[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5e5e36fa489967c405a51b9371de17be32c5a0d8.1650890638.git.robin.murphy@arm.com>
Date: Thu, 28 Apr 2022 14:18:02 +0100
From: Robin Murphy <robin.murphy@....com>
To: joro@...tes.org, will@...nel.org
Cc: iommu@...ts.linux-foundation.org, sven@...npeter.dev,
robdclark@...il.com, m.szyprowski@...sung.com,
baolu.lu@...ux.intel.com, yong.wu@...iatek.com,
mjrosato@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
zhang.lyra@...il.com, thierry.reding@...il.com, vdumpa@...dia.com,
jean-philippe@...aro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 01/14] iommu/vt-d: Temporarily reject probing non-PCI devices
Although the driver has some support implemented for non-PCI devices via
ANDD, it only registers itself for pci_bus_type, so has never actually
seen probe_device for a non-PCI device. Once the bus details move into
the IOMMU core, it appears there may be some issues with correctly
rejecting non-ANDD platform devices, so let's temporarily enforce the
current behaviour of only considering PCI devices until that can be
investigated properly.
Reported-by: Lu Baolu <baolu.lu@...ux.intel.com>
Signed-off-by: Robin Murphy <robin.murphy@....com>
---
drivers/iommu/intel/iommu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 0edf6084dc14..9507b64fdf6b 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -4565,6 +4565,10 @@ static struct iommu_device *intel_iommu_probe_device(struct device *dev)
unsigned long flags;
u8 bus, devfn;
+ /* ANDD platform device support needs fixing */
+ if (!pdev)
+ return ERR_PTR(-ENODEV);
+
iommu = device_to_iommu(dev, &bus, &devfn);
if (!iommu)
return ERR_PTR(-ENODEV);
--
2.35.3.dirty
Powered by blists - more mailing lists