From: Ashok Raj <ashok.raj@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
iommu@lists.linux-foundation.org
Cc: Ashok Raj <ashok.raj@intel.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Joerg Roedel <joro@8bytes.org>,
Bjorn Helgaas <helgaas@kernel.org>,
Gage Eads <gage.eads@intel.com>
Subject: [PATCH] x86/pci: Some buggy virtual functions incorrectly report 1 for intx.
Date: Mon, 16 Jul 2018 13:42:25 -0700 [thread overview]
Message-ID: <1531773745-41876-1-git-send-email-ashok.raj@intel.com> (raw)
PCI_INTERRUPT_PIN should always read 0 for SRIOV Virtual Functions.
Some SRIOV devices have some bugs in RTL and VF's end up reading 1
instead of 0 for the PIN.
We could enforce it by default in vfio_pci_nointx.
Reported-by: Gage Eads <gage.eads@intel.com>
Tested-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Cc: iommu@lists.linux-foundation.org
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: Gage Eads <gage.eads@intel.com>
---
drivers/vfio/pci/vfio_pci.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index b423a30..bc3f4fa 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -192,6 +192,13 @@ static void vfio_pci_disable(struct vfio_pci_device *vdev);
*/
static bool vfio_pci_nointx(struct pci_dev *pdev)
{
+ /*
+ * Per PCI, no VF's should have INTx
+ * Simply disable it here
+ */
+ if (pdev->is_virtfn)
+ return true;
+
switch (pdev->vendor) {
case PCI_VENDOR_ID_INTEL:
switch (pdev->device) {
--
2.7.4
next reply other threads:[~2018-07-16 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 20:42 Ashok Raj [this message]
2018-07-16 21:17 ` [PATCH] x86/pci: Some buggy virtual functions incorrectly report 1 for intx Alex Williamson
2018-07-16 22:13 ` Raj, Ashok
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=1531773745-41876-1-git-send-email-ashok.raj@intel.com \
--to=ashok.raj@intel.com \
--cc=alex.williamson@redhat.com \
--cc=gage.eads@intel.com \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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).