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

Konstantin Belousov kostikbel at gmail.com
Sun Jul 14 21:13:35 UTC 2019


On Sun, Jul 14, 2019 at 09:08:54PM +0000, Konstantin Belousov wrote:
> Author: kib
> Date: Sun Jul 14 21:08:54 2019
> New Revision: 349988
> URL: https://svnweb.freebsd.org/changeset/base/349988
In dmar_find(), refuse to search for DMAR unit for non-PCI device.

Eventually this should be reworked, because ACPI DMAR table can
specify ANND entries for scoping ACPI namespace enumerated devices.
But code to match DMAR unit against such device is missed currently
anyway.

Sorry.
> 
> 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