[RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Will Deacon
Some IOMMUs, such as the ARM SMMU, support two stages of translation. The idea behind such a scheme is to allow a guest operating system to use the IOMMU for DMA mappings in the first stage of translation, with the hypervisor then installing mappings in the second stage to provide isolation of the

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Alex Williamson
On Tue, 2014-07-01 at 17:10 +0100, Will Deacon wrote: > Some IOMMUs, such as the ARM SMMU, support two stages of translation. > The idea behind such a scheme is to allow a guest operating system to > use the IOMMU for DMA mappings in the first stage of translation, with > the hypervisor then instal

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Will Deacon
Hi Alex, Thanks for having a look. On Tue, Jul 01, 2014 at 06:42:33PM +0100, Alex Williamson wrote: > On Tue, 2014-07-01 at 17:10 +0100, Will Deacon wrote: > > Some IOMMUs, such as the ARM SMMU, support two stages of translation. > > The idea behind such a scheme is to allow a guest operating sys

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-01 Thread Alex Williamson
On Tue, 2014-07-01 at 19:04 +0100, Will Deacon wrote: > Hi Alex, > > Thanks for having a look. > > On Tue, Jul 01, 2014 at 06:42:33PM +0100, Alex Williamson wrote: > > On Tue, 2014-07-01 at 17:10 +0100, Will Deacon wrote: > > > Some IOMMUs, such as the ARM SMMU, support two stages of translation.

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-02 Thread Will Deacon
On Tue, Jul 01, 2014 at 08:28:11PM +0100, Alex Williamson wrote: > On Tue, 2014-07-01 at 19:04 +0100, Will Deacon wrote: > > On Tue, Jul 01, 2014 at 06:42:33PM +0100, Alex Williamson wrote: > > > On Tue, 2014-07-01 at 17:10 +0100, Will Deacon wrote: > > > > Finally, a new IOMMU capability, IOMMU_CA

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-02 Thread Will Deacon
On Wed, Jul 02, 2014 at 11:49:02AM +0100, Will Deacon wrote: > On Tue, Jul 01, 2014 at 08:28:11PM +0100, Alex Williamson wrote: > > If we go the route of defining it at allocation time, I'd probably think > > about adding a new interface, like: > > > > iommu_domain_alloc_with_features(struct bus_t

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-02 Thread Alex Williamson
On Wed, 2014-07-02 at 14:57 +0100, Will Deacon wrote: > On Wed, Jul 02, 2014 at 11:49:02AM +0100, Will Deacon wrote: > > On Tue, Jul 01, 2014 at 08:28:11PM +0100, Alex Williamson wrote: > > > If we go the route of defining it at allocation time, I'd probably think > > > about adding a new interface

Re: [RFC PATCH 1/3] iommu: introduce IOMMU_DOMAIN_HYP domain type for hypervisor allocation

2014-07-02 Thread Will Deacon
On Wed, Jul 02, 2014 at 04:04:15PM +0100, Alex Williamson wrote: > On Wed, 2014-07-02 at 14:57 +0100, Will Deacon wrote: > > On Wed, Jul 02, 2014 at 11:49:02AM +0100, Will Deacon wrote: > > > On Tue, Jul 01, 2014 at 08:28:11PM +0100, Alex Williamson wrote: > > > > If we go the route of defining it