From: Li Chen Date: Tue, 6 Jan 2026 08:38:59 +0000 (+0800) Subject: virtio-pmem: ignore empty queue notifications X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efd581a8cd4405ca183ecd017072b0c878802d69;p=thirdparty%2Fqemu.git 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 Acked-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Message-Id: <20260106083859.380338-1-me@linux.beauty> --- diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c index 5381d59282..c3b3299c9c 100644 --- a/hw/virtio/virtio-pmem.c +++ b/hw/virtio/virtio-pmem.c @@ -73,7 +73,6 @@ static void virtio_pmem_flush(VirtIODevice *vdev, VirtQueue *vq) trace_virtio_pmem_flush_request(); req_data = virtqueue_pop(vq, sizeof(VirtIODeviceRequest)); if (!req_data) { - virtio_error(vdev, "virtio-pmem missing request data"); return; }