Bug 68431

Summary: Some VFs claim to be multi-function, which is impossible
Product: Drivers Reporter: Bjorn Helgaas (bjorn)
Component: PCIAssignee: drivers_pci (drivers_pci)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://lkml.kernel.org/r/20140109153513.21446.31778.stgit@bling.home
Kernel Version: 3.13-rc1 Subsystem:
Regression: No Bisected commit-id:
Attachments: Emulex OneConnect 10Gb NIC config space

Description Bjorn Helgaas 2014-01-09 21:23:18 UTC
Created attachment 121441 [details]
Emulex OneConnect 10Gb NIC config space

From Alex's mail:

> Per the SR-IOV spec rev 1.1:

> 3.4.1.9 Header Type (Offset 0Eh)

> "... For VFs, this register must be RO Zero."

> Unfortunately some devices get this wrong, ex. Emulex OneConnect 10Gb
> NIC.  When they do it makes us handle ACS testing and therefore IOMMU
> groups as if they were actual multifunction devices and require ACS
> capabilities to make sure there's no peer-to-peer between functions.
> VFs are never traditional multifunction devices.

Note the Header Type at 0x0e in the attached config space dump:

09:04.0 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 01)
...
00: ff ff ff ff 04 00 10 00 01 00 00 02 00 00 80 00

Header Type == 0x80; bit 7 is set, which indicates a multi-function device.
Comment 1 Bjorn Helgaas 2014-06-03 23:39:01 UTC
Resolved by

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=aa9319773619c9d0caf2c4abc3ac12dc879dc8ed

which appeared in v3.14-rc1.