* [Qemu-devel] [PATCH v2] Work around misreported kvm cpuid features
@ 2009-05-10 13:22 Avi Kivity
0 siblings, 0 replies; only message in thread
From: Avi Kivity @ 2009-05-10 13:22 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm
kvm misreports MCA, MCE, MTRR, and PAT as unsupported. This causes Vista to
fail. Since QEMU does not support any version of kvm that does not actually
support these features, it is safe to enable them unconditionally.
These features are needed by Vista x64 to boot.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
Changes from v1:
- use CPUID_* instead of open coding constants
target-i386/kvm.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index fe67eed..86da72d 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -88,6 +88,10 @@ 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 == 1) {
+ /* kvm misreports the following features: */
+ ret |= CPUID_MTRR | CPUID_PAT | CPUID_MCA | CPUID_MCE;
+ }
if (function == 0x80000001) {
/* On Intel, kvm returns cpuid according to the Intel spec,
* so add missing bits according to the AMD spec:
--
1.6.0.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-10 13:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-10 13:22 [Qemu-devel] [PATCH v2] Work around misreported kvm cpuid features Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).