svn commit: r350192 - stable/12/sys/x86/iommu

Konstantin Belousov kib at FreeBSD.org
Sun Jul 21 08:28:29 UTC 2019


Author: kib
Date: Sun Jul 21 08:28:28 2019
New Revision: 350192
URL: https://svnweb.freebsd.org/changeset/base/350192

Log:
  MFC r349988:
  In dmar_find(), refuse to search for DMAR unit for non-PCI device.
  
  PR:	239143

Modified:
  stable/12/sys/x86/iommu/intel_drv.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/x86/iommu/intel_drv.c
==============================================================================
--- stable/12/sys/x86/iommu/intel_drv.c	Sun Jul 21 03:26:26 2019	(r350191)
+++ stable/12/sys/x86/iommu/intel_drv.c	Sun Jul 21 08:28:28 2019	(r350192)
@@ -769,6 +769,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);


More information about the svn-src-stable-12 mailing list