OSDN Git Service

KVM: x86: Do VMX/SVM support checks directly in vendor code
authorSean Christopherson <seanjc@google.com>
Wed, 30 Nov 2022 23:09:20 +0000 (23:09 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Dec 2022 20:47:42 +0000 (15:47 -0500)
commitd41931324975741e570b8deb7ea58feeabf39343
tree2b7349e64b36d80cab60f38df77025afaf341290
parent462689b37f082d06c2cf32a6e4e142182825dd70
KVM: x86: Do VMX/SVM support checks directly in vendor code

Do basic VMX/SVM support checks directly in vendor code instead of
implementing them via kvm_x86_ops hooks.  Beyond the superficial benefit
of providing common messages, which isn't even clearly a net positive
since vendor code can provide more precise/detailed messages, there's
zero advantage to bouncing through common x86 code.

Consolidating the checks will also simplify performing the checks
across all CPUs (in a future patch).

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221130230934.1014142-37-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c