When x-flts=on, we set up bindings to nested HWPT in host, after
migration, VFIO device binds to nesting parent HWPT by default.
We need to re-establish the bindings to nested HWPT, or else device
DMA will break.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260106061304.314546-18-zhenzhong.duan@intel.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
*/
vtd_switch_address_space_all(iommu);
+ /*
+ * Bindings to nested HWPT in host is set up dynamically depending
+ * on pasid entry configuration from guest. After migration, we
+ * need to re-establish the bindings before restoring device's DMA.
+ */
+ vtd_replay_pasid_bindings_all(iommu);
+
return 0;
}