From owner-freebsd-virtualization@freebsd.org Sun Feb 23 16:53:36 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD368241F60 for ; Sun, 23 Feb 2020 16:53:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48QWVS3Bjqz4Ph1 for ; Sun, 23 Feb 2020 16:53:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 6D86E241F5F; Sun, 23 Feb 2020 16:53:36 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D480241F5E for ; Sun, 23 Feb 2020 16:53:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48QWVS0PkZz4Pgl for ; Sun, 23 Feb 2020 16:53:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDEC7F90B for ; Sun, 23 Feb 2020 16:53:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 01NGrZfT067972 for ; Sun, 23 Feb 2020 16:53:35 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 01NGrZxr067971 for virtualization@FreeBSD.org; Sun, 23 Feb 2020 16:53:35 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 205549] bhyve pci passthru stops working after guest is restarted Date: Sun, 23 Feb 2020 16:53:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: sebastian.stroniewskiwojtczak@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2020 16:53:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205549 Sebastian Stroniewski-Wojtczak ch= anged: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian.stroniewskiwojtcz | |ak@gmail.com --- Comment #18 from Sebastian Stroniewski-Wojtczak --- Something is wrong with passthru for USB. I've used "devctl" to detach xHCI for separate USB controller and attached = it back to ppt. Afterward, I've setup properly my linux bhyve and start it. Af= ter few seconds xHCI stops working, nonetheless, simple device was available for short time. Linux inside bhyve side: [ 945.768655] hub 2-1:1.0: USB hub found [ 945.770089] hub 2-1:1.0: 4 ports detected [ 945.925221] usb 1-1.3: new full-speed USB device number 3 using xhci_hcd [ 946.036378] usb 1-1.3: New USB device found, idVendor=3D2a03, idProduct= =3D0043, bcdDevice=3D 0.01 [ 946.036380] usb 1-1.3: New USB device strings: Mfr=3D1, Product=3D2, SerialNumber=3D220 [ 946.036381] usb 1-1.3: Product: Arduino Uno [ 946.036382] usb 1-1.3: Manufacturer: Arduino Srl=20=20=20=20=20=20=20=20= =20=20=20=20 [ 946.036382] usb 1-1.3: SerialNumber: 95536333830351513160 [ 946.042136] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device [ 965.696484] xhci_hcd 0000:00:06.0: xHCI host not responding to stop endp= oint command. [ 965.696517] xhci_hcd 0000:00:06.0: xHCI host controller not responding, assume dead [ 965.696541] xhci_hcd 0000:00:06.0: HC died; cleaning up [ 965.696858] cdc_acm 1-1.3:1.0: acm_port_activate - usb_submit_urb(ctrl i= rq) failed [ 965.698578] usb 1-1: USB disconnect, device number 2 [ 965.698581] usb 1-1.3: USB disconnect, device number 3 [ 965.698671] usb 2-1: USB disconnect, device number 2 20 seconds Linux need to detach xHCI device. Next thing I've tried was to unbind and bind my device echo -n "0000:00:06.0" | tee /sys/bus/pci/drivers/xhci_hcd/unbind sleep 5 echo -n "0000:00:06.0" | tee /sys/bus/pci/drivers/xhci_hcd/bind That helps only for few seconds (20s). I can't talk with any USB devices through bhyve passthru. Before vm start: 10421b21 00100006 0c033000 00000010 f7c00004 00000000 00000000 00000000=20 00000000 00000000 00000000 84881043 00000000 00000050 00000000 00000113=20 After vm xHCI crash, restart/poweroff vm does not resolve issue (bind/unbind also failed): 0421b21 00100406 0c033000 00000010 f7c00004 00000000 00000000 00000000=20 00000000 00000000 00000000 84881043 00000000 00000050 00000000 00000113=20 It seemd that only VMM is affected. Once I detach my ppt to none device and= set driver to xhci I'm getting access to any devices on xhci, switch it back to= ppt or even clearing data does not help either. --=20 You are receiving this mail because: You are the assignee for the bug.=