From: Sean Christopherson <sean.j.christopherson@intel.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org, Krish Sadhukhan <krish.sadhukhan@oracle.com>
Subject: [kvm-unit-tests PATCH] x86: Skip EPT tests that involve unrestricted guest when URG is disabled
Date: Thu, 22 Aug 2019 16:47:46 -0700 [thread overview]
Message-ID: <20190822234746.3379-1-sean.j.christopherson@intel.com> (raw)
Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Fixes: f749ddc19bb2d ("nVMX x86: Check enable-EPT on vmentry of L2 guests")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
x86/vmx_tests.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 9078665..f035f24 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -4797,6 +4797,9 @@ static void test_ept_eptp(void)
test_vmx_valid_controls(false);
report_prefix_pop();
+ if (!(ctrl_cpu_rev[1].clr & CPU_URG))
+ goto skip_unrestricted_guest;
+
secondary |= CPU_URG;
vmcs_write(CPU_EXEC_CTRL1, secondary);
report_prefix_pushf("Enable-EPT disabled, unrestricted-guest enabled");
@@ -4809,6 +4812,7 @@ static void test_ept_eptp(void)
test_vmx_valid_controls(false);
report_prefix_pop();
+skip_unrestricted_guest:
secondary &= ~CPU_URG;
vmcs_write(CPU_EXEC_CTRL1, secondary);
report_prefix_pushf("Enable-EPT enabled, unrestricted-guest disabled");
--
2.22.0
reply other threads:[~2019-08-22 23:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190822234746.3379-1-sean.j.christopherson@intel.com \
--to=sean.j.christopherson@intel.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.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).