diff options
author | Krish Sadhukhan <krish.sadhukhan@oracle.com> | 2020-05-22 20:26:01 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-06 12:47:52 -0400 |
commit | 02ce1789f41c227b740f8c495a3548160d62a144 (patch) | |
tree | 76b841bafd31d2f61da20e83860769b113f5f498 | |
parent | 479a139a237328875360efd74b5a3c71aa9044c4 (diff) | |
download | kvm-unit-tests-02ce1789f41c227b740f8c495a3548160d62a144.tar.gz |
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>
-rw-r--r-- | x86/vmx_tests.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ static void vmx_guest_state_area_test(void) 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 */ |