All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nadav Amit <namit@vmware.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Nadav Amit <namit@vmware.com>,
	Marc Orr <marcorr@google.com>
Subject: [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal
Date: Fri, 20 Mar 2020 22:06:16 -0700	[thread overview]
Message-ID: <20200321050616.4272-1-namit@vmware.com> (raw)

The test atomic_switch_overflow_msrs_test is only expected to pass on
KVM. Skip the test when the debug device is not supported to avoid
failures on bare-metal.

Cc: Marc Orr <marcorr@google.com>
Signed-off-by: Nadav Amit <namit@vmware.com>
---
 x86/vmx_tests.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 2014e54..be5c952 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -9546,7 +9546,10 @@ static void atomic_switch_max_msrs_test(void)
 
 static void atomic_switch_overflow_msrs_test(void)
 {
-	atomic_switch_msrs_test(max_msr_list_size() + 1);
+	if (test_device_enabled())
+		atomic_switch_msrs_test(max_msr_list_size() + 1);
+	else
+		test_skip("Test is only supported on KVM");
 }
 
 #define TEST(name) { #name, .v2 = name }
-- 
2.17.1


             reply	other threads:[~2020-03-21  5:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21  5:06 Nadav Amit [this message]
2020-03-23 19:42 ` [PATCH] x86: vmx: skip atomic_switch_overflow_msrs_test on bare metal Nadav Amit
2020-03-31 17:01 ` 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=20200321050616.4272-1-namit@vmware.com \
    --to=namit@vmware.com \
    --cc=kvm@vger.kernel.org \
    --cc=marcorr@google.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.