aboutsummaryrefslogtreecommitdiff
path: root/target-i386/kvm.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2012-10-04 17:49:04 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2012-10-30 23:39:49 -0200
commitc9da8382c1432fbafb8705e7faecdf783c0b1821 (patch)
treee56f0ef5899a21f11a6c3b0129b39caf11f05f3a /target-i386/kvm.c
parentea85c9e45655c5e3a665a5295e5338b995e4a29c (diff)
i386: kvm: mask cpuid_ext4_features bits earlier
This way all the filtering by GET_SUPPORTED_CPUID is being done at the same place in the code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'target-i386/kvm.c')
-rw-r--r--target-i386/kvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 8eb61a02e7..be37a1f7ba 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -431,6 +431,9 @@ int kvm_arch_init_vcpu(CPUX86State *env)
env->cpuid_kvm_features &=
kvm_arch_get_supported_cpuid(s, KVM_CPUID_FEATURES, 0, R_EAX);
+ env->cpuid_ext4_features &= kvm_arch_get_supported_cpuid(s, 0xC0000001,
+ 0, R_EDX);
+
cpuid_i = 0;
/* Paravirtualization CPUIDs */
@@ -572,8 +575,6 @@ int kvm_arch_init_vcpu(CPUX86State *env)
/* Call Centaur's CPUID instructions they are supported. */
if (env->cpuid_xlevel2 > 0) {
- env->cpuid_ext4_features &=
- kvm_arch_get_supported_cpuid(s, 0xC0000001, 0, R_EDX);
cpu_x86_cpuid(env, 0xC0000000, 0, &limit, &unused, &unused, &unused);
for (i = 0xC0000000; i <= limit; i++) {