* [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes.
@ 2008-11-07 9:44 Gerd Hoffmann
2008-11-11 21:03 ` Anthony Liguori
0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2008-11-07 9:44 UTC (permalink / raw)
To: qemu-devel
[-- 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes.
2008-11-07 9:44 [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes Gerd Hoffmann
@ 2008-11-11 21:03 ` Anthony Liguori
2008-11-11 21:30 ` Gerd Hoffmann
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2008-11-11 21:03 UTC (permalink / raw)
To: qemu-devel
Gerd Hoffmann wrote:
> Hi,
>
> $subject says all, patch attached.
>
It really doesn't :-)
0x4000xxxx are the virtualization leaves, that we don't set so there is
no functional change from this patch. The KVM PV ABI doesn't use eax as
the max CPUID leaf of 0x40000000 so that's at least one example of them
not behaving like this.
So can you be a lot more specific about how you intend on using these
leaves?
Regards,
Anthony Liguori
> please apply,
> Gerd
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes.
2008-11-11 21:03 ` Anthony Liguori
@ 2008-11-11 21:30 ` Gerd Hoffmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2008-11-11 21:30 UTC (permalink / raw)
To: qemu-devel
Anthony Liguori wrote:
> Gerd Hoffmann wrote:
>> Hi,
>>
>> $subject says all, patch attached.
>>
>
> It really doesn't :-)
>
> 0x4000xxxx are the virtualization leaves, that we don't set so there is
> no functional change from this patch.
Not yet. For now it hasn't any effect. I can keep it in my patch queue
until I submit the patches depending on that one. But I expect more
users that xenner, so I thought it might be useful for others too and
submitted it right away ...
> The KVM PV ABI doesn't use eax as
> the max CPUID leaf of 0x40000000 so that's at least one example of them
> not behaving like this.
Oops. I think we should fix it then to follow the usual eax convention.
Xenner (standalone version, not qemu-integrated) actually does that and
sets eax to KVM_CPUID_FEATURES.
> So can you be a lot more specific about how you intend on using these
> leaves?
qemu-integrated xenner can handle full virtualized guests with xen pv
drivers installed. Must provide xen virt cpuid leaves then.
cheers,
Gerd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-11 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-07 9:44 [Qemu-devel] [patch] kvm: also fill 0x40000000 (vmm) cpuid leafes Gerd Hoffmann
2008-11-11 21:03 ` Anthony Liguori
2008-11-11 21:30 ` Gerd Hoffmann
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).