Messages in this thread | | | From | Vitaly Kuznetsov <> | Subject | Re: [PATCH] KVM: x86: Inject #UD on "unsupported" hypercall if patching fails | Date | Mon, 13 Dec 2021 17:53:04 +0100 |
| |
Sean Christopherson <seanjc@google.com> writes:
> Ideally, KVM wouldn't patch at all; it's the guest's responsibility to > identify and use the correct hypercall instruction (VMCALL vs. VMMCALL). > Sadly, older Linux kernels prior to commit c1118b3602c2 ("x86: kvm: use > alternatives for VMCALL vs. VMMCALL if kernel text is read-only") do the > wrong thing and blindly use VMCALL, i.e. removing the patching would > break running VMs with older kernels. >
FWIW, we also use hypercall patching for Hyper-V emulation (when HV_X64_MSR_HYPERCALL is written) and this complies with TLFS, we can't get rid of this. It's a different 'patching' though...
-- Vitaly
| |