From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: [PATCH] qemu: fix cpuid eax for kvm cpu Date: Mon, 30 Apr 2012 17:42:15 +0300 Message-ID: <20120430144214.GA10237@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davej@redhat.com To: Avi Kivity , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:22316 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756084Ab2D3OmN (ORCPT ); Mon, 30 Apr 2012 10:42:13 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: cpuid eax should return the max leaf so that guests can find out the valid range. This matches Xen et al. Tested using -cpu kvm64. Signed-off-by: Michael S. Tsirkin --- target-i386/kvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index e74a9e4..c097248 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -379,7 +379,7 @@ int kvm_arch_init_vcpu(CPUX86State *env) c->function = KVM_CPUID_SIGNATURE; if (!hyperv_enabled()) { memcpy(signature, "KVMKVMKVM\0\0\0", 12); - c->eax = 0; + c->eax = KVM_CPUID_FEATURES; } else { memcpy(signature, "Microsoft Hv", 12); c->eax = HYPERV_CPUID_MIN; -- MST