| 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.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 | struct VFIOIOMMUFDContainer { |
| 26 | VFIOContainer parent_obj; |
| 27 | |
| 28 | IOMMUFDBackend *be; |
| 29 | uint32_t ioas_id; |
| 30 | QLIST_HEAD(, VFIOIOASHwpt) hwpt_list; |
| 31 | }; |
| 32 | |
| 33 | OBJECT_DECLARE_SIMPLE_TYPE(VFIOIOMMUFDContainer, VFIO_IOMMU_IOMMUFD); |
| 34 | |
| 35 | #endif /* HW_VFIO_VFIO_IOMMUFD_H */ |