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


Groups > linux.kernel > #1259522

Re: [PATCH 8/8] iommu: Move default domain allocation to iommu_group_get_for_dev()

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [PATCH 8/8] iommu: Move default domain allocation to iommu_group_get_for_dev()
Date 2015-10-30 15:20 +0100
Message-ID <qpiHa-6Pg-33@gated-at.bofh.it> (permalink)
References <qm9Am-7mh-3@gated-at.bofh.it> <qm9Ao-7mh-37@gated-at.bofh.it> <qp07v-3Hz-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Will,

On Thu, Oct 29, 2015 at 06:22:49PM +0000, Will Deacon wrote:
> The call to iommu_group_get_for_dev in arm_smmu_add_device will end up
> calling __iommu_attach_device, since group->domain will now be initialised
> by the code above. This means the SMMU driver will see an ->attach_dev
> call for a device that is part-way through an ->add_device callback and
> will be missing the initialisation necessary for us to idenfity the SMMU
> instance to which is corresponds. In fact, the iommudata for the group
> won't be initialised at all, so the whole thing will fail afaict.
> 
> Note that I haven't actually taken this for a spin, so I could be missing
> something.

Yeah, I havn't looked at how to convert the ARM-SMMU drivers to default
domains yet, so the issue you describe above is totally possible.

But there is no way to trigger it yet, because your domain_alloc
function can not yet allocate IOMMU_DOMAIN_DMA domains. While converting
the issue must be fixed, of course.

I tested this patch-set on an AMD Seattle system and it worked fine
there.


	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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] iommu: Make core iommu-groups code more generic Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
  [PATCH 3/8] iommu: Add generic_device_group() function Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
  [PATCH 5/8] iommu/fsl: Convert to device_group call-back Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
  [PATCH 2/8] iommu: Export and rename iommu_group_get_for_pci_dev() Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
  [PATCH 7/8] iommu: Remove is_pci_dev() fall-back from iommu_group_get_for_dev Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
  [PATCH 8/8] iommu: Move default domain allocation to iommu_group_get_for_dev() Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
    Re: [PATCH 8/8] iommu: Move default domain allocation to  iommu_group_get_for_dev() Will Deacon <will.deacon@arm.com> - 2015-10-29 19:30 +0100
      Re: [PATCH 8/8] iommu: Move default domain allocation to  iommu_group_get_for_dev() Joerg Roedel <joro@8bytes.org> - 2015-10-30 15:20 +0100
  [PATCH 6/8] iommu/arm-smmu: Switch to device_group call-back Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200
  [PATCH 1/8] iommu: Revive device_group iommu-ops call-back Joerg Roedel <joro@8bytes.org> - 2015-10-22 00:00 +0200

csiph-web