]> 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>
Thu, 29 Dec 2022 20:33:12 +0000 (15:33 -0500)
commit80edc49f6a7544fa0fac122e177ffb63af60651e
treec058b9aa486d8ee2c8db5f95141ebe68cb140489
parentc128d3fd389b583ce6b28dbaa0e924de5671b961
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