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 /hw/core/qdev-properties-system.c | |
| parent | 05a58ce47167a95b554f9afc47f78f267c394c6e (diff) | |
| download | focaccia-qemu-93fec23d8cecebf0e6917044a0c1635df20e350d.tar.gz focaccia-qemu-93fec23d8cecebf0e6917044a0c1635df20e350d.zip | |
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 'hw/core/qdev-properties-system.c')
0 files changed, 0 insertions, 0 deletions