backends/host_iommu_device: Introduce HostIOMMUDeviceCaps
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Wed, 5 Jun 2024 08:30:28 +0000 (16:30 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:30 +0000 (23:15 +0200)
commit38998c79a1831e23ffed4b8b6f76222c1fedb9d5
tree90a24514f5619e5efa5c15dbfc5b1bf660f942d0
parent1f94b21801b22b01ba131e7d776f07c1062d9433
backends/host_iommu_device: Introduce HostIOMMUDeviceCaps

HostIOMMUDeviceCaps's elements map to the host IOMMU's capabilities.
Different platform IOMMU can support different elements.

Currently only two elements, type and aw_bits, type hints the host
platform IOMMU type, i.e., INTEL vtd, ARM smmu, etc; aw_bits hints
host IOMMU address width.

Introduce .get_cap() handler to check if HOST_IOMMU_DEVICE_CAP_XXX
is supported.

Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
include/sysemu/host_iommu_device.h