kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 4/5] KVM: SVM: Allow EFER.LMSLE to be set with nested svm
Date: Wed, 5 May 2010 16:04:44 +0200	[thread overview]
Message-ID: <1273068285-3105-5-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1273068285-3105-1-git-send-email-joerg.roedel@amd.com>

This patch enables setting of efer bit 13 which is allowed
in all SVM capable processors. This is necessary for the
SLES11 version of Xen 4.0 to boot with nested svm.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/include/asm/msr-index.h |    2 ++
 arch/x86/kvm/svm.c               |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

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) {
-- 
1.7.1



  parent reply	other threads:[~2010-05-05 14:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 14:04 [PATCH 0/5] Important fixes for KVM-AMD Joerg Roedel
2010-05-05 14:04 ` [PATCH 1/5] KVM: X86: Fix stupid bug in exception reinjection path Joerg Roedel
2010-05-05 14:04 ` [PATCH 2/5] KVM: SVM: Dump vmcb contents on failed vmrun Joerg Roedel
2010-05-05 14:04 ` [PATCH 3/5] KVM: SVM: Fix wrong intercept masks on 32 bit Joerg Roedel
2010-05-05 14:04 ` Joerg Roedel [this message]
2010-05-05 14:46   ` [PATCH 4/5] KVM: SVM: Allow EFER.LMSLE to be set with nested svm Avi Kivity
2010-05-05 15:04     ` Joerg Roedel
2010-05-05 15:06       ` Avi Kivity
2010-05-05 15:14         ` Avi Kivity
2010-05-05 15:16         ` Roedel, Joerg
2010-05-05 20:57     ` Andre Przywara
2010-05-06  9:38       ` Roedel, Joerg
2010-05-06 11:42         ` Avi Kivity
2010-05-05 14:04 ` [PATCH 5/5] KVM: SVM: Don't allow nested guest to VMMCALL into host Joerg Roedel
2010-05-06  8:51 ` [PATCH 0/5] Important fixes for KVM-AMD Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1273068285-3105-5-git-send-email-joerg.roedel@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).