From: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Ritesh Harjani <ritesh.harjani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH] iommu-groups: Add list_head for iommu groups
Date: Mon, 07 Apr 2014 08:14:55 -0600 [thread overview]
Message-ID: <1396880095.3215.89.camel@ul30vt.home> (raw)
In-Reply-To: <CAD15agZbUwvda+XG3hELJT5PQ_0j2Bya8Y9wOZcP5qg8binUzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Mon, 2014-04-07 at 15:23 +0530, Ritesh Harjani wrote:
> On Fri, Apr 4, 2014 at 7:33 PM, Alex Williamson
> <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > On Fri, 2014-04-04 at 11:12 +0530, Ritesh Harjani wrote:
> >> Hi All,
> >>
> >> Please find the below patch and let me know your suggestions on this.
> >>
> >> With this patch iommu groups can be linked and iommu driver will
> >> get to know which all iommu groups belongs to a particular iommu device.
> >>
> >>
> >>
> >> Each iommu device might have multiple iommu groups,
> >> with each group populated with many devices. With
> >> this configuration, iommu driver may require a list
> >> of iommu groups belonging to each iommu device.
> >>
> >> Add list_head struct entry in iommu_group.
> >>
> >> Signed-off-by: Ritesh Harjani <ritesh.harjani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> ---
> >> drivers/iommu/iommu.c | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> >> index e5555fc..70588dc 100644
> >> --- a/drivers/iommu/iommu.c
> >> +++ b/drivers/iommu/iommu.c
> >> @@ -36,6 +36,10 @@ static struct ida iommu_group_ida;
> >> static struct mutex iommu_group_mutex;
> >>
> >> struct iommu_group {
> >> + struct list_head list; /* lower level iommu driver structure
> >> + * may require list of iommu groups
> >> + * belonging to that iommu device.
> >> + */
> >
> >
> > To have a list would require locking to manage that list, but you seem
> > to imply that the iommu driver would be managing this list... but there
> > might be multiple iommu drivers in a single system. Groups are
> > currently independent of each other by design, trying to manage them in
> > a list defeats that.
>
> HOW ??
>
> > There is also no example provided here of why we
> > would need or even want to do this. Thanks,
>
> Say multiple groups are linked to one iommu device. Each iommu_group maintains
> one iommu_data specific to their group. Now, if iommu driver of a
> iommu device wants
> to query all the iommu groups and thus all devices which belongs to
> this iommu hardware,
> then in that it will be nice if iommu_group struct provides a list_entry ?
iommu_data is owned by the iommu driver, so if a driver wants to create
such a list, why would it not do so there? What's being requested here
is an extension to a private data structure with no concrete example of
why this is needed. Current users don't seem to have any need for this.
Furthermore struct iommu_group is intentionally opaque to everything
outside of iommu.c, so without either relocating this structure to a
header or adding a list service to the iommu group interfaces, the
change is completely useless. Thanks,
Alex
next prev parent reply other threads:[~2014-04-07 14:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 5:42 [PATCH] iommu-groups: Add list_head for iommu groups Ritesh Harjani
[not found] ` <CAD15agaN=ymK8JTPELNygF055r3zPyqmJ7bMVabL7pM8EusHjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-04 14:03 ` Alex Williamson
[not found] ` <1396620219.3215.46.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-04-07 9:53 ` Ritesh Harjani
[not found] ` <CAD15agZbUwvda+XG3hELJT5PQ_0j2Bya8Y9wOZcP5qg8binUzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-07 14:14 ` Alex Williamson [this message]
[not found] ` <1396880095.3215.89.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2014-04-07 16:24 ` Ritesh Harjani
[not found] ` <CAD15agYF5TCNa-0COxx3Po+7h4aKa=EW2oou_gftacfOev6CJg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-08 10:18 ` Joerg Roedel
[not found] ` <20140408101800.GS13491-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-04-08 10:33 ` Ritesh Harjani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396880095.3215.89.camel@ul30vt.home \
--to=alex.williamson-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=ritesh.harjani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.