]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vfio/container: Fix vfio_listener_commit()
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Mon, 9 Jun 2025 11:54:33 +0000 (19:54 +0800)
committerCédric Le Goater <clg@redhat.com>
Wed, 11 Jun 2025 12:01:58 +0000 (14:01 +0200)
It's wrong to call into listener_begin callback in vfio_listener_commit().
Currently this impacts vfio-user.

Fixes: d9b7d8b6993b ("vfio/container: pass listener_begin/commit callbacks")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20250609115433.401775-1-zhenzhong.duan@intel.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/listener.c

index 203ed0314ec46225651a51d91df9c2e7c76168ed..735b5f21b7b87cff6b5e757f9696d9a7c1c44fbf 100644 (file)
@@ -437,7 +437,7 @@ static void vfio_listener_commit(MemoryListener *listener)
                                                  listener);
     void (*listener_commit)(VFIOContainerBase *bcontainer);
 
-    listener_commit = VFIO_IOMMU_GET_CLASS(bcontainer)->listener_begin;
+    listener_commit = VFIO_IOMMU_GET_CLASS(bcontainer)->listener_commit;
 
     if (listener_commit) {
         listener_commit(bcontainer);