]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vfio/cpr-legacy: drop an erroneous assert
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Sun, 28 Sep 2025 08:54:28 +0000 (04:54 -0400)
committerCédric Le Goater <clg@redhat.com>
Wed, 22 Oct 2025 06:12:52 +0000 (08:12 +0200)
vfio_legacy_cpr_dma_map() is not only used in post_load on destination
but also error recovery path on source side. Assert it for destination
is wrong.

Fixes: 7e9f21411302 ("vfio/container: restore DMA vaddr")
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-3-zhenzhong.duan@intel.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/cpr-legacy.c

index b4581e8f859323c1c45560f7d345b34f1ed9bd85..7184c9399128e71a658da51ba10c2440f1e54d92 100644 (file)
@@ -52,8 +52,6 @@ static int vfio_legacy_cpr_dma_map(const VFIOContainer *bcontainer,
         .size = size,
     };
 
-    g_assert(cpr_is_incoming());
-
     if (ioctl(container->fd, VFIO_IOMMU_MAP_DMA, &map)) {
         return -errno;
     }