public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP
@ 2013-04-16  5:08 prasadjoshi.linux
  2013-04-16 16:15 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: prasadjoshi.linux @ 2013-04-16  5:08 UTC (permalink / raw)
  To: prasadjoshi.linux; +Cc: kvm

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-17 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-16  5:08 [PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP prasadjoshi.linux
2013-04-16 16:15 ` Paolo Bonzini
2013-04-17 23:10   ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox