From patchwork Sun Apr 11 20:30:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 91927 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3BKXn1U023582 for ; Sun, 11 Apr 2010 20:33:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878Ab0DKUdr (ORCPT ); Sun, 11 Apr 2010 16:33:47 -0400 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:7061 "EHLO TX2EHSOBE002.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752388Ab0DKUdq (ORCPT ); Sun, 11 Apr 2010 16:33:46 -0400 Received: from mail137-tx2-R.bigfish.com (10.9.14.249) by TX2EHSOBE002.bigfish.com (10.9.40.22) with Microsoft SMTP Server id 8.1.240.5; Sun, 11 Apr 2010 20:33:45 +0000 Received: from mail137-tx2 (localhost.localdomain [127.0.0.1]) by mail137-tx2-R.bigfish.com (Postfix) with ESMTP id 569F011F0369; Sun, 11 Apr 2010 20:33:45 +0000 (UTC) X-SpamScore: -4 X-BigFish: VPS-4(zz936eMab9bhzz1202hzzz32i2a8h6bh467h43h64h) X-Spam-TCS-SCL: 3:0 X-FB-SS: 5, Received: from mail137-tx2 (localhost.localdomain [127.0.0.1]) by mail137-tx2 (MessageSwitch) id 127101802467429_12549; Sun, 11 Apr 2010 20:33:44 +0000 (UTC) Received: from TX2EHSMHS015.bigfish.com (unknown [10.9.14.235]) by mail137-tx2.bigfish.com (Postfix) with ESMTP id 0C7BD5C0050; Sun, 11 Apr 2010 20:33:44 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by TX2EHSMHS015.bigfish.com (10.9.99.115) with Microsoft SMTP Server (TLS) id 14.0.482.44; Sun, 11 Apr 2010 20:33:44 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o3BKU5XQ015990; Sun, 11 Apr 2010 15:30:08 -0500 X-WSS-ID: 0L0QBRZ-02-1EU-02 X-M-MSG: Received: from sausexhtp02.amd.com (sausexhtp02.amd.com [163.181.3.152]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 27B02C871F; Sun, 11 Apr 2010 15:33:34 -0500 (CDT) Received: from storexhtp02.amd.com (172.24.4.4) by sausexhtp02.amd.com (163.181.3.152) with Microsoft SMTP Server (TLS) id 8.2.234.1; Sun, 11 Apr 2010 15:33:39 -0500 Received: from storexmb1.amd.com (10.1.1.14) by storexhtp02.amd.com (172.24.4.4) with Microsoft SMTP Server id 8.2.234.1; Sun, 11 Apr 2010 15:33:39 -0500 Received: from sausexmb1.amd.com ([163.181.3.156]) by storexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 11 Apr 2010 16:33:38 -0400 Received: from seurexmb1.amd.com ([165.204.9.130]) by sausexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 11 Apr 2010 15:33:37 -0500 Received: from gwo.osrc.amd.com ([165.204.16.204]) by seurexmb1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 11 Apr 2010 22:33:35 +0200 Received: from localhost.localdomain (tronje.osrc.amd.com [165.204.15.48]) by gwo.osrc.amd.com (Postfix) with ESMTP id 8782A49C131; Sun, 11 Apr 2010 21:33:35 +0100 (BST) From: Andre Przywara To: avi@redhat.com CC: kvm@vger.kernel.org, Andre Przywara Subject: [PATCH] [qemu-kvm] fix CPUID vendor override Date: Sun, 11 Apr 2010 22:30:30 +0200 Message-ID: <1271017830-9252-1-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.4 X-OriginalArrivalTime: 11 Apr 2010 20:33:35.0762 (UTC) FILETIME=[4291FF20:01CAD9B6] MIME-Version: 1.0 X-Reverse-DNS: unknown Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 11 Apr 2010 20:33:49 +0000 (UTC) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index aaac0a7..eebf038 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -785,7 +785,7 @@ int cpu_x86_register (CPUX86State *env, const char *cpu_model) env->cpuid_vendor2 = CPUID_VENDOR_INTEL_2; env->cpuid_vendor3 = CPUID_VENDOR_INTEL_3; } - env->cpuid_vendor_override = def->vendor_override || kvm_enabled(); + env->cpuid_vendor_override = def->vendor_override; env->cpuid_level = def->level; if (def->family > 0x0f) env->cpuid_version = 0xf00 | ((def->family - 0x0f) << 20); @@ -962,7 +962,7 @@ static void get_cpuid_vendor(CPUX86State *env, uint32_t *ebx, * this if you want to use KVM's sysenter/syscall emulation * in compatibility mode and when doing cross vendor migration */ - if (kvm_enabled() && env->cpuid_vendor_override) { + if (kvm_enabled() && ! env->cpuid_vendor_override) { host_cpuid(0, 0, NULL, ebx, ecx, edx); } }