diff mbox series

[1/3,v2] kvm-unit-tests: nVMX: Test GUEST_BASE_GDTR and GUEST_BASE_IDTR on vmentry of nested guests

Message ID 1591384822-71784-2-git-send-email-krish.sadhukhan@oracle.com (mailing list archive)
State New, archived
Headers show
Series kvm-unit-tests: nVMX: Test base and limit fields of guest GDTR and IDTR | expand

Commit Message

Krish Sadhukhan June 5, 2020, 7:20 p.m. UTC
According to section "Checks on Guest Descriptor-Table Registers" in Intel
SDM vol 3C, the following check is performed on the Guest Descriptor-Table
Registers on vmentry of nested guests:

    - On processors that support Intel 64 architecture, the base-address
      fields must contain canonical addresses.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
---
 x86/vmx_tests.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 68f93d3..4308ef3 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -7827,6 +7827,9 @@  static void vmx_guest_state_area_test(void)
 	test_load_guest_perf_global_ctrl();
 	test_load_guest_bndcfgs();
 
+	test_canonical(GUEST_BASE_GDTR, "GUEST_BASE_GDTR", false);
+	test_canonical(GUEST_BASE_IDTR, "GUEST_BASE_IDTR", false);
+
 	/*
 	 * Let the guest finish execution
 	 */