diff options
| author | Steve Sistare <steven.sistare@oracle.com> | 2025-07-02 14:58:51 -0700 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-07-03 13:42:28 +0200 |
| commit | f2f3e4667e4d6026f39ab17f355f79b2f8431e19 (patch) | |
| tree | f2a04e45fbcc882e2a7432c8a87d5b9640500ec9 /hw/vfio/iommufd.c | |
| parent | a6f2f9c42f3a5418fc7000b1fd331b086b6133d9 (diff) | |
| download | focaccia-qemu-f2f3e4667e4d6026f39ab17f355f79b2f8431e19.tar.gz focaccia-qemu-f2f3e4667e4d6026f39ab17f355f79b2f8431e19.zip | |
vfio/iommufd: cpr state
VFIO iommufd devices will need access to ioas_id, devid, and hwpt_id in new QEMU at realize time, so add them to CPR state. Define CprVFIODevice as the object which holds the state and is serialized to the vmstate file. Define accessors to copy state between VFIODevice and CprVFIODevice. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-15-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/iommufd.c')
| -rw-r--r-- | hw/vfio/iommufd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index ff291be235..f0d57ea65f 100644 --- a/hw/vfio/iommufd.c +++ b/hw/vfio/iommufd.c @@ -515,6 +515,8 @@ static bool iommufd_cdev_attach(const char *name, VFIODevice *vbasedev, const VFIOIOMMUClass *iommufd_vioc = VFIO_IOMMU_CLASS(object_class_by_name(TYPE_VFIO_IOMMU_IOMMUFD)); + vfio_cpr_load_device(vbasedev); + if (vbasedev->fd < 0) { devfd = iommufd_cdev_getfd(vbasedev->sysfsdev, errp); if (devfd < 0) { |