Re: [vfio-users] sr-iov support on main boards

2017-08-07 Thread Alex Williamson
On Mon, 24 Jul 2017 09:35:40 +0200
Torbjorn Jansson  wrote:

> Hello.
> 
> i'm considering upgrading my linux box that i use for virtualization 
> (i5-3470, 
> Z77 mb).
> at the moment i have a successfully working setup where i pass thru a gtx970 
> to 
> a windows vm.
> i also have an aging 4 port network card, see below:
> --
> 04:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet 
> Controller (Copper) (rev 06)
> 04:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet 
> Controller (Copper) (rev 06)
> 05:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet 
> Controller (Copper) (rev 06)
> 05:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet 
> Controller (Copper) (rev 06)
> --


Interestingly, we have quirks for most of the 82571 cards, but not the
quad port because the onboard switch doesn't support ACS so everything
would get grouped back together anyway.
 
> i was thinking of replacing this card since i at the moment can't assign this 
> in a good way, my only option now is to assign all 4 ports to same vm which 
> doesn't really help.

A dual port version of the same might give your two NICs in separate
groups depending on the ACS capabilities/quirks where it's installed
if you're looking for a cheap option.
 
> so, i was thinking of getting a x99 based mb, a xeon e5 v4 cpu and a I350-T2 
> network card that supports sr-iov.
> 
> question is, how do i know that the main board also have the necessary bits 
> for 
> sr-iov support?
> as i understand it, the bios have to do something too to make it work.
> 
> 
> main boards i was considering was MSI X99A gaming 7 and also ASUS X99-E WS.
> the msi board have a nice block diagram that says how things is connected and 
> manual looks abit better
> 
> asus manual i don't really get, i didn't find any clear indication of how 
> many 
> lanes you get on the slots and what is listed is a bit confusing.
> 
> my thinking was that maybe a workstation mb have higher probability of better 
> support for more advanced features like this.
> but this might be an incorrect assumption.
> 
> any advice would be welcomed.

An SR-IOV card needs to be installed into an ACS capable/quirked slot
or everything will be grouped together and it'd be pointless.  The PCH
slot on your Z77 (if it has one) would meet this requirement.  Beyond
that, ARI support can play a factor in the bus number layout and if it
exists can make something like an 82756/i350 work without BIOS support
given its scant SR-IOV resource requirements.  Without it, extra bus
numbers might need to be allocated which requires BIOS support, but
Linux can do as well with a pci=assign-buses boot options (pci=realloc
is also a useful options).  For a 1Gbps NIC, you're not really losing
anything by installing it into a PCH root port slot, so I'd give that a
shot on your current board unless you're just using this as an excuse to
upgrade the whole system.  Thanks,

Alex

___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] FLR supporting serial chips?

2017-08-07 Thread Alex Williamson
On Mon, 7 Aug 2017 17:52:04 -0400
"taii...@gmx.com"  wrote:

> I want to add physical serial ports to a VM but I can't find any FLR 
> supporting serial cards (I have looked at spec sheets for the chips no luck)
> 
> Ideally there would be a multi port card (say 4 or so) where every port 
> can be separately assigned.
> 
> Anyone have any info? - Thanks

I think you're headed in the wrong direction, serial ports and PCI
device assignment can be done, but it's not a great match.  For
starters, serial ports don't do DMA, so the whole IOMMU thing is a bit
overkill.  You're also not likely to find a serial ASIC designed within
the last 20yrs, so things like ACS and FLR are mostly out of the
question, besides the device state of a serial port is pretty minimal
and a device specific reset could probably be made to handle it, but
I'm not sure it's even necessary.  Performance is also likely to be not
much, if any, better than just serial passthrough because the register
set of a serial device doesn't fill a 4K page or may be implemented as
I/O port rather than MMIO, so you'll probably trap to QEMU for every
access anyway unless you can get 4k alignment on the MMIO BARs.  USB
serial passthrough might be a better option, but FLR seems
exceptionally unlikely. Thanks,

Alex

___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] Is there some method to merge 2 iommu group if I disable ACS

2017-08-07 Thread Alex Williamson
On Aug 7, 2017 5:39 AM, "Wuzongyong (Euler Dept)" 
wrote:

Hi,



Assume that an endpoint device(called ep1) belongs to iommu group 1, and
another endpoint device(called ep2) belongs to iommu group 2.

Moreover, these two devices locate in different downstream ports of the
same switch respectively. If I disable the ACS of these downstream

ports,  we know ep1 and ep2 should locate in the same iommu group. So the
question is if I can regenerate a iommu group to let ep1 and ep2

locate in the same iommu group and let ep1 and ep2  can’t be assigned to
two different VMs without  host rebooting?


Why would you want to be able to do this?
___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users


Re: [vfio-users] Is there some method to merge 2 iommu group if I disable ACS

2017-08-07 Thread Alex Williamson
On Mon, 7 Aug 2017 06:43:30 -0600
Alex Williamson  wrote:

> On Aug 7, 2017 5:39 AM, "Wuzongyong (Euler Dept)" 
> wrote:
> 
> Hi,
> 
> 
> 
> Assume that an endpoint device(called ep1) belongs to iommu group 1, and
> another endpoint device(called ep2) belongs to iommu group 2.
> 
> Moreover, these two devices locate in different downstream ports of the
> same switch respectively. If I disable the ACS of these downstream
> 
> ports,  we know ep1 and ep2 should locate in the same iommu group. So the
> question is if I can regenerate a iommu group to let ep1 and ep2
> 
> locate in the same iommu group and let ep1 and ep2  can’t be assigned to
> two different VMs without  host rebooting?


Wow, complete formatting fail from gmail on my phone.  Sorry for that.
Question is:

> Why would you want to be able to do this?

Thanks,

Alex

___
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users