linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices
@ 2014-08-12 11:48 Gavin Shan
  2014-08-12 11:59 ` Amir Vadai
  2014-09-05 21:38 ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: Gavin Shan @ 2014-08-12 11:48 UTC (permalink / raw)
  To: linux-pci; +Cc: amirv, alex.williamson, eli, weiyang, 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.

Cc: Amir Vadai <amirv@mellanox.com>
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
v3: Mark broken INTx masking for all Mellanox adapters
---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 80c2d01..da062d8 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -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
 /*
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices
  2014-08-12 11:48 [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices Gavin Shan
@ 2014-08-12 11:59 ` Amir Vadai
  2014-08-26  0:58   ` Gavin Shan
  2014-09-05 21:38 ` Bjorn Helgaas
  1 sibling, 1 reply; 4+ messages in thread
From: Amir Vadai @ 2014-08-12 11:59 UTC (permalink / raw)
  To: Gavin Shan, linux-pci; +Cc: alex.williamson, eli, weiyang

On 8/12/2014 2:48 PM, Gavin Shan wrote:
> 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.
> 
> Cc: Amir Vadai <amirv@mellanox.com>
> Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> ---
> v3: Mark broken INTx masking for all Mellanox adapters
> ---
>  drivers/pci/quirks.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-By: Amir Vadai <amirv@mellanox.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices
  2014-08-12 11:59 ` Amir Vadai
@ 2014-08-26  0:58   ` Gavin Shan
  0 siblings, 0 replies; 4+ messages in thread
From: Gavin Shan @ 2014-08-26  0:58 UTC (permalink / raw)
  To: Amir Vadai; +Cc: Gavin Shan, linux-pci, alex.williamson, eli, weiyang, bhelgaas

On Tue, Aug 12, 2014 at 02:59:49PM +0300, Amir Vadai wrote:
>On 8/12/2014 2:48 PM, Gavin Shan wrote:

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

>> 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.
>> 
>> Cc: Amir Vadai <amirv@mellanox.com>
>> Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>> ---
>> v3: Mark broken INTx masking for all Mellanox adapters
>> ---
>>  drivers/pci/quirks.c | 2 ++
>>  1 file changed, 2 insertions(+)
>> 
>
>Acked-By: Amir Vadai <amirv@mellanox.com>
>

Thanks,
Gavin

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices
  2014-08-12 11:48 [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices Gavin Shan
  2014-08-12 11:59 ` Amir Vadai
@ 2014-09-05 21:38 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2014-09-05 21:38 UTC (permalink / raw)
  To: Gavin Shan; +Cc: linux-pci, amirv, alex.williamson, eli, weiyang

On Tue, Aug 12, 2014 at 09:48:11PM +1000, Gavin Shan wrote:
> 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.
> 
> Cc: Amir Vadai <amirv@mellanox.com>
> Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>

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.

> ---
> v3: Mark broken INTx masking for all Mellanox adapters
> ---
>  drivers/pci/quirks.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 80c2d01..da062d8 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -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
>  /*
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-05 21:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 11:48 [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices Gavin Shan
2014-08-12 11:59 ` Amir Vadai
2014-08-26  0:58   ` Gavin Shan
2014-09-05 21:38 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).