From patchwork Tue Sep 28 10:05:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 214372 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8SA5CuK011944 for ; Tue, 28 Sep 2010 10:05:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753882Ab0I1KFI (ORCPT ); Tue, 28 Sep 2010 06:05:08 -0400 Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:22312 "EHLO TX2EHSOBE010.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754059Ab0I1KFH (ORCPT ); Tue, 28 Sep 2010 06:05:07 -0400 Received: from mail59-tx2-R.bigfish.com (10.9.14.249) by TX2EHSOBE010.bigfish.com (10.9.40.30) with Microsoft SMTP Server id 8.1.340.0; Tue, 28 Sep 2010 10:05:05 +0000 Received: from mail59-tx2 (localhost.localdomain [127.0.0.1]) by mail59-tx2-R.bigfish.com (Postfix) with ESMTP id 003B1C0835E; Tue, 28 Sep 2010 10:05:05 +0000 (UTC) X-SpamScore: -42 X-BigFish: VS-42(zzbb2dK10e3M1432N98dN148cM9371Pzz1202hzz8275bh15d4Rz32i87h2a8h43h61h) X-Spam-TCS-SCL: 0:0 X-FB-DOMAIN-IP-MATCH: fail Received: from mail59-tx2 (localhost.localdomain [127.0.0.1]) by mail59-tx2 (MessageSwitch) id 1285668304489647_15751; Tue, 28 Sep 2010 10:05:04 +0000 (UTC) Received: from TX2EHSMHS038.bigfish.com (unknown [10.9.14.235]) by mail59-tx2.bigfish.com (Postfix) with ESMTP id 69B03DD804F; Tue, 28 Sep 2010 10:05:04 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by TX2EHSMHS038.bigfish.com (10.9.99.138) with Microsoft SMTP Server (TLS) id 14.0.482.44; Tue, 28 Sep 2010 10:05:04 +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 o8SA8c0q024450; Tue, 28 Sep 2010 05:08:42 -0500 X-WSS-ID: 0L9GC07-01-7IJ-02 X-M-MSG: Received: from sausexhtp01.amd.com (sausexhtp01.amd.com [163.181.3.165]) (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 2D4BE1028549; Tue, 28 Sep 2010 05:04:55 -0500 (CDT) Received: from storexhtp02.amd.com (172.24.4.4) by sausexhtp01.amd.com (163.181.3.165) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 28 Sep 2010 05:04:58 -0500 Received: from gwo.osrc.amd.com (165.204.16.204) by storexhtp02.amd.com (172.24.4.4) with Microsoft SMTP Server id 8.3.83.0; Tue, 28 Sep 2010 06:04:58 -0400 Received: from lemmy.osrc.amd.com (lemmy.osrc.amd.com [165.204.15.93]) by gwo.osrc.amd.com (Postfix) with ESMTP id F0E8849C121; Tue, 28 Sep 2010 11:04:57 +0100 (BST) Received: by lemmy.osrc.amd.com (Postfix, from userid 1000) id AA6CCA06ED; Tue, 28 Sep 2010 12:05:20 +0200 (CEST) Date: Tue, 28 Sep 2010 12:05:20 +0200 From: "Roedel, Joerg" To: Avi Kivity CC: Marcelo Tosatti , Alexander Graf , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" Subject: Re: [PATCH 3/3] Add svm cpuid features Message-ID: <20100928100520.GL9817@amd.com> References: <1285593377-1754-1-git-send-email-joerg.roedel@amd.com> <1285593377-1754-4-git-send-email-joerg.roedel@amd.com> <4CA0B116.4070107@redhat.com> <4CA0B1FF.8040903@redhat.com> <20100927154049.GI9817@amd.com> <4CA0C4B5.2010303@redhat.com> <20100928092851.GK9817@amd.com> <4CA1B776.20105@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4CA1B776.20105@redhat.com> Organization: Advanced Micro Devices =?iso-8859-1?Q?GmbH?= =?iso-8859-1?Q?=2C_Karl-Hammerschmidt-Str=2E_34=2C_85609_Dornach_bei_M=FC?= =?iso-8859-1?Q?nchen=2C_Gesch=E4ftsf=FChrer=3A_Thomas_M=2E_McCoy=2C_Giuli?= =?iso-8859-1?Q?ano_Meroni=2C_Andrew_Bowd=2C_Sitz=3A_Dornach=2C_Gemeinde_A?= =?iso-8859-1?Q?schheim=2C_Landkreis_M=FCnchen=2C_Registergericht_M=FCnche?= =?iso-8859-1?Q?n=2C?= HRB Nr. 43632 User-Agent: Mutt/1.5.20 (2009-06-14) 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 (demeter1.kernel.org [140.211.167.41]); Tue, 28 Sep 2010 10:05:12 +0000 (UTC) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 0e0bf60..0630fe1 100644 --- a/target-i386/cpuid.c +++ b/target-i386/cpuid.c @@ -714,6 +714,11 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model) x86_cpu_def->ext3_features &= ~minus_ext3_features; x86_cpu_def->kvm_features &= ~minus_kvm_features; x86_cpu_def->svm_features &= ~minus_svm_features; + if ((x86_cpu_def->ext3_features & CPUID_EXT3_SVM) && + (x86_cpu_def->xlevel < 0x8000000A)) { + /* Force xlevel to at least 0x8000000A if SVM enabled */ + x86_cpu_def->xlevel = 0x8000000A; + } if (check_cpuid) { if (check_features_against_host(x86_cpu_def) && enforce_cpuid) goto error;