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

bugzilla-daemon
2014-06-03T20:44:55Z

Alex Williamson <alex.williamson@redhat.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |alex.williamson@redhat.com

--- Comment #1 from Alex Williamson <alex.williamson@redhat.com> ---
Further up in cpuid.txt is the statement:

"This is not always guaranteed to work, since userspace can
mask-out some, or even all KVM-related cpuid features before launching
a guest."

Which is exactly what is happening here. QEMU sets eax = 0 for this leaf:

target-i386/kvm.c
memcpy(signature, "KVMKVMKVM\0\0\0", 12);
c = &cpuid_data.entries[cpuid_i++];
c->function = KVM_CPUID_SIGNATURE | kvm_base;
c->eax = 0;
c->ebx = signature[0];
c->ecx = signature[1];
c->edx = signature[2];

So I don't think there's a bug here.