Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Apr 2017 09:11:41 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
To:        Anish <akgupt3@gmail.com>
Cc:        Daniel Tihanyi <tetragir@fastmail.fm>, "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   Re: Assigning PCI ethernet interfaces to VMs in bhyve
Message-ID:  <201704021611.v32GBf3t031973@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <CALnRwMReG7RqiGCKTP8sU%2BV_iDbEss=67mug1AQVWOqx0a2EVw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

> 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 <tetragir@fastmail.fm> 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


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704021611.v32GBf3t031973>