From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsGYe-0002fZ-Lh for qemu-devel@nongnu.org; Wed, 04 Jun 2014 15:09:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsGYY-0000vj-6f for qemu-devel@nongnu.org; Wed, 04 Jun 2014 15:09:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsGYX-0000vR-VC for qemu-devel@nongnu.org; Wed, 04 Jun 2014 15:09:02 -0400 From: Bandan Das References: <538EC63A.80405@redhat.com> Date: Wed, 04 Jun 2014 15:08:58 -0400 In-Reply-To: (Jidong Xiao's message of "Wed, 4 Jun 2014 03:17:56 -0400") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jidong Xiao Cc: Paolo Bonzini , qemu-devel@nongnu.org, KVM Jidong Xiao writes: > On Wed, Jun 4, 2014 at 3:09 AM, Paolo Bonzini wrote: >> Il 04/06/2014 03:10, Jidong Xiao ha scritto: >> >>> 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]; >> >> >> This should actually be "KVM_CPUID_FEATURES | kvm_base", in case Hyper-V >> leaves are available too. But it is a good catch! >> >> Paolo >> > Thanks Paolo. I have just added that and resend the patch as following: > > -Jidong > > === > Signed-off-by: Jidong Xiao Did you mean to send this as the new version of your patch ? Please send the revised version in a separate email and add "[PATCH v2]" to the subject. > --- > diff --git a/qemu-2.0.0/target-i386/kvm.c.orig b/qemu-2.0.0/target-i386/kvm.c > index 4389959..fe49a75 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 | kvm_base; Looks like this is not four spaces > c->ebx = signature[0]; > c->ecx = signature[1]; > c->edx = signature[2];