qemu-cr16/hw/vfio
Zhenzhong Duan 8bf49fff0d vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer
After CPR transfer, if there are more than one VFIO devices, device is
not added to hwpt->device_list and its reference to hwpt isn't restored
on destination. We still need to call iommufd_cdev_attach_container() to
restore it after a matching container is found, or else SIGSEV triggers.

Fixes: 4296ee0745 ("vfio/iommufd: reconstruct device")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Steve Sistare <steven.sistare@oracle.com>
Link: https://lore.kernel.org/qemu-devel/20250928085432.40107-5-zhenzhong.duan@intel.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2025-10-22 08:12:52 +02:00
..
ap.c vfio/iommufd: add vfio_device_free_name 2025-07-03 13:42:28 +02:00
ccw.c vfio/iommufd: add vfio_device_free_name 2025-07-03 13:42:28 +02:00
container-legacy.c system/physmem: Extract API out of 'system/ram_addr.h' header 2025-10-07 05:03:56 +02:00
container.c system/physmem: Extract API out of 'system/ram_addr.h' header 2025-10-07 05:03:56 +02:00
cpr-iommufd.c vfio: cpr-exec mode 2025-10-03 09:48:02 -04:00
cpr-legacy.c vfio/cpr-legacy: drop an erroneous assert 2025-10-22 08:12:52 +02:00
cpr.c vfio: cpr-exec mode 2025-10-03 09:48:02 -04:00
device.c hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE 2025-09-25 17:55:20 +02:00
display.c ramfb: Add property to control if load the romfile 2025-07-17 12:44:57 +02:00
helpers.c vfio/migration: Add x-migration-load-config-after-iter VFIO property 2025-07-15 17:11:12 +02:00
igd.c vfio/igd.c: use QOM casts where appropriate 2025-09-08 16:46:31 +02:00
iommufd-stubs.c migration: vfio cpr state hook 2025-07-03 13:42:28 +02:00
iommufd.c vfio/iommufd: Restore vbasedev's reference to hwpt after CPR transfer 2025-10-22 08:12:52 +02:00
Kconfig vfio: Remove 'vfio-platform' 2025-09-08 16:46:31 +02:00
listener.c vfio/container: Remap only populated parts in a section 2025-10-22 08:12:52 +02:00
meson.build hw/vfio/container-base.c: rename file to container.c 2025-09-25 17:55:19 +02:00
migration-multifd.c vfio queue: 2025-07-16 07:07:44 -04:00
migration-multifd.h vfio/migration: Add x-migration-load-config-after-iter VFIO property 2025-07-15 17:11:12 +02:00
migration.c vfio/migration: Add x-migration-load-config-after-iter VFIO property 2025-07-15 17:11:12 +02:00
pci-quirks.c vfio: Do not unparent in instance_finalize() 2025-09-24 09:23:20 +02:00
pci-quirks.h vfio/pci: introduce config_offset field in VFIOConfigMirrorQuirk 2025-02-11 14:15:19 +01:00
pci.c migration: Remove error variant of vmstate_save_state() function 2025-10-03 09:48:02 -04:00
pci.h hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE 2025-09-25 17:55:20 +02:00
region.c vfio: Do not unparent in instance_finalize() 2025-09-24 09:23:20 +02:00
spapr.c hw: Remove unnecessary 'system/ram_addr.h' header 2025-10-07 05:03:56 +02:00
trace-events hw/vfio: Avoid ram_addr_t in vfio_container_query_dirty_bitmap() 2025-10-02 10:41:23 +02:00
trace.h vfio: add license tag to some files 2025-06-26 08:55:37 +02:00
types.h hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE 2025-09-25 17:55:20 +02:00
vfio-display.h vfio: Introduce new files for VFIORegion definitions and declarations 2025-04-25 09:01:37 +02:00
vfio-helpers.h vfio/migration: Add x-migration-load-config-after-iter VFIO property 2025-07-15 17:11:12 +02:00
vfio-iommufd.h vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj 2025-09-25 17:55:19 +02:00
vfio-listener.h include/hw/vfio/vfio-container-base.h: rename VFIOContainerBase to VFIOContainer 2025-09-25 17:55:19 +02:00
vfio-migration-internal.h hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include 2025-07-29 13:56:39 +02:00
vfio-region.h vfio: Move vfio-region.h under hw/vfio/ 2025-09-08 16:46:31 +02:00