From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000 Date: Wed, 04 Jun 2014 09:09:46 +0200 Message-ID: <538EC63A.80405@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: Jidong Xiao , qemu-devel@nongnu.org, KVM Return-path: Received: from mail-qg0-f50.google.com ([209.85.192.50]:52611 "EHLO mail-qg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755226AbaFDHJv (ORCPT ); Wed, 4 Jun 2014 03:09:51 -0400 Received: by mail-qg0-f50.google.com with SMTP id z60so14735206qgd.23 for ; Wed, 04 Jun 2014 00:09:50 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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