diff mbox series

[kvm-unit-tests,3/9] svm: NMI is an "exception" and not interrupt in x86 land

Message ID 20220322205613.250925-4-mlevitsk@redhat.com (mailing list archive)
State New, archived
Headers show
Series KVM unit tests for SVM options features | expand

Commit Message

Maxim Levitsky March 22, 2022, 8:56 p.m. UTC
This can interfere with later tests which do treat it
as an exception.

Fixes: d4db486 ("svm: Add test cases around NMI injection")

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
---
 x86/svm_tests.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 7a97847..7586ef7 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -1384,17 +1384,16 @@  static bool interrupt_check(struct svm_test *test)
 
 static volatile bool nmi_fired;
 
-static void nmi_handler(isr_regs_t *regs)
+static void nmi_handler(struct ex_regs *regs)
 {
     nmi_fired = true;
-    apic_write(APIC_EOI, 0);
 }
 
 static void nmi_prepare(struct svm_test *test)
 {
     default_prepare(test);
     nmi_fired = false;
-    handle_irq(NMI_VECTOR, nmi_handler);
+    handle_exception(NMI_VECTOR, nmi_handler);
     set_test_stage(test, 0);
 }