kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm: fix cpuid eax
@ 2012-04-30 14:39 Michael S. Tsirkin
  2012-04-30 18:23 ` H. Peter Anvin
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2012-04-30 14:39 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, kvm, linux-kernel
  Cc: davej

cpuid eax should return the max leaf so that
guests can find out the valid range.
This matches Xen et al.

Tested using -cpu host.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 arch/x86/kvm/cpuid.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 7d00d2d..bda4877 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -397,7 +397,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];
-- 
MST

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-07  8:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30 14:39 [PATCH] kvm: fix cpuid eax Michael S. Tsirkin
2012-04-30 18:23 ` H. Peter Anvin
2012-04-30 20:37 ` Anthony Liguori
2012-04-30 20:40   ` H. Peter Anvin
2012-04-30 20:41   ` Michael S. Tsirkin
2012-05-01 12:53   ` Avi Kivity
2012-05-01 12:56     ` Avi Kivity
2012-05-07  8:26       ` Ingo Molnar
2012-05-01  7:24 ` Gleb Natapov
2012-05-01 12:54 ` Avi Kivity

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).