From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: alex.williamson@redhat.com, herbert@gondor.apana.org.au
Cc: cohuck@redhat.com, nhorman@redhat.com, vdronov@redhat.com,
bhelgaas@google.com, mark.a.chambers@intel.com,
gordon.mcfadden@intel.com, ahsan.atta@intel.com,
fiona.trahe@intel.com, qat-linux@intel.com, kvm@vger.kernel.org,
linux-crypto@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: [PATCH v4 3/5] vfio/pci: Add QAT devices to denylist
Date: Fri, 24 Jul 2020 09:47:58 +0100 [thread overview]
Message-ID: <20200724084800.6136-4-giovanni.cabiddu@intel.com> (raw)
In-Reply-To: <20200724084800.6136-1-giovanni.cabiddu@intel.com>
The current generation of Intel® QuickAssist Technology devices
are not designed to run in an untrusted environment because of the
following issues reported in the document "Intel® QuickAssist Technology
(Intel® QAT) Software for Linux" (document number 336211-014):
QATE-39220 - GEN - Intel® QAT API submissions with bad addresses that
trigger DMA to invalid or unmapped addresses can cause a
platform hang
QATE-7495 - GEN - An incorrectly formatted request to Intel® QAT can
hang the entire Intel® QAT Endpoint
The document is downloadable from https://01.org/intel-quickassist-technology
at the following link:
https://01.org/sites/default/files/downloads/336211-014-qatforlinux-releasenotes-hwv1.7_0.pdf
This patch adds the following QAT devices to the denylist: DH895XCC,
C3XXX and C62X.
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
drivers/vfio/pci/vfio_pci.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 0101f41e7834..bcc22d19ee07 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -75,6 +75,21 @@ static inline bool vfio_vga_disabled(void)
static bool vfio_pci_dev_in_denylist(struct pci_dev *pdev)
{
+ switch (pdev->vendor) {
+ case PCI_VENDOR_ID_INTEL:
+ switch (pdev->device) {
+ case PCI_DEVICE_ID_INTEL_QAT_C3XXX:
+ case PCI_DEVICE_ID_INTEL_QAT_C3XXX_VF:
+ case PCI_DEVICE_ID_INTEL_QAT_C62X:
+ case PCI_DEVICE_ID_INTEL_QAT_C62X_VF:
+ case PCI_DEVICE_ID_INTEL_QAT_DH895XCC:
+ case PCI_DEVICE_ID_INTEL_QAT_DH895XCC_VF:
+ return true;
+ default:
+ return false;
+ }
+ }
+
return false;
}
--
2.26.2
next prev parent reply other threads:[~2020-07-24 8:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 8:47 [PATCH v4 0/5] vfio/pci: add denylist and disable qat Giovanni Cabiddu
2020-07-24 8:47 ` [PATCH v4 1/5] PCI: Add Intel QuickAssist device IDs Giovanni Cabiddu
2020-07-24 8:47 ` [PATCH v4 2/5] vfio/pci: Add device denylist Giovanni Cabiddu
2020-07-24 9:28 ` Cornelia Huck
2020-07-24 8:47 ` Giovanni Cabiddu [this message]
2020-07-24 8:47 ` [PATCH v4 4/5] crypto: qat - replace device ids defines Giovanni Cabiddu
2020-07-24 8:48 ` [PATCH v4 5/5] crypto: qat - use PCI_VDEVICE Giovanni Cabiddu
2020-07-24 10:39 ` [PATCH v4 0/5] vfio/pci: add denylist and disable qat Trahe, Fiona
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=20200724084800.6136-4-giovanni.cabiddu@intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=ahsan.atta@intel.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=cohuck@redhat.com \
--cc=fiona.trahe@intel.com \
--cc=gordon.mcfadden@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kvm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.a.chambers@intel.com \
--cc=nhorman@redhat.com \
--cc=qat-linux@intel.com \
--cc=vdronov@redhat.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).