summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-05-02 16:55:56 +0200
committerAvi Kivity <avi@redhat.com>2012-05-06 14:51:56 +0200
commit57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190 (patch)
tree0ec4365a32d290c7e80d02bb67f7f28c188b39a2 /arch/x86/kvm
parentKVM: s390: implement KVM_CAP_NR/MAX_VCPUS (diff)
downloadlinux-57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190.tar.xz
linux-57c22e5f35aa4b9b2fe11f73f3e62bbf9ef36190.zip
KVM: fix cpuid eax for KVM leaf
cpuid eax should return the max leaf so that guests can find out the valid range. This matches Xen et al. Update documentation to match. Tested with -cpu host. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/cpuid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c2134b881033..7df1c6d839fb 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -398,7 +398,7 @@ static int do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
case KVM_CPUID_SIGNATURE: {
char signature[12] = "KVMKVMKVM\0\0";
u32 *sigptr = (u32 *)signature;
- entry->eax = 0;
+ entry->eax = KVM_CPUID_FEATURES;
entry->ebx = sigptr[0];
entry->ecx = sigptr[1];
entry->edx = sigptr[2];