svn commit: r349988 - head/sys/x86/iommu

Konstantin Belousov kib at FreeBSD.org
Sun Jul 14 21:08:54 UTC 2019


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

Log:
  PR:	239143
  Reported and tested by:	Wes Maag <jwmaag at gmail.com>
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/x86/iommu/intel_drv.c

Modified: head/sys/x86/iommu/intel_drv.c
==============================================================================
--- head/sys/x86/iommu/intel_drv.c	Sun Jul 14 16:05:47 2019	(r349987)
+++ head/sys/x86/iommu/intel_drv.c	Sun Jul 14 21:08:54 2019	(r349988)
@@ -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);


More information about the svn-src-head mailing list