Skip to content

virtio: shmem map transaction cleanup

Albert Esteve qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio: add shmem map transaction wrappershw/virtio/vhost-user.c hw/virtio/virtio.c include/hw/virtio/virtio.h+30 -30 replies
2/2virtio: use g_autoptr guard for shmem map transactionhw/virtio/vhost-user.c hw/virtio/virtio.c include/hw/virtio/virtio.h+21 -201 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

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(-)
Signature · 1 line
2.54.0