From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Alex Williamson <alex.williamson@redhat.com>,
David Gibson <dwg@au1.ibm.com>,
joerg.roedel@amd.com, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, chrisw@redhat.com, agraf@suse.de,
scottwood@freescale.com, B08248@freescale.com
Subject: Re: [PATCH 1/4] iommu: Add iommu_device_group callback and iommu_group sysfs entry
Date: Wed, 07 Dec 2011 17:20:15 +1100 [thread overview]
Message-ID: <1323238815.660.64.camel@pasglop> (raw)
In-Reply-To: <1322781257.10893.38.camel@i7.infradead.org>
On Thu, 2011-12-01 at 23:14 +0000, David Woodhouse wrote:
> On Thu, 2011-12-01 at 07:34 -0700, Alex Williamson wrote:
> > > Btw, did we get a quirk for the Ricoh multi-function devices which all
> > > need to be in the same group because they do all their DMA from function
> > > zero? I think we need another similar quirk for a Marvell SATA
> > > controller which seems to do its AHCI DMA from its IDE function; see
> > > https://bugzilla.redhat.com/757166
> >
> > No, as I mentioned, groups are currently for iommu_ops, not dma_ops,
>
> That doesn't matter. There are multiple devices which do all their DMA
> from the same source-id, and which have to be handled together. It
> doesn't *matter* that it's a hardware bug in this case, and it's just
> because they're multiple PCI devices behind a PCIe bridge in the other
> case. The grouping code needs to handle it, whether it's for the benefit
> of iommu_ops, dma_ops, or both.
>
> > though it makes sense that iommu drivers could use the group info or
> > create common quirk infrastructure for handling broken devices like
> > these.
>
> Well, I think we mostly have a consensus that dma_ops should be
> implemented *using* iommu_ops; I'd rather be trying to make things
> *consistent* between the two rather than building up the differences.
>
> So I'd definitely go for your "use the group info" option. It is the
> *same* info, and needs the *same* quirks.
The problem at this stage is that all implementations proposed for the
group info (both Alex and David) are somewhat higher level stuff that is
itself constructed from the underlying iommu implementation.
And this is probably the right thing to do to avoid breaking too much
stuff at once.
I think the best approach for devices like that is to have a header
quirk setting a new bit flag in pci_dev along the line of
"dma_group_functions" which causes the platform iommu implementation to
"do the right thing" and in turn create the isolation groups accordingly
as well.
Later on, we might want to revisit but I think it's nasty enough to
leave it as-is. The creation of isolation groups will have to answer to
all sort of other platform specific constraints so I'd rather not try to
put too much of that logic in generic code.
Cheers,
Ben.
next prev parent reply other threads:[~2011-12-07 6:20 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-21 19:55 [PATCH 0/4] iommu: iommu_ops group interface Alex Williamson
2011-10-21 19:56 ` [PATCH 1/4] iommu: Add iommu_device_group callback and iommu_group sysfs entry Alex Williamson
2011-11-30 2:42 ` David Gibson
2011-11-30 4:51 ` Benjamin Herrenschmidt
2011-11-30 5:25 ` Alex Williamson
2011-11-30 9:23 ` Benjamin Herrenschmidt
2011-12-01 0:06 ` David Gibson
2011-12-01 6:20 ` Alex Williamson
2011-12-01 0:03 ` David Gibson
2011-12-01 0:52 ` Chris Wright
2011-12-01 0:57 ` David Gibson
2011-12-01 1:04 ` Chris Wright
2011-12-01 1:50 ` Benjamin Herrenschmidt
2011-12-01 2:00 ` David Gibson
2011-12-01 2:05 ` Chris Wright
2011-12-01 7:28 ` Alex Williamson
2011-12-01 14:02 ` Yoder Stuart-B08248
2011-12-01 6:48 ` Alex Williamson
2011-12-01 10:33 ` David Woodhouse
2011-12-01 14:34 ` Alex Williamson
2011-12-01 21:46 ` Benjamin Herrenschmidt
2011-12-01 22:37 ` Alex Williamson
2011-12-01 23:14 ` David Woodhouse
2011-12-07 6:20 ` Benjamin Herrenschmidt [this message]
2011-12-01 21:32 ` Benjamin Herrenschmidt
2011-10-21 19:56 ` [PATCH 2/4] intel-iommu: Implement iommu_device_group Alex Williamson
2011-11-08 17:23 ` Roedel, Joerg
2011-11-10 15:22 ` David Woodhouse
2011-10-21 19:56 ` [PATCH 3/4] amd-iommu: " Alex Williamson
2011-10-21 19:56 ` [PATCH 4/4] iommu: Add option to group multi-function devices Alex Williamson
2011-12-01 0:11 ` David Gibson
2011-10-21 20:34 ` [PATCH 0/4] iommu: iommu_ops group interface Woodhouse, David
2011-10-21 21:16 ` Alex Williamson
2011-10-21 22:39 ` Woodhouse, David
2011-10-21 22:34 ` Alex Williamson
2011-10-27 16:31 ` Alex Williamson
2011-11-15 15:51 ` Roedel, Joerg
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=1323238815.660.64.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=B08248@freescale.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=chrisw@redhat.com \
--cc=dwg@au1.ibm.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=scottwood@freescale.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox