From: Krish Sadhukhan <krish.sadhukhan@oracle.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, jmattson@google.com,
sean.j.christopherson@intel.com
Subject: [PATCH 1/3] kvm-unit-tests: nVMX: Test GUEST_BASE_GDTR and GUEST_BASE_IDTR on vmentry of nested guests
Date: Fri, 22 May 2020 20:26:01 -0400 [thread overview]
Message-ID: <20200523002603.32450-2-krish.sadhukhan@oracle.com> (raw)
In-Reply-To: <20200523002603.32450-1-krish.sadhukhan@oracle.com>
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 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 68f93d3..fa27d99 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -7827,6 +7827,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
*/
--
1.8.3.1
next prev parent reply other threads:[~2020-05-23 1:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 0:26 [PATCH 0/3] kvm-unit-tests: nVMX: Test base and limit fields of guest GDTR and IDTR Krish Sadhukhan
2020-05-23 0:26 ` Krish Sadhukhan [this message]
2020-05-27 5:17 ` [PATCH 1/3] kvm-unit-tests: nVMX: Test GUEST_BASE_GDTR and GUEST_BASE_IDTR on vmentry of nested guests Sean Christopherson
2020-05-23 0:26 ` [PATCH 2/3] kvm-unit-tests: nVMX: Optimize test_guest_dr7() by factoring out the loops into a macro Krish Sadhukhan
2020-05-23 0:26 ` [PATCH 3/3] kvm-unit-tests: nVMX: Test GUEST_LIMIT_GDTR and GUEST_LIMIT_IDTR on vmentry of nested guests Krish Sadhukhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200523002603.32450-2-krish.sadhukhan@oracle.com \
--to=krish.sadhukhan@oracle.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).