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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 x86/eventinj.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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;
-- 
1.8.3.1


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux