qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes.
Date: Fri, 07 Nov 2008 10:44:14 +0100	[thread overview]
Message-ID: <49140DEE.7070000@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

  Hi,

$subject says all, patch attached.

please apply,
  Gerd

[-- Attachment #2: 0044-kvm-handle-cpuid-0x40000000.patch --]
[-- Type: text/plain, Size: 1035 bytes --]

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


Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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	other threads:[~2008-11-07  9:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07  9:44 Gerd Hoffmann [this message]
2008-11-11 21:03 ` [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes Anthony Liguori
2008-11-11 21:30   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49140DEE.7070000@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).