From nobody Tue Feb 10 10:03:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615544662; cv=none; d=zohomail.com; s=zohoarc; b=eeRtX+r9YRz/D0DXCmjAvGYHRPomDpi9f9pKnEKavgX1VPG0QLbrXYCUTXIrfT7+Wx9zbWhNtRRx7mPfGFwu/L0TipxNk/mMClPG/0UaX9E69dZcZTcNdbYiBoUV/qFbni46TCTPiToUNyjY2nxrFreJtOLsXIEub+8UE/D80l4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615544662; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WwZqhmUTQYMcloAHb8BHNauyoNuJJH4ziRo3JEaroZQ=; b=BEyHARbPwxURIAamayD24pCvJMk/bsdRNMMbd/c934uWq2kih4HxldAC7GeYD0QISCdRXKnh9rj/Yr0CX9cWNLQsjbHSjgG01oedTaEnTFrxlplamEo5kAqtALSfyfB/CzQS3y7TmvveuY4iZCkV27jkXrUsYA6ENPPMyurHsTo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615544662389522.3922048164578; Fri, 12 Mar 2021 02:24:22 -0800 (PST) Received: from localhost ([::1]:37096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKexx-0005bK-9S for importer@patchew.org; Fri, 12 Mar 2021 05:24:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKegd-00059h-CA for qemu-devel@nongnu.org; Fri, 12 Mar 2021 05:06:27 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lKegY-00051m-MU for qemu-devel@nongnu.org; Fri, 12 Mar 2021 05:06:26 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-111-QmE3LEGlPN6trhfSKJQ9HQ-1; Fri, 12 Mar 2021 05:06:18 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3277100C619 for ; Fri, 12 Mar 2021 10:06:17 +0000 (UTC) Received: from localhost (unknown [10.36.110.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9599069FB4; Fri, 12 Mar 2021 10:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615543582; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WwZqhmUTQYMcloAHb8BHNauyoNuJJH4ziRo3JEaroZQ=; b=hM5VJtD7cMoAh8uw7CCPQg4tPVwQjv5EPROiANCAJr2UrQgdh4l+w6r8J8Xy0SOWlrPAZA 0oRzGyy7o5VGGW0vRy0bsN58AZ/m8meX4WfVJUEPWtYj7RHJ4/3AMdQX+WyFZuwTpYnkf4 5sv3ew3OHChuRwEYFfHgcfKthvCHwpk= X-MC-Unique: QmE3LEGlPN6trhfSKJQ9HQ-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Subject: [PATCH 27/27] vhost-user-gpu: implement GPU_QEMU_DBUS_LISTENER Date: Fri, 12 Mar 2021 14:01:08 +0400 Message-Id: <20210312100108.2706195-28-marcandre.lureau@redhat.com> In-Reply-To: <20210312100108.2706195-1-marcandre.lureau@redhat.com> References: <20210312100108.2706195-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=marcandre.lureau@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Implement the QEMU DBus listener feature. This allows vhost-user-gpu to notify directly the console/ui clients. However, QEMU is still notified with the vhost-user-gpu protocol, for compatibility reasons. A future mechanism should allow qemu to opt-out for display updates. Signed-off-by: Marc-Andr=C3=A9 Lureau --- contrib/vhost-user-gpu/vugpu.h | 3 + contrib/vhost-user-gpu/vhost-user-gpu.c | 272 +++++++++++++++++++++++- contrib/vhost-user-gpu/meson.build | 6 +- 3 files changed, 269 insertions(+), 12 deletions(-) diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost-user-gpu/vugpu.h index 370fd10667..81ffddf347 100644 --- a/contrib/vhost-user-gpu/vugpu.h +++ b/contrib/vhost-user-gpu/vugpu.h @@ -119,12 +119,15 @@ typedef struct VuGpu { int drm_rnode_fd; GSource *renderer_source; guint wait_in; + guint wait_dbus; =20 bool virgl; bool virgl_inited; uint32_t inflight; =20 struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUTS]; + GHashTable *listeners[VIRTIO_GPU_MAX_SCANOUTS]; + QTAILQ_HEAD(, virtio_gpu_simple_resource) reslist; QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq; } VuGpu; diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-g= pu/vhost-user-gpu.c index 36d7f1d9e6..261a909fd4 100644 --- a/contrib/vhost-user-gpu/vhost-user-gpu.c +++ b/contrib/vhost-user-gpu/vhost-user-gpu.c @@ -18,6 +18,7 @@ =20 #include #include +#include =20 #include "vugpu.h" #include "hw/virtio/virtio-gpu-bswap.h" @@ -25,6 +26,8 @@ #include "virgl.h" #include "vugbm.h" =20 +#include "ui/dbus-display1.h" + enum { VHOST_USER_GPU_MAX_QUEUES =3D 2, }; @@ -359,7 +362,11 @@ vg_resource_create_2d(VuGpu *g, void vg_send_disable_scanout(VuGpu *g, int scanout_id) { + GHashTableIter iter; + DBusDisplayDisplay1Listener *listener; + g_debug("send disable scanout %d", scanout_id); + g_return_if_fail(scanout_id < VIRTIO_GPU_MAX_SCANOUTS); =20 if (g->sock_fd >=3D 0) { VhostUserGpuMsg msg =3D { @@ -369,6 +376,12 @@ vg_send_disable_scanout(VuGpu *g, int scanout_id) }; vg_send_msg(g, &msg, -1); } + + g_hash_table_iter_init(&iter, g->listeners[scanout_id]); + while (g_hash_table_iter_next(&iter, (void **)&listener, NULL)) { + dbus_display_display1_listener_call_disable( + listener, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL); + } } =20 static void @@ -597,6 +610,10 @@ vg_send_dmabuf_scanout(VuGpu *g, uint32_t fd_flags, int fd) { + GHashTableIter iter; + DBusDisplayDisplay1Listener *listener; + g_autoptr(GError) err =3D NULL; + g_autoptr(GUnixFDList) fd_list =3D NULL; VhostUserGpuMsg msg =3D { .request =3D VHOST_USER_GPU_DMABUF_SCANOUT, .size =3D sizeof(VhostUserGpuDMABUFScanout), @@ -615,7 +632,49 @@ vg_send_dmabuf_scanout(VuGpu *g, }; =20 g_debug("send dmabuf scanout: %d", ss->scanout_id); + g_return_if_fail(ss->scanout_id < VIRTIO_GPU_MAX_SCANOUTS); + vg_send_msg(g, &msg, fd); + + fd_list =3D g_unix_fd_list_new(); + if (g_unix_fd_list_append(fd_list, fd, &err) !=3D 0) { + g_warning("Failed to setup dmabuf fdlist: %s", err->message); + return; + } + + g_hash_table_iter_init(&iter, g->listeners[ss->scanout_id]); + while (g_hash_table_iter_next(&iter, (void **)&listener, NULL)) { + dbus_display_display1_listener_call_scanout_dmabuf( + listener, + g_variant_new_handle(0), + fd_width, + fd_height, + fd_stride, + fd_drm_fourcc, + 0, /* modifier */ + fd_flags & VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP, /* =3D=3D VIRGL_Y= _0_TOP */ + G_DBUS_CALL_FLAGS_NONE, + -1, + fd_list, + NULL, NULL, NULL); + } +} + +static void +dbus_update_gl_cb(GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + g_autoptr(GError) err =3D NULL; + VuGpu *g =3D user_data; + + if (!dbus_display_display1_listener_call_update_dmabuf_finish( + DBUS_DISPLAY_DISPLAY1_LISTENER(source_object), res, &err)) { + g_warning("Failed to call update dmabuf: %s", err->message); + } + + g->wait_dbus--; + vg_handle_ctrl(&g->dev.parent, 0); } =20 void @@ -626,6 +685,8 @@ vg_send_dmabuf_update(VuGpu *g, uint32_t width, uint32_t height) { + GHashTableIter iter; + DBusDisplayDisplay1Listener *listener; VhostUserGpuMsg msg =3D { .request =3D VHOST_USER_GPU_DMABUF_UPDATE, .size =3D sizeof(VhostUserGpuUpdate), @@ -635,7 +696,22 @@ vg_send_dmabuf_update(VuGpu *g, .payload.update.width =3D width, .payload.update.height =3D height }; + + g_return_if_fail(scanout_id < VIRTIO_GPU_MAX_SCANOUTS); + vg_send_msg(g, &msg, -1); + + g_hash_table_iter_init(&iter, g->listeners[scanout_id]); + while (g_hash_table_iter_next(&iter, (void **)&listener, NULL)) { + g->wait_dbus++; + dbus_display_display1_listener_call_update_dmabuf( + listener, + x, y, width, height, + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, + dbus_update_gl_cb, + g); + } } =20 void @@ -652,6 +728,8 @@ vg_send_scanout(VuGpu *g, uint32_t scanout_id) } }; vg_send_msg(g, &msg, -1); + + /* dbus-listener is postponed until data is available */ } =20 static void @@ -745,9 +823,17 @@ vg_send_update(VuGpu *g, VgUpdateFill fill_cb, void *fill_data) { - void *p =3D g_malloc(VHOST_USER_GPU_HDR_SIZE + + GHashTableIter iter; + DBusDisplayDisplay1Listener *listener; + g_autoptr(GVariant) v_data =3D NULL; + bool scanout =3D false; + VhostUserGpuMsg *msg; + void *p =3D NULL; + + g_return_if_fail(scanout_id < VIRTIO_GPU_MAX_SCANOUTS); + + msg =3D p =3D g_malloc(VHOST_USER_GPU_HDR_SIZE + sizeof(VhostUserGpuUpdate) + data_size); - VhostUserGpuMsg *msg =3D p; msg->request =3D VHOST_USER_GPU_UPDATE; msg->size =3D sizeof(VhostUserGpuUpdate) + data_size; msg->payload.update =3D (VhostUserGpuUpdate) { @@ -759,7 +845,40 @@ vg_send_update(VuGpu *g, }; fill_cb(g, msg, fill_data); vg_send_msg(g, msg, -1); - g_free(msg); + + if (x =3D=3D 0 && y =3D=3D 0 && + width =3D=3D g->scanout[scanout_id].width && + height =3D=3D g->scanout[scanout_id].height) { + scanout =3D true; + } + + v_data =3D g_variant_new_from_data( + G_VARIANT_TYPE("ay"), + p + offsetof(VhostUserGpuMsg, payload.update.data), + data_size, + TRUE, + g_free, + p); + g_variant_ref_sink(v_data); + + g_hash_table_iter_init(&iter, g->listeners[scanout_id]); + while (g_hash_table_iter_next(&iter, (void **)&listener, NULL)) { + if (scanout) { + dbus_display_display1_listener_call_scanout( + listener, + width, height, width * 4, PIXMAN_x8r8g8b8, + v_data, + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); + } else { + dbus_display_display1_listener_call_update( + listener, + x, y, width, height, width * 4, PIXMAN_x8r8g8b8, + v_data, + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); + } + } } =20 static void @@ -912,7 +1031,7 @@ vg_handle_ctrl(VuDev *dev, int qidx) size_t len; =20 for (;;) { - if (vg->wait_in !=3D 0) { + if (vg->wait_in !=3D 0 || vg->wait_dbus > 0) { return; } =20 @@ -970,7 +1089,15 @@ vg_send_cursor_update(VuGpu *g, const struct virtio_gpu_update_cursor *cursor, const void *data) { - VhostUserGpuMsg msg =3D { + GHashTableIter iter; + DBusDisplayDisplay1Listener *listener; + VhostUserGpuMsg *msg; + g_autoptr(GVariant) v_data =3D NULL; + + g_return_if_fail(cursor->pos.scanout_id < VIRTIO_GPU_MAX_SCANOUTS); + + msg =3D g_new0(VhostUserGpuMsg, 1); + *msg =3D (VhostUserGpuMsg) { .request =3D VHOST_USER_GPU_CURSOR_UPDATE, .size =3D sizeof(VhostUserGpuCursorUpdate), .payload.cursor_update =3D { @@ -983,15 +1110,43 @@ vg_send_cursor_update(VuGpu *g, .hot_y =3D cursor->hot_y, } }; + /* we can afford that cursor copy */ - memcpy(msg.payload.cursor_update.data, data, - sizeof(msg.payload.cursor_update.data)); - vg_send_msg(g, &msg, -1); + memcpy(msg->payload.cursor_update.data, data, + sizeof(msg->payload.cursor_update.data)); + vg_send_msg(g, msg, -1); + + v_data =3D g_variant_new_from_data( + G_VARIANT_TYPE("ay"), + msg->payload.cursor_update.data, + sizeof(msg->payload.cursor_update.data), + TRUE, + g_free, + msg); + g_variant_ref_sink(v_data); + + g_hash_table_iter_init(&iter, g->listeners[cursor->pos.scanout_id]); + while (g_hash_table_iter_next(&iter, (void **)&listener, NULL)) { + dbus_display_display1_listener_call_cursor_define( + listener, + 64, + 64, + cursor->hot_x, + cursor->hot_y, + v_data, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); + } } =20 void vg_send_cursor_pos(VuGpu *g, const struct virtio_gpu_update_cursor *cursor) { + GHashTableIter iter; + DBusDisplayDisplay1Listener *listener; VhostUserGpuMsg msg =3D { .request =3D cursor->resource_id ? VHOST_USER_GPU_CURSOR_POS : VHOST_USER_GPU_CURSOR_POS_HIDE, @@ -1002,7 +1157,20 @@ vg_send_cursor_pos(VuGpu *g, const struct virtio_gpu= _update_cursor *cursor) .y =3D cursor->pos.y, } }; + + g_return_if_fail(cursor->pos.scanout_id < VIRTIO_GPU_MAX_SCANOUTS); + vg_send_msg(g, &msg, -1); + + g_hash_table_iter_init(&iter, g->listeners[cursor->pos.scanout_id]); + while (g_hash_table_iter_next(&iter, (void **)&listener, NULL)) { + dbus_display_display1_listener_call_mouse_set( + listener, + cursor->pos.x, + cursor->pos.y, + cursor->resource_id !=3D 0, + G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL); + } } =20 static void @@ -1127,6 +1295,70 @@ set_gpu_protocol_features(VuGpu *g) protocol_features_cb, g); } =20 +static void +listener_vanished_cb(GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + VuGpu *g) +{ + DBusDisplayDisplay1Listener *listener; + uint8_t idx; + + listener =3D g_object_get_data(G_OBJECT(connection), "listener"); + g_debug("Removing dbus-listener %p", listener); + + idx =3D GPOINTER_TO_INT(g_object_get_data(G_OBJECT(listener), "idx")); + g_hash_table_remove(g->listeners[idx], listener); +} + +static void +vg_register_dbus_listener(VuGpu *g, uint8_t idx, int fd) +{ + GDBusConnection *listener_conn; + g_autoptr(GError) err =3D NULL; + g_autoptr(GSocket) socket =3D NULL; + g_autoptr(GSocketConnection) socket_conn =3D NULL; + g_autofree char *guid =3D g_dbus_generate_guid(); + DBusDisplayDisplay1Listener *listener; + + socket =3D g_socket_new_from_fd(fd, &err); + if (err) { + g_warning("Couldn't make a socket: %s", err->message); + close(fd); + return; + } + socket_conn =3D g_socket_connection_factory_create_connection(socket); + listener_conn =3D g_dbus_connection_new_sync(G_IO_STREAM(socket_conn), + guid, + G_DBUS_CONNECTION_FLAGS_AUT= HENTICATION_SERVER, + NULL, NULL, &err); + if (err) { + g_warning("Failed to setup peer connection: %s", err->message); + return; + } + + listener =3D dbus_display_display1_listener_proxy_new_sync( + listener_conn, + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, + NULL, + "/org/qemu/Display1/Listener", + NULL, + &err); + if (!listener) { + g_warning("failed to setup proxy: %s", err->message); + return; + } + + g_debug("Adding dbus-listener %p", listener); + + g_object_set_data(G_OBJECT(listener), "idx", GINT_TO_POINTER(idx)); + g_object_set_data(G_OBJECT(listener_conn), "listener", listener); + g_hash_table_add(g->listeners[idx], listener); + g_object_connect(listener_conn, + "signal::closed", listener_vanished_cb, g, + NULL); +} + static int vg_process_msg(VuDev *dev, VhostUserMsg *msg, int *do_reply) { @@ -1140,6 +1372,12 @@ vg_process_msg(VuDev *dev, VhostUserMsg *msg, int *d= o_reply) set_gpu_protocol_features(g); return 1; } + case VHOST_USER_GPU_QEMU_DBUS_LISTENER: { + g_return_val_if_fail(msg->fd_num =3D=3D 1, 1); + g_return_val_if_fail(msg->payload.u64 < VIRTIO_GPU_MAX_SCANOUTS, 1= ); + vg_register_dbus_listener(g, msg->payload.u64, msg->fds[0]); + return 1; + } default: return 0; } @@ -1175,6 +1413,12 @@ vg_set_features(VuDev *dev, uint64_t features) g->virgl =3D virgl; } =20 +static uint64_t +vg_get_protocol_features(VuDev *dev) +{ + return 1 << VHOST_USER_PROTOCOL_F_GPU_QEMU_DBUS_LISTENER; +} + static int vg_get_config(VuDev *dev, uint8_t *config, uint32_t len) { @@ -1211,6 +1455,7 @@ vg_set_config(VuDev *dev, const uint8_t *data, static const VuDevIface vuiface =3D { .set_features =3D vg_set_features, .get_features =3D vg_get_features, + .get_protocol_features =3D vg_get_protocol_features, .queue_set_started =3D vg_queue_set_started, .process_msg =3D vg_process_msg, .get_config =3D vg_get_config, @@ -1221,9 +1466,14 @@ static void vg_destroy(VuGpu *g) { struct virtio_gpu_simple_resource *res, *tmp; + int i; =20 vug_deinit(&g->dev); =20 + for (i =3D 0; i < VIRTIO_GPU_MAX_SCANOUTS; i++) { + g_clear_pointer(&g->listeners[i], g_hash_table_unref); + } + vg_sock_fd_close(g); =20 QTAILQ_FOREACH_SAFE(res, &g->reslist, next, tmp) { @@ -1253,7 +1503,7 @@ main(int argc, char *argv[]) GOptionContext *context; GError *error =3D NULL; GMainLoop *loop =3D NULL; - int fd; + int i, fd; VuGpu g =3D { .sock_fd =3D -1, .drm_rnode_fd =3D -1 }; =20 QTAILQ_INIT(&g.reslist); @@ -1307,6 +1557,10 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } =20 + for (i =3D 0; i < VIRTIO_GPU_MAX_SCANOUTS; i++) { + g.listeners[i] =3D g_hash_table_new_full(NULL, NULL, g_object_unre= f, NULL); + } + if (!vug_init(&g.dev, VHOST_USER_GPU_MAX_QUEUES, fd, vg_panic, &vuifac= e)) { g_printerr("Failed to initialize libvhost-user-glib.\n"); exit(EXIT_FAILURE); diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/me= son.build index 0ce1515a10..773823e5bf 100644 --- a/contrib/vhost-user-gpu/meson.build +++ b/contrib/vhost-user-gpu/meson.build @@ -1,8 +1,8 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \ and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \ - and pixman.found() - executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm= .c'), - dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, open= gl], + and pixman.found() and 'CONFIG_UI_DBUS' in config_host + executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm= .c') + dbus_display1, + dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, open= gl, gio], install: true, install_dir: get_option('libexecdir')) =20 --=20 2.29.0