Can you try the diff below on a host running -current? I think I found a
fix but it does depend on some recent fixes.

DB Cloud Art <dbcloud...@protonmail.com> writes:

> [[PGP Signed Part:Undecided]]
> Thank you, Dave, for confirming.
> This makes sense and I hope this thread may be useful to other people, 
> finding it via search later.
> Cheers!
>
> ------- Original Message -------
> On Tuesday, June 20th, 2023 at 4:16 AM, Dave Voutila <d...@sisu.io> wrote:
>
>
>> I recommend connecting to your guests via ssh. This is a known design
>> issue at the moment without a trivial fix as it's mostly a consequence
>> of our emualted uart, com(4), and how we emulate a legacy PIC.
>>

diff refs/heads/master refs/heads/vmd-edge
commit - 7869b2fdaac7e118bfd1783874fe25ce3b8b0f09
commit + 00d448cdbe2461f27419aaf79520a0cef720aefc
blob - b98e7bdc69ac6a12eb84eaaf97ec43ecdbe83733
blob + 248e3b161e88be505a88411156dc57a2772bd4fa
--- usr.sbin/vmd/i8253.c
+++ usr.sbin/vmd/i8253.c
@@ -371,7 +371,6 @@ i8253_fire(int fd, short type, void *arg)
        struct i8253_channel *ctr = (struct i8253_channel *)arg;

        vcpu_assert_pic_irq(ctr->vm_id, 0, 0);
-       vcpu_deassert_pic_irq(ctr->vm_id, 0, 0);

        if (ctr->mode != TIMER_INTTC) {
                timerclear(&tv);
blob - 43dce7b10d1467a5b7ac7f3308d01e32b4d0b9ee
blob + 4fc147b19c99627e386ab26355b8f90a6ae5872b
--- usr.sbin/vmd/mc146818.c
+++ usr.sbin/vmd/mc146818.c
@@ -150,7 +150,6 @@ rtc_fireper(int fd, short type, void *arg)
        rtc.regs[MC_REGC] |= MC_REGC_PF;

        vcpu_assert_pic_irq((ptrdiff_t)arg, 0, 8);
-       vcpu_deassert_pic_irq((ptrdiff_t)arg, 0, 8);

        evtimer_add(&rtc.per, &rtc.per_tv);
 }
blob - bc23876bf0392312335da0d00e143583a87549af
blob + 98ed7dbecf2120ccbf9a16198ee479cb15aebc5f
--- usr.sbin/vmd/ns8250.c
+++ usr.sbin/vmd/ns8250.c
@@ -82,7 +82,6 @@ ratelimit(int fd, short type, void *arg)
        com1_dev.regs.iir &= ~IIR_NOPEND;

        vcpu_assert_pic_irq(com1_dev.vmid, 0, com1_dev.irq);
-       vcpu_deassert_pic_irq(com1_dev.vmid, 0, com1_dev.irq);
        mutex_unlock(&com1_dev.mutex);
 }

@@ -160,7 +159,6 @@ com_rcv_event(int fd, short kind, void *arg)
        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);

Reply via email to