Re: [RFC] Device isolation infrastructure v2
From: David Gibson
Date: Mon Dec 19 2011 - 17:43:29 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/