[Bug 77271] CPUID Leaf 0x40000000 return 0 in eax

bugzilla-daemon
2014-06-04T00:28:18Z

--- Comment #2 from Jidong Xiao <jidong.xiao@gmail.com> ---
Oh, thanks Alex. I think you are right here, it's not a bug. But do you think
that, does it make sense to submit a patch to qemu, so as to make them
consistent between userspace qemu and the kernel side kvm? Like this:

diff --git a/qemu-2.0.0/target-i386/kvm.c.orig b/qemu-2.0.0/target-i386/kvm.c
index 4389959..b8b282d 100644
--- a/qemu-2.0.0/target-i386/kvm.c.orig
+++ b/qemu-2.0.0/target-i386/kvm.c
@@ -530,7 +530,7 @@ int kvm_arch_init_vcpu(CPUState *cs)
memcpy(signature, "KVMKVMKVM\0\0\0", 12);
c = &cpuid_data.entries[cpuid_i++];
c->function = KVM_CPUID_SIGNATURE | kvm_base;
- c->eax = 0;
+ c->eax = KVM_CPUID_FEATURES;
c->ebx = signature[0];
c->ecx = signature[1];
c->edx = signature[2];