[PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Prasad Joshi <prasadjoshi.linux@xxxxxxxxx>

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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux