]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86: Do CPU compatibility checks in x86 code
authorSean Christopherson <seanjc@google.com>
Wed, 30 Nov 2022 23:09:15 +0000 (23:09 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Jan 2023 15:47:23 +0000 (10:47 -0500)
commitc017865c7cbc0d393dae0789aceee89a9f34517e
tree3425ca16f8e1cada6e973ca549462ed785a7836a
parentebb10d254041ae0ade82268cd72bf403261362c6
KVM: x86: Do CPU compatibility checks in x86 code

Move the CPU compatibility checks to pure x86 code, i.e. drop x86's use
of the common kvm_x86_check_cpu_compat() arch hook.  x86 is the only
architecture that "needs" to do per-CPU compatibility checks, moving
the logic to x86 will allow dropping the common code, and will also
give x86 more control over when/how the compatibility checks are
performed, e.g. TDX will need to enable hardware (do VMXON) in order to
perform compatibility checks.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Message-Id: <20221130230934.1014142-32-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c