Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-30 Thread Joerg Roedel
On Fri, Jan 27, 2012 at 03:22:43PM -0600, Scott Wood wrote: OK, so there's a geometry that is read-only, and potentially a driver-specific geometry that is read/write. The default config for PAMU would likely be a 1 MiB aperture in which the dma api can do arbitrary 4k mappings -- this fits

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-27 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 02:02:26PM -0600, Scott Wood wrote: On 01/26/2012 01:44 PM, Joerg Roedel wrote: Another reason why it must be in the generic struct is the intended generic dma-ops layer on-top. This code can decide on this flag wheter a address needs to be remapped at all. So

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 12:25:32PM -0600, Scott Wood wrote: On 01/20/2012 10:03 AM, Joerg Roedel wrote: Because the values in this generic geometry-struct make sense for more than one IOMMU (short-term for Tegra GART and Freescale PAMU). If you have additional vendor-specific ones you could

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 12:42:10PM -0600, Scott Wood wrote: On 01/26/2012 12:31 PM, Joerg Roedel wrote: The force_aperture flag indicated whether DMA is only allowed between aperture_start and apertuer_end or if DMA is allowed outside of this range too (unmapped in this case). The AMD

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 01:00:37PM -0600, Scott Wood wrote: On 01/26/2012 12:51 PM, Joerg Roedel wrote: Because this is a flag that makes sense for all IOMMU. Every IOMMU either allows DMA outside its aperture or it doesn't. Another reason why it must be in the generic struct is the