Revert "i8259: add -no-spurious-interrupt-hack option"
authormalc <av1474@comtv.ru>
Mon, 27 Aug 2012 14:33:12 +0000 (18:33 +0400)
committermalc <av1474@comtv.ru>
Mon, 27 Aug 2012 14:33:12 +0000 (18:33 +0400)
This reverts commit f278d4947fff814dcde2ef2acad36d172ff8be35.

Signed-off-by: malc <av1474@comtv.ru>
cpu-exec.c
hw/i8259.c
qemu-options.hx
sysemu.h
vl.c

index 625fbb0e0f87a24e467104191956d4b44a87e6bc..134b3c4fcfb62feebb77b69fe11b55e299e3e0b6 100644 (file)
@@ -329,15 +329,11 @@ int cpu_exec(CPUArchState *env)
                                                           0);
                             env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ);
                             intno = cpu_get_pic_interrupt(env);
-                            if (intno >= 0) {
-                                qemu_log_mask(CPU_LOG_TB_IN_ASM,
-                                              "Servicing hardware INT=0x%02x\n",
-                                              intno);
-                                do_interrupt_x86_hardirq(env, intno, 1);
-                                /* ensure that no TB jump will be modified as
-                                   the program flow was changed */
-                                next_tb = 0;
-                            }
+                            qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno);
+                            do_interrupt_x86_hardirq(env, intno, 1);
+                            /* ensure that no TB jump will be modified as
+                               the program flow was changed */
+                            next_tb = 0;
 #if !defined(CONFIG_USER_ONLY)
                         } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) &&
                                    (env->eflags & IF_MASK) && 
index 7ecb7e1de6b1e8af53f347f22c5ad13aad13c3b4..65876662a112096a4fd224d10aafba897b662e07 100644 (file)
@@ -26,7 +26,6 @@
 #include "isa.h"
 #include "monitor.h"
 #include "qemu-timer.h"
-#include "sysemu.h"
 #include "i8259_internal.h"
 
 /* debug PIC */
@@ -194,20 +193,6 @@ int pic_read_irq(DeviceState *d)
                 pic_intack(slave_pic, irq2);
             } else {
                 /* spurious IRQ on slave controller */
-                if (no_spurious_interrupt_hack) {
-                    /* Pretend it was delivered and acknowledged.  If
-                     * it was spurious due to slave_pic->imr, then
-                     * as soon as the mask is cleared, the slave will
-                     * re-trigger IRQ2 on the master.  If it is spurious for
-                     * some other reason, make sure we don't keep trying
-                     * to half-process the same spurious interrupt over
-                     * and over again.
-                     */
-                    s->irr &= ~(1<<irq);
-                    s->last_irr &= ~(1<<irq);
-                    s->isr &= ~(1<<irq);
-                    return -1;
-                }
                 irq2 = 7;
             }
             intno = slave_pic->irq_base + irq2;
@@ -217,9 +202,6 @@ int pic_read_irq(DeviceState *d)
         pic_intack(s, irq);
     } else {
         /* spurious IRQ on host controller */
-        if (no_spurious_interrupt_hack) {
-            return -1;
-        }
         irq = 7;
         intno = s->irq_base + irq;
     }
index 2a6d8295513dfd4a151c3975e54b8966e6340c83..0682338e9f9a18f05052d30cf9f02a68532a37d0 100644 (file)
@@ -1189,18 +1189,6 @@ Windows 2000 is installed, you no longer need this option (this option
 slows down the IDE transfers).
 ETEXI
 
-DEF("no-spurious-interrupt-hack", 0, QEMU_OPTION_no_spurious_interrupt_hack,
-    "-no-spurious-interrupt-hack     disable delivery of spurious interrupts\n",
-    QEMU_ARCH_I386)
-STEXI
-@item -no-spurious-interrupt-hack
-@findex -no-spurious-interrupt-hack
-Use it as a workaround for operating systems that drive PICs in a way that
-can generate spurious interrupts, but the OS doesn't handle spurious
-interrupts gracefully.  (e.g. late 80s/early 90s versions of ATT UNIX
-and derivatives)
-ETEXI
-
 HXCOMM Deprecated by -rtc
 DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "", QEMU_ARCH_I386)
 
index 0170109e12aca5f95ed2d113f043bd24ca1a1c09..65552acee5618807e75c41fda6c07aa89c12ff1a 100644 (file)
--- a/sysemu.h
+++ b/sysemu.h
@@ -117,7 +117,6 @@ extern int graphic_depth;
 extern DisplayType display_type;
 extern const char *keyboard_layout;
 extern int win2k_install_hack;
-extern int no_spurious_interrupt_hack;
 extern int alt_grab;
 extern int ctrl_grab;
 extern int usb_enabled;
diff --git a/vl.c b/vl.c
index 6de41c124dc42a44a3f5dbbfe4d3ff08b6e64353..16d04a2ee2561bfcc5a0a1e46e58b4b7afb8c0a2 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -204,7 +204,6 @@ CharDriverState *serial_hds[MAX_SERIAL_PORTS];
 CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
 CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES];
 int win2k_install_hack = 0;
-int no_spurious_interrupt_hack = 0;
 int usb_enabled = 0;
 int singlestep = 0;
 int smp_cpus = 1;
@@ -3047,9 +3046,6 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_win2k_hack:
                 win2k_install_hack = 1;
                 break;
-            case QEMU_OPTION_no_spurious_interrupt_hack:
-                no_spurious_interrupt_hack = 1;
-                break;
             case QEMU_OPTION_rtc_td_hack: {
                 static GlobalProperty slew_lost_ticks[] = {
                     {