From patchwork Mon Dec 28 08:48:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 41850 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 EC67AB7BBF for ; Mon, 28 Dec 2009 19:48:43 +1100 (EST) Received: from localhost ([127.0.0.1]:60718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPBHM-0001JW-Ee for incoming@patchwork.ozlabs.org; Mon, 28 Dec 2009 03:48:40 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NPBGr-0001JH-Br for qemu-devel@nongnu.org; Mon, 28 Dec 2009 03:48:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NPBGm-0001Ip-T9 for qemu-devel@nongnu.org; Mon, 28 Dec 2009 03:48:08 -0500 Received: from [199.232.76.173] (port=54328 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPBGm-0001Il-I2 for qemu-devel@nongnu.org; Mon, 28 Dec 2009 03:48:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50641) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NPBGm-0003TI-6W for qemu-devel@nongnu.org; Mon, 28 Dec 2009 03:48:04 -0500 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 nBS8m2Vw002794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 28 Dec 2009 03:48:02 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBS8m0D7018683; Mon, 28 Dec 2009 03:48:01 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 663E625004D; Mon, 28 Dec 2009 10:48:00 +0200 (IST) From: Avi Kivity To: Marcelo Tosatti Date: Mon, 28 Dec 2009 10:48:00 +0200 Message-Id: <1261990080-15330-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH] Reinstate cpuid vendor override when kvm is enabled 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 Due to upstream qemu changes we no longer expose the host cpu vendor id to the guest. This leads to failures when the syscall/sysenter instructions are used in compatibility mode. Change the default to override when kvm is enabled. Signed-off-by: Avi Kivity --- target-i386/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index 9a50da6..b58fd82 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; + env->cpuid_vendor_override = def->vendor_override || kvm_enabled(); env->cpuid_level = def->level; if (def->family > 0x0f) env->cpuid_version = 0xf00 | ((def->family - 0x0f) << 20);