From patchwork Sun Apr 11 20:15:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 91926 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 o3BKIeP8020277 for ; Sun, 11 Apr 2010 20:18:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752520Ab0DKUSh (ORCPT ); Sun, 11 Apr 2010 16:18:37 -0400 Received: from va3ehsobe005.messaging.microsoft.com ([216.32.180.15]:5665 "EHLO VA3EHSOBE006.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752507Ab0DKUSg (ORCPT ); Sun, 11 Apr 2010 16:18:36 -0400 Received: from mail59-va3-R.bigfish.com (10.7.14.250) by VA3EHSOBE006.bigfish.com (10.7.40.26) with Microsoft SMTP Server id 8.1.240.5; Sun, 11 Apr 2010 20:18:35 +0000 Received: from mail59-va3 (localhost.localdomain [127.0.0.1]) by mail59-va3-R.bigfish.com (Postfix) with ESMTP id C7AE310502D1; Sun, 11 Apr 2010 20:18:35 +0000 (UTC) X-SpamScore: -4 X-BigFish: VPS-4(zz936eMab9bhzz1202hzzz32i2a8h467h6bh64h) X-Spam-TCS-SCL: 3:0 X-FB-SS: 5, Received: from mail59-va3 (localhost.localdomain [127.0.0.1]) by mail59-va3 (MessageSwitch) id 1271017114475105_5165; Sun, 11 Apr 2010 20:18:34 +0000 (UTC) Received: from VA3EHSMHS003.bigfish.com (unknown [10.7.14.249]) by mail59-va3.bigfish.com (Postfix) with ESMTP id 70CE7B6804E; Sun, 11 Apr 2010 20:18:34 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by VA3EHSMHS003.bigfish.com (10.7.99.13) with Microsoft SMTP Server (TLS) id 14.0.482.44; Sun, 11 Apr 2010 20:18:34 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp02.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o3BKO87h028517; Sun, 11 Apr 2010 15:24:11 -0500 X-WSS-ID: 0L0QB2N-02-16E-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 2DEABC871E; Sun, 11 Apr 2010 15:18:22 -0500 (CDT) Received: from storexhtp01.amd.com (172.24.4.3) by sausexhtp02.amd.com (163.181.3.152) with Microsoft SMTP Server (TLS) id 8.2.234.1; Sun, 11 Apr 2010 15:18:27 -0500 Received: from storexbh1.amd.com (10.1.1.17) by storexhtp01.amd.com (172.24.4.3) with Microsoft SMTP Server id 8.2.234.1; Sun, 11 Apr 2010 13:18:27 -0700 Received: from sausexmb1.amd.com ([163.181.3.156]) by storexbh1.amd.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 11 Apr 2010 16:18:26 -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:18:25 -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:18:23 +0200 Received: from localhost.localdomain (tronje.osrc.amd.com [165.204.15.48]) by gwo.osrc.amd.com (Postfix) with ESMTP id 8C9E149C131; Sun, 11 Apr 2010 21:18:23 +0100 (BST) From: Andre Przywara To: avi@redhat.com CC: kvm@vger.kernel.org, Andre Przywara Subject: [PATCH] [qemu-kvm/stable] fix CPUID vendor override Date: Sun, 11 Apr 2010 22:15:14 +0200 Message-ID: <1271016914-8963-1-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.4 X-OriginalArrivalTime: 11 Apr 2010 20:18:23.0795 (UTC) FILETIME=[22FEE030:01CAD9B4] MIME-Version: 1.0 X-Reverse-DNS: ausb3extmailp02.amd.com 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:18:40 +0000 (UTC) diff --git a/target-i386/helper.c b/target-i386/helper.c index fb22f88..ed77a71 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -518,7 +518,7 @@ static 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); @@ -1662,7 +1662,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); } }