From patchwork Fri May 21 05:58:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 53114 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]) by ozlabs.org (Postfix) with ESMTP id BF825B7D43 for ; Fri, 21 May 2010 16:08:27 +1000 (EST) Received: from localhost ([127.0.0.1]:59757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFLJk-0005g3-0m for incoming@patchwork.ozlabs.org; Fri, 21 May 2010 02:02:44 -0400 Received: from [140.186.70.92] (port=40272 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFLHA-0004pq-Hy for qemu-devel@nongnu.org; Fri, 21 May 2010 02:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFLH8-00038e-Uo for qemu-devel@nongnu.org; Fri, 21 May 2010 02:00:04 -0400 Received: from tx2ehsobe004.messaging.microsoft.com ([65.55.88.14]:51125 helo=TX2EHSOBE008.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFLH8-000377-Ih for qemu-devel@nongnu.org; Fri, 21 May 2010 02:00:02 -0400 Received: from mail154-tx2-R.bigfish.com (10.9.14.251) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 8.1.340.0; Fri, 21 May 2010 06:00:00 +0000 Received: from mail154-tx2 (localhost.localdomain [127.0.0.1]) by mail154-tx2-R.bigfish.com (Postfix) with ESMTP id 9D03C18681B7; Fri, 21 May 2010 06:00:00 +0000 (UTC) X-SpamScore: -1 X-BigFish: VPS-1(zz936eMab9bh853kzz1202hzzz32i2a8h43h61h) Received: from mail154-tx2 (localhost.localdomain [127.0.0.1]) by mail154-tx2 (MessageSwitch) id 1274421600238301_15323; Fri, 21 May 2010 06:00:00 +0000 (UTC) Received: from TX2EHSMHS014.bigfish.com (unknown [10.9.14.236]) by mail154-tx2.bigfish.com (Postfix) with ESMTP id 3644213B004D; Fri, 21 May 2010 06:00:00 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by TX2EHSMHS014.bigfish.com (10.9.99.114) with Microsoft SMTP Server (TLS) id 14.0.482.44; Fri, 21 May 2010 05:59:58 +0000 Received: from ausb3twp01.amd.com ([163.181.250.37]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o4L5lAFf011985; Fri, 21 May 2010 00:47:13 -0500 X-WSS-ID: 0L2R9ZM-01-9OJ-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 ausb3twp01.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 24401D100AB; Fri, 21 May 2010 00:59:46 -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.254.0; Fri, 21 May 2010 00:59:52 -0500 Received: from gwo.osrc.amd.com (165.204.16.204) by storexhtp01.amd.com (172.24.4.3) with Microsoft SMTP Server id 8.2.254.0; Fri, 21 May 2010 01:59:51 -0400 Received: from localhost.localdomain (tronje.osrc.amd.com [165.204.15.48]) by gwo.osrc.amd.com (Postfix) with ESMTP id AC02849C195; Fri, 21 May 2010 06:59:50 +0100 (BST) From: Andre Przywara To: Date: Fri, 21 May 2010 07:58:13 +0200 Message-ID: <1274421493-9036-1-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.6.4 MIME-Version: 1.0 X-Reverse-DNS: unknown X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ Cc: Andre Przywara , qemu-devel@nongnu.org, aurelien@aurel32.net Subject: [Qemu-devel] [PATCH] resent: fix CPUID vendor override 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 the meaning of vendor_override is actually the opposite of how it is currently used :-( Fix it to allow KVM to export the non-native CPUID vendor if explicitly requested by the user. The semantic is now as intended: - With TCG, the guest always sees the configured vendor. - With KVM, the default is to propagate the host's vendor - when explicitly requested via -cpu ,vendor=xxx obey this and use the specified vendor Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Hi, this hasn't been picked up the last time I sent it out, are there any objections? Regards, Andre. diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 56938e2..99d1f44 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -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); } }