diff options
author | David Hildenbrand <david@redhat.com> | 2024-02-14 16:16:52 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-03-12 17:56:55 -0400 |
commit | 93fec23d8cecebf0e6917044a0c1635df20e350d (patch) | |
tree | 43d35e410c96f330efa9c85aa72e708174e2e32b /scripts/analyse-9p-simpletrace.py | |
parent | 05a58ce47167a95b554f9afc47f78f267c394c6e (diff) | |
download | qemu-93fec23d8cecebf0e6917044a0c1635df20e350d.zip qemu-93fec23d8cecebf0e6917044a0c1635df20e350d.tar.gz qemu-93fec23d8cecebf0e6917044a0c1635df20e350d.tar.bz2 |
libvhost-user: Factor out adding a memory region
Let's factor it out, reducing quite some code duplication and perparing
for further changes.
If we fail to mmap a region and panic, we now simply don't add that
(broken) region.
Note that we now increment dev->nregions as we are successfully
adding memory regions, and don't increment dev->nregions if anything went
wrong.
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-6-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>
Diffstat (limited to 'scripts/analyse-9p-simpletrace.py')
0 files changed, 0 insertions, 0 deletions