summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-03-05 16:11:56 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-16 17:58:45 +0100
commit408e9a318f57ba8be82ba01e98cc271b97392187 (patch)
tree1730689c6284511cbbe6e5f8545eb3f46114b5c6 /arch/x86/kvm/svm.c
parent257038745cae1fdaa3948013a22eba3b1d610174 (diff)
downloadlinux-408e9a318f57ba8be82ba01e98cc271b97392187.tar.bz2
KVM: CPUID: add support for supervisor states
Current CPUID 0xd enumeration code does not support supervisor states, because KVM only supports setting IA32_XSS to zero. Change it instead to use a new variable supported_xss, to be set from the hardware_setup callback which is in charge of CPU capabilities. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index c6e9910d1149..4dca3579e740 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1371,6 +1371,8 @@ static __init void svm_set_cpu_caps(void)
{
kvm_set_cpu_caps();
+ supported_xss = 0;
+
/* CPUID 0x80000001 and 0x8000000A (SVM features) */
if (nested) {
kvm_cpu_cap_set(X86_FEATURE_SVM);