]> git.ipfire.org Git - thirdparty/qemu.git/commit
vdpa: fix vhost-vdpa suspended state not be shared
authorWafer Xie <wafer@jaguarmicro.com>
Wed, 19 Nov 2025 13:24:52 +0000 (21:24 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 5 Feb 2026 10:06:45 +0000 (05:06 -0500)
commitfd3a2c601ab4a1bdb669e4c584b364e00a978702
treeaecb5b8594946d0f220a12b419152f1647cdcf08
parent23a4edb6dbe3dd5223326bdf03ae955321669b5c
vdpa: fix vhost-vdpa suspended state not be shared

When stopping a vhost-vdpa device, only the first queue pair is marked as suspended,
while the remaining queues are not updated to the suspended state.
As a result, when stopping a multi-queue vhost-vdpa device,
the following error message will be printed.

qemu-system-x86_64:vhost VQ 2 ring restore failed: -1: Operation not permitted (1)

qemu-system-x86_64:vhost VQ 3 ring restore failed: -1: Operation not permitted (1)

So move v->suspended to v->shared, and then all the vhost_vdpa devices cannot
have different suspended states.

Fixes: 0bb302a9960a ("vdpa: add vhost_vdpa_suspend")
Suggested-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Wafer Xie <wafer@jaguarmicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20251119132452.3117-1-wafer@jaguarmicro.com>
hw/virtio/vhost-vdpa.c
include/hw/virtio/vhost-vdpa.h