[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111219223120.GB5207@truffala.fritz.box>
Date: Tue, 20 Dec 2011 09:31:20 +1100
From: David Gibson <david@...son.dropbear.id.au>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Joerg Roedel <joerg.roedel@....com>,
Alex Williamson <alex.williamson@...hat.com>, aik@...abs.ru,
benh@...nel.crashing.org, chrisw@...hat.com, agraf@...e.de,
scottwood@...escale.com, B08248@...escale.com,
rusty@...tcorp.com.au, iommu@...ts.linux-foundation.org,
qemu-devel@...gnu.org, linux-kernel@...r.kernel.org,
joro@...tes.org
Subject: Re: [RFC] Device isolation infrastructure v2
On Mon, Dec 19, 2011 at 03:46:38PM +0000, David Woodhouse wrote:
> On Mon, 2011-12-19 at 11:11 +1100, David Gibson wrote:
> > They have no inbuilt concept
> > of domains (though we could fake in software in some circumstances).
>
> That sentence doesn't make much sense to me.
>
> Either you're saying that every device behind a given IOMMU is in *one*
> domain (i.e. there's one domain per PCI host bridge), or you're saying
> that each device has its *own* domain (maximum isolation, but still
> perhaps not really true if you end up with PCIe-to-PCI bridges or broken
> hardware such as the ones we've been discovering, where multifunction
> devices do their DMA from the wrong function).
>
> Either way, you *do* have domains. You just might not have thought about
> it before.
Right, sorry, what I mean is that there's no concept of runtime
assignment of devices to domains. The concept used in the
documentation is a "Partitionable Endpoint" (PE) - which would
correspond to the isolation groups I'm proposing. These are generally
assigned by firmware based on various hardware dependent isolation
constraints.
When we're running paravirtualized under pHyp, it's impossible to
merge multiple PEs into one domain per se. We could fake it rather
nastily by replicating all map/unmaps across mutiple PEs. When
running bare metal, we could do so a bit more nicely by assigning
multiple PEs the same TCE pointer, but we have no mechanism to do so
at present.
Older hardware usually does have just one PE per host bridge, but it
also often has only one slot per host bridge, so in practice is often
both one domain per host bridge _and_ one device per host bridge.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists