diff mbox

[kvm-unit-tests,11/18] x86: eventinj: enable NP test in 64-bit mode

Message ID 1398698581-17302-12-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini April 28, 2014, 3:22 p.m. UTC
Sharing the GDT between 32-bit and 64-bit means that the non-present
code segment is now always there, and the test just works.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/eventinj.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox

Patch

diff --git a/x86/eventinj.c b/x86/eventinj.c
index 1df3a43..050bc8c 100644
--- a/x86/eventinj.c
+++ b/x86/eventinj.c
@@ -83,6 +83,7 @@  static void of_isr(struct ex_regs *r)
 	printf("OF isr running\n");
 	test_count++;
 }
+#endif
 
 static void np_isr(struct ex_regs *r)
 {
@@ -90,7 +91,6 @@  static void np_isr(struct ex_regs *r)
 	set_idt_sel(33, read_cs());
 	test_count++;
 }
-#endif
 
 static void de_isr(struct ex_regs *r)
 {
@@ -316,7 +316,6 @@  int main()
 	while(test_count != 2); /* wait for second irq */
 	irq_disable();
 
-#ifndef __x86_64__
 	/* test fault durint NP delivery */
 	printf("Before NP test\n");
 	test_count = 0;
@@ -327,7 +326,6 @@  int main()
 	asm volatile ("int $33");
 	printf("After int33\n");
 	report("NP exception", test_count == 2);
-#endif
 
 	/* generate NMI that will fault on IDT */
 	test_count = 0;