x86/svm: run cr3 read intercept emulate only on SMP
PATCH 1/1 x86/svm: run cr3 read intercept emulate only on SMP
From: Prasad Joshi <[email protected]>
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.
--- x86/svm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
x86/svm.c +6 -1
@@ -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,
Signature · 1 line
1.7.10.4
Il 16/04/2013 07:08, [email protected] ha scritto:
Quoted 5 lines
From: Prasad Joshi <[email protected]>
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.
test->scratch = 1;
while (test->scratch != 2)
barrier();Indeed.
Marcelo Tosatti
AppliedQuoted 7 lines · Paolo Bonzini
Il 16/04/2013 07:08, [email protected] ha scritto:
Quoted 5 lines
From: Prasad Joshi <[email protected]>
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.
Quoted 7 lines
test->scratch = 1; while (test->scratch != 2) barrier();Indeed.
Reviewed-by Paolo Bonzini <[email protected]>
Applied, thanks.