serial: only resample THR interrupt on rising edge of IER.THRI
commit1645b8eee558ffe2389a081bf61d08a864c36d2c
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Dec 2014 10:54:42 +0000 (12 11:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Dec 2014 16:34:42 +0000 (15 17:34 +0100)
tree4f24f749a7b33925e3f7a64d8883866ef12fec17
parent023c3a9707d0d9259a1e858cdf7804dd10973fca
serial: only resample THR interrupt on rising edge of IER.THRI

There is disagreement on whether LSR.THRE should be resampled when
IER.THRI goes from 1 to 1.  Bochs only does it if IER.THRI goes from 0
to 1; PCE does it even if IER.THRI is unchanged.  But the Windows driver
seems to always go from 1 to 0 and back to 1, so do things in agreement
with Bochs, because the handling of thr_ipending was reported in 2010
(https://lists.gnu.org/archive/html/qemu-devel/2010-03/msg01914.html)
as breaking DR-DOS Plus.

Reported-by: Roy Tam <roytam@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/char/serial.c