kvm-unit-tests: nVMX: Test GUEST_BASE_GDTR and GUEST_BASE_IDTR on vmentry of nested guests
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>
Message-Id: <20200523002603.32450-2-krish.sadhukhan@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 0bef0b1..aec32fc 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -7835,6 +7835,11 @@
test_load_guest_perf_global_ctrl();
test_load_guest_bndcfgs();
+#ifdef __x86_64__
+ test_canonical(GUEST_BASE_GDTR, "GUEST_BASE_GDTR", false);
+ test_canonical(GUEST_BASE_IDTR, "GUEST_BASE_IDTR", false);
+#endif
+
/*
* Let the guest finish execution
*/