Commit ffb7d290bc for qemu.org
commit ffb7d290bc55481f573ff12135612bf92fab74cc
Author: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
Date: Tue Sep 29 15:16:23 2026 +0500
vhost-user: add missing stub for vhost_user_has_protocol_feature()
Currently, building with --disable-vhost-user fails to link when other
vhost backends are enabled: vhost.c calls vhost_user_has_protocol_feature(),
but its implementation is not built.
Add a stub returning false to fix the link error.
Signed-off-by: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
Fixes: 5eb2347867ee ("vhost-user: add skip_drain param to do_vhost_virtqueue_stop")
Tested-by: Clément Chigot <chigot@adacore.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260929101623.1352299-1-dtalexundeer@yandex-team.ru>
diff --git a/hw/virtio/vhost-user-stub.c b/hw/virtio/vhost-user-stub.c
index 45559788dd..9d2e521788 100644
--- a/hw/virtio/vhost-user-stub.c
+++ b/hw/virtio/vhost-user-stub.c
@@ -4,3 +4,8 @@
void vhost_user_qmp_status(struct vhost_dev *dev, VirtioStatus *status)
{
}
+
+bool vhost_user_has_protocol_feature(struct vhost_dev *dev, uint64_t feature)
+{
+ return false;
+}