vmd(8): backout ns8250 changes.
authordv <dv@openbsd.org>
Mon, 13 Mar 2023 18:09:41 +0000 (18:09 +0000)
committerdv <dv@openbsd.org>
Mon, 13 Mar 2023 18:09:41 +0000 (18:09 +0000)
This backs out commit h1IJwTVsYWfnRKWy which intended to fix interrupt
issues on slower host hardware. Unfortunately, this causes a race
condition on much faster host hardware. It still requires investigation.

With an "I told you so" about touching ns8250 from mlarkin@

usr.sbin/vmd/ns8250.c

index f9d1433..2c20e21 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ns8250.c,v 1.35 2023/01/30 21:43:12 dv Exp $ */
+/* $OpenBSD: ns8250.c,v 1.36 2023/03/13 18:09:41 dv Exp $ */
 /*
  * Copyright (c) 2016 Mike Larkin <mlarkin@openbsd.org>
  *
@@ -153,15 +153,14 @@ com_rcv_event(int fd, short kind, void *arg)
                return;
        }
 
-       if ((com1_dev.regs.lsr & LSR_RXRDY) == 0) {
+       if ((com1_dev.regs.lsr & LSR_RXRDY) == 0)
                com_rcv(&com1_dev, (uintptr_t)arg, 0);
 
-               /* If pending interrupt, inject */
-               if ((com1_dev.regs.iir & IIR_NOPEND) == 0) {
-                       /* XXX: vcpu_id */
-                       vcpu_assert_pic_irq((uintptr_t)arg, 0, com1_dev.irq);
-                       vcpu_deassert_pic_irq((uintptr_t)arg, 0, com1_dev.irq);
-               }
+       /* If pending interrupt, inject */
+       if ((com1_dev.regs.iir & IIR_NOPEND) == 0) {
+               /* XXX: vcpu_id */
+               vcpu_assert_pic_irq((uintptr_t)arg, 0, com1_dev.irq);
+               vcpu_deassert_pic_irq((uintptr_t)arg, 0, com1_dev.irq);
        }
 
        mutex_unlock(&com1_dev.mutex);