]> git.proxmox.com Git - mirror_qemu.git/commitdiff
kvm: fix 80000001.EDX supported bit filtering
authorGleb Natapov <gleb@redhat.com>
Tue, 11 May 2010 06:41:25 +0000 (09:41 +0300)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 11 May 2010 20:07:36 +0000 (17:07 -0300)
On AMD some bits from 1.EDX are reported in 80000001.EDX. The mask used
to copy bits from 1.EDX to 80000001.EDX is incorrect resulting in
unsupported features passed into a guest.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
target-i386/kvm.c

index 676aa60791f0ba8a689354882f511147e5a9ec13..d6b12edab7f2c555c951cdda8b7c1e99a72d5808 100644 (file)
@@ -111,7 +111,7 @@ uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function, int reg)
                      * so add missing bits according to the AMD spec:
                      */
                     cpuid_1_edx = kvm_arch_get_supported_cpuid(env, 1, R_EDX);
-                    ret |= cpuid_1_edx & 0xdfeff7ff;
+                    ret |= cpuid_1_edx & 0x183f7ff;
                     break;
                 }
                 break;