summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/governed_features.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2023-08-15 13:36:47 -0700
committerSean Christopherson <seanjc@google.com>2023-08-17 11:43:28 -0700
commit4365a45571c791a2fbeb81cf27738960c5456f57 (patch)
tree8963d912fde7ac18ed978010c41cd4a934f1ebae /arch/x86/kvm/governed_features.h
parent7a6a6a3bf5d8c32a91d8fabb0e2d31f3bd23a412 (diff)
KVM: nSVM: Use KVM-governed feature framework to track "TSC scaling enabled"
Track "TSC scaling exposed to L1" via a governed feature flag instead of using a dedicated bit/flag in vcpu_svm. Note, this fixes a benign bug where KVM would mark TSC scaling as exposed to L1 even if overall nested SVM supported is disabled, i.e. KVM would let L1 write MSR_AMD64_TSC_RATIO even when KVM didn't advertise TSCRATEMSR support to userspace. Reviewed-by: Yuan Yao <yuan.yao@intel.com> Link: https://lore.kernel.org/r/20230815203653.519297-10-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/governed_features.h')
-rw-r--r--arch/x86/kvm/governed_features.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/governed_features.h b/arch/x86/kvm/governed_features.h
index 722b66af412c..32c0469cf952 100644
--- a/arch/x86/kvm/governed_features.h
+++ b/arch/x86/kvm/governed_features.h
@@ -9,6 +9,7 @@ KVM_GOVERNED_X86_FEATURE(GBPAGES)
KVM_GOVERNED_X86_FEATURE(XSAVES)
KVM_GOVERNED_X86_FEATURE(VMX)
KVM_GOVERNED_X86_FEATURE(NRIPS)
+KVM_GOVERNED_X86_FEATURE(TSCRATEMSR)
#undef KVM_GOVERNED_X86_FEATURE
#undef KVM_GOVERNED_FEATURE