aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2020-06-23 10:27:11 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-24 02:50:23 -0400
commit2d3ecdfec9514907084b29b1fb08932da5a5ec7e (patch)
treee2dfde0bfe001bbaba1b7f759b462f6372139879
parentd68a795a213ddcd224a80fb9e5015b57582bc625 (diff)
downloadkvm-unit-tests-2d3ecdfec9514907084b29b1fb08932da5a5ec7e.tar.gz
Revert "SVM: move guest past HLT"
'nmi_hlt' test returns somewhat weird result: ... PASS: direct NMI + hlt PASS: NMI intercept while running guest PASS: intercepted NMI + hlt PASS: nmi_hlt SUMMARY: 4 tests, 1 unexpected failures Trying to investigate where the failure is coming from I was tweaking the code around and with tiny meaningless changes I was able to observe #PF, #GP, #UD and other 'interesting' results. Compiler optimization flags also change the outcome so there's obviously a corruption somewhere. Adding a meaningless 'nop' to the second 'asm volatile ("hlt");' in nmi_hlt_test() saves the day so it seems we erroneously advance RIP twice, the advancement in nmi_hlt_finished() is not needed. The outcome, however, contradicts with the commit message in 7e7aa86f74 ("SVM: move guest past HLT"). With that commit reverted, all tests seem to pass but I'm not sure what issue the commit was trying to fix, thus RFC. This reverts commit 7e7aa86f7418a8343de46583977f631e55fd02ed. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20200623082711.803916-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--x86/svm_tests.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 610685b..a2c993d 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -1362,11 +1362,6 @@ static bool interrupt_finished(struct svm_test *test)
return true;
}
- /* The guest is not woken up from HLT and RIP still points to it. */
- if (get_test_stage(test) == 3) {
- vmcb->save.rip++;
- }
-
irq_enable();
asm volatile ("nop");
irq_disable();
@@ -1553,9 +1548,6 @@ static bool nmi_hlt_finished(struct svm_test *test)
return true;
}
- /* The guest is not woken up from HLT and RIP still points to it. */
- vmcb->save.rip++;
-
report(true, "NMI intercept while running guest");
break;