From patchwork Wed May 5 14:04:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 97092 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 o45E6sTR030343 for ; Wed, 5 May 2010 14:06:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934810Ab0EEOFs (ORCPT ); Wed, 5 May 2010 10:05:48 -0400 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13]:14253 "EHLO TX2EHSOBE006.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934796Ab0EEOFm (ORCPT ); Wed, 5 May 2010 10:05:42 -0400 Received: from mail79-tx2-R.bigfish.com (10.9.14.252) by TX2EHSOBE006.bigfish.com (10.9.40.26) with Microsoft SMTP Server id 8.1.340.0; Wed, 5 May 2010 14:05:41 +0000 Received: from mail79-tx2 (localhost.localdomain [127.0.0.1]) by mail79-tx2-R.bigfish.com (Postfix) with ESMTP id DA1D21B68009; Wed, 5 May 2010 14:05:40 +0000 (UTC) X-SpamScore: -4 X-BigFish: VPS-4(zz936eMab9bhzz1202hzz6ff19hz32i2a8h87h61h) X-Spam-TCS-SCL: 0:0 X-FB-DOMAIN-IP-MATCH: fail Received: from mail79-tx2 (localhost.localdomain [127.0.0.1]) by mail79-tx2 (MessageSwitch) id 1273068339100812_30596; Wed, 5 May 2010 14:05:39 +0000 (UTC) Received: from TX2EHSMHS047.bigfish.com (unknown [10.9.14.238]) by mail79-tx2.bigfish.com (Postfix) with ESMTP id 4978E4E00BB; Wed, 5 May 2010 14:04:59 +0000 (UTC) Received: from ausb3extmailp02.amd.com (163.181.251.22) by TX2EHSMHS047.bigfish.com (10.9.99.147) with Microsoft SMTP Server (TLS) id 14.0.482.44; Wed, 5 May 2010 14:04:56 +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 o45E5k9d027499; Wed, 5 May 2010 09:05:49 -0500 X-WSS-ID: 0L1Y9S1-02-IK7-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 2A5E5C8633; Wed, 5 May 2010 09:04:49 -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; Wed, 5 May 2010 09:04: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.234.1; Wed, 5 May 2010 07:04:47 -0700 Received: from lemmy.osrc.amd.com (lemmy.osrc.amd.com [165.204.15.93]) by gwo.osrc.amd.com (Postfix) with ESMTP id 4C86849C222; Wed, 5 May 2010 15:04:47 +0100 (BST) Received: by lemmy.osrc.amd.com (Postfix, from userid 41430) id 5A283C9A5C; Wed, 5 May 2010 16:04:47 +0200 (CEST) From: Joerg Roedel To: Avi Kivity , Marcelo Tosatti CC: , , Joerg Roedel Subject: [PATCH 4/5] KVM: SVM: Allow EFER.LMSLE to be set with nested svm Date: Wed, 5 May 2010 16:04:44 +0200 Message-ID: <1273068285-3105-5-git-send-email-joerg.roedel@amd.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1273068285-3105-1-git-send-email-joerg.roedel@amd.com> References: <1273068285-3105-1-git-send-email-joerg.roedel@amd.com> 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]); Wed, 05 May 2010 14:06:59 +0000 (UTC) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index bc473ac..352767d 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -20,6 +20,7 @@ #define _EFER_LMA 10 /* Long mode active (read-only) */ #define _EFER_NX 11 /* No execute enable */ #define _EFER_SVME 12 /* Enable virtualization */ +#define _EFER_LMSLE 13 /* Long Mode Segment Limit Enable */ #define _EFER_FFXSR 14 /* Enable Fast FXSAVE/FXRSTOR */ #define EFER_SCE (1<<_EFER_SCE) @@ -27,6 +28,7 @@ #define EFER_LMA (1<<_EFER_LMA) #define EFER_NX (1<<_EFER_NX) #define EFER_SVME (1<<_EFER_SVME) +#define EFER_LMSLE (1<<_EFER_LMSLE) #define EFER_FFXSR (1<<_EFER_FFXSR) /* Intel MSRs. Some also available on other CPUs */ diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 74f7b9d..bc087c7 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -610,7 +610,7 @@ static __init int svm_hardware_setup(void) if (nested) { printk(KERN_INFO "kvm: Nested Virtualization enabled\n"); - kvm_enable_efer_bits(EFER_SVME); + kvm_enable_efer_bits(EFER_SVME | EFER_LMSLE); } for_each_possible_cpu(cpu) {