Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653378
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 03/10] x86/hyper-v: make hv_do_hypercall() inline |
| Date | 2017-05-30 18:40 +0200 |
| Message-ID | <tMSlA-1h4-27@gated-at.bofh.it> (permalink) |
| References | <tMNFf-6JG-3@gated-at.bofh.it> <tMNFf-6JG-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, May 30, 2017 at 2:34 PM, Vitaly Kuznetsov <vkuznets@redhat.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@redhat.com>
> Acked-by: K. Y. Srinivasan <kys@microsoft.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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v5 03/10] x86/hyper-v: make hv_do_hypercall() inline Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-05-30 13:40 +0200 Re: [PATCH v5 03/10] x86/hyper-v: make hv_do_hypercall() inline Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-30 18:40 +0200
csiph-web