summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-05-11 09:41:25 +0300
committerMarcelo Tosatti <mtosatti@redhat.com>2010-05-11 17:07:36 -0300
commitc1667e409764bb43a8196e40d01c409326d54a96 (patch)
tree830c8f5e7742a7f1f8d9cab7b3ee87f52f83fe3c /target-i386
parent4513d9232badcc5039d69dae946054ba2682c258 (diff)
kvm: fix 80000001.EDX supported bit filtering
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>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/kvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 676aa6079..d6b12edab 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -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;