diff options
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 4 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 36e6c88913dc..e0f4da07f987 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -3469,6 +3469,10 @@ static void svm_cpuid_update(struct kvm_vcpu *vcpu) | |||
3469 | static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) | 3469 | static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) |
3470 | { | 3470 | { |
3471 | switch (func) { | 3471 | switch (func) { |
3472 | case 0x80000001: | ||
3473 | if (nested) | ||
3474 | entry->ecx |= (1 << 2); /* Set SVM bit */ | ||
3475 | break; | ||
3472 | case 0x8000000A: | 3476 | case 0x8000000A: |
3473 | entry->eax = 1; /* SVM revision 1 */ | 3477 | entry->eax = 1; /* SVM revision 1 */ |
3474 | entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper | 3478 | entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index bbd9f4af4449..3ff0a8ff275c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2209,7 +2209,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, | |||
2209 | 0 /* Reserved, AES */ | F(XSAVE) | 0 /* OSXSAVE */ | F(AVX); | 2209 | 0 /* Reserved, AES */ | F(XSAVE) | 0 /* OSXSAVE */ | F(AVX); |
2210 | /* cpuid 0x80000001.ecx */ | 2210 | /* cpuid 0x80000001.ecx */ |
2211 | const u32 kvm_supported_word6_x86_features = | 2211 | const u32 kvm_supported_word6_x86_features = |
2212 | F(LAHF_LM) | F(CMP_LEGACY) | F(SVM) | 0 /* ExtApicSpace */ | | 2212 | F(LAHF_LM) | F(CMP_LEGACY) | 0 /*SVM*/ | 0 /* ExtApicSpace */ | |
2213 | F(CR8_LEGACY) | F(ABM) | F(SSE4A) | F(MISALIGNSSE) | | 2213 | F(CR8_LEGACY) | F(ABM) | F(SSE4A) | F(MISALIGNSSE) | |
2214 | F(3DNOWPREFETCH) | 0 /* OSVW */ | 0 /* IBS */ | F(SSE5) | | 2214 | F(3DNOWPREFETCH) | 0 /* OSVW */ | 0 /* IBS */ | F(SSE5) | |
2215 | 0 /* SKINIT */ | 0 /* WDT */; | 2215 | 0 /* SKINIT */ | 0 /* WDT */; |