On Tue, 14 Jul 2026 15:28:39 +0200, Kirill A. Korinsky <[email protected]> wrote: > > On Tue, 14 Jul 2026 12:01:36 +0200, > Philippe Mathieu-Daudé <[email protected]> wrote: > > > > Hi Kirill, > > > > On 13/7/26 13:16, Kirill A. Korinsky wrote: > > > xhci_intr_raise() returned early whenever ERDP.EHB was set; that also > > > skipped IRQ assertion after the guest cleared IMAN.IP while leaving the > > > event handler busy bit asserted. > > > > > > Track the previous IMAN.IP state and suppress only duplicate raises; > > > when ERDP.EHB remains set after IMAN.IP is cleared, assert the IRQ again > > > so the guest can observe the pending event. > > > > > > Signed-off-by: Kirill A. Korinsky <[email protected]> > > > --- > > > hw/usb/hcd-xhci.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c > > > index 2cdab3ba0e..ce06d52c36 100644 > > > --- a/hw/usb/hcd-xhci.c > > > +++ b/hw/usb/hcd-xhci.c > > > @@ -577,12 +577,13 @@ static void xhci_intr_update(XHCIState *xhci, int v) > > > static void xhci_intr_raise(XHCIState *xhci, int v) > > > { > > > bool pending = (xhci->intr[v].erdp_low & ERDP_EHB); > > > + bool was_raised = (xhci->intr[v].iman & IMAN_IP); > > > > Per your description we are missing to clear ERDP_EHB? > > > > @@ -592,6 +592,7 @@ static void xhci_intr_raise(XHCIState *xhci, int v) > > } > > if (xhci->intr_raise) { > > if (xhci->intr_raise(xhci, v, true)) { > > + xhci->intr[v].erdp_low &= ~ERDP_EHB; > > xhci->intr[v].iman &= ~IMAN_IP; > > } > > } > > > > What seems a real fix for that may be a real root cause. > > My test is simple: I boot OpenBSD/octeon in my machine with USB disk, and > inside machine, via SSH, run cvs checkout of ports with -Q option (no > output). It produces ~200k files and works for about 30 minutes. > > Without my or your diff the cvs process stuck in biowait, I can use any IO > at all, ls is blocked. > > But network and things like ps works well. > > And enough input from serial console usually wake up machines. > > So far I had reverted my hack and replaced by yours fix, and it survives two > checkout without an issues. > > I'll drop that patch from my series. >
I'd like to whitdraw my claim. I can't reproduce issue on amd64 and riscv64, and I can reproduce issue with ~ERDP_EHB. So, it indicates that issue is my octeon machine (quite likley) or something is missed in mips implementation. -- wbr, Kirill
