Skip to contentSkip to conversation

PCI: Mark broken INTx masking for Mellanox devices

PATCH Applied Gavin Shan 3 participants 4 messages Aug 12, 2014 – Sep 5, 2014 PCI

lore
Share & tools
lore

Gavin Shan

author
#0 lore raw

PATCH v3 1/1 PCI: Mark broken INTx masking for Mellanox devices

The VFIO driver is routing LSI interrupts by capturing, masking, and then delivering. When passing though Mellanox adapters from host to guest, interrupt storm was reported from host and guest. That's because we can't mask the LSI interrupt with help of PCI command register.

 # lspci | grep Mellanox
 0001:05:00.0 Ethernet controller: Mellanox Technologies MT27500 \
              Family [ConnectX-3]
 0005:01:00.0 Ethernet controller: Mellanox Technologies MT26448 \
              [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0)

It's confirmed by Amir Vadai that all Mellanox devices have same problem. The patch marks broken INTx masking for all Mellanox adapters.

---
v3: Mark broken INTx masking for all Mellanox adapters

---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/quirks.c +2 -0
index 80c2d01..da062d8 100644
@@ -2985,6 +2985,8 @@ DECLARE_PCI_FIXUP_HEADER(0x1814, 0x0601, /* Ralink RT2800 802.11n PCI */
  */
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x8169,
 			 quirk_broken_intx_masking);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, PCI_ANY_ID,
+			 quirk_broken_intx_masking);
 
 #ifdef CONFIG_ACPI
 /*
Signature · 1 line
1.8.3.2
Acked-by on v3 1/1
#1 lore raw
Quoted 16 lines · Gavin Shan

The VFIO driver is routing LSI interrupts by capturing, masking, and then delivering. When passing though Mellanox adapters from host to guest, interrupt storm was reported from host and guest. That's because we can't mask the LSI interrupt with help of PCI command register.

 # lspci | grep Mellanox
 0001:05:00.0 Ethernet controller: Mellanox Technologies MT27500 \
              Family [ConnectX-3]
 0005:01:00.0 Ethernet controller: Mellanox Technologies MT26448 \
              [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0)

It's confirmed by Amir Vadai that all Mellanox devices have same problem. The patch marks broken INTx masking for all Mellanox adapters.

Quoted 9 lines

---
v3: Mark broken INTx masking for all Mellanox adapters

---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
author
#2 lore raw
Quoted 1 line · Amir Vadai

On 8/12/2014 2:48 PM, Gavin Shan wrote:

Cc Bjorn so that he can pick it up if possible.

Quoted 26 lines
Quoted 16 lines

The VFIO driver is routing LSI interrupts by capturing, masking, and then delivering. When passing though Mellanox adapters from host to guest, interrupt storm was reported from host and guest. That's because we can't mask the LSI interrupt with help of PCI command register.

 # lspci | grep Mellanox
 0001:05:00.0 Ethernet controller: Mellanox Technologies MT27500 \
              Family [ConnectX-3]
 0005:01:00.0 Ethernet controller: Mellanox Technologies MT26448 \
              [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0)

It's confirmed by Amir Vadai that all Mellanox devices have same problem. The patch marks broken INTx masking for all Mellanox adapters.

Quoted 9 lines

---
v3: Mark broken INTx masking for all Mellanox adapters

---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 2 lines

Thanks,
Gavin

Quoted 5 lines

--
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

maintainer Applied
#3 lore raw
In reply to Gavin Shan
Quoted 12 lines · Gavin Shan

The VFIO driver is routing LSI interrupts by capturing, masking, and then delivering. When passing though Mellanox adapters from host to guest, interrupt storm was reported from host and guest. That's because we can't mask the LSI interrupt with help of PCI command register.

 # lspci | grep Mellanox
 0001:05:00.0 Ethernet controller: Mellanox Technologies MT27500 \
              Family [ConnectX-3]
 0005:01:00.0 Ethernet controller: Mellanox Technologies MT26448 \
              [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0)
Quoted 7 lines

It's confirmed by Amir Vadai that all Mellanox devices have same problem. The patch marks broken INTx masking for all Mellanox adapters.

I applied this with Amir's ack to pci/virtualization for v3.18.

It's possible Mellanox will someday make a device where INTx masking works. I guess we'll have to deal with that if and when it happens.

Quoted 26 lines

---
v3: Mark broken INTx masking for all Mellanox adapters

---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/quirks.c +2 -0
index 80c2d01..da062d8 100644
@@ -2985,6 +2985,8 @@ DECLARE_PCI_FIXUP_HEADER(0x1814, 0x0601, /* Ralink RT2800 802.11n PCI */
  */
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x8169,
 			 quirk_broken_intx_masking);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, PCI_ANY_ID,
+			 quirk_broken_intx_masking);
 
 #ifdef CONFIG_ACPI
 /*
Signature · 6 lines
1.8.3.2

--
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