diff options
author | Avi Kivity <avi@redhat.com> | 2009-05-10 11:32:31 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-05-10 11:35:14 +0300 |
commit | 143eb2bd043e82bcf353cf82d33c127f06411d82 (patch) | |
tree | c7d777dce37e389a5977973597f2cd624d1fae27 /kvm | |
parent | Merge branch 'master' of git://git.sv.gnu.org/qemu into master (diff) | |
download | qemu-kvm-143eb2bd043e82bcf353cf82d33c127f06411d82.tar.gz qemu-kvm-143eb2bd043e82bcf353cf82d33c127f06411d82.tar.bz2 qemu-kvm-143eb2bd043e82bcf353cf82d33c127f06411d82.zip |
Fix x86 kvm feature reporting
kvm misreports the support for MTRR, PAT, MCA, and MCE. This causes Vista x64
to fail to boot.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm')
-rw-r--r-- | kvm/libkvm/libkvm-x86.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kvm/libkvm/libkvm-x86.c b/kvm/libkvm/libkvm-x86.c index dd2b878f8..a2f63207b 100644 --- a/kvm/libkvm/libkvm-x86.c +++ b/kvm/libkvm/libkvm-x86.c @@ -627,6 +627,15 @@ uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, int reg) break; case R_EDX: ret = cpuid->entries[i].edx; + if (function == 1) { + /* kvm misreports the following features + */ + ret |= 1 << 12; /* MTRR */ + ret |= 1 << 16; /* PAT */ + ret |= 1 << 7; /* MCE */ + ret |= 1 << 14; /* MCA */ + } + /* On Intel, kvm returns cpuid according to * the Intel spec, so add missing bits * according to the AMD spec: |