qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Albert Esteve <aesteve@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefano Garzarella <sgarzare@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Albert Esteve <aesteve@redhat.com>
Subject: [PATCH v4 0/1] vhost-user: fix shared object lookup handler logic
Date: Fri, 17 Oct 2025 09:20:10 +0200	[thread overview]
Message-ID: <20251017072011.1874874-1-aesteve@redhat.com> (raw)

v3->v4:
- Base the branch on [PATCH v10 0/7] vhost-user: Add SHMEM_MAP/UNMAP requests
- Add `reply_ack = false;` for SHMEM_MAP/UNMAP handlers.

v4 is based on:
[PATCH v10 0/7] vhost-user: Add SHMEM_MAP/UNMAP requests

Based-on: <20251016143827.1850397-1-aesteve@redhat.com>

Refactor backend_read() function and add a reply_ack variable
to have the option for handlers to force tweak whether they should
send a reply or not without depending on VHOST_USER_NEED_REPLY_MASK
flag.

This fixes an issue with
vhost_user_backend_handle_shared_object_lookup() logic, as the
error path was not closing the backend channel correctly. So,
we can remove the reply call from within the handler, make
sure it returns early on errors as other handlers do and
set the reply_ack variable on backend_read() to true to ensure
that it will send a response, thus keeping the original intent.

Albert Esteve (1):
  vhost-user: fix shared object lookup handler logic

 hw/virtio/vhost-user.c | 42 +++++++++++++++---------------------------
 1 file changed, 15 insertions(+), 27 deletions(-)

-- 
2.49.0



             reply	other threads:[~2025-10-17  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17  7:20 Albert Esteve [this message]
2025-10-17  7:20 ` [PATCH v4 1/1] vhost-user: fix shared object lookup handler logic Albert Esteve
2025-10-17  7:52   ` Stefano Garzarella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251017072011.1874874-1-aesteve@redhat.com \
    --to=aesteve@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).