KVM: x86: Use KVM-governed feature framework to track "XSAVES enabled"
authorSean Christopherson <seanjc@google.com>
Tue, 15 Aug 2023 20:36:44 +0000 (13:36 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Aug 2023 18:38:28 +0000 (11:38 -0700)
commitfe60e8f65f79138ffdcc8a9155036cc35f6079ac
treedb3b1ab313cfbcc994c73407f198d1eae063cdae
parent662f6815786efc9a60ee374142b3fd70db4637be
KVM: x86: Use KVM-governed feature framework to track "XSAVES enabled"

Use the governed feature framework to track if XSAVES is "enabled", i.e.
if XSAVES can be used by the guest.  Add a comment in the SVM code to
explain the very unintuitive logic of deliberately NOT checking if XSAVES
is enumerated in the guest CPUID model.

No functional change intended.

Reviewed-by: Yuan Yao <yuan.yao@intel.com>
Link: https://lore.kernel.org/r/20230815203653.519297-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/governed_features.h
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c