From owner-freebsd-virtualization@FreeBSD.ORG Thu Feb 12 11:23:27 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7741BBF6 for ; Thu, 12 Feb 2015 11:23:27 +0000 (UTC) Received: from mail.h3q.com (mail.h3q.com [213.73.89.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.h3q.com", Issuer "Thawte DV SSL CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 10BB51E6 for ; Thu, 12 Feb 2015 11:23:26 +0000 (UTC) Received: (qmail 16689 invoked from network); 12 Feb 2015 11:16:42 -0000 Received: from mail.h3q.com (HELO mail.h3q.com) (cryx) by mail.h3q.com with ESMTPS (DHE-RSA-CAMELLIA256-SHA encrypted); 12 Feb 2015 11:16:42 -0000 Message-ID: <54DC8B98.4090902@h3q.com> Date: Thu, 12 Feb 2015 12:16:40 +0100 From: Philipp Wuensche User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: bhyve and PCI Passthrough a USB Controller Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 12 Feb 2015 11:23:27 -0000 Hi, I'm currently trying to passthrough a PCIe USB 3.0 Controller to one of my bhyve VMs. I'm running 10.1-RELEASE and the controller is a Renesas Technology Corp. uPD720202 USB 3.0 Host Controller After disabling the xhci driver in the FreeBSD kernel and putting the correct pci-id into loader.conf the controller is hooked to the vmm module: ppt1@pci0:7:0:0: class=0x0c0330 card=0x00151912 chip=0x00151912 rev=0x02 hdr=0x00 vendor = 'Renesas Technology Corp.' class = serial bus subclass = USB lspic shows me this: # lspci -vxxs 07:00.0 07:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02) (prog-if 30 [XHCI]) Subsystem: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller Flags: bus master, fast devsel, latency 0, IRQ 40 Memory at fbff0000 (64-bit, non-prefetchable) Capabilities: [50] Power Management version 3 Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+ Capabilities: [90] MSI-X: Enable- Count=8 Masked- Capabilities: [a0] Express Endpoint, MSI 00 00: 12 19 15 00 46 00 10 00 02 30 03 0c 10 00 00 00 10: 04 00 ff fb 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 12 19 15 00 30: 00 00 00 00 50 00 00 00 00 00 00 00 28 01 00 00 I then try to bind the controller to the VM using the bhyve command option "-s 7,passthru,7/0/0". The loader starts but then bhyve exits with: "Unsupported MSI-X configuration: 7/0/0" I've had an intel PCIe ethernet card in the very same slot as the USB controller and pci passthrough worked without a problem. I did some research on the matter and I found this post regarding VMware and the very same controller https://communities.vmware.com/message/2203210 There the problem was solved by "deactivating the "Message-Signaled Interrupts" of the "passthroughed" PCI card in the virtual machine, the USB 3.0 controller works now." Is there anything similar with bhyve to get the controller working or should I start hunting for a different controller that might work as on the VMware mailinglist suggested? Any suggestions for known to be working USB Controllers with bhyve and PCI passthrough? Greetings, Philipp