mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-24 23:16:45 +00:00
kvm,8250: Fix ->counter clearing
We need to reset the counter to zero before we inject an interrupt to the guest. Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
133bedc1b8
commit
0bc4cf7872
+2
-3
@@ -105,6 +105,7 @@ void serial8250__interrupt(struct kvm *self)
|
||||
|
||||
/* Only send an IRQ if there's work to do. */
|
||||
if (new_iir) {
|
||||
dev->counter = 0;
|
||||
dev->iir = new_iir;
|
||||
kvm__irq_line(self, dev->irq, 0);
|
||||
kvm__irq_line(self, dev->irq, 1);
|
||||
@@ -164,10 +165,8 @@ static bool serial8250_out(struct kvm *self, uint16_t port, void *data, int size
|
||||
}
|
||||
fflush(stdout);
|
||||
|
||||
if (dev->counter++ > 10) {
|
||||
if (dev->counter++ > 10)
|
||||
dev->iir = UART_IIR_NO_INT;
|
||||
dev->counter = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user