From patchwork Wed May 12 21:25:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 52426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E6815B7E0D for ; Thu, 13 May 2010 14:01:52 +1000 (EST) Received: from localhost ([127.0.0.1]:59730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCPaD-0007I7-GL for incoming@patchwork.ozlabs.org; Wed, 12 May 2010 23:59:37 -0400 Received: from [140.186.70.92] (port=36939 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCP0c-0003XR-N6 for qemu-devel@nongnu.org; Wed, 12 May 2010 23:22:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCKf0-0005DF-8S for qemu-devel@nongnu.org; Wed, 12 May 2010 18:44:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18924) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCJSO-0000uE-HE for qemu-devel@nongnu.org; Wed, 12 May 2010 17:27:09 -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 o4CLR6Ao012621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 May 2010 17:27:06 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4CLR5Pu020969; Wed, 12 May 2010 17:27:06 -0400 Received: from amt.cnet (vpn2-10-158.ams2.redhat.com [10.36.10.158]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o4CLR3VW021870; Wed, 12 May 2010 17:27:04 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 9D01B656081; Wed, 12 May 2010 18:26:32 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o4CLQSne028663; Wed, 12 May 2010 18:26:28 -0300 From: Marcelo Tosatti To: Anthony Liguori Date: Wed, 12 May 2010 18:25:06 -0300 Message-Id: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gleb Natapov , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 12/12] kvm: fix 80000001.EDX supported bit filtering X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gleb Natapov 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 Signed-off-by: Marcelo Tosatti --- 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 676aa60..d6b12ed 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;