vfio/container: Move per container device list in base container

VFIO Device is also changed to point to base container instead of
legacy container.

No functional change intended.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
Zhenzhong Duan 2023-11-02 15:12:34 +08:00 committed by Cédric Le Goater
parent bb424490ed
commit 3e6015d111
4 changed files with 23 additions and 16 deletions

View file

@ -90,7 +90,6 @@ typedef struct VFIOContainer {
QLIST_HEAD(, VFIOHostDMAWindow) hostwin_list;
QLIST_HEAD(, VFIOGroup) group_list;
QLIST_HEAD(, VFIORamDiscardListener) vrdl_list;
QLIST_HEAD(, VFIODevice) device_list;
GList *iova_ranges;
} VFIOContainer;
@ -118,7 +117,7 @@ typedef struct VFIODevice {
QLIST_ENTRY(VFIODevice) container_next;
QLIST_ENTRY(VFIODevice) global_next;
struct VFIOGroup *group;
VFIOContainer *container;
VFIOContainerBase *bcontainer;
char *sysfsdev;
char *name;
DeviceState *dev;

View file

@ -39,6 +39,7 @@ typedef struct VFIOContainerBase {
bool dirty_pages_supported;
QLIST_HEAD(, VFIOGuestIOMMU) giommu_list;
QLIST_ENTRY(VFIOContainerBase) next;
QLIST_HEAD(, VFIODevice) device_list;
} VFIOContainerBase;
typedef struct VFIOGuestIOMMU {