From 98c12de5aeb1cb464a9cde13cd7a53dd6520d3aa Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 15 Jul 2025 10:25:42 +0100 Subject: vfio/vfio-container.h: update VFIOContainer declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the VFIOContainer declaration so that it is closer to our coding guidelines: emove the explicit typedef (this is already handled by the OBJECT_DECLARE_TYPE() macro) and add a blank line after the parent object. Signed-off-by: Mark Cave-Ayland Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/20250715093110.107317-3-mark.caveayland@nutanix.com Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/hw/vfio/vfio-container.h') diff --git a/include/hw/vfio/vfio-container.h b/include/hw/vfio/vfio-container.h index 21e5807e48..50c91788d5 100644 --- a/include/hw/vfio/vfio-container.h +++ b/include/hw/vfio/vfio-container.h @@ -25,13 +25,14 @@ typedef struct VFIOGroup { bool ram_block_discard_allowed; } VFIOGroup; -typedef struct VFIOContainer { +struct VFIOContainer { VFIOContainerBase bcontainer; + int fd; /* /dev/vfio/vfio, empowered by the attached groups */ unsigned iommu_type; QLIST_HEAD(, VFIOGroup) group_list; VFIOContainerCPR cpr; -} VFIOContainer; +}; OBJECT_DECLARE_SIMPLE_TYPE(VFIOContainer, VFIO_IOMMU_LEGACY); -- cgit 1.4.1 From 507a118e9f8cc328c55adc531336e075fa8ee2d7 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 15 Jul 2025 10:25:47 +0100 Subject: vfio/vfio-container.h: rename VFIOContainer bcontainer field to parent_obj MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that nothing accesses the bcontainer field directly, rename bcontainer to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/qemu-devel/20250715093110.107317-8-mark.caveayland@nutanix.com Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw/vfio/vfio-container.h') diff --git a/include/hw/vfio/vfio-container.h b/include/hw/vfio/vfio-container.h index 50c91788d5..240f566993 100644 --- a/include/hw/vfio/vfio-container.h +++ b/include/hw/vfio/vfio-container.h @@ -26,7 +26,7 @@ typedef struct VFIOGroup { } VFIOGroup; struct VFIOContainer { - VFIOContainerBase bcontainer; + VFIOContainerBase parent_obj; int fd; /* /dev/vfio/vfio, empowered by the attached groups */ unsigned iommu_type; -- cgit 1.4.1