lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 03/10] x86/hyper-v: make hv_do_hypercall() inline
On Wed, May 24, 2017 at 3:03 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.

> + u32 control_hi = control >> 32;
> + u32 control_lo = control & 0xFFFFFFFF;
> + u32 input_address_hi = input_address >> 32;
> + u32 input_address_lo = input_address & 0xFFFFFFFF;
> + u32 output_address_hi = output_address >> 32;
> + u32 output_address_lo = output_address & 0xFFFFFFFF;

Yes, I have noticed it was in older code, but see, all conjunctions
above are redundant.

Besides that, you may consider to use upper_32_bits() / lower_32_bits() macros.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-05-27 19:47    [W:0.136 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site