KVM: Fix cpuid feature misreporting
authorAvi Kivity <avi@redhat.com>
Sun, 10 May 2009 08:41:39 +0000 (11:41 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:52 +0000 (11:48 +0300)
MTRR, PAT, MCE, and MCA are all supported (to some extent) but not reported.
Vista requires these features, so if userspace relies on kernel cpuid
reporting, it loses support for Vista.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c

index a0faa4882f846ddd77e160ac2770d845e76b6566..da3e65bfc6ee9e2919661a5e7c86ace1000b969c 100644 (file)
@@ -1254,9 +1254,12 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
                bit(X86_FEATURE_VME) | bit(X86_FEATURE_DE) |
                bit(X86_FEATURE_PSE) | bit(X86_FEATURE_TSC) |
                bit(X86_FEATURE_MSR) | bit(X86_FEATURE_PAE) |
+               bit(X86_FEATURE_MCE) |
                bit(X86_FEATURE_CX8) | bit(X86_FEATURE_APIC) |
-               bit(X86_FEATURE_SEP) | bit(X86_FEATURE_PGE) |
-               bit(X86_FEATURE_CMOV) | bit(X86_FEATURE_PSE36) |
+               bit(X86_FEATURE_SEP) | bit(X86_FEATURE_MTRR) |
+               bit(X86_FEATURE_PGE) | bit(X86_FEATURE_MCA) |
+               bit(X86_FEATURE_CMOV) | bit(X86_FEATURE_PAT) |
+               bit(X86_FEATURE_PSE36) |
                bit(X86_FEATURE_CLFLSH) | bit(X86_FEATURE_MMX) |
                bit(X86_FEATURE_FXSR) | bit(X86_FEATURE_XMM) |
                bit(X86_FEATURE_XMM2) | bit(X86_FEATURE_SELFSNOOP);