]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/container: recover from unmap-all-vaddr failure
authorSteve Sistare <steven.sistare@oracle.com>
Tue, 10 Jun 2025 15:39:21 +0000 (08:39 -0700)
committerCédric Le Goater <clg@redhat.com>
Wed, 11 Jun 2025 12:01:58 +0000 (14:01 +0200)
commiteba1f657cbb1b525e2b069626de655da21084e3e
treea37fd5a6dd8a6035395dd3d1abafb81895b98866
parentdac0dd68d9b150a6aa334ab8ee9aeba011d54b32
vfio/container: recover from unmap-all-vaddr failure

If there are multiple containers and unmap-all fails for some container, we
need to remap vaddr for the other containers for which unmap-all succeeded.
Recover by walking all address ranges of all containers to restore the vaddr
for each.  Do so by invoking the vfio listener callback, and passing a new
"remap" flag that tells it to restore a mapping without re-allocating new
userland data structures.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/1749569991-25171-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/cpr-legacy.c
hw/vfio/listener.c
include/hw/vfio/vfio-container-base.h
include/hw/vfio/vfio-cpr.h