]> git.itanic.dy.fi Git - linux-stable/commit
KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-V
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 4 Nov 2022 14:47:08 +0000 (15:47 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Dec 2022 11:02:56 +0000 (06:02 -0500)
commit1567037614af5f078c2361ca21d9b1a1cd42b8aa
tree3b7f7a6ef491091e24cfed40bc8b9b60b562d8fa
parent746b1833919eed3dd92c82466316471dfaba319e
KVM: VMX: Resurrect vmcs_conf sanitization for KVM-on-Hyper-V

Commit 9bcb90650e31 ("KVM: VMX: Get rid of eVMCS specific VMX controls
sanitization") dropped 'vmcs_conf' sanitization for KVM-on-Hyper-V because
there's no known Hyper-V version which would expose a feature
unsupported in eVMCS in VMX feature MSRs. This works well for all
currently existing Hyper-V version, however, future Hyper-V versions
may add features which are supported by KVM and are currently missing
in eVMCSv1 definition (e.g. APIC virtualization, PML,...). When this
happens, existing KVMs will get broken. With the inverted 'unsupported
by eVMCSv1' checks, we can resurrect vmcs_conf sanitization and make
KVM future proof.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20221104144708.435865-5-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/hyperv.c
arch/x86/kvm/vmx/hyperv.h
arch/x86/kvm/vmx/vmx.c