From nobody Thu May 2 19:59:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541587981189692.7920262544307; Wed, 7 Nov 2018 02:53:01 -0800 (PST) Received: from localhost ([::1]:47129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKLSG-0005DV-1k for importer@patchew.org; Wed, 07 Nov 2018 05:53:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKLP6-00030b-8w for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKLP0-0001Zf-2i for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26518) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gKLOz-0000cz-PP for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27D22308FB98; Wed, 7 Nov 2018 10:49:28 +0000 (UTC) Received: from diego.redhat.com (unknown [10.40.205.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0BD86608F3; Wed, 7 Nov 2018 10:49:26 +0000 (UTC) From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= To: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org Date: Wed, 7 Nov 2018 11:49:19 +0100 Message-Id: <20181107104921.20536-2-lhrazky@redhat.com> In-Reply-To: <20181107104921.20536-1-lhrazky@redhat.com> References: <20181107104921.20536-1-lhrazky@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 07 Nov 2018 10:49:28 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC PATCH spice v3 1/3] QXL interface: add a function to identify monitors in the guest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Adds a function to let QEMU provide information to identify graphics devices and their monitors in the guest. The function (spice_qxl_set_device_info) sets the device address (e.g. a PCI path) and monitor ID -> device display ID mapping of displays exposed by given QXL interface. Signed-off-by: Luk=C3=A1=C5=A1 Hr=C3=A1zk=C3=BD --- server/red-qxl.c | 44 ++++++++++++++++++++++++++++++++++++++ server/spice-qxl.h | 46 ++++++++++++++++++++++++++++++++++++++++ server/spice-server.syms | 5 +++++ 3 files changed, 95 insertions(+) diff --git a/server/red-qxl.c b/server/red-qxl.c index 97940611..0ea424cd 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c @@ -41,6 +41,9 @@ #include "red-qxl.h" =20 =20 +#define MAX_DEVICE_ADDRESS_LEN 256 +#define MAX_MONITORS_COUNT 16 + struct QXLState { QXLWorker qxl_worker; QXLInstance *qxl; @@ -53,6 +56,9 @@ struct QXLState { unsigned int max_monitors; RedsState *reds; RedWorker *worker; + char device_address[MAX_DEVICE_ADDRESS_LEN]; + uint32_t device_display_ids[MAX_MONITORS_COUNT]; + size_t monitors_count; // length of ^^^ =20 pthread_mutex_t scanout_mutex; SpiceMsgDisplayGlScanoutUnix scanout; @@ -846,6 +852,44 @@ void red_qxl_gl_draw_async_complete(QXLInstance *qxl) red_qxl_async_complete(qxl, cookie); } =20 +SPICE_GNUC_VISIBLE +void spice_qxl_set_device_info(QXLInstance *instance, + const char *device_address, + uint32_t device_display_id_start, + uint32_t device_display_id_count) +{ + g_return_if_fail(device_address !=3D NULL); + + size_t da_len =3D strnlen(device_address, MAX_DEVICE_ADDRESS_LEN); + if (da_len >=3D MAX_DEVICE_ADDRESS_LEN) { + spice_error("Device address too long: %lu > %u", da_len, MAX_DEVIC= E_ADDRESS_LEN); + return; + } + + if (device_display_id_count > MAX_MONITORS_COUNT) { + spice_error("Device display ID count (%u) is greater than limit %u= ", + device_display_id_count, + MAX_MONITORS_COUNT); + return; + } + + strncpy(instance->st->device_address, device_address, MAX_DEVICE_ADDRE= SS_LEN); + + g_debug("QXL Instance %d setting device address \"%s\" and monitor -> = device display mapping:", + instance->id, + device_address); + + // store the mapping monitor_id -> device_display_id + for (uint32_t monitor_id =3D 0; monitor_id < device_display_id_count; = ++monitor_id) { + uint32_t device_display_id =3D device_display_id_start + monitor_i= d; + instance->st->device_display_ids[monitor_id] =3D device_display_id; + g_debug(" monitor ID %u -> device display ID %u", + monitor_id, device_display_id); + } + + instance->st->monitors_count =3D device_display_id_count; +} + void red_qxl_init(RedsState *reds, QXLInstance *qxl) { QXLState *qxl_state; diff --git a/server/spice-qxl.h b/server/spice-qxl.h index 0c4e75fc..547d3d93 100644 --- a/server/spice-qxl.h +++ b/server/spice-qxl.h @@ -115,6 +115,52 @@ void spice_qxl_gl_draw_async(QXLInstance *instance, uint32_t w, uint32_t h, uint64_t cookie); =20 +/* since spice 0.14.2 */ + +/** + * spice_qxl_set_device_info: + * @instance the QXL instance to set the path to + * @device_address the path of the device this QXL instance belongs to + * @device_display_id_start the starting device display ID of this interfa= ce, + * i.e. the one monitor ID 0 maps to + * @device_display_id_count the total number of device display IDs on this + * interface + * + * Sets the device information for this QXL interface, i.e. the hardware + * address (e.g. PCI) of the graphics device and the IDs of the displays o= f the + * graphics device that are exposed by this interface (device display IDs). + * + * The supported device address format is: + * "pci//./.../." + * + * The "pci" identifies the rest of the string as a PCI address. It is the= only + * supported address at the moment, other identifiers can be introduced la= ter. + * is the PCI domain, followed by . of any PCI br= idges + * in the chain leading to the device. The last . is the + * graphics device. All of , , are hexadecimal nu= mbers + * with the following number of digits: + * : 4 + * : 2 + * : 1 + * + * The device_display_id_{start,count} denotes the sequence of device disp= lay + * IDs that map to the zero-based sequence of monitor IDs provided by moni= tors + * config on this interface. For example with device_display_id_start =3D = 2 and + * device_display_id_count =3D 3 you get the following mapping: + * monitor_id -> device_display_id + * 0 -> 2 + * 1 -> 3 + * 2 -> 4 + * + * Note this example is unsupported in practice. The only supported cases = are + * either a single device display ID (count =3D 1) or multiple device disp= lay IDs + * in a sequence starting from 0. + */ +void spice_qxl_set_device_info(QXLInstance *instance, + const char *device_address, + uint32_t device_display_id_start, + uint32_t device_display_id_count); + typedef struct QXLDevInitInfo { uint32_t num_memslots_groups; uint32_t num_memslots; diff --git a/server/spice-server.syms b/server/spice-server.syms index edf04a42..ac4d9b14 100644 --- a/server/spice-server.syms +++ b/server/spice-server.syms @@ -173,3 +173,8 @@ SPICE_SERVER_0.13.2 { global: spice_server_set_video_codecs; } SPICE_SERVER_0.13.1; + +SPICE_SERVER_0.14.2 { +global: + spice_qxl_set_device_info; +} SPICE_SERVER_0.13.2; --=20 2.19.1 From nobody Thu May 2 19:59:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541587890954712.3085430161237; Wed, 7 Nov 2018 02:51:30 -0800 (PST) Received: from localhost ([::1]:47120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKLQV-0003f1-HF for importer@patchew.org; Wed, 07 Nov 2018 05:51:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKLP6-00030Z-7e for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKLOz-0001TM-M1 for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45554) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gKLOx-0000dl-H7 for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BACC5A70A; Wed, 7 Nov 2018 10:49:30 +0000 (UTC) Received: from diego.redhat.com (unknown [10.40.205.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id A34D360BEE; Wed, 7 Nov 2018 10:49:28 +0000 (UTC) From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= To: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org Date: Wed, 7 Nov 2018 11:49:20 +0100 Message-Id: <20181107104921.20536-3-lhrazky@redhat.com> In-Reply-To: <20181107104921.20536-1-lhrazky@redhat.com> References: <20181107104921.20536-1-lhrazky@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 07 Nov 2018 10:49:30 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC PATCH spice v3 2/3] QXL interface: deprecate spice_qxl_set_max_monitors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Replace it by spice_qxl_set_device_info. Note we can't use monitors_count for what's stored in max_monitors, because monitors_count denotes the length of the device_display_ids array, which spice_qxl_set_max_monitors doesn't touch. Signed-off-by: Luk=C3=A1=C5=A1 Hr=C3=A1zk=C3=BD --- server/red-qxl.c | 1 + server/spice-qxl.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/red-qxl.c b/server/red-qxl.c index 0ea424cd..6ffd8286 100644 --- a/server/red-qxl.c +++ b/server/red-qxl.c @@ -888,6 +888,7 @@ void spice_qxl_set_device_info(QXLInstance *instance, } =20 instance->st->monitors_count =3D device_display_id_count; + instance->st->max_monitors =3D device_display_id_count; } =20 void red_qxl_init(RedsState *reds, QXLInstance *qxl) diff --git a/server/spice-qxl.h b/server/spice-qxl.h index 547d3d93..e7af5e5e 100644 --- a/server/spice-qxl.h +++ b/server/spice-qxl.h @@ -101,9 +101,9 @@ void spice_qxl_monitors_config_async(QXLInstance *insta= nce, QXLPHYSICAL monitors int group_id, uint64_t cookie); /* since spice 0.12.3 */ void spice_qxl_driver_unload(QXLInstance *instance); -/* since spice 0.12.6 */ +/* since spice 0.12.6, deprecated since 0.14.2, spice_qxl_set_device_info = replaces it */ void spice_qxl_set_max_monitors(QXLInstance *instance, - unsigned int max_monitors); + unsigned int max_monitors) SPICE_GNUC_DEPR= ECATED; /* since spice 0.13.1 */ void spice_qxl_gl_scanout(QXLInstance *instance, int fd, --=20 2.19.1 From nobody Thu May 2 19:59:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541588063359969.8088675365178; Wed, 7 Nov 2018 02:54:23 -0800 (PST) Received: from localhost ([::1]:47136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKLTa-0007ZM-Bm for importer@patchew.org; Wed, 07 Nov 2018 05:54:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKLP6-00030a-8m for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKLOz-0001XL-Tl for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40450) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gKLOz-0000wR-Iu for qemu-devel@nongnu.org; Wed, 07 Nov 2018 05:49:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B0DAD3680B; Wed, 7 Nov 2018 10:49:32 +0000 (UTC) Received: from diego.redhat.com (unknown [10.40.205.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3796E608F3; Wed, 7 Nov 2018 10:49:30 +0000 (UTC) From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= To: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org Date: Wed, 7 Nov 2018 11:49:21 +0100 Message-Id: <20181107104921.20536-4-lhrazky@redhat.com> In-Reply-To: <20181107104921.20536-1-lhrazky@redhat.com> References: <20181107104921.20536-1-lhrazky@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 07 Nov 2018 10:49:32 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC PATCH qemu v3 3/3] spice: set device address and device display ID in QXL interface X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Calls the new SPICE QXL interface function spice_qxl_set_device_info to set the hardware address of the graphics device represented by the QXL interface (e.g. a PCI path) and the device display IDs (the IDs of the device's monitors that belong to this QXL interface). Also stops using the deprecated spice_qxl_set_max_monitors, the new interface function replaces it. Signed-off-by: Luk=C3=A1=C5=A1 Hr=C3=A1zk=C3=BD --- hw/display/qxl.c | 14 ++++++++++++- include/ui/spice-display.h | 2 ++ ui/spice-core.c | 42 ++++++++++++++++++++++++++++++++++++++ ui/spice-display.c | 11 ++++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index f608abc769..f4bef8e4da 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -276,7 +276,8 @@ static void qxl_spice_monitors_config_async(PCIQXLDevic= e *qxl, int replay) QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG, 0)); } else { -#if SPICE_SERVER_VERSION >=3D 0x000c06 /* release 0.12.6 */ +#if SPICE_SERVER_VERSION >=3D 0x000c06 /* release 0.12.6 */ && \ + SPICE_SERVER_VERSION < 0x000e02 if (qxl->max_outputs) { spice_qxl_set_max_monitors(&qxl->ssd.qxl, qxl->max_outputs); } @@ -2184,6 +2185,17 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Er= ror **errp) SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR); return; } + +#if SPICE_SERVER_VERSION >=3D 0x000e02 /* release 0.14.2 */ + char device_address[256] =3D ""; + if (qemu_spice_fill_device_address(qxl->vga.con, device_address, 256))= { + spice_qxl_set_device_info(&qxl->ssd.qxl, + device_address, + 0, + qxl->max_outputs); + } +#endif + qemu_add_vm_change_state_handler(qxl_vm_change_state_handler, qxl); =20 qxl->update_irq =3D qemu_bh_new(qxl_update_irq_bh, qxl); diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index 87a84a59d4..7608fa7ebd 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -179,3 +179,5 @@ void qemu_spice_wakeup(SimpleSpiceDisplay *ssd); void qemu_spice_display_start(void); void qemu_spice_display_stop(void); int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd); + +bool qemu_spice_fill_device_address(QemuConsole *con, char *device_address= , size_t size); diff --git a/ui/spice-core.c b/ui/spice-core.c index a4fbbc3898..0bc8b002ec 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -35,6 +35,8 @@ #include "qemu/option.h" #include "migration/misc.h" #include "hw/hw.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_bus.h" #include "ui/spice-display.h" =20 /* core bits */ @@ -871,6 +873,46 @@ bool qemu_spice_have_display_interface(QemuConsole *co= n) return false; } =20 +/* + * Recursively (in reverse order) appends addresses of PCI devices as it m= oves + * up in the PCI hierarchy. + * + * @returns true on success, false when the buffer wasn't large enough + */ +static bool append_pci_address(char *buf, size_t buf_size, const PCIDevice= *pci) +{ + PCIBus *bus =3D pci_get_bus(pci); + if (!pci_bus_is_root(bus)) { + append_pci_address(buf, buf_size, bus->parent_dev); + } + + size_t len =3D strlen(buf); + ssize_t written =3D snprintf(buf + len, buf_size - len, "/%02x.%x", + PCI_SLOT(pci->devfn), PCI_FUNC(pci->devfn)); + + return written > 0 && written < buf_size - len; +} + +bool qemu_spice_fill_device_address(QemuConsole *con, char *device_address= , size_t size) +{ + DeviceState *dev =3D DEVICE(object_property_get_link(OBJECT(con), "dev= ice", &error_abort)); + PCIDevice *pci =3D (PCIDevice *) object_dynamic_cast(OBJECT(dev), TYPE= _PCI_DEVICE); + + if (pci =3D=3D NULL) { + warn_report("Setting device address of a display device to SPICE: = Not a PCI device."); + return false; + } + + strncpy(device_address, "pci/0000", size); + if (!append_pci_address(device_address, size, pci)) { + warn_report("Setting device address of a display device to SPICE: " + "Too many PCI devices in the chain."); + return false; + } + + return true; +} + int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con) { if (g_slist_find(spice_consoles, con)) { diff --git a/ui/spice-display.c b/ui/spice-display.c index 2f8adb6b9f..578ec6bf8b 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1129,6 +1129,17 @@ static void qemu_spice_display_init_one(QemuConsole = *con) =20 ssd->qxl.base.sif =3D &dpy_interface.base; qemu_spice_add_display_interface(&ssd->qxl, con); + +#if SPICE_SERVER_VERSION >=3D 0x000e02 /* release 0.14.2 */ + char device_address[256] =3D ""; + if (qemu_spice_fill_device_address(con, device_address, 256)) { + spice_qxl_set_device_info(&ssd->qxl, + device_address, + qemu_console_get_head(con), + 1); + } +#endif + qemu_spice_create_host_memslot(ssd); =20 register_displaychangelistener(&ssd->dcl); --=20 2.19.1