[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] KVM: x86: Fix up misreported CPU features
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 3/6] KVM: x86: Fix up misreported CPU features |
Date: |
Wed, 3 Feb 2010 21:55:48 -0200 |
From: Jan Kiszka <address@hidden>
>From qemu-kvm: Kernels before 2.6.30 misreported some essential CPU
features via KVM_GET_SUPPORTED_CPUID. Fix them up.
Signed-off-by: Jan Kiszka <address@hidden>
---
target-i386/kvm.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index b457b96..0d08cd5 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;
}
--
1.6.6
- [Qemu-devel] [PATCH 0/6] [GIT PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 2/6] KVM: Request setting of nmi_pending and sipi_vector, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 4/6] KVM: Make vmport KVM-compatible, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 5/6] KVM: Move and rename regs_modified, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 3/6] KVM: x86: Fix up misreported CPU features,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 6/6] Fix incoming migration with iothread, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] [PATCH 1/6] kvm: Flush coalesced MMIO buffer periodly, Marcelo Tosatti, 2010/02/03
- [Qemu-devel] Re: [PATCH 0/6] [GIT PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/02/08