qemu/subprojects
David Hildenbrand 60ccdca42d libvhost-user: Factor out search for memory region by GPA and simplify
Memory regions cannot overlap, and if we ever hit that case something
would be really flawed.

For example, when vhost code in QEMU decides to increase the size of memory
regions to cover full huge pages, it makes sure to never create overlaps,
and if there would be overlaps, it would bail out.

QEMU commits 48d7c97577 ("vhost: Merge sections added to temporary
list"), c1ece84e7c ("vhost: Huge page align and merge") and
e7b94a84b6 ("vhost: Allow adjoining regions") added and clarified that
handling and how overlaps are impossible.

Consequently, each GPA can belong to at most one memory region, and
everything else doesn't make sense. Let's factor out our search to prepare
for further changes.

Reviewed-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-10-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: Factor out search for memory region by GPA and simplify 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