diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-08 10:06:54 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-08 10:06:54 -0600 |
commit | 8217d945860c546844807e22088e8a7d97836aff (patch) | |
tree | b30fa9e9ac08830317d4314c4e11374bc286c813 /target-i386 | |
parent | 4cb26382182bf5256de1d9058739946d922e9f49 (diff) | |
parent | c5f32c99c6855d466737daf1cd262e7e92062f87 (diff) |
Merge remote branch 'qemu-kvm/uq/master' into staging-tmp
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5b093ce3b..0d08cd532 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -99,12 +99,18 @@ uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function, int reg) break; case R_EDX: ret = cpuid->entries[i].edx; - if (function == 0x80000001) { + switch (function) { + case 1: + /* KVM before 2.6.30 misreports the following features */ + ret |= CPUID_MTRR | CPUID_PAT | CPUID_MCE | CPUID_MCA; + break; + case 0x80000001: /* On Intel, kvm returns cpuid according to the Intel spec, * 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; + break; } break; } @@ -794,6 +800,9 @@ static int kvm_put_vcpu_events(CPUState *env) events.sipi_vector = env->sipi_vector; + events.flags = + KVM_VCPUEVENT_VALID_NMI_PENDING | KVM_VCPUEVENT_VALID_SIPI_VECTOR; + return kvm_vcpu_ioctl(env, KVM_SET_VCPU_EVENTS, &events); #else return 0; |