Re: [PATCH v3 7/7] x86/kvm: use Enlightened VMCS when running on Hyper-V

From: Thomas Gleixner
Date: Thu Mar 15 2018 - 15:29:10 EST


On Thu, 15 Mar 2018, Radim Krčmář wrote:
> 2018-03-15 16:19+0100, Vitaly Kuznetsov:
> > This works. But hell, this is a crude hack :-) Not sure if there's a
> > cleaner way to find what needs to be patched without something like jump
> > label table ...
>
> Yeah, I can see us accidently patching parts of other instructions. :)
>
> The target instruction address can be made into a C-accessible symbol
> with the same trick that vmx_return uses -- add a .global containing the
> address of a label (not sure if a more direct approach would work).
>
> The evil in me likes it. (The good is too lazy to add a decent patching
> infrastructure for just one user.)

Can we just use jump labels please? There is agreement that 4.17 will have
a dependency on a jump label capable compiler for x86.

Thanks,

tglx