Re: RFC: extend iommu_ops with domain attributes API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-01-10 at 10:22 -0600, Stuart Yoder wrote:
> As we work on mapping the Freescale IOMMU (called PAMU) into the existing
> Linux iommu infrastructure, one issue is that we have additional domain
> attributes that need to be set.   This was discussed briefly a month ago
> or so and I believe there was a need for a similar mechanism by IBM.
> 
> We are proposing a couple of APIs to be added to iommu_ops to
> get/set domain attributes:
> 
>    int domain_set_attr(struct iommu_domain *domain, int attr_type, void *data);
>    int domain_get_attr(struct iommu_domain *domain, int attr_type, void *data);
> 
> A couple of the attributes I'm considering PAMU specific with a generic
> enable attribute:
> 
>    enum iommu_attr_type {
>        IOMMU_ATTR_PAMU_GEOMETRY,       // the PAMU geometry for the domain
>        IOMMU_ATTR_PAMU_STASH,          // stash characteristics for a domain
>        IOMMU_ATTR_ENABLE
>    };
> 
>    The data for each attribute value is defined as:
> 
>    IOMMU_ATTR_PAMU_GEOMETRY - data is a struct:
> 
>       struct dma_geometry_attr {
>           u64 iova;          // iova of the DMA domain
>           u32 size;          // must be a power of 2 and be greater
>                              // or equal than 4KB.
>           u32 subwin_cnt;    // power of 2 between 1 and 256

Agree with Joerg's comments.  size/subwin count should probably both be
u64 if generalized and the restrictions would be iommu dependent.  Is
this also where we should expose a bitmap of available mapping sizes?
Thanks,

Alex

--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux