From nobody Thu Sep 3 07:03:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1787555567; cv=none; d=zohomail.com; s=zohoarc; b=oD+FlvWw/P6fz1TOS48WpDBSBDrEIAm5FKGljsePWJMZbUlJ2no5m4SmU2lTCkfiVQgfKQd1VpJnhMV3uruwM//v7YERoNp7qRi5qTu7BQU+gTE5RkRSYdvihGE/admjHORoy2+A/VyQwsCZaOGTEYyKUlWCj75EocnR2hWAkXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1787555567; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RQQzKc7fXgnyMVrT3Qi+0O4dsqzanUM4EfhHa4x9i88=; b=WNqKVbGd38Qf/Pd21WFahpTwBugNs4biFP3SO8F1x8YzJmhdrhA9VwzUFRi/GUDs8bInD3MparHn0OoumLiQBbvkV+ZHfkoY39mZo1JMCShqXwpWHWDBNwJUCCYQpK1YAoDlENxZIkd7B7aQI4oOvOvc6S1nV1rvRP0jQ/nbAqU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1787555567327431.36727084142694; Mon, 24 Aug 2026 00:12:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1398697.1634843 (Exim 4.92) (envelope-from ) id 1wyOr6-0003sk-V4; Mon, 24 Aug 2026 07:12:28 +0000 Received: by outflank-mailman (output) from mailman id 1398697.1634843; Mon, 24 Aug 2026 07:12:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wyOr6-0003sb-SY; Mon, 24 Aug 2026 07:12:28 +0000 Received: by outflank-mailman (input) for mailman id 1398697; Mon, 24 Aug 2026 07:12:28 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wyOr6-0003sR-Ba for xen-devel@lists.xenproject.org; Mon, 24 Aug 2026 07:12:28 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wyOr5-000tfE-EU for xen-devel@lists.xenproject.org; Mon, 24 Aug 2026 09:12:27 +0200 Received: from [10.42.69.1] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a8beeb9-8faa-0a2a0a5109dd-0a2a4501e50a-0 for ; Mon, 24 Aug 2026 09:11:53 +0200 Received: from [195.135.223.130] (helo=smtp-out1.suse.de) by tlsNG-d62444.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a8beeb9-5984-0a2a45010019-c387df829436-3 for ; Mon, 24 Aug 2026 09:11:53 +0200 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5E5D3865B9; Mon, 24 Aug 2026 07:11:45 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DBDF013335; Mon, 24 Aug 2026 07:11:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QDQDM7Dui2poXQAAD6G6ig (envelope-from ); Mon, 24 Aug 2026 07:11:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=susede1 header.d=suse.com header.i="@suse.com" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding:In-Reply-To:References"; dkim=pass header.s=susede1 header.d=suse.com header.i="@suse.com" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding:In-Reply-To:References" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1787555509; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RQQzKc7fXgnyMVrT3Qi+0O4dsqzanUM4EfhHa4x9i88=; b=GRStE1zEjdoaZF7EeV1Qc7jRkK7AFsxQA8zdFSVrPuizxFKRrAFOHMrsza/kFNsjB79xxE JWtob8YtgEk2/+f8py9pZJf21SN362D2Bn2CJ2V6sRbyF0OlfhUzhq+tOwyXACWVqPx9uR 06HjGZgDUwehZ+NfSocrJmxgXwu/2PI= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=Rp8Zz61W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1787555505; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RQQzKc7fXgnyMVrT3Qi+0O4dsqzanUM4EfhHa4x9i88=; b=Rp8Zz61WHAlZSqPrBHhVp2p/cTyKMXbTTswW8U98VQ8PoqXtbEqdD2SPXx9rqtAGKRbO0F 2t3vqe9Rrjo+QVmXF7QGBMVTSs4I5ZjQ2B4ECwskTSUdOX1qbCXwC1PtO565DKAo+RStmP xYPR1XbzwMgxVfg4/qLGwPTPBq2KlQM= From: Dario Faggioli To: qemu-devel@nongnu.org Cc: xen-devel@lists.xenproject.org, sstabellini@kernel.org, anthony@xenproject.org, edgar.iglesias@gmail.com, philmd@mailo.com, odaki@rsg.ci.i.u-tokyo.ac.jp, Dario Faggioli Subject: [RFC PATCH 1/1] hw/display/xenfb: always register vfb and allocate console early Date: Mon, 24 Aug 2026 09:11:16 +0200 Message-ID: <20260824071116.935828-2-dfaggioli@suse.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260824071116.935828-1-dfaggioli@suse.com> References: <20260824071116.935828-1-dfaggioli@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.51 X-Spam-Level: X-Rspamd-Action: no action X-Rspamd-Queue-Id: 5E5D3865B9 X-Spamd-Result: default: False [-1.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email,suse.com:dkim]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; RCPT_COUNT_SEVEN(0.00)[8]; FREEMAIL_CC(0.00)[lists.xenproject.org,kernel.org,xenproject.org,gmail.com,mailo.com,rsg.ci.i.u-tokyo.ac.jp,suse.com]; DKIM_TRACE(0.00)[suse.com:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-purgate-ID: tlsNG-d62444/1787555513-BDC79757-20543C4E/0/0 X-purgate-type: clean X-purgate-size: 2659 X-ZohoMail-DKIM: pass (identity @suse.com) (identity @suse.com) X-ZM-MESSAGEID: 1787555569253158500 Content-Type: text/plain; charset="utf-8" This commit addresses a black console issues for Xen PV and PVH guests. In fact, commit 6ece1df966 ("hw/xen: Register framebuffer backend via xen_backend_init()") introduced a check before registering the vfb backend. Problem is that the '-vga' agrument may not be present (e.g., for PV/PVH guests started with 'xl') and this causes the backend to be silently ignored. This commit restores the unconditional registration of the vfb backend. Furthermore, even with the backend always being registered, the fact that xenfb allocates the QemuConsole asynchronously in fb_initialise() looks problematic. In fact, when the UI initializes, it finds 0 active consoles and it permanently allocates a dummy surface showing the message "This VM has no graphic display device". And since the removal of console_select() there's no way to dynamically switch to the xenfb console, when it is finally up and running. This commit works around the issue by moving console creation to fb_init(), so that VNC attaches to it immediately. The surface is then updated normally via qemu_console_set_surface() once the guest framebuffer is mapped. Fixes: 6ece1df966 ("hw/xen: Register framebuffer backend via xen_backend_in= it()") Signed-off-by: Dario Faggioli --- hw/display/xenfb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index ae302b217f..3a0cdc0578 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -851,9 +851,14 @@ static void xenfb_handle_events(struct XenFB *xenfb) =20 static int fb_init(struct XenLegacyDevice *xendev) { + struct XenFB *fb =3D container_of(xendev, struct XenFB, c.xendev); + #ifdef XENFB_TYPE_RESIZE xenstore_write_be_int(xendev, "feature-resize", 1); #endif + + fb->con =3D qemu_graphic_console_create(NULL, 0, &xenfb_ops, fb); + return 0; } =20 @@ -882,8 +887,6 @@ static int fb_initialise(struct XenLegacyDevice *xendev) if (rc !=3D 0) return rc; =20 - fb->con =3D qemu_graphic_console_create(NULL, 0, &xenfb_ops, fb); - if (xenstore_read_fe_int(xendev, "feature-update", &fb->feature_update= ) =3D=3D -1) fb->feature_update =3D 0; if (fb->feature_update) @@ -973,9 +976,6 @@ static const GraphicHwOps xenfb_ops =3D { static void xen_ui_register_backend(void) { xen_be_register("vkbd", &xen_kbdmouse_ops); - - if (vga_interface_type =3D=3D VGA_XENFB) { - xen_be_register("vfb", &xen_framebuffer_ops); - } + xen_be_register("vfb", &xen_framebuffer_ops); } xen_backend_init(xen_ui_register_backend); --=20 2.55.0