From: prasadjoshi.linux@gmail.com
To: prasadjoshi.linux@gmail.com
Cc: kvm@vger.kernel.org
Subject: [PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP
Date: Tue, 16 Apr 2013 10:38:16 +0530 [thread overview]
Message-ID: <1366088896-1868-1-git-send-email-prasadjoshi.linux@gmail.com> (raw)
From: Prasad Joshi <prasadjoshi.linux@gmail.com>
The SVM test 'cr3 read intercept emulate' when ran on uniprocessor
system does not finish and blocks all the tests scheduled to be ran
afterwords. Add check so that the test is only ran on the SMP VM.
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
---
x86/svm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/x86/svm.c b/x86/svm.c
index ed784c4..d51e7ec 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -211,6 +211,11 @@ static bool test_run(struct test *test, struct vmcb *vmcb)
return success;
}
+static bool smp_supported(void)
+{
+ return cpu_count() > 1;
+}
+
static bool default_supported(void)
{
return true;
@@ -749,7 +754,7 @@ static struct test tests[] = {
test_cr3_intercept, default_finished, check_cr3_intercept },
{ "cr3 read nointercept", default_supported, default_prepare,
test_cr3_intercept, default_finished, check_cr3_nointercept },
- { "cr3 read intercept emulate", default_supported,
+ { "cr3 read intercept emulate", smp_supported,
prepare_cr3_intercept_bypass, test_cr3_intercept_bypass,
default_finished, check_cr3_intercept },
{ "next_rip", next_rip_supported, prepare_next_rip, test_next_rip,
--
1.7.10.4
next reply other threads:[~2013-04-16 5:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 5:08 prasadjoshi.linux [this message]
2013-04-16 16:15 ` [PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP Paolo Bonzini
2013-04-17 23:10 ` Marcelo Tosatti
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=1366088896-1868-1-git-send-email-prasadjoshi.linux@gmail.com \
--to=prasadjoshi.linux@gmail.com \
--cc=kvm@vger.kernel.org \
/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