[Top][All Lists]

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

[Qemu-devel] vfio / iommu domain attributes

From: Stuart Yoder
Subject: [Qemu-devel] vfio / iommu domain attributes
Date: Wed, 7 Dec 2011 09:54:39 -0600

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
<address@hidden> wrote:
> 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
>  - 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 {
        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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]