Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1303508

Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices
Date 2016-01-07 13:10 +0100
Message-ID <qOhy9-7Vb-5@gated-at.bofh.it> (permalink)
References <qOhy9-7Vb-7@gated-at.bofh.it> <qOhy9-7Vb-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 05, 2016 at 05:07:24AM -0500, Wan Zongshun wrote:
> +static struct iommu_group *amd_iommu_device_group(struct device *dev)
> +{
> +	if (dev_is_pci(dev))
> +		return pci_device_group(dev);
> +
> +	return acpihid_device_group(dev);
> +}
> +
>  /*****************************************************************************
>   *
>   * The next functions belong to the dma_ops mapping/unmapping code.
> @@ -3202,7 +3233,7 @@ static const struct iommu_ops amd_iommu_ops = {
>  	.iova_to_phys = amd_iommu_iova_to_phys,
>  	.add_device = amd_iommu_add_device,
>  	.remove_device = amd_iommu_remove_device,
> -	.device_group = pci_device_group,
> +	.device_group = amd_iommu_device_group,

Does this work? Which bus do the ACPIHID devices belong to (what does
dev->bus point to)? If it is not &pci_bus_type, then the iommu core code
will not create an iommu group for the devices.


	Joerg

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices Joerg Roedel <joro@8bytes.org> - 2016-01-07 13:10 +0100
  Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices Wan ZongShun <mcuos.com@gmail.com> - 2016-01-08 02:50 +0100

csiph-web