]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-pmem: ignore empty queue notifications
authorLi Chen <chenl311@chinatelecom.cn>
Tue, 6 Jan 2026 08:38:59 +0000 (16:38 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 5 Feb 2026 10:06:46 +0000 (05:06 -0500)
commitefd581a8cd4405ca183ecd017072b0c878802d69
treefea070f669c89facd1c06302303bf2d5ab8f00be
parente27194e087aede62dbe3d2805c6f1aa30d3465df
virtio-pmem: ignore empty queue notifications

virtio_pmem_flush() treats a NULL return from virtqueue_pop() as a fatal
error and calls virtio_error(), which puts the device into NEEDS_RESET.

However, virtqueue handlers can be invoked when no element is available,
so an empty queue should be handled as a benign no-op.

With a Linux guest this avoids spurious NEEDS_RESET and the resulting
-EIO propagation (e.g. EXT4 journal abort and remount-ro).

Signed-off-by: Li Chen <me@linux.beauty>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260106083859.380338-1-me@linux.beauty>
hw/virtio/virtio-pmem.c