From owner-freebsd-virtualization@freebsd.org Sun Apr 2 16:11:55 2017 Return-Path: Delivered-To: freebsd-virtualization@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 62434D29D1F for ; Sun, 2 Apr 2017 16:11:55 +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 1A53D96A for ; Sun, 2 Apr 2017 16:11:54 +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 v32GBgev031974; Sun, 2 Apr 2017 09:11:42 -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 v32GBf3t031973; Sun, 2 Apr 2017 09:11:41 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201704021611.v32GBf3t031973@pdx.rh.CN85.dnsmgr.net> Subject: Re: Assigning PCI ethernet interfaces to VMs in bhyve In-Reply-To: To: Anish Date: Sun, 2 Apr 2017 09:11:41 -0700 (PDT) CC: Daniel Tihanyi , "freebsd-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.23 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, 02 Apr 2017 16:11:55 -0000 > Hi Daniel, > For Intel cards only condition is that in the VM, these devices should > start at function 0 because of PCI enumeration, always starts at function > 0. If you want to assign multiple ports to VM, it can be function 0 and any > other function, for example: > > Host PCI dev 4/0/1 and 4/0/2 are to be assigned to guest at virtual PCI > slot 10, assignment can be: > 4/0/1 -> 10/0 > 4/0/2 -> 10/1 > > > Regards, > Anish > > On Sun, Apr 2, 2017 at 3:09 AM, Daniel Tihanyi wrote: > > > Hello, > > > > I have a FreeBSD host running VMs on bhyve. I already have a few PCI-X > > ethernet cards assigned to each of them, but only with one ethernet > > interface. I would like to purchase a few PCI-X Ethernet cards with 4 > > interfaces. My question is if it is possible to assign the individual > > interfaces on the card to different VMs? On the bhyve Wiki, there is an > > example for this, but it is assigning the interfaces into the same VM, > > although to different slots. I am planning to use Intel cards for this > > of course. Has anyone experience in this? > > Thank you very much in advance! > > > > Daniel Tihanyi I think what he wants to do though is assign 1 each of the 4 PCI devs to seperate VM's as in First VM: 4/0/1 Second VM: 4/0/2 Third VM; 4/0/3 Forth VM: 4/0/4 I do not know if this well or well not work. It might work if the 4 devices appear behind a bridge chip and are not subdevs but are actual full devies of there own as in: first vm: 4/0/1 second vm: 5/0/1 third vm: 6/0/1 forth vm: 7/0/1 I have hardware of this later type I could test with, though it is PCI, and 10/100, so may present other issues (BAR size/alignment.) -- Rod Grimes rgrimes@freebsd.org