Date: Sun, 21 Jul 2019 08:28:29 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r350192 - stable/12/sys/x86/iommu Message-ID: <201907210828.x6L8ST5U017662@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907210828.x6L8ST5U017662>