Re: [PATCH v4 03/10] x86/hyper-v: make hv_do_hypercall() inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 24, 2017 at 3:03 PM, Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> 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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux