kvm: also fill 0x40000000 (vmm) cpuid leafes.
PATCH 1/1 kvm: also fill 0x40000000 (vmm) cpuid leafes.
Hi,
$subject says all, patch attached.
please apply,
Gerd
Quoted 1 line
From
e95b11a187d6ca344b544a8aef7910c8cbacf297Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Fri, 7 Nov 2008 09:35:58 +0100
Subject: [PATCH] kvm: handle cpuid 0x40000000
--- target-i386/kvm.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
target-i386/kvm.c +14 -0
@@ -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;
Signature · 1 line
1.5.6.5
Quoted 4 lines · Gerd Hoffmann
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
Quoted 3 lines
please apply,
Gerd
Quoted 10 lines · Anthony Liguori
Quoted 4 lines · Gerd Hoffmann
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 ...
Quoted 3 lines
The KVM PV ABI doesn't use eax as
the max CPUID leaf of0x40000000so 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.
Quoted 2 lines
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