All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
@ 2009-11-27  8:46 Sheng Yang
  2009-11-30 22:02 ` Marcelo Tosatti
  0 siblings, 1 reply; 8+ messages in thread
From: Sheng Yang @ 2009-11-27  8:46 UTC (permalink / raw)
  To: Marcelo Tosatti, Avi Kivity; +Cc: kvm, Sheng Yang

Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
supported processors.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
 arch/x86/kvm/vmx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 80367c5..1092e8a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2308,8 +2308,10 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
 				~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES;
 		if (vmx->vpid == 0)
 			exec_control &= ~SECONDARY_EXEC_ENABLE_VPID;
-		if (!enable_ept)
+		if (!enable_ept) {
 			exec_control &= ~SECONDARY_EXEC_ENABLE_EPT;
+			enable_unrestricted_guest = 0;
+		}
 		if (!enable_unrestricted_guest)
 			exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST;
 		if (!ple_gap)
-- 
1.5.4.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled
@ 2010-03-18  6:11 Sheng Yang
  2010-04-07 21:49 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Sheng Yang @ 2010-03-18  6:11 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, kvm, Avi Kivity, Marcelo Tosatti, Alexander Graf, Sheng Yang

Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest
supported processors.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---

Please apply this to 2.6.32 stable. Thanks!

Patch already in the upstream, commit:
046d87103addc117f0d397196e85189722d4d7de

 arch/x86/kvm/vmx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 80367c5..1092e8a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2316,8 +2316,10 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
 				~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES;
 		if (vmx->vpid == 0)
 			exec_control &= ~SECONDARY_EXEC_ENABLE_VPID;
-		if (!enable_ept)
+		if (!enable_ept) {
 			exec_control &= ~SECONDARY_EXEC_ENABLE_EPT;
+			enable_unrestricted_guest = 0;
+		}
 		if (!enable_unrestricted_guest)
 			exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST;
		vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_control);
-- 
1.5.4.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-04-07 22:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-27  8:46 [PATCH] KVM: VMX: Disable unrestricted guest when EPT disabled Sheng Yang
2009-11-30 22:02 ` Marcelo Tosatti
2010-03-17 18:37   ` Alexander Graf
2010-03-18  1:50     ` Sheng Yang
2010-03-18  5:51       ` Alexander Graf
2010-03-18  5:57         ` Sheng Yang
2010-03-18  6:11 Sheng Yang
2010-04-07 21:49 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.