From nobody Sat Feb 7 04:47:09 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=1612508296; cv=none; d=zohomail.com; s=zohoarc; b=lKOxpTKijbu7ifeWyoFXCSXSyLm2GFXbMZTQUx+CH9JOUHNWIGmHx9Eh8jBvK7wn1z8rolSHdtcqwWtxvNrZPrVSfK79FxltlYpt2m+gEAs5hUt9319A75x2U3AvvzauTsgbDD5hYPMmP7IUxWJ2DKVtQOBeZ9j2RXoJjgrr1Fg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612508296; 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=8g1I8TeDpgfKcKJDVZonGOBO0NvoFOy6rkm/tg58S+0=; b=e/dHsfPLXO6dVcCykKg05rgNdV7KdGuQbDU8HiBM611PDUTzPE6SQpVhI9J/d1wnEe7YVT5zOj3yS6/64e3yLolM9l4BJ8DIAv1HwVIXBgPiK+h72E1pB1ldA+HYvFJ/PgNQm6Vh2BV6aeBqAgqQJyvpx+49APar0C92ybu2c88= 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 1612508296217364.2497657002533; Thu, 4 Feb 2021 22:58:16 -0800 (PST) Received: from localhost ([::1]:38190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7v4I-0002fo-FE for importer@patchew.org; Fri, 05 Feb 2021 01:58:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7v2p-00011D-Fq for qemu-devel@nongnu.org; Fri, 05 Feb 2021 01:56:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7v2m-00014d-W2 for qemu-devel@nongnu.org; Fri, 05 Feb 2021 01:56:43 -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-505-4hHaveykOKiBznk_-XyHUA-1; Fri, 05 Feb 2021 01:56:37 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CC48801977 for ; Fri, 5 Feb 2021 06:56:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-108.ams2.redhat.com [10.36.113.108]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B05862461; Fri, 5 Feb 2021 06:56:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 938BC18003AF; Fri, 5 Feb 2021 07:56:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612508199; 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=8g1I8TeDpgfKcKJDVZonGOBO0NvoFOy6rkm/tg58S+0=; b=BXCp3zcLw9rTBIC2DxlaLXqHpK1hFmzqrzQEWg+9fP0y1Vyuv/oIncWg+t/Y1HrbZfvJBm Y96sbiP03fFcZtc1KSuNI7Uo53ojPH4OgmOqtbjaHJPHvjulrlvrJxkf6JAAqE/CK6EYLH YlmcWcjNflO5q99ME7v0HtcXW4YtjJc= X-MC-Unique: 4hHaveykOKiBznk_-XyHUA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 04/24] spice: delay starting until display are initialized Date: Fri, 5 Feb 2021 07:56:00 +0100 Message-Id: <20210205065620.1726554-5-kraxel@redhat.com> In-Reply-To: <20210205065620.1726554-1-kraxel@redhat.com> References: <20210205065620.1726554-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@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=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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: "Michael S. Tsirkin" , Cleber Rosa , Wainer dos Santos Moschetta , Alex Williamson , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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 QEMU used to run qemu_spice.display_init() before vm_start(), and QXL/display interfaces where started then. Now, vm_start() happens before QXL/display interfaces are added and Spice server doesn't automatically start them in this case (fixed in spice git) Fixes Spice regression introduced after 5.2, with refactoring commits b4e1a34211 ("vl: remove separate preconfig main_loop") and facf7c60ee ("vl: initialize displays _after_ exiting preconfiguration"), probably others. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210129152351.161971-1-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/qemu-spice.h | 1 + ui/spice-core.c | 9 ++++++++- ui/spice-display.c | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 2beb7929728c..71ecd6cfd106 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -28,6 +28,7 @@ =20 void qemu_spice_input_init(void); void qemu_spice_display_init(void); +void qemu_spice_display_init_done(void); bool qemu_spice_have_display_interface(QemuConsole *con); int qemu_spice_add_display_interface(QXLInstance *qxlin, QemuConsole *con); int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, diff --git a/ui/spice-core.c b/ui/spice-core.c index 514c0f975443..beee932f5546 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -625,6 +625,14 @@ static void vm_change_state_handler(void *opaque, int = running, } } =20 +void qemu_spice_display_init_done(void) +{ + if (runstate_is_running()) { + qemu_spice_display_start(); + } + qemu_add_vm_change_state_handler(vm_change_state_handler, NULL); +} + static void qemu_spice_init(void) { QemuOpts *opts =3D QTAILQ_FIRST(&qemu_spice_opts.head); @@ -796,7 +804,6 @@ static void qemu_spice_init(void) =20 qemu_spice_input_init(); =20 - qemu_add_vm_change_state_handler(vm_change_state_handler, NULL); qemu_spice_display_stop(); =20 g_free(x509_key_file); diff --git a/ui/spice-display.c b/ui/spice-display.c index 0178d5766d2c..3d3e3bcb2246 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1188,4 +1188,6 @@ void qemu_spice_display_init(void) } qemu_spice_display_init_one(con); } + + qemu_spice_display_init_done(); } --=20 2.29.2