diff options
author | Eduardo Habkost | 2012-10-04 22:49:03 +0200 |
---|---|---|
committer | Marcelo Tosatti | 2012-10-31 02:39:48 +0100 |
commit | ea85c9e45655c5e3a665a5295e5338b995e4a29c (patch) | |
tree | aa6e4b0aefcd98dff1352fca63ec9122f43f6518 /target-i386/kvm.c | |
parent | i386: kvm: x2apic is not supported without in-kernel irqchip (diff) | |
download | qemu-ea85c9e45655c5e3a665a5295e5338b995e4a29c.tar.gz qemu-ea85c9e45655c5e3a665a5295e5338b995e4a29c.tar.xz qemu-ea85c9e45655c5e3a665a5295e5338b995e4a29c.zip |
i386: kvm: mask cpuid_kvm_features earlier
Instead of masking the KVM feature bits very late (while building the
KVM_SET_CPUID2 data), mask it out on env->cpuid_kvm_features, at the
same point where the other feature words are masked out.
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 4e96b046da..8eb61a02e7 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -428,6 +428,9 @@ int kvm_arch_init_vcpu(CPUX86State *env) env->cpuid_svm_features &= kvm_arch_get_supported_cpuid(s, 0x8000000A, 0, R_EDX); + env->cpuid_kvm_features &= + kvm_arch_get_supported_cpuid(s, KVM_CPUID_FEATURES, 0, R_EAX); + cpuid_i = 0; /* Paravirtualization CPUIDs */ @@ -448,8 +451,7 @@ int kvm_arch_init_vcpu(CPUX86State *env) c = &cpuid_data.entries[cpuid_i++]; memset(c, 0, sizeof(*c)); c->function = KVM_CPUID_FEATURES; - c->eax = env->cpuid_kvm_features & - kvm_arch_get_supported_cpuid(s, KVM_CPUID_FEATURES, 0, R_EAX); + c->eax = env->cpuid_kvm_features; if (hyperv_enabled()) { memcpy(signature, "Hv#1\0\0\0\0\0\0\0\0", 12); |