lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 May 2017 19:29:46 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>
Cc:     "x86@...nel.org" <x86@...nel.org>, devel@...uxdriverproject.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Jork Loeser <Jork.Loeser@...rosoft.com>,
        Simon Xiao <sixiao@...rosoft.com>,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v5 03/10] x86/hyper-v: make hv_do_hypercall() inline

On Tue, May 30, 2017 at 2:34 PM, Vitaly Kuznetsov <vkuznets@...hat.com> wrote:
> We have only three call sites for hv_do_hypercall() and we're going to
> change HVCALL_SIGNAL_EVENT to doing fast hypercall so we can inline this
> function for optimization.
>
> Hyper-V top level functional specification states that r9-r11 registers
> and flags may be clobbered by the hypervisor during hypercall and with
> inlining this is somewhat important, add the clobbers.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> Acked-by: K. Y. Srinivasan <kys@...rosoft.com>

>  #if IS_ENABLED(CONFIG_HYPERV)
>  extern struct clocksource *hyperv_cs;
> +extern void *hv_hypercall_pg;
> +
> +static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
> +{

> +       u64 input_address = (input) ? virt_to_phys(input) : 0;
> +       u64 output_address = (output) ? virt_to_phys(output) : 0;

Yes, I see this in original code, but first pairs of parens are
redundant (it's not a macro anyway).

> +#ifdef CONFIG_X86_64
> +

Swap those lines.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ