KVM Archive on lore.kernel.org
 help / color / Atom feed
* [kvm-unit-tests PATCH] x86: Skip EPT tests that involve unrestricted guest when URG is disabled
@ 2019-08-22 23:47 Sean Christopherson
  0 siblings, 0 replies; only message in thread
From: Sean Christopherson @ 2019-08-22 23:47 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář; +Cc: kvm, Krish Sadhukhan

Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Fixes: f749ddc19bb2d ("nVMX x86: Check enable-EPT on vmentry of L2 guests")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 x86/vmx_tests.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 9078665..f035f24 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -4797,6 +4797,9 @@ static void test_ept_eptp(void)
 	test_vmx_valid_controls(false);
 	report_prefix_pop();
 
+	if (!(ctrl_cpu_rev[1].clr & CPU_URG))
+		goto skip_unrestricted_guest;
+
 	secondary |= CPU_URG;
 	vmcs_write(CPU_EXEC_CTRL1, secondary);
 	report_prefix_pushf("Enable-EPT disabled, unrestricted-guest enabled");
@@ -4809,6 +4812,7 @@ static void test_ept_eptp(void)
 	test_vmx_valid_controls(false);
 	report_prefix_pop();
 
+skip_unrestricted_guest:
 	secondary &= ~CPU_URG;
 	vmcs_write(CPU_EXEC_CTRL1, secondary);
 	report_prefix_pushf("Enable-EPT enabled, unrestricted-guest disabled");
-- 
2.22.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22 23:47 [kvm-unit-tests PATCH] x86: Skip EPT tests that involve unrestricted guest when URG is disabled Sean Christopherson

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org kvm@archiver.kernel.org
	public-inbox-index kvm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox