[PATCH 0/2] virtio: shmem map transaction cleanup

Albert Esteve posted 2 patches 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260707112149.2867886-1-aesteve@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>
hw/virtio/vhost-user.c     | 21 ++++-----------------
hw/virtio/virtio.c         | 12 ++++++++++++
include/hw/virtio/virtio.h | 29 +++++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 17 deletions(-)
[PATCH 0/2] virtio: shmem map transaction cleanup
Posted by Albert Esteve 1 week, 6 days ago
This series is a follow-up cleanup to [1], which introduced the
VHOST_USER_BACKEND_SHMEM_MAP request handler in vhost-user.c, and
addresses suggestions raised during its review.

The first patch wraps the raw memory_region_transaction_begin()/commit()
calls to hide implementation details behind dedicated helpers (see [2]).

The second patch builds on those helpes by replacing the manual begin/end
calls with a g_autoptr guard that commits the transaction automatically on
all exit paths, removing the send_reply_commit label which became redundant
as a result.

[1] https://lore.kernel.org/all/20260304165223.2166175-1-aesteve@redhat.com/
[2] https://lore.kernel.org/all/a74da624-8665-46d6-846d-15fc932775cc@redhat.com/

Albert Esteve (2):
  virtio: add shmem map transaction wrappers
  virtio: use g_autoptr guard for shmem map transaction

 hw/virtio/vhost-user.c     | 21 ++++-----------------
 hw/virtio/virtio.c         | 12 ++++++++++++
 include/hw/virtio/virtio.h | 29 +++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 17 deletions(-)

-- 
2.54.0