In the vfio RFC thread there seemed to be convergence that some new iommu_ops API is needed to set some platform specific aspects of an iommu domain. On Wed, Nov 30, 2011 at 10:58 AM, Alex Williamson <alex.williamson@xxxxxxxxxx> wrote: [cut] > In that case, you should definitely be following what Alexey is thinking > about with an iommu_setup IOMMU API callback. I think it's shaping up > to do: > > x86: > - Report any IOVA range restrictions imposed by hw implementation > POWER: > - Request IOVA window size, report size and base > powerpc: > - Set domain attributes, probably report range as well. Alex, Alexey I'm wondering if you've had any new thoughts on this over the last week. For Freescale, our iommu domain attributes would look something like: -domain iova base address -domain iova window size -domain enable/disable -number of subwindows -operation mapping table index -stash destination CPU -stash target (cache– L1, L2, L3) These are all things that need to be set by the creator of the domain. Since the domain attributes are going to be so different for each platform does it make sense to define a new iommu_ops call back that just takes a void pointer that can be implemented in a platform specific way? For example: struct iommu_ops { [cut] int (*domain_set_attrs)(struct iommu_domain *domain, void *attrs); int (*domain_get_attrs)(struct iommu_domain *domain, void *attrs); } Whatever this API winds up looking like it needs to be reflected in the vfio interface to user space as well. Thanks, Stuart -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html