vmd(8): fix broken IRR bit setting for the slave PIC. Noticed by claudio
authormlarkin <mlarkin@openbsd.org>
Wed, 29 Nov 2017 22:08:40 +0000 (22:08 +0000)
committermlarkin <mlarkin@openbsd.org>
Wed, 29 Nov 2017 22:08:40 +0000 (22:08 +0000)
when he tried to make a vm with 4 network interfaces.

ok claudio

usr.sbin/vmd/i8259.c

index 2c1e8dc..5944205 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: i8259.c,v 1.15 2017/09/18 00:05:15 dlg Exp $ */
+/* $OpenBSD: i8259.c,v 1.16 2017/11/29 22:08:40 mlarkin Exp $ */
 /*
  * Copyright (c) 2016 Mike Larkin <mlarkin@openbsd.org>
  *
@@ -223,7 +223,7 @@ i8259_assert_irq(uint8_t irq)
        } else {
                irq -= 8;
                if (!ISSET(pics[SLAVE].imr, 1 << irq)) {
-                       SET(pics[SLAVE].irr, irq);
+                       SET(pics[SLAVE].irr, 1 << irq);
                        pics[SLAVE].asserted = 1;
 
                        /* Assert cascade IRQ on master PIC */