From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Nadav Amit <namit@vmware.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, Krish Sadhukhan <krish.sadhukhan@oracle.com>
Subject: Re: [kvm-unit-tests PATCH 1/2] x86: nVMX: Do not use test_skip() when multiple tests are run
Date: Tue, 3 Sep 2019 10:28:40 -0700 [thread overview]
Message-ID: <20190903172840.GJ10768@linux.intel.com> (raw)
In-Reply-To: <20190830204031.3100-2-namit@vmware.com>
On Fri, Aug 30, 2019 at 01:40:30PM -0700, Nadav Amit wrote:
> Using test_skip() when multiple tests are run causes all the following
> tests to be skipped. Instead, just print a message and return.
>
> Fixes: 47cc3d85c2fe ("nVMX x86: Check PML and EPT on vmentry of L2 guests")
> Fixes: 7fd449f2ed2e ("nVMX x86: Check VPID value on vmentry of L2 guests")
> Fixes: 181219bfd76b ("x86: Add test for checking NMI controls on vmentry of L2 guests")
> Fixes: 1d70eb823e12 ("nVMX x86: Check EPTP on vmentry of L2 guests")
> Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com>
> Signed-off-by: Nadav Amit <namit@vmware.com>
invvpid_test_v2() also has a bunch of bad calls to test_skip().
What about removing test_skip() entirely? The code for in_guest looks
suspect, e.g. at a glance it should use HYPERCALL_VMSKIP instead of
HYPERCALL_VMABORT. The only somewhat legit usage is the ept tests, and
only then because the ept tests are all at the end of the array.
Returning success/failure from ept_access_test_setup() seems like a
better solution than test_skip.
> ---
> x86/vmx_tests.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index f035f24..4ff1570 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -4040,7 +4040,7 @@ static void test_vpid(void)
>
> if (!((ctrl_cpu_rev[0].clr & CPU_SECONDARY) &&
> (ctrl_cpu_rev[1].clr & CPU_VPID))) {
> - test_skip("Secondary controls and/or VPID not supported");
> + printf("Secondary controls and/or VPID not supported\n");
> return;
> }
>
> @@ -4544,7 +4544,7 @@ static void test_nmi_ctrls(void)
>
> if ((ctrl_pin_rev.clr & (PIN_NMI | PIN_VIRT_NMI)) !=
> (PIN_NMI | PIN_VIRT_NMI)) {
> - test_skip("NMI exiting and Virtual NMIs are not supported !");
> + printf("NMI exiting and Virtual NMIs are not supported !\n");
> return;
> }
>
> @@ -4657,7 +4657,7 @@ static void test_ept_eptp(void)
>
> if (!((ctrl_cpu_rev[0].clr & CPU_SECONDARY) &&
> (ctrl_cpu_rev[1].clr & CPU_EPT))) {
> - test_skip("\"CPU secondary\" and/or \"enable EPT\" execution controls are not supported !");
> + printf("\"CPU secondary\" and/or \"enable EPT\" execution controls are not supported !\n");
> return;
> }
>
> @@ -4844,7 +4844,7 @@ static void test_pml(void)
>
> if (!((ctrl_cpu_rev[0].clr & CPU_SECONDARY) &&
> (ctrl_cpu_rev[1].clr & CPU_EPT) && (ctrl_cpu_rev[1].clr & CPU_PML))) {
> - test_skip("\"Secondary execution\" control or \"enable EPT\" control or \"enable PML\" control is not supported !");
> + printf("\"Secondary execution\" control or \"enable EPT\" control or \"enable PML\" control is not supported !\n");
> return;
> }
>
> --
> 2.17.1
>
next prev parent reply other threads:[~2019-09-03 17:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 20:40 [kvm-unit-tests PATCH 0/2] x86: nVMX: Bug fixes Nadav Amit
2019-08-30 20:40 ` [kvm-unit-tests PATCH 1/2] x86: nVMX: Do not use test_skip() when multiple tests are run Nadav Amit
2019-09-03 17:28 ` Sean Christopherson [this message]
2019-09-03 17:44 ` Nadav Amit
2019-09-03 17:50 ` Sean Christopherson
2019-08-30 20:40 ` [kvm-unit-tests PATCH 2/2] x86: nVMX: Fix wrong reserved bits of error-code Nadav Amit
2019-09-03 17:23 ` Sean Christopherson
2019-09-10 17:16 ` [kvm-unit-tests PATCH 0/2] x86: nVMX: Bug fixes Paolo Bonzini
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=20190903172840.GJ10768@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=namit@vmware.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.