]> git.ipfire.org Git - thirdparty/qemu.git/commit
vdpa-dev: add get_vhost() callback for vhost-vdpa device
authorLi Zhaoxin <lizhaoxin04@baidu.com>
Fri, 26 Sep 2025 11:08:17 +0000 (19:08 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 5 Oct 2025 20:13:02 +0000 (16:13 -0400)
commit221e59e3835c71bd3a09d05a39cd192e772aaec3
tree75a25c5cf4c80ffe3625645614792d7145436196
parentd9ec848fb515f4c98f5737ad1f788ef06887fc2c
vdpa-dev: add get_vhost() callback for vhost-vdpa device

Commit c255488d67 "virtio: add vhost support for virtio devices"
added the get_vhost() function, but it did not include vhost-vdpa devices.

So when I use the vdpa device and query the status of the vdpa device
with the x-query-virtio-status qmp command, since vdpa does not implement
vhost_get, it will cause qemu to crash.

Therefore, in order to obtain the status of the virtio device under vhost-vdpa,
we need to add a vhost_get implement for the vdpa device.

Co-developed-by: Miao Kezhan <miaokezhan@baidu.com>
Signed-off-by: Miao Kezhan <miaokezhan@baidu.com>
Signed-off-by: Li Zhaoxin <lizhaoxin04@baidu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <2778f817cb6740a15ecb37927804a67288b062d1.1758860411.git.lizhaoxin04@baidu.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vdpa-dev.c