> -----Original Message-----
> From: [email protected] [mailto:iommu-
> [email protected]] On Behalf Of Damian Hobson-Garcia
> Sent: Thursday, January 17, 2013 8:51 AM
> To: Alex Williamson
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [RFC] drivers: iommu: Use of add_device()/remove_device()
> outside of IOMMU groups
> 
> I mistakenly sent this with the tag [PATCH] when it should have been
> [RFC].  Updated with this reply.
> 
> Hi Alex,
> On 2013/01/17 6:47, Alex Williamson wrote:
> > On Tue, 2013-01-15 at 19:10 +0900, Damian Hobson-Garcia wrote:
> >> We've recently been thinking about the best way to attach platform
> >> devices in an IOMMU in a generic way without having to have every
> >> platform device register itself at probe time.  We've seen that at
> >> least on the tegra IOMMU, using the platform_bus notifier seems like
> >> a viable option
> >> (http://lists.linuxfoundation.org/pipermail/iommu/2012-December/00495
> >> 4.html). We also noticed that the IOMMU ops add_device() function is
> called (indirectly) from a similar bus notifier and we're thinking that
> using the bus notifier in the common code would be better than us rolling
> our own to do basically the same thing.
> >>
> >> The problem, however, is that add_device() seems to be intended for
> >> use with IOMMU groups.  i.e. After calling add_device() on a device
> >> that is should be in a group, dev->iommu_group should have some
> meaningful value.
> >> I think though, that if the IOMMU groups requirement can be removed,
> >> it should be more versatile.
> >>
> >> I believe that removing the IOMMU groups dependency can be achieved
> >> with the patch below. Currently the intel-iommu seems to be the only
> >> implementation using these callbacks.
> >
> > What stops you from creating a single iommu_group and adding all
> > device to it?  Thanks,
>  >
>  > Alex
> Thanks for your comment.
> 
> Nothing stops me, but putting everything in one group doesn't really add
> any benefit over not using groups at all, does it?  It seems like its
> just adding more complexity(i.e code) to the driver without adding any
> additional functionality.
> 
Do you intend to use vfio? That's the specific objective of creating iommu 
groups.

-Varun

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to