[PATCH kvm-unit-tests 1/3] Support #DE (divide error) exception handlers

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

 



Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 x86/idt.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/x86/idt.c b/x86/idt.c
index 590839f..4480833 100644
--- a/x86/idt.c
+++ b/x86/idt.c
@@ -100,6 +100,11 @@ asm (".pushsection .text \n\t"
      "pushq $13 \n\t"
      "jmp handle_exception \n\t"
 
+     "de_fault: \n\t"
+     "pushq $0 \n\t"
+     "pushq $0 \n\t"
+     "jmp handle_exception \n\t"
+
      "handle_exception: \n\t"
      "push %r15; push %r14; push %r13; push %r12 \n\t"
      "push %r11; push %r10; push %r9; push %r8 \n\t"
@@ -118,9 +123,10 @@ asm (".pushsection .text \n\t"
 
 void setup_idt(void)
 {
-    extern char ud_fault, gp_fault;
+    extern char ud_fault, gp_fault, de_fault;
 
     lidt(idt, 256);
+    set_idt_entry(&idt[0], &de_fault, 0);
     set_idt_entry(&idt[6], &ud_fault, 0);
     set_idt_entry(&idt[13], &gp_fault, 0);
 }
-- 
1.7.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