Skip to contentSkip to conversation

KVM: VMX: Disable unrestricted guest when EPT disabled

PATCH Applied Sheng Yang 3 participants 6 messages Nov 27, 2009 – Mar 18, 2010

Subsystems (3)
lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 KVM: VMX: Disable unrestricted guest when EPT disabled

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

---
 arch/x86/kvm/vmx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/x86/kvm/vmx.c +3 -1
index 80367c5..1092e8a 100644
@@ -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)
Signature · 1 line
1.5.4.5
#2 lore raw
Quoted 10 lines · Marcelo Tosatti
Quoted 5 lines · Sheng Yang

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

Applied, thanks.

So without this patch kvm breaks with ept=0? Sounds like a stable candidate to me.

Alex

author
#3 lore raw
Quoted 11 lines · On Thursday 18 March 2010 02:37:10 Alexander Graf wrote:
Quoted 7 lines · Marcelo Tosatti
Quoted 4 lines · Sheng Yang

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

Applied, thanks.

So without this patch kvm breaks with ept=0? Sounds like a stable candidate to me.

Seems unrestricted guest code isn't in v2.6.31-stable, and v2.6.32 had already fixed this issue. So it should be fine.

Signature · 2 lines
regards
Yang, Sheng
#4 lore raw
Quoted 8 lines · Sheng Yang
Quoted 7 lines · On Thursday 18 March 2010 02:37:10 Alexander Graf wrote:
Quoted 6 lines · Marcelo Tosatti
Quoted 4 lines · Sheng Yang

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

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied, thanks.

So without this patch kvm breaks with ept=0? Sounds like a stable candidate to me.

Seems unrestricted guest code isn't in v2.6.31-stable, and v2.6.32 had already fixed this issue. So it should be fine.

Are you sure? I don't see the patch in 2.6.32-stable git.

Alex

author
#5 lore raw
Quoted 11 lines · On Thursday 18 March 2010 13:51:41 Alexander Graf wrote:
Quoted 10 lines · Sheng Yang
Quoted 9 lines · On Thursday 18 March 2010 02:37:10 Alexander Graf wrote:
Quoted 7 lines · Marcelo Tosatti
Quoted 4 lines · Sheng Yang

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

Applied, thanks.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

So without this patch kvm breaks with ept=0? Sounds like a stable candidate to me.

Seems unrestricted guest code isn't in v2.6.31-stable, and v2.6.32 had already fixed this issue. So it should be fine.

Are you sure? I don't see the patch in 2.6.32-stable git.

Yes, you are right. Found it not in 2.6.32-stable...

Would post a patch for stable.

Thanks

Signature · 2 lines
regards
Yang, Sheng