]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
vfio/pci: Add QAT devices to denylist
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Mon, 27 Jul 2020 19:43:40 +0000 (13:43 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 27 Jul 2020 19:43:40 +0000 (13:43 -0600)
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>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci.c

index f368a3993ac14b1882280166f19de75591cf9d69..620465c2a1da4569c5ae503d820e8efc982aa26f 100644 (file)
@@ -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;
 }