From patchwork Wed Jun 17 17:56:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 30945 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5HHviG5015963 for ; Wed, 17 Jun 2009 17:57:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755462AbZFQR5D (ORCPT ); Wed, 17 Jun 2009 13:57:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755404AbZFQR5D (ORCPT ); Wed, 17 Jun 2009 13:57:03 -0400 Received: from sg2ehsobe004.messaging.microsoft.com ([207.46.51.78]:10581 "EHLO SG2EHSOBE004.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754629AbZFQR5A (ORCPT ); Wed, 17 Jun 2009 13:57:00 -0400 Received: from mail83-sin-R.bigfish.com (10.210.100.253) by SG2EHSOBE004.bigfish.com (10.210.112.24) with Microsoft SMTP Server id 8.1.340.0; Wed, 17 Jun 2009 17:57:02 +0000 Received: from mail83-sin (localhost.localdomain [127.0.0.1]) by mail83-sin-R.bigfish.com (Postfix) with ESMTP id 0C2CD7E00A0; Wed, 17 Jun 2009 17:57:02 +0000 (UTC) X-SpamScore: 3 X-BigFish: VPS3(zzzz1202hzzz32i17ch43j64h) X-Spam-TCS-SCL: 3:0 Received: by mail83-sin (MessageSwitch) id 124526142199649_20700; Wed, 17 Jun 2009 17:57:01 +0000 (UCT) Received: from ausb3extmailp01.amd.com (unknown [163.181.251.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail83-sin.bigfish.com (Postfix) with ESMTP id 53E5E72004F; Wed, 17 Jun 2009 17:57:00 +0000 (UTC) Received: from ausb3twp01.amd.com ([163.181.250.37]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id n5HHunKn027099; Wed, 17 Jun 2009 12:56:52 -0500 X-WSS-ID: 0KLE9UK-01-5FR-01 Received: from sausexbh1.amd.com (sausexbh1.amd.com [163.181.22.101]) by ausb3twp01.amd.com (Tumbleweed MailGate 3.5.1) with ESMTP id 26A121943CE; Wed, 17 Jun 2009 12:56:44 -0500 (CDT) Received: from sausexmb2.amd.com ([163.181.3.157]) by sausexbh1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Jun 2009 12:56:53 -0500 Received: from SDRSEXMB1.amd.com ([172.20.3.116]) by sausexmb2.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Jun 2009 12:56:53 -0500 Received: from seurexmb1.amd.com ([165.204.9.130]) by SDRSEXMB1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Jun 2009 19:56:50 +0200 Received: from lemmy.amd.com ([165.204.15.93]) by seurexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Jun 2009 19:56:49 +0200 Received: by lemmy.amd.com (Postfix, from userid 41430) id 18D5CC9DF4; Wed, 17 Jun 2009 19:56:49 +0200 (CEST) From: Joerg Roedel To: Avi Kivity CC: kvm@vger.kernel.org, Joerg Roedel Subject: [PATCH 1/3] qemu-kvm: fix cpuid bitmask in kvm_setup_cpuid() Date: Wed, 17 Jun 2009 19:56:40 +0200 Message-ID: <1245261402-26440-2-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.6.3.1 In-Reply-To: <1245261402-26440-1-git-send-email-joerg.roedel@amd.com> References: <1245261402-26440-1-git-send-email-joerg.roedel@amd.com> X-OriginalArrivalTime: 17 Jun 2009 17:56:49.0352 (UTC) FILETIME=[FCD03C80:01C9EF74] MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Fix the bitmask in kvm_setup_cpuid() to a value which represents only the common bits between cpuid function 0x00000001 and 0x80000001. Signed-off-by: Joerg Roedel --- target-i386/libkvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/libkvm.c b/target-i386/libkvm.c index 0f4e009..6391caf 100644 --- a/target-i386/libkvm.c +++ b/target-i386/libkvm.c @@ -644,7 +644,7 @@ uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, int reg) */ if (function == 0x80000001) { cpuid_1_edx = kvm_get_supported_cpuid(kvm, 1, R_EDX); - ret |= cpuid_1_edx & 0xdfeff7ff; + ret |= cpuid_1_edx & 0x0183f3ff; } break; }