From nobody Sun Dec 14 11:17:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1764863079; cv=none; d=zohomail.com; s=zohoarc; b=VBjs4S2o7y2mnIRlKvrEaoU6/QNqo2gUNYvsdUZRWLJ/a1wcTIbBEIPmvtH0hzp+molybAnO1iDzrk2vOYRFin49p11zFBuHGZDrKi21S7HIPenuyGiqhBoQRs88gv9etPEWz5wP1iLejL+AxH1KxOrTjqps9nfpeOYtfpiNsWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764863079; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PpF/Ahz2DABg8yyXEUgT8xYyNAcpoY+VtYrKlgJwuHY=; b=QK/lqIJYYKUF2nSgVpWT2yRhlw8+M2BWZdR8crwufaKf0LUvAaVjVnJZP09gzp9LfIGzvivvF5DO0YjQF/VyCVb1OG8E3PHtciKo3n3gCbHN3tGtZY/giKVdX5OKInQxRH+wMXcr7uberyCmQ+7ixsZ8UbtjZEmG5V8raH67N8k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764863079596747.434981105693; Thu, 4 Dec 2025 07:44:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vRBU9-0006ZI-Cb; Thu, 04 Dec 2025 10:43:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vRBTj-0006QI-RR for qemu-devel@nongnu.org; Thu, 04 Dec 2025 10:42:51 -0500 Received: from forwardcorp1b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:df01]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vRBTf-0007Dy-UJ for qemu-devel@nongnu.org; Thu, 04 Dec 2025 10:42:47 -0500 Received: from mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net [IPv6:2a02:6b8:c24:fa2:0:640:41ee:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTPS id 30F2F808F1; Thu, 04 Dec 2025 18:42:39 +0300 (MSK) Received: from vsementsov-lin.. (unknown [2a02:6bf:8080:83c::1:2e]) by mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id agnhnW0F9Gk0-UMuOIQjn; Thu, 04 Dec 2025 18:42:38 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1764862958; bh=PpF/Ahz2DABg8yyXEUgT8xYyNAcpoY+VtYrKlgJwuHY=; h=Cc:Message-ID:References:Date:In-Reply-To:Subject:To:From; b=D5waOUsRqAhp5n2UxoCEIlDTpARz+Ri7b030WsB/QG5DFrzqOuGqxdyW85DRDlMKu 4iN4iOpDiNCW3UC33HznRVdUcrtiRmitlDHJricjRj2b0SCN3hLA5+WbrDtR44MlFN lhfvAIXDO658Tgzx+1wcXQSpwK2pGn0Thq4fOpFk= Authentication-Results: mail-nwsmtp-smtp-corp-main-34.sas.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: marcandre.lureau@redhat.com Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, vsementsov@yandex-team.ru, d-tatianin@yandex-team.ru, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 01/10] ui/spice: Require spice-server >= 0.15.0 Date: Thu, 4 Dec 2025 18:42:25 +0300 Message-ID: <20251204154235.149575-2-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251204154235.149575-1-vsementsov@yandex-team.ru> References: <20251204154235.149575-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 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=2a02:6b8:c02:900:1:45:d181:df01; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1764863083233019200 For major distributions we have now: Debian 13: 0.15.2 Ubuntu 22.04: 0.15.0 RHEL-9/CentOS Stream 9: SPICE is removed Fedora 42: 0.15.1 OpenSUSE Leap 15.4: 0.15.0 Time to update the dependancy in QEMU and drop almost all SPICE_SERVER_VERSION checks. Suggested-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Marc-Andr=C3=A9 Lureau --- chardev/spice.c | 6 ------ hw/display/qxl.c | 11 ++--------- include/ui/qemu-spice.h | 4 ---- meson.build | 2 +- ui/spice-display.c | 8 ++------ 5 files changed, 5 insertions(+), 26 deletions(-) diff --git a/chardev/spice.c b/chardev/spice.c index db53b49da2..39b79d60fb 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -278,12 +278,6 @@ static void qemu_chr_open_spice_vmc(Chardev *chr, } =20 *be_opened =3D false; -#if SPICE_SERVER_VERSION < 0x000e02 - /* Spice < 0.14.2 doesn't explicitly open smartcard chardev */ - if (strcmp(type, "smartcard") =3D=3D 0) { - *be_opened =3D true; - } -#endif chr_open(chr, type); } =20 diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 18f482ca7f..0fa8a3204d 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -261,11 +261,6 @@ static void qxl_spice_monitors_config_async(PCIQXLDevi= ce *qxl, int replay) QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG, 0)); } else { -#if SPICE_SERVER_VERSION < 0x000e02 /* release 0.14.2 */ - if (qxl->max_outputs) { - spice_qxl_set_max_monitors(&qxl->ssd.qxl, qxl->max_outputs); - } -#endif qxl->guest_monitors_config =3D qxl->ram->monitors_config; spice_qxl_monitors_config_async(&qxl->ssd.qxl, qxl->ram->monitors_config, @@ -2109,6 +2104,8 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Err= or **errp) uint8_t* config =3D qxl->pci.config; uint32_t pci_device_rev; uint32_t io_size; + Error *err =3D NULL; + char device_address[256] =3D ""; =20 qemu_spice_display_init_common(&qxl->ssd); qxl->mode =3D QXL_MODE_UNDEFINED; @@ -2208,9 +2205,6 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Err= or **errp) return; } =20 -#if SPICE_SERVER_VERSION >=3D 0x000e02 /* release 0.14.2 */ - Error *err =3D NULL; - char device_address[256] =3D ""; if (qemu_console_fill_device_address(qxl->vga.con, device_address, sizeof(device_add= ress), &err)) { @@ -2221,7 +2215,6 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Err= or **errp) } else { error_report_err(err); } -#endif =20 qemu_add_vm_change_state_handler(qxl_vm_change_state_handler, qxl); =20 diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index b7d493742c..8e5e6b2a74 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -34,11 +34,7 @@ int qemu_spice_add_display_interface(QXLInstance *qxlin,= QemuConsole *con); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, const char *subject); =20 -#if SPICE_SERVER_VERSION >=3D 0x000f00 /* release 0.15.0 */ #define SPICE_HAS_ATTACHED_WORKER 1 -#else -#define SPICE_HAS_ATTACHED_WORKER 0 -#endif =20 #else /* CONFIG_SPICE */ =20 diff --git a/meson.build b/meson.build index d9293294d8..975e842f70 100644 --- a/meson.build +++ b/meson.build @@ -1357,7 +1357,7 @@ if get_option('spice') \ .require(pixman.found(), error_message: 'cannot enable SPICE if pixman is not= available') \ .allowed() - spice =3D dependency('spice-server', version: '>=3D0.14.0', + spice =3D dependency('spice-server', version: '>=3D0.15.0', required: get_option('spice'), method: 'pkg-config') endif diff --git a/ui/spice-display.c b/ui/spice-display.c index db71e866f8..f2304bb0ce 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -689,13 +689,11 @@ static int interface_client_monitors_config(QXLInstan= ce *sin, if (mc->num_of_monitors > head) { info.width =3D mc->monitors[head].width; info.height =3D mc->monitors[head].height; -#if SPICE_SERVER_VERSION >=3D 0x000e04 /* release 0.14.4 */ if (mc->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) { VDAgentMonitorMM *mm =3D (void *)&mc->monitors[mc->num_of_moni= tors]; info.width_mm =3D mm[head].width; info.height_mm =3D mm[head].height; } -#endif } =20 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); @@ -1393,6 +1391,8 @@ static const DisplayGLCtxOps gl_ctx_ops =3D { static void qemu_spice_display_init_one(QemuConsole *con) { SimpleSpiceDisplay *ssd =3D g_new0(SimpleSpiceDisplay, 1); + Error *err =3D NULL; + char device_address[256] =3D ""; =20 qemu_spice_display_init_common(ssd); =20 @@ -1414,9 +1414,6 @@ static void qemu_spice_display_init_one(QemuConsole *= con) ssd->qxl.base.sif =3D &dpy_interface.base; qemu_spice_add_display_interface(&ssd->qxl, con); =20 -#if SPICE_SERVER_VERSION >=3D 0x000e02 /* release 0.14.2 */ - Error *err =3D NULL; - char device_address[256] =3D ""; if (qemu_console_fill_device_address(con, device_address, 256, &err)) { spice_qxl_set_device_info(&ssd->qxl, device_address, @@ -1425,7 +1422,6 @@ static void qemu_spice_display_init_one(QemuConsole *= con) } else { error_report_err(err); } -#endif =20 qemu_spice_create_host_memslot(ssd); =20 --=20 2.48.1