qemu/subprojects
David Hildenbrand 67f4f663cd libvhost-user: Dynamically remap rings after (temporarily?) removing memory regions
Currently, we try to remap all rings whenever we add a single new memory
region. That doesn't quite make sense, because we already map rings when
setting the ring address, and panic if that goes wrong. Likely, that
handling was simply copied from set_mem_table code, where we actually
have to remap all rings.

Remapping all rings might require us to walk quite a lot of memory
regions to perform the address translations. Ideally, we'd simply remove
that remapping.

However, let's be a bit careful. There might be some weird corner cases
where we might temporarily remove a single memory region (e.g., resize
it), that would have worked for now. Further, a ring might be located on
hotplugged memory, and as the VM reboots, we might unplug that memory, to
hotplug memory before resetting the ring addresses.

So let's unmap affected rings as we remove a memory region, and try
dynamically mapping the ring again when required.

Acked-by: Raphael Norwitz <raphael@enfabrica.net>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20240214151701.29906-14-david@redhat.com>
Tested-by: Mario Casquero <mcasquer@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-03-12 17:56:55 -04:00
..
libvduse libvduse: Fix compiler warning with -Wshadow=local 2023-10-12 14:09:58 +02:00
libvhost-user libvhost-user: Dynamically remap rings after (temporarily?) removing memory regions 2024-03-12 17:56:55 -04:00
packagefiles meson: subprojects: replace berkeley-{soft,test}float-3 with wraps 2023-06-06 16:30:01 +02:00
.gitignore meson: subprojects: replace berkeley-{soft,test}float-3 with wraps 2023-06-06 16:30:01 +02:00
berkeley-softfloat-3.wrap subprojects: Use the correct .git suffix in the repository URLs 2023-09-21 11:31:18 +03:00
berkeley-testfloat-3.wrap subprojects: Use the correct .git suffix in the repository URLs 2023-09-21 11:31:18 +03:00
dtc.wrap meson: subprojects: replace submodules with wrap files 2023-06-06 16:30:01 +02:00
keycodemapdb.wrap meson: subprojects: replace submodules with wrap files 2023-06-06 16:30:01 +02:00
libblkio.wrap subprojects: add wrap file for libblkio 2023-09-07 13:32:37 +02:00
libvfio-user.wrap meson: subprojects: replace submodules with wrap files 2023-06-06 16:30:01 +02:00
slirp.wrap subprojects: Use the correct .git suffix in the repository URLs 2023-09-21 11:31:18 +03:00