Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Oct 2018 19:53:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 232084] bhyve crashes with SIGSEGV under NetBSD guest and xhci
Message-ID:  <bug-232084-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232084

            Bug ID: 232084
           Summary: bhyve crashes with SIGSEGV under NetBSD guest and xhci
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: olevole@olevole.ru

Hello. NetBSD works fine in bhyve, except for the case when the bhyve
emulates eXtensible Host Controller Interface (xHCI) USB controller. (
-s 30,xhci,tablet )

LLDB output upon bhyve crash (guest screen: https://pasteboard.co/HFAqTOk.p=
ng
):

https://github.com/freebsd/freebsd/blob/ebeb3285f598d6c1214c49598c951493d09=
e1067/usr.sbin/bhyve/pci_xhci.c#L735

Process 57083 stopped
* thread #20, name =3D 'vcpu 0', stop reason =3D signal SIGSEGV: invalid
address (fault address: 0x0)
    frame #0: 0x00000000002587d8
bhyve`pci_xhci_insert_event(sc=3D0x00000008010a5100,
evtrb=3D0x00007fffddbeba78, do_intr=3D0) at pci_xhci.c:735
   732          rts =3D &sc->rtsregs;
   733
   734          erdp =3D rts->intrreg.erdp & ~0xF;
-> 735          erdp_idx =3D (erdp -
rts->erstba_p[rts->er_deq_seg].qwEvrsTablePtr) /
   736                     sizeof(struct xhci_trb);
   737
   738          DPRINTF(("pci_xhci: insert event 0[%lx] 2[%x] 3[%x]\r\n"
(lldb) frame variable erdp_idx
(int) erdp_idx =3D 0


in all likelihood, the problem in the rts->erstba_p structure because
when I commenting 735 line ( erdp_idx is used only in DPRINTF debug
output ) the next stop when working with this structure again, e.g:

Process 58354 stopped
* thread #20, name =3D 'vcpu 0', stop reason =3D signal SIGSEGV: invalid
address (fault address: 0x8)
    frame #0: 0x0000000000258881
bhyve`pci_xhci_insert_event(sc=3D0x00000008010a5100,
evtrb=3D0x00007fffddbeba78, do_intr=3D0) at pci_xhci.c:750
   747          evtrbptr =3D &rts->erst_p[rts->er_enq_idx];
   748
   749          /* TODO: multi-segment table */
-> 750          if (rts->er_events_cnt >=3D rts->erstba_p->dwEvrsTableSize)=
 {
   751                  DPRINTF(("pci_xhci[%d] cannot insert event;
ring full\r\n",
   752                           __LINE__));
   753                  err =3D XHCI_TRB_ERROR_EV_RING_FULL;


What can I do to find out the reasons for this behavior? Thanks!

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232084-227>