From mboxrd@z Thu Jan 1 00:00:00 1970 From: prasadjoshi.linux@gmail.com Subject: [PATCH kvm-unittest] x86/svm: run cr3 read intercept emulate only on SMP Date: Tue, 16 Apr 2013 10:38:16 +0530 Message-ID: <1366088896-1868-1-git-send-email-prasadjoshi.linux@gmail.com> Cc: kvm@vger.kernel.org To: prasadjoshi.linux@gmail.com Return-path: Received: from mail-pb0-f43.google.com ([209.85.160.43]:52079 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002Ab3DPFI1 (ORCPT ); Tue, 16 Apr 2013 01:08:27 -0400 Received: by mail-pb0-f43.google.com with SMTP id md4so83423pbc.2 for ; Mon, 15 Apr 2013 22:08:27 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: From: Prasad Joshi 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 --- 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