diff mbox series

[kvm-unit-tests,v3,04/27] svm: remove nop after stgi/clgi

Message ID 20221122161152.293072-5-mlevitsk@redhat.com (mailing list archive)
State New, archived
Headers show
Series kvm-unit-tests: set of fixes and new tests | expand

Commit Message

Maxim Levitsky Nov. 22, 2022, 4:11 p.m. UTC
Remove pointless nop after stgi/clgi - these instructions don't have an
interrupt window.

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

Patch

diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index 02583236..88393fcf 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -3026,7 +3026,7 @@  static void svm_intr_intercept_mix_run_guest(volatile int *counter, int expected
 }
 
 
-// subtest: test that enabling EFLAGS.IF is enought to trigger an interrupt
+// subtest: test that enabling EFLAGS.IF is enough to trigger an interrupt
 static void svm_intr_intercept_mix_if_guest(struct svm_test *test)
 {
 	asm volatile("nop;nop;nop;nop");
@@ -3065,7 +3065,6 @@  static void svm_intr_intercept_mix_gif_guest(struct svm_test *test)
 	report(!dummy_isr_recevied, "No interrupt expected");
 
 	stgi();
-	asm volatile("nop");
 	report(0, "must not reach here");
 }
 
@@ -3095,7 +3094,6 @@  static void svm_intr_intercept_mix_gif_guest2(struct svm_test *test)
 	report(!dummy_isr_recevied, "No interrupt expected");
 
 	stgi();
-	asm volatile("nop");
 	report(0, "must not reach here");
 }
 
@@ -3120,13 +3118,11 @@  static void svm_intr_intercept_mix_nmi_guest(struct svm_test *test)
 	cli(); // should have no effect
 
 	clgi();
-	asm volatile("nop");
 	apic_icr_write(APIC_DEST_SELF | APIC_DEST_PHYSICAL | APIC_DM_NMI, 0);
 	sti_nop(); // should have no effect
 	report(!nmi_recevied, "No NMI expected");
 
 	stgi();
-	asm volatile("nop");
 	report(0, "must not reach here");
 }
 
@@ -3150,11 +3146,9 @@  static void svm_intr_intercept_mix_smi_guest(struct svm_test *test)
 	asm volatile("nop;nop;nop;nop");
 
 	clgi();
-	asm volatile("nop");
 	apic_icr_write(APIC_DEST_SELF | APIC_DEST_PHYSICAL | APIC_DM_SMI, 0);
 	sti_nop(); // should have no effect
 	stgi();
-	asm volatile("nop");
 	report(0, "must not reach here");
 }