i8259: add -no-spurious-interrupt-hack option

This patch provides a way to optionally suppress spurious interrupts,
as a workaround for systems described below:

Some old operating systems do not handle spurious interrupts well,
and qemu tends to generate them significantly more often than
real hardware.

Examples:
  - Microport UNIX System V/386 v 2.1 (ca 1987)
    (The main problem I'm fixing: Without this patch, it panics
    sporadically when accessing the hard disk.)
  - AT&T UNIX System V/386 Release 4.0 Version 2.1a (ca 1991)
    See screenshot in "QEMU Official OS Support List":
    http://www.claunia.com/qemu/objectManager.php?sClass=application&iId=9
    (I don't have this system to test.)
  - A report about OS/2 boot lockup from 2004 by Hampa Hug:
    http://lists.nongnu.org/archive/html/qemu-devel/2004-09/msg00367.html
    (My patch was partially inspired by his.)
    Also: http://lists.nongnu.org/archive/html/qemu-devel/2005-06/msg00243.html
    (I don't have this system to test.)

Signed-off-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net>
Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
Matthew Ogilvie 2012-08-23 00:24:43 -06:00 committed by malc
parent 482f7bf86b
commit f278d4947f
5 changed files with 44 additions and 5 deletions

View file

@ -1189,6 +1189,18 @@ 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)