1 /* 2 * VFIO iommufd 3 * 4 * Copyright Red Hat, Inc. 2025 5 * 6 * SPDX-License-Identifier: GPL-2.0-or-later 7 */ 8 9 #ifndef HW_VFIO_VFIO_IOMMUFD_H 10 #define HW_VFIO_VFIO_IOMMUFD_H 11 12 #include "hw/vfio/vfio-container-base.h" 13 14 typedef struct VFIODevice VFIODevice; 15 16 typedef struct VFIOIOASHwpt { 17 uint32_t hwpt_id; 18 uint32_t hwpt_flags; 19 QLIST_HEAD(, VFIODevice) device_list; 20 QLIST_ENTRY(VFIOIOASHwpt) next; 21 } VFIOIOASHwpt; 22 23 typedef struct IOMMUFDBackend IOMMUFDBackend; 24 25 typedef struct VFIOIOMMUFDContainer { 26 VFIOContainerBase bcontainer; 27 IOMMUFDBackend *be; 28 uint32_t ioas_id; 29 QLIST_HEAD(, VFIOIOASHwpt) hwpt_list; 30 } VFIOIOMMUFDContainer; 31 32 OBJECT_DECLARE_SIMPLE_TYPE(VFIOIOMMUFDContainer, VFIO_IOMMU_IOMMUFD); 33 34 #endif /* HW_VFIO_VFIO_IOMMUFD_H */ 35