From 841caa40908407edf7d8d0960c9c5c869dedfc73 Mon Sep 17 00:00:00 2001 From: Peter Grehan Date: Fri, 6 Sep 2013 05:55:43 +0000 Subject: [PATCH] Allow level-triggered interrupt sources. While this isn't precisely emulated, it is good enough for the single consumer i.e. irq4, the serial port on Linux. --- usr.sbin/bhyve/ioapic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/ioapic.c b/usr.sbin/bhyve/ioapic.c index c712692c937..114b4462ae5 100644 --- a/usr.sbin/bhyve/ioapic.c +++ b/usr.sbin/bhyve/ioapic.c @@ -101,13 +101,13 @@ ioapic_set_pinstate(struct vmctx *ctx, int pin, bool newstate) * XXX * We only deal with: * - edge triggered interrupts - * - physical destination mode * - fixed delivery mode + * Level-triggered sources will work so long as their is + * no sharing. */ low = ioapic->redtbl[pin]; high = ioapic->redtbl[pin] >> 32; if ((low & IOART_INTMASK) == IOART_INTMCLR && - (low & IOART_TRGRMOD) == IOART_TRGREDG && (low & IOART_DESTMOD) == IOART_DESTPHY && (low & IOART_DELMOD) == IOART_DELFIXED) { vector = low & IOART_INTVEC;