[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,

    5b8ba41dafd7 KVM: nVMX: move vmcs12 EPTP consistency check to
check_vmentry_prereqs()

moved 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
tested in that particular test.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
Reviewed-by: Mark Kanda <mark.kanda@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