[kvm-unit-test 2/2] nVMX: Move all tests for VM-entry control fields to a separate function

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

 



 ... to improve readability and maintainability, and to align the code as per
the layout of the checks in chapter "VM Entries" in Intel SDM vol 3C.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
Reviewed-by: Mihai Carabas <mihai.carabas@xxxxxxxxxx>
---
 x86/vmx_tests.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 50806ab..2ff94e0 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -4819,6 +4819,14 @@ static void test_vm_execution_ctls(void)
 }
 
 /*
+ * Tests for VM-entry control fields
+ */
+static void test_vm_entry_ctls(void)
+{
+	test_invalid_event_injection();
+}
+
+/*
  * Check that the virtual CPU checks all of the VMX controls as
  * documented in the Intel SDM.
  */
@@ -4832,7 +4840,7 @@ static void vmx_controls_test(void)
 	vmcs_write(GUEST_RFLAGS, 0);
 
 	test_vm_execution_ctls();
-	test_invalid_event_injection();
+	test_vm_entry_ctls();
 }
 
 static bool valid_vmcs_for_vmentry(void)
-- 
2.9.5




[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