summary refs log tree commit diff stats
path: root/hw/display/vhost-user-gpu.c
diff options
context:
space:
mode:
authorHaoqian He <haoqian.he@smartx.com>2025-04-15 22:47:27 -0400
committerMichael S. Tsirkin <mst@redhat.com>2025-05-14 05:39:14 -0400
commit5a317017b827e338358792cd07663f8ea25f1ffe (patch)
tree20622a94b6b117dbb9b589f66b6c5c3c711b67a8 /hw/display/vhost-user-gpu.c
parente0f300b36da1ee794fd81aa95f56e7bc9f010d46 (diff)
downloadfocaccia-qemu-5a317017b827e338358792cd07663f8ea25f1ffe.tar.gz
focaccia-qemu-5a317017b827e338358792cd07663f8ea25f1ffe.zip
vhost: return failure if stop virtqueue failed in vhost_dev_stop
This patch captures the error of vhost_virtqueue_stop() in vhost_dev_stop()
and returns the error upward.

Specifically, if QEMU is disconnected from the vhost backend, some actions
in vhost_dev_stop() will fail, such as sending vhost-user messages to the
backend (GET_VRING_BASE, SET_VRING_ENABLE) and vhost_reset_status.

Considering that both set_vring_enable and vhost_reset_status require setting
the specific virtio feature bit, we can capture vhost_virtqueue_stop()'s
error to indicate that QEMU has lost connection with the backend.

This patch is the pre patch for 'vhost-user: return failure if backend crashes
when live migration', which makes the live migration aware of the loss of
connection with the vhost-user backend and aborts the live migration.

Signed-off-by: Haoqian He <haoqian.he@smartx.com>
Message-Id: <20250416024729.3289157-3-haoqian.he@smartx.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/display/vhost-user-gpu.c')
0 files changed, 0 insertions, 0 deletions