[kvm-unit-test nVMX] If "enable EPT" is enabled in a test, EPT pointer must also be set up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 2737c0410fa60eeaef8a7af0f8968be40cb1e9d9 move the check for EPT
pointer, from nested_ept_get_cr3() to check_vmentry_prereqs(). As a result
if "enabled EPT" is set in a test but EPT pointer is not, vmentry will fail
even if EPT pointer is not being tested in that particular test.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
---
 x86/vmx_tests.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index ee0c9ff..1e987e6 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -4682,6 +4682,7 @@ static void test_ept_eptp(void)
 	report_prefix_pop();
 
 	secondary |= CPU_EPT;
+	setup_ept(false);
 	vmcs_write(CPU_EXEC_CTRL1, secondary);
 	report_prefix_pushf("Enable-EPT enabled, unrestricted-guest enabled");
 	test_vmx_controls(true, false);
@@ -4737,6 +4738,7 @@ static void test_pml(void)
 	report_prefix_pop();
 
 	secondary |= CPU_EPT;
+	setup_ept(false);
 	vmcs_write(CPU_EXEC_CTRL1, secondary);
 	report_prefix_pushf("enable-PML enabled, enable-EPT enabled");
 	test_vmx_controls(true, false);
-- 
2.17.2




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux