From: Alex Williamson <alex.williamson@redhat.com>
To: Majd Dibbiny <majd@mellanox.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
ogerlitz@mellanox.com, Noa Osherovich <noaos@mellanox.com>
Subject: Re: [PATCH] PCI: Refine broken INTx masking for Mellanox devices
Date: Tue, 19 Apr 2016 13:04:35 -0600 [thread overview]
Message-ID: <20160419130435.7d681f6d@t450s.home> (raw)
In-Reply-To: <1461083616-30099-1-git-send-email-majd@mellanox.com>
On Tue, 19 Apr 2016 19:33:36 +0300
Majd Dibbiny <majd@mellanox.com> wrote:
> From: Noa Osherovich <noaos@mellanox.com>
>
> Mellanox devices were marked as having INTx masking ability broken.
> As a result, the VFIO driver fails to load when the device was
> passed-through to a VM.
>
> This patch excludes ConnectX-4, ConnectX4-Lx and Connect-IB from the
> list of Mellanox devices marked as having broken INTx masking:
>
> - ConnectX-4 and ConnectX4-Lx either declare INTx are not supported
> (FW versions 12.14.2036 / 14.12.2036) or support them properly
> (starting May 2016 firmware release). Users having earlier firmware
> versions will have to update to either one.
> - Connect-IB does not support INTx currently so will not cause any
> problem.
What's the user and support experience here? A user gets a new kernel
that no longer marks INTx masking as bad (note that if the device does
not support INTx by returing 0 in the pin register, it doesn't matter
whether it's marked bad or not), they try to assign the device and get
an interrupt storm on the guest and go complain to support. Support
tries to reproduce, maybe can, maybe can't, depending on the firmware
version they happen to have running, everyone gets very unhappy until
the thing that almost never works, "are you running the latest
firmware", actually works. Can we instead add a new function for
mellanox that can probe the firmware version and continue marking INTx
masking bad with a warning noting that a firmware update will resolve
it? Thanks,
Alex
>
> Fixes: 11e42532ada31 ('PCI: Assume all Mellanox devices have ...')
> Signed-off-by: Noa Osherovich <noaos@mellanox.com>
> Signed-off-by: Majd Dibbiny <majd@mellanox.com>
> ---
> drivers/pci/quirks.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++-
> include/linux/pci_ids.h | 14 ++++++++++++
> 2 files changed, 74 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 8e67802..6a1856e 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3147,7 +3147,66 @@ 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,
> +
> +/*
> + * Mellanox devices that fail under PCI device assignment using DisINTx masking
> + */
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_TAVOR,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_ARBEL,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, PCI_DEVICE_ID_MELLANOX_SINAI,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_SINAI_OLD,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_SDR,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_DDR,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_QDR,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_DDR_GEN2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_QDR_GEN2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_EN,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_HERMON_EN_GEN2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX_EN,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_T_GEN2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_GEN2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_5_GEN2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX2,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX3,
> + quirk_broken_intx_masking);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX,
> + PCI_DEVICE_ID_MELLANOX_CONNECTX3_PRO,
> quirk_broken_intx_masking);
>
> static void quirk_no_bus_reset(struct pci_dev *dev)
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index 247da8c..bc8918e 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -2262,6 +2262,20 @@
> #define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282
> #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c
> #define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_SDR 0x6340
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_DDR 0x634a
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_QDR 0x6354
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_DDR_GEN2 0x6732
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_QDR_GEN2 0x673c
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_EN 0x6368
> +#define PCI_DEVICE_ID_MELLANOX_HERMON_EN_GEN2 0x6750
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN 0x6372
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_T_GEN2 0x675a
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_GEN2 0x6764
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_5_GEN2 0x6746
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX2 0x676e
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX3 0x1003
> +#define PCI_DEVICE_ID_MELLANOX_CONNECTX3_PRO 0x1007
>
> #define PCI_VENDOR_ID_DFI 0x15bd
>
next prev parent reply other threads:[~2016-04-19 19:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 16:33 [PATCH] PCI: Refine broken INTx masking for Mellanox devices Majd Dibbiny
2016-04-19 19:04 ` Alex Williamson [this message]
2016-04-21 7:12 ` Majd Dibbiny
2016-04-25 12:45 ` Majd Dibbiny
2016-04-25 13:55 ` Alex Williamson
[not found] ` <5720CFA1.6030200@mellanox.com>
2016-04-28 7:55 ` Majd Dibbiny
-- strict thread matches above, loose matches on Subject: below --
2016-11-01 14:47 Noa Osherovich
2016-11-09 18:22 ` Bjorn Helgaas
2016-11-10 3:46 ` Gavin Shan
2016-11-10 15:00 ` Bjorn Helgaas
2016-11-10 15:58 ` Noa Osherovich
2016-11-10 15:56 ` Noa Osherovich
2016-11-10 23:22 ` Gavin Shan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160419130435.7d681f6d@t450s.home \
--to=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=majd@mellanox.com \
--cc=noaos@mellanox.com \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).