From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] fix 80000001.EDX supported bit filtering Date: Tue, 11 May 2010 17:07:58 -0300 Message-ID: <20100511200758.GI9712@amt.cnet> References: <20100511064125.GE2504@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56563 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757886Ab0EKUr4 (ORCPT ); Tue, 11 May 2010 16:47:56 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4BKluLt019386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 May 2010 16:47:56 -0400 Content-Disposition: inline In-Reply-To: <20100511064125.GE2504@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 11, 2010 at 09:41:25AM +0300, Gleb Natapov wrote: > On AMD some bits from 1.EDX are reported in 80000001.EDX. The mask used > to copy bits from 1.EDX to 80000001.EDX is incorrect resulting in > unsupported features passed into a guest. > > Signed-off-by: Gleb Natapov > diff --git a/target-i386/kvm.c b/target-i386/kvm.c > index 76c1adb..6463390 100644 > --- a/target-i386/kvm.c > +++ b/target-i386/kvm.c > @@ -111,7 +111,7 @@ uint32_t kvm_arch_get_supported_cpuid(CPUState *env, uint32_t function, int reg) > * so add missing bits according to the AMD spec: > */ > cpuid_1_edx = kvm_arch_get_supported_cpuid(env, 1, R_EDX); > - ret |= cpuid_1_edx & 0xdfeff7ff; > + ret |= cpuid_1_edx & 0x183f7ff; > break; > } > break; Applied to uq/master, thanks.