…ility chains This patch allows the user-space to retrieve the MSI geometry. The implementation is based on capability chains, now also added to VFIO_IOMMU_GET_INFO. The returned info comprise: - whether the MSI IOVA are constrained to a reserved range (x86 case) and in the positive, the start/end of the aperture, - or whether the IOVA aperture need to be set by the userspace. In that case, the size and alignment of the IOVA window to be provided are returned. In case the userspace must provide the IOVA aperture, we currently report a size/alignment based on all the doorbells registered by the host kernel. This may exceed the actual needs. Signed-off-by: Eric Auger <eric.auger@redhat.com> --- v11 -> v11: - msi_doorbell_pages was renamed msi_doorbell_calc_pages v9 -> v10: - move cap_offset after iova_pgsizes - replace __u64 alignment by __u32 order - introduce __u32 flags in vfio_iommu_type1_info_cap_msi_geometry and fix alignment - call msi-doorbell API to compute the size/alignment v8 -> v9: - use iommu_msi_supported flag instead of programmable - replace IOMMU_INFO_REQUIRE_MSI_MAP flag by a more sophisticated capability chain, reporting the MSI geometry v7 -> v8: - use iommu_domain_msi_geometry v6 -> v7: - remove the computation of the number of IOVA pages to be provisionned. This number depends on the domain/group/device topology which can dynamically change. Let's rely instead rely on an arbitrary max depending on the system v4 -> v5: - move msi_info and ret declaration within the conditional code v3 -> v4: - replace former vfio_domains_require_msi_mapping by more complex computation of MSI mapping requirements, especially the number of pages to be provided by the user-space. - reword patch title RFC v1 -> v1: - derived from [RFC PATCH 3/6] vfio: Extend iommu-info to return MSIs automap state - renamed allow_msi_reconfig into require_msi_mapping - fixed VFIO_IOMMU_GET_INFO
2fff16b