Skip to contentSkip to conversation

pci: Add ACS quirk for Emulex NICs

PATCH In review Sathya Perla 3 participants 3 messages Jan 13, 2015 – Jan 16, 2015 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: Add ACS quirk for Emulex NICs

From: Vasundhara Volam <[email protected]>

As Skyhawk and BE3-R (both multi-function devices) don't advertise the PCI-ACS capability, the vfio driver places all the functions of these devices in a single IOMMU group. Attaching (via PCI-passthru)two different Skyhawk/BE3-R partitions (nPAR, Flex etc PFs) using vfio, to different guests doesn't work as vfio only allows functions in *different* IOMMU groups to be assigned to different guests.

As peer-to-peer access between PFs in Skyhawk/BE3-R is not possible, we can treat them as "fully isolated" even though the device doesn't advertise ACS. So, this patch adds a PCI quirk for Skyhawk and BE3-R chips to fix this problem.

---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/quirks.c +2 -0
index ed6f89b..3d24629 100644
@@ -3713,6 +3713,8 @@ static const struct pci_dev_acs_enabled {
 	{ PCI_VENDOR_ID_INTEL, 0x1551, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, 0x1558, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
+	{ 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */
+	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
 	{ 0 }
 };
 
Signature · 1 line
2.2.0
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Sathya Perla

From: Vasundhara Volam <[email protected]>

As Skyhawk and BE3-R (both multi-function devices) don't advertise the PCI-ACS capability, the vfio driver places all the functions of these devices in a single IOMMU group. Attaching (via PCI-passthru)two different Skyhawk/BE3-R partitions (nPAR, Flex etc PFs) using vfio, to different guests doesn't work as vfio only allows functions in *different* IOMMU groups to be assigned to different guests.

As peer-to-peer access between PFs in Skyhawk/BE3-R is not possible, we can treat them as "fully isolated" even though the device doesn't advertise ACS. So, this patch adds a PCI quirk for Skyhawk and BE3-R chips to fix this problem.

Quoted 5 lines
---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 13 lines
drivers/pci/quirks.c +2 -0
index ed6f89b..3d24629 100644
@@ -3713,6 +3713,8 @@ static const struct pci_dev_acs_enabled {
 	{ PCI_VENDOR_ID_INTEL, 0x1551, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, 0x1558, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
+	{ 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */
+	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
 	{ 0 }
 };
 
maintainer
#2 lore raw
In reply to Sathya Perla

[+cc Alex]

Quoted 9 lines · Sathya Perla

From: Vasundhara Volam <[email protected]>

As Skyhawk and BE3-R (both multi-function devices) don't advertise the PCI-ACS capability, the vfio driver places all the functions of these devices in a single IOMMU group. Attaching (via PCI-passthru)two different Skyhawk/BE3-R partitions (nPAR, Flex etc PFs) using vfio, to different guests doesn't work as vfio only allows functions in *different* IOMMU groups to be assigned to different guests.

Quoted 7 lines

As peer-to-peer access between PFs in Skyhawk/BE3-R is not possible, we can treat them as "fully isolated" even though the device doesn't advertise ACS. So, this patch adds a PCI quirk for Skyhawk and BE3-R chips to fix this problem.

Applied with Alex's ack to pci/virtualization for v3.20, thanks!

Quoted 24 lines
---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/quirks.c +2 -0
index ed6f89b..3d24629 100644
@@ -3713,6 +3713,8 @@ static const struct pci_dev_acs_enabled {
 	{ PCI_VENDOR_ID_INTEL, 0x1551, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, 0x1558, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
+	{ 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */
+	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
 	{ 0 }
 };
 
Signature · 6 lines
2.2.0

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html