From owner-freebsd-virtualization@freebsd.org Sat Aug 25 02:56:55 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FC7F109DD37 for ; Sat, 25 Aug 2018 02:56:55 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C68DF83942 for ; Sat, 25 Aug 2018 02:56:54 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: by mailman.ysv.freebsd.org (Postfix) id 8B952109DD36; Sat, 25 Aug 2018 02:56:54 +0000 (UTC) Delivered-To: virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A5A5109DD34 for ; Sat, 25 Aug 2018 02:56:54 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A2B283941 for ; Sat, 25 Aug 2018 02:56:53 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w7P2uniA098239; Fri, 24 Aug 2018 19:56:49 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w7P2unlh098238; Fri, 24 Aug 2018 19:56:49 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201808250256.w7P2unlh098238@pdx.rh.CN85.dnsmgr.net> Subject: Re: access usb device from bhyve vm In-Reply-To: <749-1535155926-263682@sneakemail.com> To: John Hein Date: Fri, 24 Aug 2018 19:56:49 -0700 (PDT) CC: virtualization@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 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: Sat, 25 Aug 2018 02:56:55 -0000 > I asked this on usb@, but might get a better bhyve perspective on this > list... > > Does anyone have thought about what it would take to support access to > individual usb devices "natively" from a bhyve vm? The best though on this, and note I have not done this with bhyve, but have done it with ESXi, is to get yourself a PCI USB card, and pass the card in as a PCI device. Note that for bhyve this requires a careful selection of that PCI card, as the BAR's have to be page sized and paged aligned to not have some issues getting it passed in due to the fact that the IOMMU only works on pages aligned and sized stuff. I have asked about what magic would it take to make our USB stack allow this and it is "non trivial". -- Rod Grimes rgrimes@freebsd.org