qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes.


From: Gerd Hoffmann
Subject: [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes.
Date: Fri, 07 Nov 2008 10:44:14 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

  Hi,

$subject says all, patch attached.

please apply,
  Gerd
>From e95b11a187d6ca344b544a8aef7910c8cbacf297 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <address@hidden>
Date: Fri, 7 Nov 2008 09:35:58 +0100
Subject: [PATCH] kvm: handle cpuid 0x40000000


Signed-off-by: Gerd Hoffmann <address@hidden>
---
 target-i386/kvm.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index f22f30a..1f37a52 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -58,6 +58,20 @@ int kvm_arch_init_vcpu(CPUState *env)
         c->edx = edx;
     }
 
+    cpu_x86_cpuid(env, 0x40000000, &eax, &ebx, &ecx, &edx);
+    limit = eax;
+
+    for (i = 0x40000000; i <= limit; i++) {
+        struct kvm_cpuid_entry *c = &cpuid_data.entries[cpuid_i++];
+
+        cpu_x86_cpuid(env, i, &eax, &ebx, &ecx, &edx);
+        c->function = i;
+        c->eax = eax;
+        c->ebx = ebx;
+        c->ecx = ecx;
+        c->edx = edx;
+    }
+
     cpu_x86_cpuid(env, 0x80000000, &eax, &ebx, &ecx, &edx);
     limit = eax;
 
-- 
1.5.6.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]