KVM: SVM: Check for SVM support in CPU compatibility checks
authorSean Christopherson <seanjc@google.com>
Wed, 30 Nov 2022 23:09:22 +0000 (23:09 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Dec 2022 20:47:42 +0000 (15:47 -0500)
commit325fc9579c2e415e8ae3d1ab56a5157751157869
treebb87e48734d313629595903bd0dfcaa78183527f
parent8504ef2139e2164aced4335c23ef3f919db55281
KVM: SVM: Check for SVM support in CPU compatibility checks

Check that SVM is supported and enabled in the processor compatibility
checks.  SVM already checks for support during hardware enabling,
i.e. this doesn't really add new functionality.  The net effect is that
KVM will refuse to load if a CPU doesn't have SVM fully enabled, as
opposed to failing KVM_CREATE_VM.

Opportunistically move svm_check_processor_compat() up in svm.c so that
it can be invoked during hardware enabling in a future patch.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221130230934.1014142-39-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c