vfio/common: Store the parent container in VFIODevice

let's store the parent contaienr within the VFIODevice.
This simplifies the logic in vfio_viommu_preset() and
brings the benefice to hide the group specificity which
is useful for IOMMUFD migration.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
Zhenzhong Duan 2023-10-09 11:09:15 +02:00 committed by Cédric Le Goater
parent 7103ef7e76
commit 0bddd88027
2 changed files with 8 additions and 1 deletions

View file

@ -132,6 +132,7 @@ typedef struct VFIODevice {
QLIST_ENTRY(VFIODevice) next;
QLIST_ENTRY(VFIODevice) container_next;
struct VFIOGroup *group;
VFIOContainer *container;
char *sysfsdev;
char *name;
DeviceState *dev;