[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API |
Date: |
Tue, 22 May 2018 10:42:21 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 05/21/2018 07:03 AM, Peter Maydell wrote:
> + /* Return the IOMMU index to use for a given set of transaction
> attributes.
> + *
> + * Optional method: if an IOMMU only supports a single IOMMU index then
> + * the default implementation of memory_region_iommu_attrs_to_index()
> + * will return 0.
> + *
> + * The indexes supported by an IOMMU must be contiguous, starting at 0.
> + *
> + * @iommu: the IOMMUMemoryRegion
> + * @attrs: memory transaction attributes
> + */
> + int (*attrs_to_index)(IOMMUMemoryRegion *iommu, MemTxAttrs attrs);
> +
> + /* Return the number of IOMMU indexes this IOMMU supports.
> + *
> + * Optional method: if this method is not provided, then
> + * memory_region_iommu_num_indexes() will return 1, indicating that
> + * only a single IOMMU index is supported.
> + */
The mispatched callback has been discussed, but would it be equally useful to
simply have a variable here instead of a callback? Perhaps max_index instead
of num_indexes so that zero-initialization of the structure does the right
thing for existing iommu's.
r~
- Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, (continued)
- Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Peter Xu, 2018/05/24
- Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Peter Maydell, 2018/05/24
- Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Peter Xu, 2018/05/24
- Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Auger Eric, 2018/05/25
- Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Peter Maydell, 2018/05/25
Re: [Qemu-arm] [Qemu-devel] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Auger Eric, 2018/05/22
Re: [Qemu-arm] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API,
Richard Henderson <=
[Qemu-arm] [PATCH 19/27] hw/misc/tz-mpc.c: Implement registers, Peter Maydell, 2018/05/21
[Qemu-arm] [PATCH 05/27] Make address_space_access_valid() take a MemTxAttrs argument, Peter Maydell, 2018/05/21
[Qemu-arm] [PATCH 02/27] Make tb_invalidate_phys_addr() take a MemTxAttrs argument, Peter Maydell, 2018/05/21