From 4aa27a3b56d6a005496eaa239ba8656bc8fa48c4 Mon Sep 17 00:00:00 2001 From: kib Date: Sun, 14 Jul 2019 21:08:54 +0000 Subject: [PATCH] PR: 239143 Reported and tested by: Wes Maag Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/iommu/intel_drv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index ae03ffa14e30..bd475d8b4ca8 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -770,6 +770,13 @@ dmar_find(device_t dev, bool verbose) const char *banner; int i, dev_domain, dev_busno, dev_path_len; + /* + * This function can only handle PCI(e) devices. + */ + if (device_get_devclass(device_get_parent(dev)) != + devclass_find("pci")) + return (NULL); + dmar_dev = NULL; dev_domain = pci_get_domain(dev); dev_path_len = dmar_dev_depth(dev);