From owner-freebsd-bugs@freebsd.org Wed Dec 23 19:32:15 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E2C8A50845 for ; Wed, 23 Dec 2015 19:32:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DE621357 for ; Wed, 23 Dec 2015 19:32:15 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tBNJWELd082717 for ; Wed, 23 Dec 2015 19:32:14 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 205549] bhyve pci passthru stops working after guest is restarted Date: Wed, 23 Dec 2015 19:32:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: sm@ara-ler.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 19:32:15 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205549 Bug ID: 205549 Summary: bhyve pci passthru stops working after guest is restarted Product: Base System Version: 11.0-CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: sm@ara-ler.com This is 100% reproducible in Thinkpad T430 with FreeBSD 11-CURRENT base r292595 (Dec 22, 2015). I pass trough a PCI device (USB controller) to a Linux guest. When I boot Linux VM, it fully controls the USB controller and those USB ports, and I see e.g. the USB flash in Linux when plug it in. As soon as I shut down Linux, the host takes the control over, and the USB flash drive appears as /dev/da0 in FreeBSD. The bhyve guest (re)started then does has no control on that PCI device although it shows it: $ lspci -v 00:07.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI]) Subsystem: Lenovo Device 21f3 Flags: bus master, medium devsel, latency 0, IRQ 24 Memory at c0010000 (64-bit, prefetchable) [size=64K] Capabilities: [70] Power Management version 2 Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+ Kernel driver in use: xhci_hcd $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub This behavior does not depend on the time when the USB device is plugged: before guest is booted or after, unplugged before shutdown or after. The host FreeBSD has the same device description before or after the issue: $ pciconf -vl .... ppt0@pci0:0:20:0: class=0x0c0330 card=0x21f317aa chip=0x1e318086 rev=0x04 hdr=0x00 vendor = 'Intel Corporation' device = '7 Series/C210 Series Chipset Family USB xHCI Host Controller' class = serial bus subclass = USB .... When the USB device appears in the host device list it looks as: $ devinfo | grep -B15 mass pcib1 pci1 sdhci_pci0 pcib2 pci2 iwn0 pcib3 pci3 ehci1 usbus1 uhub1 uhub3 umass0 <== Since it's a XHCI controller I tried to run FreeBSD kernel with xhci driver not compiled-in. It does not help. Most likely the USB controller can be also handled by ehci driver. -- You are receiving this mail because: You are the assignee for the bug.