qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hanna Czenczek <hreitz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Hanna Czenczek <hreitz@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>
Subject: [PATCH 0/2] Do not abort on log-start/stop errors
Date: Thu, 24 Jul 2025 14:59:26 +0200	[thread overview]
Message-ID: <20250724125928.61045-1-hreitz@redhat.com> (raw)

Hi,

vhost_log_global_start() and vhost_log_global_stop() abort the whole
qemu process on error.  Not least because vhost devices are generally
outside of qemu (i.e. use a foreign code base), that is not great, as we
can basically be forced to abort because of bugs (or maybe even properly
behaving, just unexpectedly so) in other code bases.

In case of vhost_log_global_start(), the solution is simple: Ever since
commit 3688fec8923 ("memory: Add Error** argument to .log_global_start()
handler"), it can just return proper errors, so do that instead of
aborting.

In case of vhost_log_global_stop(), we cannot return errors; but we can
just ignore them.  In the worst case, some other process will keep
logging into shared memory we have already unmapped.  That's fine.


Hanna Czenczek (2):
  vhost: Do not abort on log-start error
  vhost: Do not abort on log-stop error

 hw/virtio/vhost.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.50.1



             reply	other threads:[~2025-07-24 13:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24 12:59 Hanna Czenczek [this message]
2025-07-24 12:59 ` [PATCH 1/2] vhost: Do not abort on log-start error Hanna Czenczek
2025-07-24 13:12   ` Manos Pitsidianakis
2025-07-24 14:24   ` Stefano Garzarella
2025-07-24 14:58     ` Hanna Czenczek
2025-07-24 12:59 ` [PATCH 2/2] vhost: Do not abort on log-stop error Hanna Czenczek
2025-07-24 13:17   ` Manos Pitsidianakis
2025-07-24 14:26   ` Stefano Garzarella
2025-07-25  9:30 ` [PATCH 0/2] Do not abort on log-start/stop errors Lei Yang
2025-08-02  6:31 ` Michael Tokarev

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=20250724125928.61045-1-hreitz@redhat.com \
    --to=hreitz@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).