From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848763; cv=none; d=zohomail.com; s=zohoarc; b=d/9oDCv5JCKiUPn5WUx9om+Ehykdi/j+xnDAdRiN19dOAZecPbSypgFQTEbStDPal4ftBS0Sa/Iuz2IfDmR8Fw0u2gAOKP4NQV3wViQn9IQzTD2aSJJd51cF6um8D6ypUa82w/0zbbwa0cWofPVQdoElIcCofI5wZQAIOAZ//w4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848763; 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=DqVh+K5e166hk6+S8o/H6szWIs9EscmRRjA+WfGEXig=; b=OY7UdUTJ+h3+ObrtiCuSGY5ufQIroT5GTwwe70r6uN8BLavtA3Ntc1TyZ356o7pe4t/tolbMb7gl6vrpCk0Pu9o/mwZTBc3pz4xD9242Db1gmww40I6JDBb7z3X3zhS4DzjmGAHdAXCPOazFFEJDuoDh83fFKpFAoWmVdD4lAEk= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848763634261.15939122108523; Fri, 10 Apr 2026 12:19:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHNk-0002Fc-ON; Fri, 10 Apr 2026 15:19:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNh-0002F6-6C for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNf-0000MH-8L for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:04 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-418-pKFKan5wMAWulIJ47d6mMQ-1; Fri, 10 Apr 2026 15:19:01 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4E9F1955F18 for ; Fri, 10 Apr 2026 19:18:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 954DE19560AB; Fri, 10 Apr 2026 19:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848742; 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=DqVh+K5e166hk6+S8o/H6szWIs9EscmRRjA+WfGEXig=; b=bj96/u2Jkrx4pWzA01G8jiySRRuLQKt9b6Xvi2rLWp2CzczXPSFVShPGdNYzqc3F/jqJNp etjW9wXpOeI8c+B8USh2dJHi2K/a1kVQD1I6hvfk0UPuPF1OKVwich/CHdNpJIWNid+aU/ ZRk89cnDHrFeggxtFxgEJwAOJ6VrEcg= X-MC-Unique: pKFKan5wMAWulIJ47d6mMQ-1 X-Mimecast-MFC-AGG-ID: pKFKan5wMAWulIJ47d6mMQ_1775848740 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:23 +0400 Subject: [PATCH v2 01/67] ui/vnc-jobs: remove needless buffer_reset() before end MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-1-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=648; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=ZrOdbjC8BpC69HbB0gl9efwBluKy20HH5buM0Y3OGcE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Te2cJ9s4E1FtFZXFNd+IKclT9cwi41xuAf oZs8fTK8S6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5azQEACiz97E1D/Yh0xWV+q9cfMEvqEPe4mdKr+KwvPRHz5cBnRodB7GWVMsXbIQ3XpEetzDSMt /qMq2fq+zkZRMftD7umpbgmD2jz6WgnBlXVWEd7Lv7vsJBlTv65YGReaF18thwfMxefPkV7gsNS JYnM0MsnvUNScVL2e/WySJW2bJdhU8+vOtuEsYEnCwSAfJNF2m0R6sBIvHyIT1gqEkrmqSoRsHi PfFU/QBzev8tWqWXcuHnPg1DS+KfIGWJ4zHqHRlK//ddd+uaKBMCPgsRwCggmhAeJLi3u+JlxIX jbuR4O3OFRMH6B7rmFNyakHYxKLKqfOnNykFgTz7C8HWVb/kUzG7wRjJO0qUZc86BkltyWovcE0 V9cIEPY7ifbt2ZqhHiAwGJTfjevbkh1IKzYUKVM/vzeuXqUZ37LBUeElm3d4IVx4V5q+BGJxi+P jnRKqLEZWWSlSBwyerKI1lmWTwVBmUonnO2tyUdOhsYJtqYE5E/Xa88aTeAzF6f9McehgPWUTkF uSDDXNOv25qYVxf8zLYj30EKScvMA9H/1U6RwikcFHT5FJ5R4D+uBB79eGf4XLYDQiIlfAukHK9 cLLZz5gAxOkapZ+Og7uVhkyytVTocyMx0eEBa/DOJW4bwbRSoX6zw3aXq7KYlw3OU1NpdN1vN1y yzB51BCNx7gFCog== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848766981158500 vnc_async_encoding_end() does buffer_free() next. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index ec90ae6d5fc..a6ab733faa1 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -326,7 +326,6 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) =20 qemu_bh_schedule(job->vs->bh); } else { - buffer_reset(&vs.output); /* Copy persistent encoding data */ vnc_async_encoding_end(job->vs, &vs); } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848797; cv=none; d=zohomail.com; s=zohoarc; b=n0zQGDUbkweiDCDBZv/lkkYWcUXstBfXiPIQEnrCN3jpCOi/0qvm06Rnv8A8frbsnUgtv5okzhAO0v3yelnLuq6j70oRqBGwwK6MQycGhZ1V5JkNQxy8nHzVhDJry3btK+GcJZwicK5cQtiA2y7gybNo98iWVG4CRs25XGLVJP4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848797; 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=582Mq7JHgKD89nFbt457ZffKJ0pztKW4k1JqMJhynNw=; b=S45qKfQCkEPez4865mSFqgcTM223pg51eo5f1AbSzhHG/GbUnPuFf5ke/kFL28eLmLahfsp9VBcofcz0LlYU+8df5bTvzkQYT43X9gU5Aug880ty78ESjsfJ4V0G0uEFzU5EXVcnFJvbwIwuzHpanOFwOqyI8lDwhG7UMc3jbCE= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584879790312.416800848239632; Fri, 10 Apr 2026 12:19:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHNp-0002GR-8D; Fri, 10 Apr 2026 15:19:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNm-0002Fq-QN for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNk-0000Nf-A0 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:09 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-638-u6iGaDMcO7uhPJyMHa9K7w-1; Fri, 10 Apr 2026 15:19:06 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 98A5918002C0 for ; Fri, 10 Apr 2026 19:19:05 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 555CE3000C1F; Fri, 10 Apr 2026 19:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848747; 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=582Mq7JHgKD89nFbt457ZffKJ0pztKW4k1JqMJhynNw=; b=iQWewPhaxqv7b/fxx/wuitKhMbXJEmSFHeyk3rd81UNlKdAFgh9h8bQWu2kwaiDbgNylZp t9ZECk7dCcouLuARRs9UiLijFrW2DssdDIYQWKVcprQMySn+RpiMtb3c6BZw7rp/ARuc1Q xmX/wnEVsNCzJb8x/yMWmJk0368vOYE= X-MC-Unique: u6iGaDMcO7uhPJyMHa9K7w-1 X-Mimecast-MFC-AGG-ID: u6iGaDMcO7uhPJyMHa9K7w_1775848745 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:24 +0400 Subject: [PATCH v2 02/67] ui/vnc: clarify intent using buffer_empty() function MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-2-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1156; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Oaz4HwykOBOf9JYgkJzVi5dqUDlvyrzedLzIIlA+YUQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0TMZDQJ9nSmNocpX15cdsYo4DX93RlAFrK+ 4RLcdCWLO6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5YbqEAC6ky+Rv0lNUojnxjQiDx6KbczbsZjpOvvo4kNs2jZM40OKsEaqQlR4IgQ6BPKo6+UhTTU lTtd54nyIWymFmBcSl0ohuJ2rV8yT1Vbo/MAEi0PDwrdK/UcCWEJBRhhvFz8fs0K4Np04jpcNSG inr46cQIx1SeKa1XtLK623eZXRTEaAXhvAEivPyAAq+wbbgub/xPK84sLnxcbayAL8oet4gf3Ex +cm1JbV516v4+hYr4n811hvvvqs0hTpq9ikq64eAtLHDIk+nr8dncAplO3GCFk6qrPYeTyX4jSk mWqMajRaOyvBtGRokdu7lSFl1r/GEfCPaJi1AQDm2bSxZYk/NQJqaepDuDHiG5sPblW+wQkgx62 evArJ31zEThCplTBHwQqV33Gz4vg7VdyC4Jg/TYpdfv442yKHp3RKYLydok2XOLfxVexqJQlrun WyIdvx/elwyPa2DK5ENy8Ul8SMZcGkLwNuRyUJUhYGtg22v+achcWDCXpSWXt4DliEH62XCwpXc BFpWs0vWQI2t85Da1MlyPpafjf5Is46vwaMOvbfwKhY9nH3TlC3FfM06HSiM9tjVQHCyd540oBi HVPXeNMEmVXgQvjkqMMPEoHqf9fmlxTREbAxeT04/6XNGUipvCaWpButo7P7VFMel1X5xgw2kj/ pZHMw3kXrI4Sa+g== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848798756158500 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 2 +- ui/vnc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index a6ab733faa1..4dd7ccad969 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -160,7 +160,7 @@ void vnc_jobs_consume_buffer(VncState *vs) bool flush; =20 vnc_lock_output(vs); - if (vs->jobs_buffer.offset) { + if (!buffer_empty(&vs->jobs_buffer)) { if (vs->ioc !=3D NULL && buffer_empty(&vs->output)) { g_clear_handle_id(&vs->ioc_tag, g_source_remove); if (vs->disconnecting =3D=3D FALSE) { diff --git a/ui/vnc.c b/ui/vnc.c index ccc73bd7aa4..4aa446a48d7 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1718,7 +1718,7 @@ void vnc_write_u8(VncState *vs, uint8_t value) void vnc_flush(VncState *vs) { vnc_lock_output(vs); - if (vs->ioc !=3D NULL && vs->output.offset) { + if (vs->ioc !=3D NULL && !buffer_empty(&vs->output)) { vnc_client_write_locked(vs); } if (vs->disconnecting) { --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848815; cv=none; d=zohomail.com; s=zohoarc; b=BKFOAu4r7WKLHeUXXWfWHMKdaGmZLI40iew5Q5N5xCVl/aHLCRS4qX0tLaQ6XgugY+7OpoAqjU1D9Ck+ENNXz22nSM76L/Y4qHQ/afL7j/QqmKCqASxI58Mokcc/5yB+Ui40W7qID2eySBnIFFelbFAtjCKCxJVtcOaCBTJ1Uqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848815; 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=YNC6v0P1xzOIZIP6aHqQfMFudfdgW80spUvHLw0+FaM=; b=P9HVEr2k18t4bJm/jCF/Z4qn701f8QzVoL9e1P2VCOZU53FN3p43lSObkVfczwtyhR9VioWO+9AVRE7XFE0nUk/8sfFu3XKgDzzPu6e/B4MVPKKP1P2xoQORPozMGc1NGj49BFacr0wcI2AsY+nS++CqSj/G+xiOrxU4dqh0kIg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848815269741.9070295310298; Fri, 10 Apr 2026 12:20:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHNv-0002Gp-6G; Fri, 10 Apr 2026 15:19:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNs-0002Ga-JD for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNq-0000On-9J for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:16 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606--WHcnR5mOeu6OJUR6XBkRg-1; Fri, 10 Apr 2026 15:19:12 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6E0CD180034C for ; Fri, 10 Apr 2026 19:19:11 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4BA2E3000C16; Fri, 10 Apr 2026 19:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848753; 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=YNC6v0P1xzOIZIP6aHqQfMFudfdgW80spUvHLw0+FaM=; b=csGdwrojnXH/V8pg0pzIDZSOUswysNsKQ6XxYTzifQRZ9XXe4u0j7/FyKdfcBEHPzdznSt 7hmBSIPaO4N3R+JI1l3XizZ5H272nR5xoHndiIO+J4TZ8kcVUorgbQFysCJ3C/GqvFb/3m HELqQvVvH6QnuYtCidr2TWk1bKtzD2s= X-MC-Unique: -WHcnR5mOeu6OJUR6XBkRg-1 X-Mimecast-MFC-AGG-ID: -WHcnR5mOeu6OJUR6XBkRg_1775848751 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:25 +0400 Subject: [PATCH v2 03/67] ui/vnc-jobs: vnc_has_job_locked() argument cannot be NULL MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-3-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=686; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=8lTDGJSHd1oC47RSN2DU3h4RCwiGcEBrgwXT5KJMEUs=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0TzoSrmap6Ei8tkfeYA6nR9/46PRkHe2AdY gZ3TlkHo5iJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5eNZEAC0Es+Bs67QOPOtfiazyqBCWDmeGBiYt4Ev0jxETfW7IylmSgTjMCbeQlaFs+cEaJGXim0 tmLR2+eHwtbPA1Jz/3YCs62m21A1pdhQw1PORjSd0kTQbCByM+VCLufcQQefteyYcx8hR2Ibz7B UFa9OdUQ0vkR+oy8vvxjeYDR5nw7SGyoEYSqHhNjgWVqGwzhEfFCp5sj/0udfniwVbt9PSsV8If cmPKange5piFbaHwEf9ihfrMAf0iWdNi/eY15WuLK5T0sY+R5VSL1DzC4YjPoNC+hSiMtWhCd3+ seYMO/a7sNwhauqZxVgAzGD+NE/jC4+LM7M3luSQSR9UwcHWlUFOeSv5StnU9BDWGQwoX0N0tPZ 6PMvsYdjFcUzeizyiRXFRgJKQ8OKvC2epMyl9kFWak/RscUue9q3z5BMy7ZIh0VNHCT1iQjGVVJ oJVDtw2HYtapD09EvTqVOcH3cAH2+byvBnnFyo8lts5sBDKlQay7BNbUwUaowib8YHTS8LcpjsP UGlmS/X7Zt3k7GloRchfF7feF8lgHOT0tsVMUXsdvF+Ew6HFrfi8wwfAItnE6coAlWrsfZIAFe9 zU7Um/NkUn5craRWHkFEm51+mTaoyOYmoWsS5R9qCCoXcocdpZ1HX/uFaNhaWymEAk0JJTYeCPh s0N8mB+MCuJKI2A== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848817032158500 The only caller, vnc_jobs_join() cannot take vs =3D=3D NULL argument, or it would later crash. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 4dd7ccad969..8cb30e72276 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -138,7 +138,7 @@ static bool vnc_has_job_locked(VncState *vs) VncJob *job; =20 QTAILQ_FOREACH(job, &queue->jobs, next) { - if (job->vs =3D=3D vs || !vs) { + if (job->vs =3D=3D vs) { return true; } } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848795; cv=none; d=zohomail.com; s=zohoarc; b=W4ziYGGgySIN03EanlWLpFzlPCr66YmBygCz/AeoV7AnOmaqGdD1Cslp0JOMx8IXtJE2UF6oIIHTITSbAFfXs815hfsrnCNmZobX8mh0wjCO26edu6638Uk02M4VXlJzhr/nM1BshUGbG510meu3w0RNmXXr4iiTfzuEIio4UdM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848795; 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=I09NHvw8atmJax+ZAvCxf3dEVbEAKA6LxIu95J9jOIY=; b=jVQtWySzR52qifWpL6r95uIxKWdJUzcbSHvOg/DF4fFLS0Mo3mDJb2oqtCcV2bWn/2o0NS8uL58yivlB0JCJbnN7zXy9TOnasoRiF6+nmidIEExmtxvbYYwR00gwCvc0JAeDDtgtLB8pSeW1mwNR+ZXlTCR3GGkABz23rtO8CpE= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848795839310.4750321116521; Fri, 10 Apr 2026 12:19:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHNz-0002JT-Mb; Fri, 10 Apr 2026 15:19:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNy-0002H5-GW for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHNx-0000Py-5n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:22 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-696-vx_P347-OGmlxAVJd63VUA-1; Fri, 10 Apr 2026 15:19:18 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 91A431801326 for ; Fri, 10 Apr 2026 19:19:17 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 56C8D1955E77; Fri, 10 Apr 2026 19:19:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848760; 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=I09NHvw8atmJax+ZAvCxf3dEVbEAKA6LxIu95J9jOIY=; b=aOtGMdqCE3GgNrbgykTRD31oDqd5g2nA/gmAubYY35p7chaAB7gZT+0/AmgggYfMqOfyWl 0Onzm8yRHezUzpIhRX+HRf5DWPAMn1z7S+E6CRv0MQm2lGQLwM0mSJ+CCMjOhTTmVhSA8N nyS83zuF0q3GQfbtY1j94Kdqko2pHsU= X-MC-Unique: vx_P347-OGmlxAVJd63VUA-1 X-Mimecast-MFC-AGG-ID: vx_P347-OGmlxAVJd63VUA_1775848757 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:26 +0400 Subject: [PATCH v2 04/67] ui/vnc-jobs: remove dead VncJobQueue.exit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-4-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1591; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=dgRNTw9wFjvzywdXh2HBEiFRI7zZwhAv49Mp+nZt5gc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0TpkcMpz7YbgnFAe1hXAkHJHnR/wCYU0Mrb ubWcspCNNKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5UD9D/9I9EaL70HdZHS43JiYeFsD1WDReURSerHfakS1qq6EsrcgYPkP5I0cqiXlAAM2VNYscFa 1+9TVAaA4DaXLvytfgzPDC0aFw7oGliGknm8yLdOZoyyj+TfKvy/9R6xV+ZAYqp6TWwkn69t1SI 068X2k5HBMUK736cR9ORpjDEKGXavjat4iAoRpGEpQB3NNisYG7BXKO6a2qGtEEDpB/3ny4TV+E LrCct8rIZwX8Pof6Ho5Lex/keQSHFd2tjubNEuVVKLd+PYPyXbUZFhI3bekvrKIzVySZl79Lddr 1M5N4SNjsEgE9pf0/UiaaoS8aHzJTWsrDwCd34vRFeFW7rLQNmRHodL8BiPjtSf0qBh1kp7LQs4 hhctQGqAwAPEhyLN+dFJRjyoHdgpM8TUCAmiVKC9KHPt32ez9Q0B0GSXvaJgyueZgRjLjKuFdUt 3D1/cVAFfsCsiH3zc+PVmxrxfJHI3pBtELkoTkQgwS7s0JscVwC72Af93MFbxUyEW2I16bQ56/8 9tWGuSbqKfUcwKKkiPYjBgNr8+vN+ySkNMkQHIfx37f0i6G7lmrD+r/iFxRZT6gfKhJxs/oPEpK 2+fBMFxibm7ClBFTgfQ93EvqdeZ5Erg7vsJR9eQf/kZSVWuadeW1IldCcYpSuO1bu2f30NF23AW 2UyU9WACLYYvuNA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848796794158500 Since commit 09526058d0a5 ("ui/vnc: Remove vnc_stop_worker_thread()"), it's not used anymore. It seems stopping worker thread hasn't been supported ever. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 8cb30e72276..9e536b07b90 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -56,7 +56,6 @@ struct VncJobQueue { QemuCond cond; QemuMutex mutex; QemuThread thread; - bool exit; QTAILQ_HEAD(, VncJob) jobs; }; =20 @@ -124,7 +123,7 @@ static void vnc_job_free(VncJob *job) void vnc_job_push(VncJob *job) { vnc_lock_queue(queue); - if (queue->exit || QLIST_EMPTY(&job->rectangles)) { + if (QLIST_EMPTY(&job->rectangles)) { vnc_job_free(job); } else { QTAILQ_INSERT_TAIL(&queue->jobs, job, next); @@ -248,17 +247,12 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) int saved_offset; =20 vnc_lock_queue(queue); - while (QTAILQ_EMPTY(&queue->jobs) && !queue->exit) { + while (QTAILQ_EMPTY(&queue->jobs)) { qemu_cond_wait(&queue->cond, &queue->mutex); } - /* Here job can only be NULL if queue->exit is true */ job =3D QTAILQ_FIRST(&queue->jobs); vnc_unlock_queue(queue); =20 - if (queue->exit) { - return -1; - } - assert(job->vs->magic =3D=3D VNC_MAGIC); vc =3D container_of(job->vs, VncConnection, vs); =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848815; cv=none; d=zohomail.com; s=zohoarc; b=IPpGjIbYeRSZuPipRkhqnbJzNVe89XDHtD/C3zO/QlyDVFO9fbxUc9bGcyUkBFKhm2Nt1p2OC9NIPeSHQegnbjbXIJ69/ZcStpHfDlk3Lei4ascE5JEJYcJAedq6eh8NulxCaexvP8OEpdVEJ2oeKkd7mq12fFHn48XfrdEjUpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848815; 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=ROmzbrl3g/helr+i5FS/DorPr+JmvWFeR0/3EHyzpto=; b=FzGSoGGdBmGm0mtOMnnsUrmDvs+PIJnE+0hR9+4R2GVrOhZYm0DdSnvW1XRVM9aEVu8kfw+H50yesiskdx38Eg6F7iYZiY0ngjtfeFfYYSSPP3/wPtNNGxSgrjJJoHZgCU0H5S5mgWIjRuE5DvULJTvnJr88ydzGwRlPR7cWxgI= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848815075659.4301139823955; Fri, 10 Apr 2026 12:20:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHO7-0002OD-IC; Fri, 10 Apr 2026 15:19:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHO5-0002Ne-MN for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHO4-0000S1-DY for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:29 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-44-vO80eM5qMpGfWVfZrSApQQ-1; Fri, 10 Apr 2026 15:19:26 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 294E3195D03E for ; Fri, 10 Apr 2026 19:19:24 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EC6003000C1D; Fri, 10 Apr 2026 19:19:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848767; 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=ROmzbrl3g/helr+i5FS/DorPr+JmvWFeR0/3EHyzpto=; b=RaJjVn3eX147oqCa17qfZ3oO9wwRvCr5Eq7WaH92bxo0uYx+vA35ltNWfUN+IVCMEqOjiM MnSMiOa9rlWkHPmdHoW1RBCe7Oscxz7g4+1PjTpMSkqnBdFTf+cTyy+u9FwiykPsuZPec1 OnYeNB8sSA+fg07ZquiejwUIJpN7HB4= X-MC-Unique: vO80eM5qMpGfWVfZrSApQQ-1 X-Mimecast-MFC-AGG-ID: vO80eM5qMpGfWVfZrSApQQ_1775848765 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:27 +0400 Subject: [PATCH v2 05/67] ui/vnc-jobs: remove vnc_queue_clear() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-5-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1255; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Qyc2bReAPSXL8Tu4TqrZ5PYPjMmPgsbSEM8+ZDWFQ8Q=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0TcAMQRTArg5i3X9RzaNGMtsasVL0Ux8HY3 fnG2V/1aVSJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5a3MD/9DZfaOdJNQpTLK4CIhE7F7Aua1exC+ycY6Udu21QKvWMQELQGi/QGR4eZi05W3JlOiTzK Qn31eL8YqBm7J7Uo/scZEmZtcwG3Qfp5fZu0HU4V5mcUBH/wpWQG7jEqys9/f9/wf78xp4vtUx8 lzvJzXd7oKZAnsmjlJcZC+7FfZC51WIfLdbEpi0Snil8Wt3e31tIH7LhLMUVxBV10qHBM8zRhnB SdhVo+jPXpdpFhIByv12I1jraSu1tuzo0o/i1jstdAI0cfNPz2TIAHMPv6daKbkyhDY0CqbJ540 UP+8cSg/tpS1B4VUesoT/ZK4gkg3F55MIylXbTmSFmVVVEC23tQQuouS7GcYCnfTVEtTIMB7gWV XsuTt753AGMvZscIEstM0vreoG+QGEPe20ygDQys5JPnyj2WJE7w8D/W2BpweBAz8KlAfI+Ejrh uxqDTHzBVsP3ZXj4K3tR0aQ3LItPzNMeANh5SEI9hjRpyTi3b2UkVcJqJ4x2mkBsd5hEg3BzObI 5JLTCwltxhBg9DVx02Zby/QPfKkTYpbraePTf4HYCE+BZNgjj9e6UvPHqZBtQZvAxDYChV9kUrA 4ATe/JLCN8Po6QmmFoMz7ggDvIw7bZsE+G7FVvRJrEWVbIvgjMAQgtb5J/FORLD0Ay3778ij1DY DR2p3cVf00bRt7Q== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848815823154100 The function was never called, since the worker thread was never exiting. Also it was incomplete (not clearing pending job list) and mixing global queue and argument. Let's remove it. Note: maybe the worker thread could be torn down when vnc_jobs_join() realizes there is no job left. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 9e536b07b90..28a4738f1ec 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -345,14 +345,6 @@ static VncJobQueue *vnc_queue_init(void) return queue; } =20 -static void vnc_queue_clear(VncJobQueue *q) -{ - qemu_cond_destroy(&queue->cond); - qemu_mutex_destroy(&queue->mutex); - g_free(q); - queue =3D NULL; /* Unset global queue */ -} - static void *vnc_worker_thread(void *arg) { VncJobQueue *queue =3D arg; @@ -360,7 +352,7 @@ static void *vnc_worker_thread(void *arg) qemu_thread_get_self(&queue->thread); =20 while (!vnc_worker_thread_loop(queue)) ; - vnc_queue_clear(queue); + g_assert_not_reached(); return NULL; } =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848819; cv=none; d=zohomail.com; s=zohoarc; b=hg/zMw+nm+szE2o8UUtJSSY5twKevqf3MGsafS1f7L04hY5G2d1nTqh5WQujlHm749SD+wX9+5+znd2x3kLztCpPI8lC7OFrWYLHbXwdBuWCMUvllbhwD5e5jP6ZQ6gzPHiu56/sDDVNN6kuUlmSA4fzIphjV8FFm7L/E1/brdk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848819; 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=04H11uqkKPsmfZAF9wEtytacoQ7tjN07AWbO6BWGtZQ=; b=nKISKSmG8f4MXceaj3bMy6qaBGuUqpz9CBTl1vSYhwQKYeUNbZpRtqRqL3Vc3fqM8NfJT7zKgZsbgicG5xo4LBIj6VfF8aXO4iF/P6iGf+xgMZVXdoik6QTWdki8kx09Os1bCGLAQcGzIkLBf4dHDp5T6+uCniqLzY4ZHARgRF4= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848819475264.84044328120444; Fri, 10 Apr 2026 12:20:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOH-0002Vl-EU; Fri, 10 Apr 2026 15:19:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOD-0002V7-Ct for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOB-0000W2-JK for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:36 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-99-fVKq_1h7MVaasg-dBvEBhA-1; Fri, 10 Apr 2026 15:19:32 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E2D231955DB2 for ; Fri, 10 Apr 2026 19:19:29 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D924719560AB; Fri, 10 Apr 2026 19:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848774; 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=04H11uqkKPsmfZAF9wEtytacoQ7tjN07AWbO6BWGtZQ=; b=izwaU7qv00AimSjYmRPOfdTAsfGB0jP6Z1TngTpDC5Cfn50QWmGRDFuVWf0oK7t8L2THHC pUo9RnZ+YdseNFrq4QEZeRIVLdQjXXM80LR+VwTjX2QzLLqUMB6JrYsST/7h3ZXa+SCIwD Y1eVTSxOXVagzHyQh0N4VFv1MkWH1M0= X-MC-Unique: fVKq_1h7MVaasg-dBvEBhA-1 X-Mimecast-MFC-AGG-ID: fVKq_1h7MVaasg-dBvEBhA_1775848770 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:28 +0400 Subject: [PATCH v2 06/67] ui/vnc-jobs: narrow taking the queue lock MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-6-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1736; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=KoLQMmYbBIOnREXI2mU7J3ttjR2QtUJlnlZbP6oVDa0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0T/v09UM7pdXc1+Xyeo0y3ldzufWSAD/bAE pStwf3Y7mKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5dsLD/4wlxZeF7b44RGF/ez3ZuSqSOgGM2VqPPFQNSlD/aDhaMu0+dlT0HBmCQ0wmQJ+yPStzjT on3fXdNe7u+P6yO0IFbfdX2HW9KBHlnjYFrrtBSzsmtzbg8xXyaAFKPNV2qFLJG/9reT64YdFfR K82pm0r1IkFZFVshVi9DDdjjICFBVJ8sSIllEjYzv2bBJ7VyW9N7IJ6pIq4fB1nxfXy8lydmvdJ Tf629AcZzJmvW3VtRnpj7zHEHebN9hcMx87+nfBnZxuhtKDzSZZ2VeoxE0Sm1f0tG/7+2VoqUZJ UE4IAO9H54SOMewWzPhJZKKaLS/fJukW3VWJg3lgtgDDTI4kkqmXehp/LFVuGRhG5J/aPEIb/T1 pr7Lm88rk0xy9bfEmU50apkY4HTd378IdM3AeDjttzZtEK3aWOMMpgDvwj0qkwZutx/GD0Jzm4G 7Z1DdyZd3eyC3NPYhXACLnNBMW7hmM1CrDAqElHdB8JtuCfz6ALP1dKTRzgp9I5scXAZIWqVlds xH6eUrYjsT4vCmKzB1uMTUXXuxQvq+sKuey3iXwhgPzJteaAAP5GGhOfMNYZ+91FmGcPD9h1AeL NnvUgKUujBUquMdLl7fl6uZywNzW0sMibl06TgfQIVwsGMRodfsKOgr3C41YIhjRHpwOyyz/SiM bguyrTUtLWpNRyg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848820875158500 It's not needed unless manipulating the queue. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 28a4738f1ec..9c17d684c9e 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -83,26 +83,26 @@ VncJob *vnc_job_new(VncState *vs) =20 assert(vs->magic =3D=3D VNC_MAGIC); job->vs =3D vs; - vnc_lock_queue(queue); QLIST_INIT(&job->rectangles); - vnc_unlock_queue(queue); return job; } =20 +/* + * Do not call this after pushing the job. + */ int vnc_job_add_rect(VncJob *job, int x, int y, int w, int h) { VncRectEntry *entry =3D g_new0(VncRectEntry, 1); =20 trace_vnc_job_add_rect(job->vs, job, x, y, w, h); + assert(!QTAILQ_IN_USE(job, next)); =20 entry->rect.x =3D x; entry->rect.y =3D y; entry->rect.w =3D w; entry->rect.h =3D h; =20 - vnc_lock_queue(queue); QLIST_INSERT_HEAD(&job->rectangles, entry, next); - vnc_unlock_queue(queue); return 1; } =20 @@ -120,16 +120,21 @@ static void vnc_job_free(VncJob *job) g_free(job); } =20 +/* + * Push a job onto the queue. Ownership of the job is transferred. + */ void vnc_job_push(VncJob *job) { - vnc_lock_queue(queue); + assert(!QTAILQ_IN_USE(job, next)); + if (QLIST_EMPTY(&job->rectangles)) { vnc_job_free(job); } else { + vnc_lock_queue(queue); QTAILQ_INSERT_TAIL(&queue->jobs, job, next); qemu_cond_broadcast(&queue->cond); + vnc_unlock_queue(queue); } - vnc_unlock_queue(queue); } =20 static bool vnc_has_job_locked(VncState *vs) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848817; cv=none; d=zohomail.com; s=zohoarc; b=jAwxwRLXpAAcu43ndsQUsvA6zLdZLscWpC03r4Un5YTVaEW85kw90fnOOSqv3OtDl8rPiMBr55b/nuo9T4hFkgo2fW3MXUEMu8WWqYmrwvnKxi2oFjlhpKQb80zZ3BmTU0KyfdEL1jIHNDwDDi2RahiMxeT1EegwpGzs40+FhX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848817; 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=S3GkcxD4jjJ8nW0/TsJHVunvewBQEbuA/3E1+0rTj0s=; b=TDiDKHHcNDOsYrGQEJjpdT2tmE+yLO3+kYQQMVS2KhxOP89grm4jBuEXK2xkWLIO+cgtbi2cvDK8v6XuWM7EPv2z/Vpxs3/L9zpQS+WPkiQgv5MfuU1hBMFnzLZfXA5TdFpyQ608XEOblawrsU2Kdc5Nbr9O1AITklA9+/jX3i8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848817135964.4980744817617; Fri, 10 Apr 2026 12:20:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOJ-0002WG-Iy; Fri, 10 Apr 2026 15:19:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOH-0002W5-OD for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOF-0000aY-08 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:41 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-501-WK3u5ZdFMvaE_ilWR5MWNQ-1; Fri, 10 Apr 2026 15:19:36 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E480D1956088 for ; Fri, 10 Apr 2026 19:19:35 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9390C3000C1D; Fri, 10 Apr 2026 19:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848778; 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=S3GkcxD4jjJ8nW0/TsJHVunvewBQEbuA/3E1+0rTj0s=; b=IB3cFRUjFfaa+/PTNJNuQ9D373elqEss+QCCcaMQaNb+RdokuTZsaINdZkKlbjsGwGo4QF 0Vufw/+vNg7E365YgBMxMhwaOrPVPYAzOHq0LKBkUsHFgch+8u21SbCH1HWk1c1sWE7yD5 ub8NqwWsu7CKsCZVVJvfNHtNCNj/q6I= X-MC-Unique: WK3u5ZdFMvaE_ilWR5MWNQ-1 X-Mimecast-MFC-AGG-ID: WK3u5ZdFMvaE_ilWR5MWNQ_1775848776 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:29 +0400 Subject: [PATCH v2 07/67] ui/vnc-jobs: drop redundant (and needless) qemu_thread_get_self() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-7-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=782; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=bQo4AiXo3/Djihjv7WfqxpSjZnrdrffDBbBND0Ml97s=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0TeL/vhE41+B8CeyrvPwmdri9VE8xsk3+Cc JsgGC7Td1eJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5QDDD/4+H8psQ0Y1o+to+oP+ReXjYXe5x2IV8m/z2UCQUCnTPkVLke4FVcn37GwPPxhmG3qYbOZ Er5MsqETPD85wCkcPzsHX9hssB9GJlKm2ve52ayEvOv6Zq9oeRFlH6xs4Z97RZmPQrVrd4UsrHF 4xPF8kP3Gtz0VWPRZYY4gOiPtvQs9lVbW9MTXCHCiQuri+H+V7eayQHYDc04SZmc9oAyfXEhPkZ OPJFOeyuWrVflZgkJ04Ar8msT11pIaZev9ZHX/SHsIP8qS2vsXiT4KpXWDKoYkFyRAAlW3/i1LE 2S4MIyiQiVFKqCYrV4wFC6NjDMCZAylI8LEGbskyUHqHl74BtXcHWrkwd6wuE65vPI0cOeJhDaQ cSbwYMAiaBY1S3Rs8wEV4Fgz5D8R/aVH7OoOgjEU2iY1RyFfXUP6/+eeLdcB/IX43XJSkxWQJbP 3RsDtgDID1Q+aiMbkOhoMN1CEILeTlmukvJUSY6K/Aly0+3em9YiF6U81/WV522dGxBx9PV7Oc2 +lYqK9CT2WYDvvaNvT2+yZ25fG+A1s0RHacoLQzpWsap8ysfW/MLmJguxm4a+jNN4CO2UzYJPn9 A8ehEfqJ/hkQAYaA3kURFXQlDF2jcn9roGJERyGV0PSOzomCOhw8gRgJq6ymFbPLossJg/rpzDr 4dKmv9nwm6wh5+A== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848818856158500 The call is unnecessary, since "thread" is already set at creation time. Furthermore, the "thread" field is mostly useless as the thread is created DETACHED and isn't used for anything but perhaps debugging. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 9c17d684c9e..5b17ef54091 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -354,8 +354,6 @@ static void *vnc_worker_thread(void *arg) { VncJobQueue *queue =3D arg; =20 - qemu_thread_get_self(&queue->thread); - while (!vnc_worker_thread_loop(queue)) ; g_assert_not_reached(); return NULL; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848804; cv=none; d=zohomail.com; s=zohoarc; b=GCE5wMiqaL6jOgM3bUOCZfXlcGULkwNrD5Ded3x/liZT+hLfc3t2mF+Em0f7EOQLzNTH2WWU3ro2z02dzT/SyVnrRmWwvlcjKYHKXEztTC7njjYG9/7ee1MIyF/IQqduj3RF0/olJKwNZMb4pL8niUTqaI6Su6w7priK7iYtnyc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848804; 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=XM1LdpvMo/ryUlaKFnRu4IyfjRwCYwSedayje/V4ZLw=; b=XmkuJQ93kv3iyyaduL1MS8vAGFXmxG+LK8JK0+hjDUBg6UQoofRDMXh5Dgm5LFN3/mTITSXhgV52T+he/PqSh1jYpB9A6TpHAtDANbB5TfCQLvDIhVw3HE/ITPCDt9V/BXZFUBgzi2L/0+0s26qKOmZGfk2QdqN82A5iZ0NXNo8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848804022202.60098938232295; Fri, 10 Apr 2026 12:20:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOO-0002pB-Ui; Fri, 10 Apr 2026 15:19:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHON-0002fW-3t for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOL-0000hy-Cv for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:46 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-133--tHQ7Uw-MFmRZKrGUjduog-1; Fri, 10 Apr 2026 15:19:42 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DFF7C1800454 for ; Fri, 10 Apr 2026 19:19:41 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A5D663000C16; Fri, 10 Apr 2026 19:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848784; 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=XM1LdpvMo/ryUlaKFnRu4IyfjRwCYwSedayje/V4ZLw=; b=VejQ6BZD1yWXI2aaT5UFEbzrN4oYyvJ5jA2TUWO0BHqXGd/GjLQWKHdmas6eWt0hCIeWk8 FqzetEuL+uGigq+8DwPuFvFY/B0UYdgqSQd98hOz2hIgAJrRbkK7LQMvAmE/kkLyeIRlJH gMzO0wJbfcMYhtPWpy1U+3SuX8Q9NDg= X-MC-Unique: -tHQ7Uw-MFmRZKrGUjduog-1 X-Mimecast-MFC-AGG-ID: -tHQ7Uw-MFmRZKrGUjduog_1775848782 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:30 +0400 Subject: [PATCH v2 08/67] ui/console-vc: fix off-by-one in CSI J 2 (clear entire screen) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-8-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=972; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=+B++g3vg0UFSP1H5PN6zGwpYWHVJzQ3p7MliDE5OVm0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0TrFwNRtxqIGHKIO5B4Qh+MPxJQDf+heFcV N5qGc3iwH6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNEwAKCRDa6OEJdZac 5ZjUD/9hdwgtLg6oHtm7DhK1Xyag5w9j/Jc+LGs+45YedptowdhPe+lsnoQaNBqDhCSE51AALXr i7UdJwBFhbWuh6Jyblv2jwOs8hZGCYIOFRzZdArJqxGI64DOFaOAMhpVz8f+aNM9Z2v8B314Ano NmAolgwk3po84USswCKYj7Rnr3HF8bZPkuKwhHQSABWzEGW9JHnkYU7/YgPWQWCPv9PMplKdZ2R cxMDPtykz3kUnkGt8M20sBKb262Nrl8+z13ydVDaE+XaZScMmRkafTFN7Uo7w1zPR0n77HL7AzJ 8m5qSCPj03TZ1CzuhMBaHqvWEZj4F7BWCz2IEFYI+x2HkrV/GXe01HOXP1k5K401a7WjtOq6C9C NSHS95N9Qp7zcMuerLUKN2/BA1ruJO7C8UwlKIVQUeBLF/aeWC2+Dn/ONBp4bgRoMvuhZ+stX4k AtcVFCicrFmG1vHvedzKT63oszhOv66ujLsSt/zgpXFGAUrOrCtYFkvqkd+3YuAwlpnWjywQ8Bt jKFwQ2I7dpVTxkSwvpUOIX5veMTC7icL8mJB0Unfy+RqCT2e6oGo8vIuQeBFn+fyQgSIfSBg5i1 klgtScZDlktXEdbdR98ByDB4EmtrYBOgTTrL/IMxGb8sBwmC+6KK0UlPGn30ee065uKh+qgYQuU GSdNUvFijVcmJVQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848807588154100 The loop condition used `y <=3D s->height` instead of `y < s->height`, causing vc_clear_xy() to be called with y =3D=3D s->height. This clears a row in the scrollback buffer beyond the visible screen. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index f22806fed79..8dee1f9bd01 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -899,7 +899,7 @@ static void vc_putchar(VCChardev *vc, int ch) break; case 2: /* clear entire screen */ - for (y =3D 0; y <=3D s->height; y++) { + for (y =3D 0; y < s->height; y++) { for (x =3D 0; x < s->width; x++) { vc_clear_xy(vc, x, y); } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848853; cv=none; d=zohomail.com; s=zohoarc; b=h41JnE7AnKOnfguGFGC+eDT5ku7YgdjYrJJ2Fm072ZxArwIkZ1cqYD3NniBsj5NocUpDxetG0Bq0qnkE0+w8eIr3J/+A1Ar9RRFQq8clSbBIiZFY2XZawBbdKXiyxeG4OetPc3X6F0vJqREULfn/WRGr/2Wm/v2cq97gRC9F1MQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848853; 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=6JBJBMHZC9WLxuLQpDicTt3kZxJ/ySW/z8ibHRBORuU=; b=n+Pbbqs3SgNSOwQkIOBcrtEnyQ+8ZhItaybOKIKHhT7jGMuXmQg2tZq/ajIpmiDKcgVQ8qxi6+910DmhVbLMBsOe1raArgDjG/YmJJY1E+XQhrvx+h1zpTzcrOxqDYmSCyr4QlUUF5Y0xUDXqdMyjcrQRn8jUTLiNupZUG6zNqg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848853567261.0889596954255; Fri, 10 Apr 2026 12:20:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOV-0003KO-E5; Fri, 10 Apr 2026 15:19:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOT-0003I4-Uj for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOQ-0000os-P5 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:19:53 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-126-VIKqXZvINTGcGzdkjfRi-Q-1; Fri, 10 Apr 2026 15:19:49 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2D0C81800454 for ; Fri, 10 Apr 2026 19:19:48 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C5EB11801ACC; Fri, 10 Apr 2026 19:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848790; 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=6JBJBMHZC9WLxuLQpDicTt3kZxJ/ySW/z8ibHRBORuU=; b=ND7uF6ERxR4UsjxhkTXj8JL4XDniNUHgVCOPDwT1Ch6085c0RWFEJYUrIyAP3xrVIFTU18 K+2/YCZaKqmqph1pCAC6pY2V+Rkg9bsRoU7F6N0E14Vw2eX9GM6ZyeORXzSxKUoFEBWhrg i8jzvSOo/EmFaYGWk1np29GiB0JJb9c= X-MC-Unique: VIKqXZvINTGcGzdkjfRi-Q-1 X-Mimecast-MFC-AGG-ID: VIKqXZvINTGcGzdkjfRi-Q_1775848788 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:31 +0400 Subject: [PATCH v2 09/67] ui/console-vc: add UTF-8 input decoding with CP437 rendering MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-9-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=16632; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=KHIfXWQ7lGuS0EQV66aajAXrSG5dXvt2AmBHpq2kLlc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UbNta3kieg0BaRmBxq0YIkIfm6sPC/+l0n t3T++lN10OJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5a0RD/9MbkzkgsHfStRL+C2ubMORitwROzerdgkekGXOMB73iRftjLjxqxwpQ/dW6IpAj5z/LS1 oIjE780gOYfm9MuV/127rhUQhSyi4IUJ7s1V/HbrDTCFMCxjlCkgd6S1oveqr3QOu9HnpuUdBlc 2CD06f8ztjtC9ZdscahGVCKzw44juRr+pEwJOHXFGOic/S9XvtwpMDQ5JMOgWop0+VcwV0fYNLh iuMLW1YRtzYO2ZR4652UMJ8wdLAJRKpoSZWetE4SDzIFB3Of4fNMQ3kTpZrakXgoV8zvOrjycaY 1npUAp3AG9ahVKQK0avxNms+Mp+c5/R1sa53vsaakDwoveWabjT0HdRI6Pa4ZRkS1Rm/tA96FCB jlGppczwQqotEPX0EL/FzCQkOwoW+noYVvXe0eDEBaUHF3LoflWQ9mIZMUIIHbxlLX/2oUbWe3p /nNWgyNcmmwAng/KivVAsfg8R22NPyQ+kvZr++Ro821Q9FECUey8EbrdXFQYYXEDV5sxTFpsqCf d46vSDFMqOMsAXGd446ZuF+uLkcEyuDPFF3ci6ZExrb0b6ekPwwkQFhu49hkXq6OdCHx+5CJdWh 4bSn63AdkHJOccF39wTWIxd1+zSajOR55zVh4otpchPPu+QzccDS5BV5qPN/nOAqecTsHEwtX5A HhSOd6WR/+sgAFw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848854198154100 The text console receives bytes that may be UTF-8 encoded (e.g. from a guest running a modern distro), but currently treats each byte as a raw character index into the VGA/CP437 font, producing garbled output for any multi-byte sequence. Add a UTF-8 decoder using Bjoern Hoehrmann's DFA. The DFA inherently rejects overlong encodings, surrogates, and codepoints above U+10FFFF. Completed codepoints are then mapped to CP437, unmappable characters are displayed as '?'. Note that QEMU has a "buffered" utf8 decoder in util/unicode.c, but it is not a good fit for byte-per-byte decoding. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/cp437.h | 13 ++++ ui/console-vc.c | 61 +++++++++++++++++ ui/cp437.c | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ ui/meson.build | 2 +- 4 files changed, 280 insertions(+), 1 deletion(-) diff --git a/ui/cp437.h b/ui/cp437.h new file mode 100644 index 00000000000..81ace8317c7 --- /dev/null +++ b/ui/cp437.h @@ -0,0 +1,13 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (c) QEMU contributors + */ +#ifndef QEMU_CP437_H +#define QEMU_CP437_H + +#include + +int unicode_to_cp437(uint32_t codepoint); + +#endif /* QEMU_CP437_H */ diff --git a/ui/console-vc.c b/ui/console-vc.c index 8dee1f9bd01..d9d6966410a 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -9,6 +9,7 @@ #include "qemu/fifo8.h" #include "qemu/option.h" #include "ui/console.h" +#include "ui/cp437.h" =20 #include "trace.h" #include "console-priv.h" @@ -89,6 +90,8 @@ struct VCChardev { enum TTYState state; int esc_params[MAX_ESC_PARAMS]; int nb_esc_params; + uint32_t utf8_state; /* UTF-8 DFA decoder state */ + uint32_t utf8_codepoint; /* accumulated UTF-8 code point */ TextAttributes t_attrib; /* currently active text attributes */ TextAttributes t_attrib_saved; int x_saved, y_saved; @@ -598,6 +601,46 @@ static void vc_clear_xy(VCChardev *vc, int x, int y) vc_update_xy(vc, x, y); } =20 +/* + * UTF-8 DFA decoder by Bjoern Hoehrmann. + * Copyright (c) 2008-2010 Bjoern Hoehrmann + * See https://github.com/polijan/utf8_decode for details. + * + * SPDX-License-Identifier: MIT + */ +#define BH_UTF8_ACCEPT 0 +#define BH_UTF8_REJECT 12 + +static uint32_t bh_utf8_decode(uint32_t *state, uint32_t *codep, uint32_t = byte) +{ + static const uint8_t utf8d[] =3D { + /* character class lookup */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, + + /* state transition lookup */ + 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,= 12,12, + 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24= ,12,12, + 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24= ,12,12, + 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36= ,12,12, + 12,36,12,12,12,12,12,12,12,12,12,12, + }; + uint32_t type =3D utf8d[byte]; + + *codep =3D (*state !=3D BH_UTF8_ACCEPT) ? + (byte & 0x3fu) | (*codep << 6) : + (0xffu >> type) & (byte); + + *state =3D utf8d[256 + *state + type]; + return *state; +} + static void vc_put_one(VCChardev *vc, int ch) { QemuTextConsole *s =3D vc->console; @@ -761,6 +804,24 @@ static void vc_putchar(VCChardev *vc, int ch) =20 switch(vc->state) { case TTY_STATE_NORM: + /* Feed byte through the UTF-8 DFA decoder */ + if (ch >=3D 0x80) { + switch (bh_utf8_decode(&vc->utf8_state, &vc->utf8_codepoint, c= h)) { + case BH_UTF8_ACCEPT: + vc_put_one(vc, unicode_to_cp437(vc->utf8_codepoint)); + break; + case BH_UTF8_REJECT: + /* Reset state so the decoder can resync */ + vc->utf8_state =3D BH_UTF8_ACCEPT; + break; + default: + /* Need more bytes */ + break; + } + break; + } + /* ASCII byte: abort any pending UTF-8 sequence */ + vc->utf8_state =3D BH_UTF8_ACCEPT; switch(ch) { case '\r': /* carriage return */ s->x =3D 0; diff --git a/ui/cp437.c b/ui/cp437.c new file mode 100644 index 00000000000..8ec38b73419 --- /dev/null +++ b/ui/cp437.c @@ -0,0 +1,205 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Copyright (c) QEMU contributors + */ +#include "qemu/osdep.h" +#include "cp437.h" + +/* + * Unicode to CP437 page tables. + * + * Borrowed from the Linux kernel (fs/nls/nls_cp437.c, "Dual BSD/GPL"), + * generated from the Unicode Organization tables (www.unicode.org). + */ +static const unsigned char uni2cp437_page00[256] =3D { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */ + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */ + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */ + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */ + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */ + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */ + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */ + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */ + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */ + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */ + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */ + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */ + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */ + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */ + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ + 0xff, 0xad, 0x9b, 0x9c, 0x00, 0x9d, 0x00, 0x00, /* 0xa0-0xa7 */ + 0x00, 0x00, 0xa6, 0xae, 0xaa, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ + 0xf8, 0xf1, 0xfd, 0x00, 0x00, 0xe6, 0x00, 0xfa, /* 0xb0-0xb7 */ + 0x00, 0x00, 0xa7, 0xaf, 0xac, 0xab, 0x00, 0xa8, /* 0xb8-0xbf */ + 0x00, 0x00, 0x00, 0x00, 0x8e, 0x8f, 0x92, 0x80, /* 0xc0-0xc7 */ + 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */ + 0x00, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, /* 0xd0-0xd7 */ + 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0xe1, /* 0xd8-0xdf */ + 0x85, 0xa0, 0x83, 0x00, 0x84, 0x86, 0x91, 0x87, /* 0xe0-0xe7 */ + 0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, /* 0xe8-0xef */ + 0x00, 0xa4, 0x95, 0xa2, 0x93, 0x00, 0x94, 0xf6, /* 0xf0-0xf7 */ + 0x00, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */ +}; + +static const unsigned char uni2cp437_page01[256] =3D { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */ + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ +}; + +static const unsigned char uni2cp437_page03[256] =3D { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */ + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ + 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0xe8, 0x00, /* 0xa0-0xa7 */ + 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ + 0x00, 0xe0, 0x00, 0x00, 0xeb, 0xee, 0x00, 0x00, /* 0xb0-0xb7 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */ + 0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */ +}; + +static const unsigned char uni2cp437_page20[256] =3D { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, /* 0x78-0x7f */ + + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, /* 0xa0-0xa7 */ +}; + +static const unsigned char uni2cp437_page22[256] =3D { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0x00, 0xf9, 0xfb, 0x00, 0x00, 0x00, 0xec, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ + 0x00, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ + 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ + 0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */ +}; + +static const unsigned char uni2cp437_page23[256] =3D { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */ +}; + +static const unsigned char uni2cp437_page25[256] =3D { + 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0x20-0x27 */ + 0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, /* 0x28-0x2f */ + 0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, /* 0x30-0x37 */ + 0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, /* 0x38-0x3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ + 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, /* 0x50-0x57 */ + 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, /* 0x58-0x5f */ + 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, /* 0x60-0x67 */ + 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x00, 0x00, 0x00, /* 0x68-0x6f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */ + + 0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, /* 0x80-0x87 */ + 0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ + 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ +}; + +static const unsigned char *const uni2cp437_page[256] =3D { + [0x00] =3D uni2cp437_page00, [0x01] =3D uni2cp437_page01, + [0x03] =3D uni2cp437_page03, [0x20] =3D uni2cp437_page20, + [0x22] =3D uni2cp437_page22, [0x23] =3D uni2cp437_page23, + [0x25] =3D uni2cp437_page25, +}; + +/* + * Convert a Unicode code point to its CP437 equivalent for + * rendering with the VGA font. + * Returns '?' for characters that cannot be mapped. + */ +int unicode_to_cp437(uint32_t codepoint) +{ + const unsigned char *page; + unsigned char hi =3D (codepoint >> 8) & 0xff; + unsigned char lo =3D codepoint & 0xff; + + if (codepoint > 0xffff) { + return '?'; + } + + page =3D uni2cp437_page[hi]; + if (page && page[lo]) { + return page[lo]; + } + + return '?'; +} diff --git a/ui/meson.build b/ui/meson.build index 69404bca71a..d4d9312b98c 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -16,7 +16,7 @@ system_ss.add(files( 'ui-qmp-cmds.c', 'util.c', )) -system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: file= s('console-vc-stubs.c')) +system_ss.add(when: pixman, if_true: files('console-vc.c', 'cp437.c'), if_= false: files('console-vc-stubs.c')) if dbus_display system_ss.add(files('dbus-module.c')) endif --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848845; cv=none; d=zohomail.com; s=zohoarc; b=eELnrx1AmhQdqkXZ0dqrVFVhjrhReQmoJg05qrB2UyurXj0aYjsK9Tkgy7H4CrirgxUrj8Sn6z2ytyfQE+z2+d4j3Fu4NXOdu9FQFKRp3YlTF+9pII5YLcVso6XxLie8dTpo+09aa6r9gwdeTbHUb+ZC3Gd36wof1wSW6/8VYOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848845; 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=BVtXUd3/vnIW9OWxR+IrxGHFdO8ndQ7MDKjHO+ZSuxs=; b=Zm5Og8rKJmmD3d/QlB0b4NgGX0RU+gehS1qsPzWiUDiZMSFc9nmvICXq3gX2gQcd3cdJMDV3Vci+EG9g/n00e09lTgobZ9Dy48pTW7Goq+jEiHsRE4ItlrKxQeiMDcbpripj4m92QO1od/nQMfme69eomiSl9KCvGF59HHTlnNc= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848845681732.2300078216681; Fri, 10 Apr 2026 12:20:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOc-0003eM-8K; Fri, 10 Apr 2026 15:20:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOa-0003Tq-E4 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOZ-0000qM-10 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:00 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-h-bk7hw6MnKbfBnvI-fy8g-1; Fri, 10 Apr 2026 15:19:55 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 30EAE1800BED for ; Fri, 10 Apr 2026 19:19:54 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1133D19560AB; Fri, 10 Apr 2026 19:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848798; 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=BVtXUd3/vnIW9OWxR+IrxGHFdO8ndQ7MDKjHO+ZSuxs=; b=F5ZFh+Ilr50rZq2FQXNpei9roqRweULwE4fcjVb1YEToJDFwS04/DDzCsSdbo6N7G0B4Oa 4mD33kzJDaSckbl6q+b7DBSiIzNqMbnNVPIn7b2KhqNRVMDFRV/cjwwrAcBMoWJXXZ2iVR 8U1hRtq//R0WVge6MjBYHVctmDlefGY= X-MC-Unique: h-bk7hw6MnKbfBnvI-fy8g-1 X-Mimecast-MFC-AGG-ID: h-bk7hw6MnKbfBnvI-fy8g_1775848794 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:32 +0400 Subject: [PATCH v2 10/67] ui/console-vc: ignore string-type escape sequences MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-10-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2045; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=m7qmdCz70Vht0Po69gBkjQ+7bxeu8B0z/LwcEPzXT8o=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UWMOYphewUu/SP9fn+qqHNkY4OwSH4wRqq hxvCdAa3aiJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5TK0D/wI6POFjveO6ZH1hK70vYP14aBpIO8mx9oogGIW9vVCeDJAo3gzDDp+X7wZa7JXA3+o4vd ve3aC1Ry17qu4eA8s1wT3YGVzfclxY0vDt3krCSvCDXHYtt13wVOqEPu/ZwX8Ly1jrp5V7z8M1t /NesmOXx9uVRq+vlvDyUi9kAsUKIUoS7mLAUb5IeNj9cEVLbZF7vB67pSfeUgYR1MGgSQVDzpwC tp2pRYnpffzHdjbQTSxLP4hSexn8R/faSq+7azwQfbVk2bMSHndd7sRlpK6SX8p/UyZrbkv7kIl wSpgvIDSHlU4dlXfeXf7PXK7TcVjZFNwFcT9A2ccVGLGT0nuaLp58IB0KaOKOjVDQj3HA3XRkCU wuDKorb1ZdIWcrj68KQeddI6LD4Q5sAIWgj4bmD9q+pYuYpNckC9hYSTzyrNMSj4YUz6TUtYp8t pJCpHdPRndvbyE1wMBrju5kLJAMjqCmi7bkiyuJ+TOm5+WRtQap4zmVDl5pZ2mX5xeX4+6X5iK5 npCSELRu85Rg7bCqs3x+yIa4+zJev80nKvM90DwzBwxn3IZ0vDmQ0IG9BAUm4PymUvc1dPhqFth R0CnJ7xh+e5hIrTOrIuSnmjS9HlxQ3L/qKR1m2/eqJPo+rznQLMiNywyDyGyH4/3NZgkZ6aUrRX 3fttw4clpeYmGbw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848848055154100 Modern terminals and applications emit OSC (Operating System Command), DCS, SOS, PM, and APC escape sequences (e.g. for setting window titles). The text console currently does not recognise these string-type introducers, so each byte of the payload is interpreted as a normal character or a new escape, producing garbage on screen. Add a TTY_STATE_OSC state that silently consumes all bytes until the sequence is terminated by BEL or ST (ESC \). Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ui/console-vc.c b/ui/console-vc.c index d9d6966410a..f1d38ee8ada 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -45,6 +45,7 @@ enum TTYState { TTY_STATE_CSI, TTY_STATE_G0, TTY_STATE_G1, + TTY_STATE_OSC, }; =20 typedef struct QemuTextConsole { @@ -868,6 +869,10 @@ static void vc_putchar(VCChardev *vc, int ch) vc->state =3D TTY_STATE_G0; } else if (ch =3D=3D ')') { vc->state =3D TTY_STATE_G1; + } else if (ch =3D=3D ']' || ch =3D=3D 'P' || ch =3D=3D 'X' + || ch =3D=3D '^' || ch =3D=3D '_') { + /* String sequences: OSC, DCS, SOS, PM, APC */ + vc->state =3D TTY_STATE_OSC; } else if (ch =3D=3D '7') { vc_save_cursor(vc); vc->state =3D TTY_STATE_NORM; @@ -1026,6 +1031,16 @@ static void vc_putchar(VCChardev *vc, int ch) break; } break; + case TTY_STATE_OSC: /* Operating System Command: ESC ] ... BEL/ST */ + if (ch =3D=3D '\a') { + /* BEL terminates OSC */ + vc->state =3D TTY_STATE_NORM; + } else if (ch =3D=3D 27) { + /* ESC might start ST (ESC \) */ + vc->state =3D TTY_STATE_ESC; + } + /* All other bytes are silently consumed */ + break; case TTY_STATE_G0: /* set character sets */ case TTY_STATE_G1: /* set character sets */ switch (ch) { --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848813; cv=none; d=zohomail.com; s=zohoarc; b=g9fIGln2kzEBZqdiCR5+5WePj1SKVCvlCdgxC9zGl2FspvyjuNEejaf+V6a9Llzug9Iy6vmlBB0jH82gf7dwcWnDUrGcIio6dJL2Is5fEQAX/mby1jTSUqzAlY2cLa2nEin4GiF1EYfDoxFHV5ta0AmLE9sEoXO3EptAjAD+/o8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848813; 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=XXrhTuQ3t10ZXdWYsa32uGbpBKnwKNjPxFVhMgq4Awc=; b=hVKlFk9AsgTJO4eLNki3ViPAaLzxB7SdJTX1HhlQnGntNGp5pW7dTMBQxLzoDPeEJ20IMfCV9qhQw5k2WYNhzbU2Wakd9t8JkvQBsgB/ah4KuNckNaOSSCbj7jKX/6ZH+zDHGylF4ICUcykmfw0GEx5wWeEAfBqRVnxvIMP8BgA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584881301924.795053454259346; Fri, 10 Apr 2026 12:20:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOg-00043f-Rq; Fri, 10 Apr 2026 15:20:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOg-0003yt-1a for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOc-0000rO-TQ for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:05 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-643-_z6XIPJVOROCuSKrEQVINA-1; Fri, 10 Apr 2026 15:20:00 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E65A61955DE3 for ; Fri, 10 Apr 2026 19:19:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 930E6180057E; Fri, 10 Apr 2026 19:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848802; 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=XXrhTuQ3t10ZXdWYsa32uGbpBKnwKNjPxFVhMgq4Awc=; b=S63mqq5T5c5muSHYfyymYzCRqEJJu5nd979AUFKhe2DMZsquYGkJ4SJp3RgFQ6TZHZC7dI 3u19Dz5rqfEYwSJhAtb1mijr1+5UIQhdbKVhl7o0CLgTIcjH6iZ3XNZILmCoF16dbabFPZ PMwK8bGHGLj7la4r6+kc8oKS/Hy2Vc0= X-MC-Unique: _z6XIPJVOROCuSKrEQVINA-1 X-Mimecast-MFC-AGG-ID: _z6XIPJVOROCuSKrEQVINA_1775848800 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:33 +0400 Subject: [PATCH v2 11/67] ui/console-vc: fix comment shift-out/in comments MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-11-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=958; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=kh0P9x+noWu4Ywj5nXZfasH2un/SYGYaOt5dLCPeL0o=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UHLhNwOECcaML/lGcjd4GYMQGLoa2IgQ57 qZdRC/wkWeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5ZPRD/0Xf2fPnoG7czj9LmtxZC/oUWijyLam90b+yY2ICBzBX5zgRUs6cRjKOumhElF/g2haKlE 1ty0Od3LobC6DtPoo3Z91O+IfEuMZaBTkhdWRADnGjdz8XycoHDX73+FFXEos8RdLW0qCyF1Wqz lWzR4O2SogKx2UsJmeAitd1LEAg05sZki0+ZYYoHPFdQOMrQxEZMAG/8vQh7qROPzCzsNYtNfZz 7UfIDPRrPEpFwwj9UlqT/ZKXoD1WBmvG7qhVKQTPIFIBpVUWpsde+wVV9gm+Bh638mPpx2giZ6I scku/5eT42eriKNdnAlcHyo1i/i5qlLJX8mhgSvT5HpNVtltfGVM9AKIHJRIb/CUqiWHYHEvpl8 oRiSomOhJRkqhCyeUfxI66tKm6FeKd2pCiBfe4+G4pC8BUMueLKVASCQLYo/AG66AAPYogCMmJ4 oaEidRV0p6UhvtULdisjGZdZ/CwiSD17LipreoUEPD/IPUG0jbIvYD28bfxENPNAcOuIAseelBp McK2XHPzwN0ZELxEe77HwFkVCnHNnX+95X4rRE6GpfTvH3fdyhK+AjdtJwNeCUqV8HnQ6HyYmPt UEW3eNnLtSQcosRYD4LZSChuakflqphg9oHR5DbCQ/wVGpPzyS/OoIigSXouIl2NtSJDn6vk3Ns 1a86zURUFNPtcOw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848814888158500 14 is shift-out 15 is shift-in Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index f1d38ee8ada..bd816d45759 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -846,10 +846,10 @@ static void vc_putchar(VCChardev *vc, int ch) /* TODO: has to be implemented */ break; case 14: - /* SI (shift in), character set 0 (ignored) */ + /* SO (shift out), character set 1 (ignored) */ break; case 15: - /* SO (shift out), character set 1 (ignored) */ + /* SI (shift in), character set 0 (ignored) */ break; case 27: /* esc (introducing an escape sequence) */ vc->state =3D TTY_STATE_ESC; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848862; cv=none; d=zohomail.com; s=zohoarc; b=XJVH8eJMKR0NTWBzPZVU8pBkC+NQlUuKIylifHalvT3/XAI5z5R6yemm6vK1Zbl4XwV8YFx8+1TzfW+0469KI2HOpss7D1GFyK86Nk1znm/kXjY92nrGjpGVpX4K4TisE8nt4HHNiwFNW8su7hbMSTi29chrxDVx60pEezry03k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848862; 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=0I2+yZ98E836Z2P9dlsrUG3JAUWuXDSLpAuU+eC392E=; b=CRVwaik2NrghvbOcSyp7XF381FIv2FUpndbpo4gzMN7OzKRRGCJSOzD82YFMDtTwZYHa/NBvPhA5s0Xmgy9B+NGylls6+dDCNB3pguC4lHA0gZqQu3Pnius0qUF5mabVgHy2EN4d1uanX5DROP2qNPzbWq1/FXxa6qLcpXEMMXk= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848862924647.8144630281715; Fri, 10 Apr 2026 12:21:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOn-0004Gu-4F; Fri, 10 Apr 2026 15:20:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOl-0004Aa-9x for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOj-00015C-1m for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:10 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-230-Y0gyWIl_PmKPSk47N0Bkpw-1; Fri, 10 Apr 2026 15:20:07 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 87265195605E for ; Fri, 10 Apr 2026 19:20:06 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4E6BF3000C16; Fri, 10 Apr 2026 19:20:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848808; 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=0I2+yZ98E836Z2P9dlsrUG3JAUWuXDSLpAuU+eC392E=; b=ACcwmoiRaAZPt7oMemWY7eEpEw/WFRr1zpo7XVDsRr5J548c2KSZxN7jUQp/Q8JMOldkj0 RaLgxbH9oeJW/wMfwGo3Frok8UgQa572sqHe1dPRYRXZft1toKCw+Wqo0mjHd2CphZQdLO cBnU/7SVY6OcnVqf5+RdTUbPD2Hkr0M= X-MC-Unique: Y0gyWIl_PmKPSk47N0Bkpw-1 X-Mimecast-MFC-AGG-ID: Y0gyWIl_PmKPSk47N0Bkpw_1775848806 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:34 +0400 Subject: [PATCH v2 12/67] ui/console: dispatch get_label() through QOM virtual method MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-12-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=6932; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=VZpzpANVaAkXTsjt5tv6uI07yEgnJRkVBs8sY4GwLtQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UCt4OpQ/403qw7n7WYHgEhNC/f6K6g/ErF LEGrqgB1NuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5ShKD/9rw3Bl3TP6Gk/yM+YumAzUovg5wDf4+x8X+9fwCbpMtti9dihwUC2XGk/dHm2jn+JOCAH RnwPmYSfgMQNFLCm+7SbSmw9NuX3r4MplJaVOsi2gUJs2Z8cvjMv3AxW3orFMHzkCs33cxzEkHS SZaqEje33lSSKDWTVDdFR95/TsKJ3ZK5TP79IjgG7kbo+laenNX0JmA4wcT29/cd3MmsO6E4Pu6 9bWDR769IjG2RsmlUVzKy/96gQ1bInmu7KnsrWemW529GH5bujdzjOIw0ejPpcXeqklK7hfC4zB Kk68L0jQzZbjVk1/0MwD77t52q+r59ucyGkIaNokSJMu+JqIj+S6ELm1W2N7vBEnX9ShaOSXsxL 3n+F5kdJ0FpUQuRZnRKw7junMuYcLz1bsfF3vzSAX0oEZp1Jk5duL0hYyGchlJ/0LI4reC/8ouJ NYgbQGzEHzyinCIs0WoB5AaSKZ5Dd38vIIvgqwss8S7KP1muuiCN6TQOTPPRkwfxTS/Bjp4Ur7J 1CycWb7CCLn5ksmNmVGAIA6yU3h3wTGsL1gqmZOvtpHkO88HoXvyrN5KGGECL9NnTHPzR+gy2Ka /H54wZ6ofUZhF0Z8a9jwY9nXGKo6d/ntQH530vuyMEM6IouodAlwZYzG4vlgMMLfZi3Ajcvrlp8 Tng7/mtdQf59vDQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848865204158500 Replace the type-checking chain in qemu_console_get_label() (using QEMU_IS_GRAPHIC_CONSOLE/QEMU_IS_TEXT_CONSOLE) with a QemuConsoleClass virtual method, allowing each console subclass to provide its own get_label implementation. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 2 + ui/console-priv.h | 1 - ui/console-vc-stubs.c | 6 --- ui/console-vc.c | 12 ++++-- ui/console.c | 101 +++++++++++++++++++++++++++-------------------= ---- 5 files changed, 65 insertions(+), 57 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 08082389f71..395a723e318 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -129,6 +129,8 @@ void console_handle_touch_event(QemuConsole *con, =20 struct QemuConsoleClass { ObjectClass parent_class; + + char * (*get_label)(QemuConsole *con); }; =20 typedef struct ScanoutTexture { diff --git a/ui/console-priv.h b/ui/console-priv.h index 43ceb8122f1..2c2cfd99570 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -36,7 +36,6 @@ struct QemuConsole { }; =20 void qemu_text_console_update_size(QemuTextConsole *c); -const char * qemu_text_console_get_label(QemuTextConsole *c); void qemu_text_console_update_cursor(void); void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym); =20 diff --git a/ui/console-vc-stubs.c b/ui/console-vc-stubs.c index b63e2fb2345..8a7f19c1f44 100644 --- a/ui/console-vc-stubs.c +++ b/ui/console-vc-stubs.c @@ -14,12 +14,6 @@ void qemu_text_console_update_size(QemuTextConsole *c) { } =20 -const char * -qemu_text_console_get_label(QemuTextConsole *c) -{ - return NULL; -} - void qemu_text_console_update_cursor(void) { } diff --git a/ui/console-vc.c b/ui/console-vc.c index bd816d45759..7b9acf1adb1 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -125,10 +125,12 @@ static const pixman_color_t color_table_rgb[2][8] =3D= { static bool cursor_visible_phase; static QEMUTimer *cursor_timer; =20 -const char * -qemu_text_console_get_label(QemuTextConsole *c) +static char * +qemu_text_console_get_label(QemuConsole *c) { - return c->chr ? c->chr->label : NULL; + QemuTextConsole *tc =3D QEMU_TEXT_CONSOLE(c); + + return tc->chr ? g_strdup(tc->chr->label) : NULL; } =20 static void qemu_console_fill_rect(QemuConsole *con, int posx, int posy, @@ -1114,9 +1116,13 @@ qemu_text_console_finalize(Object *obj) static void qemu_text_console_class_init(ObjectClass *oc, const void *data) { + QemuConsoleClass *cc =3D QEMU_CONSOLE_CLASS(oc); + if (!cursor_timer) { cursor_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, cursor_timer_cb= , NULL); } + + cc->get_label =3D qemu_text_console_get_label; } =20 static const GraphicHwOps text_console_ops =3D { diff --git a/ui/console.c b/ui/console.c index f445db11389..24e4761e1f9 100644 --- a/ui/console.c +++ b/ui/console.c @@ -436,9 +436,58 @@ qemu_graphic_console_prop_get_head(Object *obj, Visito= r *v, const char *name, visit_type_uint32(v, name, &c->head, errp); } =20 +static bool +qemu_graphic_console_is_multihead(QemuGraphicConsole *c) +{ + QemuConsole *con; + + QTAILQ_FOREACH(con, &consoles, next) { + QemuGraphicConsole *candidate; + + if (!QEMU_IS_GRAPHIC_CONSOLE(con)) { + continue; + } + + candidate =3D QEMU_GRAPHIC_CONSOLE(con); + if (candidate->device !=3D c->device) { + continue; + } + + if (candidate->head !=3D c->head) { + return true; + } + } + return false; +} + +static char * +qemu_graphic_console_get_label(QemuConsole *con) +{ + QemuGraphicConsole *c =3D QEMU_GRAPHIC_CONSOLE(con); + + if (c->device) { + DeviceState *dev; + bool multihead; + + dev =3D DEVICE(c->device); + multihead =3D qemu_graphic_console_is_multihead(c); + if (multihead) { + return g_strdup_printf("%s.%d", dev->id ? + dev->id : + object_get_typename(c->device), + c->head); + } else { + return g_strdup(dev->id ? : object_get_typename(c->device)); + } + } + return g_strdup("VGA"); +} + static void qemu_graphic_console_class_init(ObjectClass *oc, const void *data) { + QemuConsoleClass *cc =3D QEMU_CONSOLE_CLASS(oc); + object_class_property_add_link(oc, "device", TYPE_DEVICE, offsetof(QemuGraphicConsole, device), object_property_allow_set_link, @@ -446,6 +495,8 @@ qemu_graphic_console_class_init(ObjectClass *oc, const = void *data) object_class_property_add(oc, "head", "uint32", qemu_graphic_console_prop_get_head, NULL, NULL, NULL); + + cc->get_label =3D qemu_graphic_console_get_label; } =20 static void @@ -1347,56 +1398,12 @@ bool qemu_console_is_gl_blocked(QemuConsole *con) return con->gl_block; } =20 -static bool qemu_graphic_console_is_multihead(QemuGraphicConsole *c) -{ - QemuConsole *con; - - QTAILQ_FOREACH(con, &consoles, next) { - QemuGraphicConsole *candidate; - - if (!QEMU_IS_GRAPHIC_CONSOLE(con)) { - continue; - } - - candidate =3D QEMU_GRAPHIC_CONSOLE(con); - if (candidate->device !=3D c->device) { - continue; - } - - if (candidate->head !=3D c->head) { - return true; - } - } - return false; -} - char *qemu_console_get_label(QemuConsole *con) { - if (QEMU_IS_GRAPHIC_CONSOLE(con)) { - QemuGraphicConsole *c =3D QEMU_GRAPHIC_CONSOLE(con); - if (c->device) { - DeviceState *dev; - bool multihead; - - dev =3D DEVICE(c->device); - multihead =3D qemu_graphic_console_is_multihead(c); - if (multihead) { - return g_strdup_printf("%s.%d", dev->id ? - dev->id : - object_get_typename(c->device), - c->head); - } else { - return g_strdup(dev->id ? : object_get_typename(c->device)= ); - } - } - return g_strdup("VGA"); - } else if (QEMU_IS_TEXT_CONSOLE(con)) { - const char *label =3D qemu_text_console_get_label(QEMU_TEXT_CONSOL= E(con)); - if (label) { - return g_strdup(label); - } + char *label =3D QEMU_CONSOLE_GET_CLASS(con)->get_label(con); + if (label) { + return label; } - return g_strdup_printf("vc%d", con->index); } =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848844; cv=none; d=zohomail.com; s=zohoarc; b=FK2ASfNPZwiN+Y7vf0z7UnwkEVzCPlMTRbGWLqMAfxJ9sQoWHxRsqKf3EVZkpW/C6eX9LVPpm795skyJsJ8r3NNvD0hwNbr47LFWF8PZZOE2e68Ej6zqheYnZ8ZuvnvmJPVOfL9XWBXeQ+hdrGdpHtNtJd9LZDU2Ety5Fm469jg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848844; 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=L+3nHPs9xR2D8mkEMq5b7qsnC0hTkTfJrxig+fdBYlo=; b=h776ovQOyDbM9bj4r8TAguez/w04kgukPXrH1a8IIRC2ObWUnTZ4bCwMEwjfN4I2+McujU36jsPkrrMfIeWv4l67YI/fXZsFIxz6Liy5X7ZDPF9yicFAUqLw0sU373oDx2pEozzVaxcwrUFai7OaRuag9vssjL2T9vUpzOfn7n0= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848843920275.69654697125384; Fri, 10 Apr 2026 12:20:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHOx-0004hy-Lk; Fri, 10 Apr 2026 15:20:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOv-0004g1-QR for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOs-000170-Vc for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:21 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-jtfE0P7fOAig-na2HDDHVQ-1; Fri, 10 Apr 2026 15:20:15 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0A7FA19560BB; Fri, 10 Apr 2026 19:20:14 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 42DDF1801ACE; Fri, 10 Apr 2026 19:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848818; 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=L+3nHPs9xR2D8mkEMq5b7qsnC0hTkTfJrxig+fdBYlo=; b=gIBEn14NZQO7mcnfrXktjhAoxNAW0KldkUyOVebIBw66qTuUi8MKH6mOhwyATWtU6oR7x0 H7aCpW7UTQspkF5YGwbjS68f0BilNLro39xVH+mk1Q40hHQXmaRi9nGg3QEg+pfdbEAXFc E7uWD+WxnKL3WWid7paPTpS8r8oLoDQ= X-MC-Unique: jtfE0P7fOAig-na2HDDHVQ-1 X-Mimecast-MFC-AGG-ID: jtfE0P7fOAig-na2HDDHVQ_1775848814 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:35 +0400 Subject: [PATCH v2 13/67] ui/console-vc: introduce QemuVT100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-13-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=28456; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=5qFx7O1tTryueCgr78HCGFQy8xKJFAZYAw5dmxbXGno=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Usn9NDLkDIVGcTE5NIt0lyX6IA841K3Ff4 rKXL/HWk6GJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5aMsD/4yLqeuuM7moJpAaPsfIkXQ+DUt+b0lN0Z7tqn9RiE/9BOxYn+J5qCZk1t1G4V5HxQs3Y1 oWrH2OJkPMevI6kV8rnlfafM0+ZiGlpCMENcwEK5dS2WBCTwRGVwNaKYzCKETRyKfGQEfYifIW3 BkFcOpkxYuorm2ghvDt/Ol0KK3nex8To/9SkP1N3RjtDb8FPUP/63yOCRDucRQIMeYJ+qoIQ3yb EqXY9OL29OuwxdEIemiPsoR0k0W9EVxqOcbLN03EjqQ4XxgoD4CRa+QWLJuwXtcirmcVHfggt60 7tMoI/GNGwTA0Jbfv7rn6+FGULetRnT/Dr4GxDq7bJpx5+1tBPiOKKpI8su+5fmwowNt85ZAyE8 2uc+nGGLpRyVBVmcdQpqxGciIJrQprDxcmdr1CeNTQYaPeh38bt7WcgxgiD+GoMoizlhMtXa5lK wmsiGVJDDSKwgVUQ5UfJ6UMIsMayar/sDH+ABnOsmz4gJwH4qXOFE9iAc8yVRfPbnD5CxYmzFHS vkwVPI/bvdvpl5+pw9R/eCTh7cpAKN6OgnPrxAXYMFYH8IPCAAN/VlypK8cHwxtdrALaHwtQjOT 3le8jHQxQeDU99X1w/FWTQFGEWOAuCfdWBuwiZ3wK3uXOFUIT2xBUUXzbVDAwW6BI7azNjbYbLi tQreR9yYq3pqBmg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848845040158500 Start moving VT100 emulation specific code in a different structure. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 399 +++++++++++++++++++++++++++++-----------------------= ---- 1 file changed, 210 insertions(+), 189 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 7b9acf1adb1..cc061dff769 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -48,9 +48,7 @@ enum TTYState { TTY_STATE_OSC, }; =20 -typedef struct QemuTextConsole { - QemuConsole parent; - +typedef struct QemuVT100 { int width; int height; int total_height; @@ -66,7 +64,12 @@ typedef struct QemuTextConsole { int update_y0; int update_x1; int update_y1; +} QemuVT100; =20 +typedef struct QemuTextConsole { + QemuConsole parent; + + QemuVT100 vt; Chardev *chr; /* fifo for key pressed */ Fifo8 out_fifo; @@ -183,37 +186,40 @@ static void vga_putcharxy(QemuConsole *s, int x, int = y, int ch, =20 static void invalidate_xy(QemuTextConsole *s, int x, int y) { + QemuVT100 *vt =3D &s->vt; + if (!qemu_console_is_visible(QEMU_CONSOLE(s))) { return; } - if (s->update_x0 > x * FONT_WIDTH) - s->update_x0 =3D x * FONT_WIDTH; - if (s->update_y0 > y * FONT_HEIGHT) - s->update_y0 =3D y * FONT_HEIGHT; - if (s->update_x1 < (x + 1) * FONT_WIDTH) - s->update_x1 =3D (x + 1) * FONT_WIDTH; - if (s->update_y1 < (y + 1) * FONT_HEIGHT) - s->update_y1 =3D (y + 1) * FONT_HEIGHT; + if (vt->update_x0 > x * FONT_WIDTH) + vt->update_x0 =3D x * FONT_WIDTH; + if (vt->update_y0 > y * FONT_HEIGHT) + vt->update_y0 =3D y * FONT_HEIGHT; + if (vt->update_x1 < (x + 1) * FONT_WIDTH) + vt->update_x1 =3D (x + 1) * FONT_WIDTH; + if (vt->update_y1 < (y + 1) * FONT_HEIGHT) + vt->update_y1 =3D (y + 1) * FONT_HEIGHT; } =20 static void console_show_cursor(QemuTextConsole *s, int show) { + QemuVT100 *vt =3D &s->vt; TextCell *c; int y, y1; - int x =3D s->x; + int x =3D vt->x; =20 - s->cursor_invalidate =3D 1; + vt->cursor_invalidate =3D 1; =20 - if (x >=3D s->width) { - x =3D s->width - 1; + if (x >=3D vt->width) { + x =3D vt->width - 1; } - y1 =3D (s->y_base + s->y) % s->total_height; - y =3D y1 - s->y_displayed; + y1 =3D (vt->y_base + vt->y) % vt->total_height; + y =3D y1 - vt->y_displayed; if (y < 0) { - y +=3D s->total_height; + y +=3D vt->total_height; } - if (y < s->height) { - c =3D &s->cells[y1 * s->width + x]; + if (y < vt->height) { + c =3D &vt->cells[y1 * vt->width + x]; if (show && cursor_visible_phase) { TextAttributes t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; t_attrib.invers =3D !(t_attrib.invers); /* invert fg and bg */ @@ -228,27 +234,28 @@ static void console_show_cursor(QemuTextConsole *s, i= nt show) static void console_refresh(QemuTextConsole *s) { DisplaySurface *surface =3D qemu_console_surface(QEMU_CONSOLE(s)); + QemuVT100 *vt =3D &s->vt; TextCell *c; int x, y, y1; =20 assert(surface); - s->text_x[0] =3D 0; - s->text_y[0] =3D 0; - s->text_x[1] =3D s->width - 1; - s->text_y[1] =3D s->height - 1; - s->cursor_invalidate =3D 1; + vt->text_x[0] =3D 0; + vt->text_y[0] =3D 0; + vt->text_x[1] =3D vt->width - 1; + vt->text_y[1] =3D vt->height - 1; + vt->cursor_invalidate =3D 1; =20 qemu_console_fill_rect(QEMU_CONSOLE(s), 0, 0, surface_width(surface), = surface_height(surface), color_table_rgb[0][QEMU_COLOR_BLACK]); - y1 =3D s->y_displayed; - for (y =3D 0; y < s->height; y++) { - c =3D s->cells + y1 * s->width; - for (x =3D 0; x < s->width; x++) { + y1 =3D vt->y_displayed; + for (y =3D 0; y < vt->height; y++) { + c =3D vt->cells + y1 * vt->width; + for (x =3D 0; x < vt->width; x++) { vga_putcharxy(QEMU_CONSOLE(s), x, y, c->ch, &(c->t_attrib)); c++; } - if (++y1 =3D=3D s->total_height) { + if (++y1 =3D=3D vt->total_height) { y1 =3D 0; } } @@ -259,28 +266,29 @@ static void console_refresh(QemuTextConsole *s) =20 static void console_scroll(QemuTextConsole *s, int ydelta) { + QemuVT100 *vt =3D &s->vt; int i, y1; =20 if (ydelta > 0) { for(i =3D 0; i < ydelta; i++) { - if (s->y_displayed =3D=3D s->y_base) + if (vt->y_displayed =3D=3D vt->y_base) break; - if (++s->y_displayed =3D=3D s->total_height) - s->y_displayed =3D 0; + if (++vt->y_displayed =3D=3D vt->total_height) + vt->y_displayed =3D 0; } } else { ydelta =3D -ydelta; - i =3D s->backscroll_height; - if (i > s->total_height - s->height) - i =3D s->total_height - s->height; - y1 =3D s->y_base - i; + i =3D vt->backscroll_height; + if (i > vt->total_height - vt->height) + i =3D vt->total_height - vt->height; + y1 =3D vt->y_base - i; if (y1 < 0) - y1 +=3D s->total_height; + y1 +=3D vt->total_height; for(i =3D 0; i < ydelta; i++) { - if (s->y_displayed =3D=3D y1) + if (vt->y_displayed =3D=3D y1) break; - if (--s->y_displayed < 0) - s->y_displayed =3D s->total_height - 1; + if (--vt->y_displayed < 0) + vt->y_displayed =3D vt->total_height - 1; } } console_refresh(s); @@ -306,6 +314,7 @@ static void kbd_send_chars(QemuTextConsole *s) /* called when an ascii key is pressed */ void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) { + QemuVT100 *vt =3D &s->vt; uint8_t buf[16], *q; int c; uint32_t num_free; @@ -338,13 +347,13 @@ void qemu_text_console_handle_keysym(QemuTextConsole = *s, int keysym) *q++ =3D '\033'; *q++ =3D '['; *q++ =3D keysym & 0xff; - } else if (s->echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n')) { + } else if (vt->echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'))= { qemu_chr_write(s->chr, (uint8_t *)"\r", 1, true); *q++ =3D '\n'; } else { *q++ =3D keysym; } - if (s->echo) { + if (vt->echo) { qemu_chr_write(s->chr, buf, q - buf, true); } num_free =3D fifo8_num_free(&s->out_fifo); @@ -357,29 +366,30 @@ void qemu_text_console_handle_keysym(QemuTextConsole = *s, int keysym) static void text_console_update(void *opaque, console_ch_t *chardata) { QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(opaque); + QemuVT100 *vt =3D &s->vt; int i, j, src; =20 - if (s->text_x[0] <=3D s->text_x[1]) { - src =3D (s->y_base + s->text_y[0]) * s->width; - chardata +=3D s->text_y[0] * s->width; - for (i =3D s->text_y[0]; i <=3D s->text_y[1]; i ++) - for (j =3D 0; j < s->width; j++, src++) { + if (vt->text_x[0] <=3D vt->text_x[1]) { + src =3D (vt->y_base + vt->text_y[0]) * vt->width; + chardata +=3D vt->text_y[0] * vt->width; + for (i =3D vt->text_y[0]; i <=3D vt->text_y[1]; i ++) + for (j =3D 0; j < vt->width; j++, src++) { console_write_ch(chardata ++, - ATTR2CHTYPE(s->cells[src].ch, - s->cells[src].t_attrib.fgcol, - s->cells[src].t_attrib.bgcol, - s->cells[src].t_attrib.bold)); + ATTR2CHTYPE(vt->cells[src].ch, + vt->cells[src].t_attrib.fgcol, + vt->cells[src].t_attrib.bgcol, + vt->cells[src].t_attrib.bold)= ); } - dpy_text_update(QEMU_CONSOLE(s), s->text_x[0], s->text_y[0], - s->text_x[1] - s->text_x[0], i - s->text_y[0]); - s->text_x[0] =3D s->width; - s->text_y[0] =3D s->height; - s->text_x[1] =3D 0; - s->text_y[1] =3D 0; + dpy_text_update(QEMU_CONSOLE(s), vt->text_x[0], vt->text_y[0], + vt->text_x[1] - vt->text_x[0], i - vt->text_y[0]); + vt->text_x[0] =3D vt->width; + vt->text_y[0] =3D vt->height; + vt->text_x[1] =3D 0; + vt->text_y[1] =3D 0; } - if (s->cursor_invalidate) { - dpy_text_cursor(QEMU_CONSOLE(s), s->x, s->y); - s->cursor_invalidate =3D 0; + if (vt->cursor_invalidate) { + dpy_text_cursor(QEMU_CONSOLE(s), vt->x, vt->y); + vt->cursor_invalidate =3D 0; } } =20 @@ -393,76 +403,77 @@ static void text_console_resize(QemuTextConsole *t) =20 w =3D surface_width(s->surface) / FONT_WIDTH; h =3D surface_height(s->surface) / FONT_HEIGHT; - if (w =3D=3D t->width && h =3D=3D t->height) { + if (w =3D=3D t->vt.width && h =3D=3D t->vt.height) { return; } =20 - last_width =3D t->width; - t->width =3D w; - t->height =3D h; + last_width =3D t->vt.width; + t->vt.width =3D w; + t->vt.height =3D h; =20 - w1 =3D MIN(t->width, last_width); + w1 =3D MIN(t->vt.width, last_width); =20 - cells =3D g_new(TextCell, t->width * t->total_height + 1); - for (y =3D 0; y < t->total_height; y++) { - c =3D &cells[y * t->width]; + cells =3D g_new(TextCell, t->vt.width * t->vt.total_height + 1); + for (y =3D 0; y < t->vt.total_height; y++) { + c =3D &cells[y * t->vt.width]; if (w1 > 0) { - c1 =3D &t->cells[y * last_width]; + c1 =3D &t->vt.cells[y * last_width]; for (x =3D 0; x < w1; x++) { *c++ =3D *c1++; } } - for (x =3D w1; x < t->width; x++) { + for (x =3D w1; x < t->vt.width; x++) { c->ch =3D ' '; c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; c++; } } - g_free(t->cells); - t->cells =3D cells; + g_free(t->vt.cells); + t->vt.cells =3D cells; } =20 static void vc_put_lf(VCChardev *vc) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; TextCell *c; int x, y1; =20 - s->y++; - if (s->y >=3D s->height) { - s->y =3D s->height - 1; + vt->y++; + if (vt->y >=3D vt->height) { + vt->y =3D vt->height - 1; =20 - if (s->y_displayed =3D=3D s->y_base) { - if (++s->y_displayed =3D=3D s->total_height) - s->y_displayed =3D 0; + if (vt->y_displayed =3D=3D vt->y_base) { + if (++vt->y_displayed =3D=3D vt->total_height) + vt->y_displayed =3D 0; } - if (++s->y_base =3D=3D s->total_height) - s->y_base =3D 0; - if (s->backscroll_height < s->total_height) - s->backscroll_height++; - y1 =3D (s->y_base + s->height - 1) % s->total_height; - c =3D &s->cells[y1 * s->width]; - for(x =3D 0; x < s->width; x++) { + if (++vt->y_base =3D=3D vt->total_height) + vt->y_base =3D 0; + if (vt->backscroll_height < vt->total_height) + vt->backscroll_height++; + y1 =3D (vt->y_base + vt->height - 1) % vt->total_height; + c =3D &vt->cells[y1 * vt->width]; + for(x =3D 0; x < vt->width; x++) { c->ch =3D ' '; c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; c++; } - if (s->y_displayed =3D=3D s->y_base) { - s->text_x[0] =3D 0; - s->text_y[0] =3D 0; - s->text_x[1] =3D s->width - 1; - s->text_y[1] =3D s->height - 1; + if (vt->y_displayed =3D=3D vt->y_base) { + vt->text_x[0] =3D 0; + vt->text_y[0] =3D 0; + vt->text_x[1] =3D vt->width - 1; + vt->text_y[1] =3D vt->height - 1; =20 qemu_console_bitblt(QEMU_CONSOLE(s), 0, FONT_HEIGHT, 0, 0, - s->width * FONT_WIDTH, - (s->height - 1) * FONT_HEIGHT); - qemu_console_fill_rect(QEMU_CONSOLE(s), 0, (s->height - 1) * F= ONT_HEIGHT, - s->width * FONT_WIDTH, FONT_HEIGHT, + vt->width * FONT_WIDTH, + (vt->height - 1) * FONT_HEIGHT); + qemu_console_fill_rect(QEMU_CONSOLE(s), 0, (vt->height - 1) * = FONT_HEIGHT, + vt->width * FONT_WIDTH, FONT_HEIGHT, color_table_rgb[0][TEXT_ATTRIBUTES_DEFA= ULT.bgcol]); - s->update_x0 =3D 0; - s->update_y0 =3D 0; - s->update_x1 =3D s->width * FONT_WIDTH; - s->update_y1 =3D s->height * FONT_HEIGHT; + vt->update_x0 =3D 0; + vt->update_y0 =3D 0; + vt->update_x1 =3D vt->width * FONT_WIDTH; + vt->update_y1 =3D vt->height * FONT_HEIGHT; } } } @@ -567,24 +578,25 @@ static void vc_handle_escape(VCChardev *vc) static void vc_update_xy(VCChardev *vc, int x, int y) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; TextCell *c; int y1, y2; =20 - s->text_x[0] =3D MIN(s->text_x[0], x); - s->text_x[1] =3D MAX(s->text_x[1], x); - s->text_y[0] =3D MIN(s->text_y[0], y); - s->text_y[1] =3D MAX(s->text_y[1], y); + vt->text_x[0] =3D MIN(vt->text_x[0], x); + vt->text_x[1] =3D MAX(vt->text_x[1], x); + vt->text_y[0] =3D MIN(vt->text_y[0], y); + vt->text_y[1] =3D MAX(vt->text_y[1], y); =20 - y1 =3D (s->y_base + y) % s->total_height; - y2 =3D y1 - s->y_displayed; + y1 =3D (vt->y_base + y) % vt->total_height; + y2 =3D y1 - vt->y_displayed; if (y2 < 0) { - y2 +=3D s->total_height; + y2 +=3D vt->total_height; } - if (y2 < s->height) { - if (x >=3D s->width) { - x =3D s->width - 1; + if (y2 < vt->height) { + if (x >=3D vt->width) { + x =3D vt->width - 1; } - c =3D &s->cells[y1 * s->width + x]; + c =3D &vt->cells[y1 * vt->width + x]; vga_putcharxy(QEMU_CONSOLE(s), x, y2, c->ch, &(c->t_attrib)); invalidate_xy(s, x, y2); @@ -594,11 +606,12 @@ static void vc_update_xy(VCChardev *vc, int x, int y) static void vc_clear_xy(VCChardev *vc, int x, int y) { QemuTextConsole *s =3D vc->console; - int y1 =3D (s->y_base + y) % s->total_height; - if (x >=3D s->width) { - x =3D s->width - 1; + QemuVT100 *vt =3D &s->vt; + int y1 =3D (vt->y_base + y) % vt->total_height; + if (x >=3D vt->width) { + x =3D vt->width - 1; } - TextCell *c =3D &s->cells[y1 * s->width + x]; + TextCell *c =3D &vt->cells[y1 * vt->width + x]; c->ch =3D ' '; c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; vc_update_xy(vc, x, y); @@ -647,19 +660,20 @@ static uint32_t bh_utf8_decode(uint32_t *state, uint3= 2_t *codep, uint32_t byte) static void vc_put_one(VCChardev *vc, int ch) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; TextCell *c; int y1; - if (s->x >=3D s->width) { + if (vt->x >=3D vt->width) { /* line wrap */ - s->x =3D 0; + vt->x =3D 0; vc_put_lf(vc); } - y1 =3D (s->y_base + s->y) % s->total_height; - c =3D &s->cells[y1 * s->width + s->x]; + y1 =3D (vt->y_base + vt->y) % vt->total_height; + c =3D &vt->cells[y1 * vt->width + vt->x]; c->ch =3D ch; c->t_attrib =3D vc->t_attrib; - vc_update_xy(vc, s->x, s->y); - s->x++; + vc_update_xy(vc, vt->x, vt->y); + vt->x++; } =20 static void vc_respond_str(VCChardev *vc, const char *buf) @@ -673,6 +687,7 @@ static void vc_respond_str(VCChardev *vc, const char *b= uf) static void vc_set_cursor(VCChardev *vc, int x, int y) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; =20 if (x < 0) { x =3D 0; @@ -680,15 +695,15 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) if (y < 0) { y =3D 0; } - if (y >=3D s->height) { - y =3D s->height - 1; + if (y >=3D vt->height) { + y =3D vt->height - 1; } - if (x >=3D s->width) { - x =3D s->width - 1; + if (x >=3D vt->width) { + x =3D vt->width - 1; } =20 - s->x =3D x; - s->y =3D y; + vt->x =3D x; + vt->y =3D y; } =20 /** @@ -700,6 +715,7 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) static void vc_csi_P(struct VCChardev *vc, unsigned int nr) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; TextCell *c1, *c2; unsigned int x1, x2, y; unsigned int end, len; @@ -707,28 +723,28 @@ static void vc_csi_P(struct VCChardev *vc, unsigned i= nt nr) if (!nr) { nr =3D 1; } - if (nr > s->width - s->x) { - nr =3D s->width - s->x; + if (nr > vt->width - vt->x) { + nr =3D vt->width - vt->x; if (!nr) { return; } } =20 - x1 =3D s->x; - x2 =3D s->x + nr; - len =3D s->width - x2; + x1 =3D vt->x; + x2 =3D vt->x + nr; + len =3D vt->width - x2; if (len) { - y =3D (s->y_base + s->y) % s->total_height; - c1 =3D &s->cells[y * s->width + x1]; - c2 =3D &s->cells[y * s->width + x2]; + y =3D (vt->y_base + vt->y) % vt->total_height; + c1 =3D &vt->cells[y * vt->width + x1]; + c2 =3D &vt->cells[y * vt->width + x2]; memmove(c1, c2, len * sizeof(*c1)); for (end =3D x1 + len; x1 < end; x1++) { - vc_update_xy(vc, x1, s->y); + vc_update_xy(vc, x1, vt->y); } } /* Clear the rest */ - for (; x1 < s->width; x1++) { - vc_clear_xy(vc, x1, s->y); + for (; x1 < vt->width; x1++) { + vc_clear_xy(vc, x1, vt->y); } } =20 @@ -741,6 +757,7 @@ static void vc_csi_P(struct VCChardev *vc, unsigned int= nr) static void vc_csi_at(struct VCChardev *vc, unsigned int nr) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; TextCell *c1, *c2; unsigned int x1, x2, y; unsigned int end, len; @@ -748,28 +765,28 @@ static void vc_csi_at(struct VCChardev *vc, unsigned = int nr) if (!nr) { nr =3D 1; } - if (nr > s->width - s->x) { - nr =3D s->width - s->x; + if (nr > vt->width - vt->x) { + nr =3D vt->width - vt->x; if (!nr) { return; } } =20 - x1 =3D s->x + nr; - x2 =3D s->x; - len =3D s->width - x1; + x1 =3D vt->x + nr; + x2 =3D vt->x; + len =3D vt->width - x1; if (len) { - y =3D (s->y_base + s->y) % s->total_height; - c1 =3D &s->cells[y * s->width + x1]; - c2 =3D &s->cells[y * s->width + x2]; + y =3D (vt->y_base + vt->y) % vt->total_height; + c1 =3D &vt->cells[y * vt->width + x1]; + c2 =3D &vt->cells[y * vt->width + x2]; memmove(c1, c2, len * sizeof(*c1)); for (end =3D x1 + len; x1 < end; x1++) { - vc_update_xy(vc, x1, s->y); + vc_update_xy(vc, x1, vt->y); } } /* Insert blanks */ - for (x1 =3D s->x; x1 < s->x + nr; x1++) { - vc_clear_xy(vc, x1, s->y); + for (x1 =3D vt->x; x1 < vt->x + nr; x1++) { + vc_clear_xy(vc, x1, vt->y); } } =20 @@ -779,9 +796,10 @@ static void vc_csi_at(struct VCChardev *vc, unsigned i= nt nr) static void vc_save_cursor(VCChardev *vc) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; =20 - vc->x_saved =3D s->x; - vc->y_saved =3D s->y; + vc->x_saved =3D vt->x; + vc->y_saved =3D vt->y; vc->t_attrib_saved =3D vc->t_attrib; } =20 @@ -792,15 +810,17 @@ static void vc_save_cursor(VCChardev *vc) static void vc_restore_cursor(VCChardev *vc) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; =20 - s->x =3D vc->x_saved; - s->y =3D vc->y_saved; + vt->x =3D vc->x_saved; + vt->y =3D vc->y_saved; vc->t_attrib =3D vc->t_attrib_saved; } =20 static void vc_putchar(VCChardev *vc, int ch) { QemuTextConsole *s =3D vc->console; + QemuVT100 *vt =3D &s->vt; int i; int x, y; g_autofree char *response =3D NULL; @@ -827,21 +847,21 @@ static void vc_putchar(VCChardev *vc, int ch) vc->utf8_state =3D BH_UTF8_ACCEPT; switch(ch) { case '\r': /* carriage return */ - s->x =3D 0; + vt->x =3D 0; break; case '\n': /* newline */ vc_put_lf(vc); break; case '\b': /* backspace */ - if (s->x > 0) - s->x--; + if (vt->x > 0) + vt->x--; break; case '\t': /* tabspace */ - if (s->x + (8 - (s->x % 8)) > s->width) { - s->x =3D 0; + if (vt->x + (8 - (vt->x % 8)) > vt->width) { + vt->x =3D 0; vc_put_lf(vc); } else { - s->x =3D s->x + (8 - (s->x % 8)); + vt->x =3D vt->x + (8 - (vt->x % 8)); } break; case '\a': /* alert aka. bell */ @@ -909,32 +929,32 @@ static void vc_putchar(VCChardev *vc, int ch) if (vc->esc_params[0] =3D=3D 0) { vc->esc_params[0] =3D 1; } - vc_set_cursor(vc, s->x, s->y - vc->esc_params[0]); + vc_set_cursor(vc, vt->x, vt->y - vc->esc_params[0]); break; case 'B': /* move cursor down */ if (vc->esc_params[0] =3D=3D 0) { vc->esc_params[0] =3D 1; } - vc_set_cursor(vc, s->x, s->y + vc->esc_params[0]); + vc_set_cursor(vc, vt->x, vt->y + vc->esc_params[0]); break; case 'C': /* move cursor right */ if (vc->esc_params[0] =3D=3D 0) { vc->esc_params[0] =3D 1; } - vc_set_cursor(vc, s->x + vc->esc_params[0], s->y); + vc_set_cursor(vc, vt->x + vc->esc_params[0], vt->y); break; case 'D': /* move cursor left */ if (vc->esc_params[0] =3D=3D 0) { vc->esc_params[0] =3D 1; } - vc_set_cursor(vc, s->x - vc->esc_params[0], s->y); + vc_set_cursor(vc, vt->x - vc->esc_params[0], vt->y); break; case 'G': /* move cursor to column */ - vc_set_cursor(vc, vc->esc_params[0] - 1, s->y); + vc_set_cursor(vc, vc->esc_params[0] - 1, vt->y); break; case 'f': case 'H': @@ -945,9 +965,9 @@ static void vc_putchar(VCChardev *vc, int ch) switch (vc->esc_params[0]) { case 0: /* clear to end of screen */ - for (y =3D s->y; y < s->height; y++) { - for (x =3D 0; x < s->width; x++) { - if (y =3D=3D s->y && x < s->x) { + for (y =3D vt->y; y < vt->height; y++) { + for (x =3D 0; x < vt->width; x++) { + if (y =3D=3D vt->y && x < vt->x) { continue; } vc_clear_xy(vc, x, y); @@ -956,9 +976,9 @@ static void vc_putchar(VCChardev *vc, int ch) break; case 1: /* clear from beginning of screen */ - for (y =3D 0; y <=3D s->y; y++) { - for (x =3D 0; x < s->width; x++) { - if (y =3D=3D s->y && x > s->x) { + for (y =3D 0; y <=3D vt->y; y++) { + for (x =3D 0; x < vt->width; x++) { + if (y =3D=3D vt->y && x > vt->x) { break; } vc_clear_xy(vc, x, y); @@ -967,8 +987,8 @@ static void vc_putchar(VCChardev *vc, int ch) break; case 2: /* clear entire screen */ - for (y =3D 0; y < s->height; y++) { - for (x =3D 0; x < s->width; x++) { + for (y =3D 0; y < vt->height; y++) { + for (x =3D 0; x < vt->width; x++) { vc_clear_xy(vc, x, y); } } @@ -979,20 +999,20 @@ static void vc_putchar(VCChardev *vc, int ch) switch (vc->esc_params[0]) { case 0: /* clear to eol */ - for(x =3D s->x; x < s->width; x++) { - vc_clear_xy(vc, x, s->y); + for(x =3D vt->x; x < vt->width; x++) { + vc_clear_xy(vc, x, vt->y); } break; case 1: /* clear from beginning of line */ - for (x =3D 0; x <=3D s->x && x < s->width; x++) { - vc_clear_xy(vc, x, s->y); + for (x =3D 0; x <=3D vt->x && x < vt->width; x++) { + vc_clear_xy(vc, x, vt->y); } break; case 2: /* clear entire line */ - for(x =3D 0; x < s->width; x++) { - vc_clear_xy(vc, x, s->y); + for(x =3D 0; x < vt->width; x++) { + vc_clear_xy(vc, x, vt->y); } break; } @@ -1012,7 +1032,7 @@ static void vc_putchar(VCChardev *vc, int ch) case 6: /* report cursor position */ response =3D g_strdup_printf("\033[%d;%dR", - s->y + 1, s->x + 1); + vt->y + 1, vt->x + 1); vc_respond_str(vc, response); break; } @@ -1063,21 +1083,22 @@ static int vc_chr_write(Chardev *chr, const uint8_t= *buf, int len) { VCChardev *drv =3D VC_CHARDEV(chr); QemuTextConsole *s =3D drv->console; + QemuVT100 *vt =3D &s->vt; int i; =20 - s->update_x0 =3D s->width * FONT_WIDTH; - s->update_y0 =3D s->height * FONT_HEIGHT; - s->update_x1 =3D 0; - s->update_y1 =3D 0; + vt->update_x0 =3D vt->width * FONT_WIDTH; + vt->update_y0 =3D vt->height * FONT_HEIGHT; + vt->update_x1 =3D 0; + vt->update_y1 =3D 0; console_show_cursor(s, 0); for(i =3D 0; i < len; i++) { vc_putchar(drv, buf[i]); } console_show_cursor(s, 1); - if (s->update_x0 < s->update_x1) { - dpy_gfx_update(QEMU_CONSOLE(s), s->update_x0, s->update_y0, - s->update_x1 - s->update_x0, - s->update_y1 - s->update_y0); + if (vt->update_x0 < vt->update_x1) { + dpy_gfx_update(QEMU_CONSOLE(s), vt->update_x0, vt->update_y0, + vt->update_x1 - vt->update_x0, + vt->update_y1 - vt->update_y0); } return len; } @@ -1136,7 +1157,7 @@ qemu_text_console_init(Object *obj) QemuTextConsole *c =3D QEMU_TEXT_CONSOLE(obj); =20 fifo8_create(&c->out_fifo, 16); - c->total_height =3D DEFAULT_BACKSCROLL; + c->vt.total_height =3D DEFAULT_BACKSCROLL; QEMU_CONSOLE(c)->hw_ops =3D &text_console_ops; QEMU_CONSOLE(c)->hw =3D c; } @@ -1167,12 +1188,12 @@ static void vc_chr_set_echo(Chardev *chr, bool echo) { VCChardev *drv =3D VC_CHARDEV(chr); =20 - drv->console->echo =3D echo; + drv->console->vt.echo =3D echo; } =20 void qemu_text_console_update_size(QemuTextConsole *c) { - dpy_text_resize(QEMU_CONSOLE(c), c->width, c->height); + dpy_text_resize(QEMU_CONSOLE(c), c->vt.width, c->vt.height); } =20 static bool vc_chr_open(Chardev *chr, ChardevBackend *backend, Error **err= p) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848855; cv=none; d=zohomail.com; s=zohoarc; b=Yq7tvQmumyLWMSUHpU5W+1JVgCBMSCb8bgfQSEekbdJcodu7bZ1B9zeVk/gjD6NnHFi+lkwc9j/q8O7iMNvpAMUR7vHqGH2h5pN87WTATAfloOxUeZXC+kTP5YiAwgSyMxUZJWjRoir0vdnyns8oc7yBXCt7QK6uNgpYR2F1v0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848855; 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=f95ATmdiY5d94eUC7k7kUvpTiBIL3Lv55v1kPJaIGF4=; b=OXclhkc8/WDZTQNlmhfRdFknUEjjWubc163TXX9MjOdZs34ElWLRDeF8CXw05TatG9Z2fUGVGiPfr2M3DjjJCrjUB5n7e6cRhB+iG4mNiaCpRFX2+9D523wCPtJyCfmU1DnKh49C48iIWJmiJpQt7aJbxbvJvcKHkylC4pyBBCo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848855328247.92776356178172; Fri, 10 Apr 2026 12:20:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPE-0004zk-5Z; Fri, 10 Apr 2026 15:20:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOy-0004jP-Qe for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHOx-000189-2N for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:24 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-673-WOBWvqk7NlqgHBfxx0W9aQ-1; Fri, 10 Apr 2026 15:20:21 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 497361800345; Fri, 10 Apr 2026 19:20:20 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1427D180049F; Fri, 10 Apr 2026 19:20:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848822; 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=f95ATmdiY5d94eUC7k7kUvpTiBIL3Lv55v1kPJaIGF4=; b=YNrsQqX62UbvljsJx/WgIXnP3vcllvgU9TiyHRsiYFVQNcoYYVgFbKyvUmF6xB2GEVd1HA 9Ueq+L/v+EmcPX8FT/levG2oL/cw6xgA19Gg3csd1BnXqkJq/marJsAmrM5Pi1lLKuLj0r ag7NFbeca8pg+MarTRa1RND8BttI3/g= X-MC-Unique: WOBWvqk7NlqgHBfxx0W9aQ-1 X-Mimecast-MFC-AGG-ID: WOBWvqk7NlqgHBfxx0W9aQ_1775848820 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:36 +0400 Subject: [PATCH v2 14/67] ui/console-vc: set vt100 associated pixman image MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-14-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=6225; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Baw5rMs8bwBjzgkFxZfs9rC3Qi9crFdvgPbcJYPkFdA=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UiLQ1zmqXqirOk/DEQHM5sO+/yxLCRvOAn TrGhwD62NyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5SLDD/4y+k5xRbncqE5dUmjnNcGuf4ikWb1TZEM6+fmKPBOfgQYPLS/0Bm3lbKwYOC3mGLkt0K9 vp6kIOvdDzozBUzINWrrMnjaro5pMcmkCaTUYbNq79x0gJ58Uzcyxd65xH0SIDfUbDxVyalAeFj tJUTB/4L6Oeq8c969Aa6bOchCtcsKPxdQ58R7MDjQ1jBTnZB/ig5EHi2eQTjKAhXE7o6fLG3N5Q ztJwqfusyd1pejBsPzPIoPRvNOErPhFWvIwIgvZTKmBX5wGkfCh9xWd0q1N/qbHrtMhqeUsroCQ xIKlRyYkUJ0g5jrZYUQBHquE15rkcx3g+77++tERVwJGTzPBkOlPlippATI8oTASv5bUhds9vGv kswdu6zKwtzdkyOMbsn71JdpXVL0nmEIAD64JAOR7V6GyGTzErXuS9vDc6bqBIA106oOO+nGKva z+lvGk35LV49TeAMwbLsKkONwMkO93nsNo6o3E3ur7hcRBnOGQPhdoB+SvZ82cMkBsh2qPBAixi aVIYUq4mghHE1PX+jLQsT7cKjAil+mzw//+kh0uqgMhaHDABZFkkujHBFIXZUUFsXrQlr1A1eAl d1aPYEkI+6IRzww0FjqMR5HNkoohmPZIP+wH5Zw99UfxpX3NaZGVPf7nua4ceuvTNwmv/dEDEJC abYWqFPC0vGOYHQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848856341154100 Start removing dependency on DisplaySurface for vt100 handling. Note that before, the rendering is done on the current DisplaySurface. It's not obvious the QemuTextConsole associated surface isn't changed over time, in particular if it was doing resize. But qemu_console_resize() is only implemented for QemuGraphicConsole. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 54 +++++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index cc061dff769..267620689e4 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -49,6 +49,8 @@ enum TTYState { }; =20 typedef struct QemuVT100 { + pixman_image_t *image; + int width; int height; int total_height; @@ -136,28 +138,22 @@ qemu_text_console_get_label(QemuConsole *c) return tc->chr ? g_strdup(tc->chr->label) : NULL; } =20 -static void qemu_console_fill_rect(QemuConsole *con, int posx, int posy, - int width, int height, pixman_color_t c= olor) +static void image_fill_rect(pixman_image_t *image, int posx, int posy, + int width, int height, pixman_color_t color) { - DisplaySurface *surface =3D qemu_console_surface(con); pixman_rectangle16_t rect =3D { .x =3D posx, .y =3D posy, .width =3D width, .height =3D height }; =20 - assert(surface); - pixman_image_fill_rectangles(PIXMAN_OP_SRC, surface->image, - &color, 1, &rect); + pixman_image_fill_rectangles(PIXMAN_OP_SRC, image, &color, 1, &rect); } =20 /* copy from (xs, ys) to (xd, yd) a rectangle of size (w, h) */ -static void qemu_console_bitblt(QemuConsole *con, - int xs, int ys, int xd, int yd, int w, int= h) +static void image_bitblt(pixman_image_t *image, + int xs, int ys, int xd, int yd, int w, int h) { - DisplaySurface *surface =3D qemu_console_surface(con); - - assert(surface); pixman_image_composite(PIXMAN_OP_SRC, - surface->image, NULL, surface->image, + image, NULL, image, xs, ys, 0, 0, xd, yd, w, h); } =20 @@ -165,10 +161,10 @@ static void vga_putcharxy(QemuConsole *s, int x, int = y, int ch, TextAttributes *t_attrib) { static pixman_image_t *glyphs[256]; - DisplaySurface *surface =3D qemu_console_surface(s); + pixman_image_t *image =3D QEMU_TEXT_CONSOLE(s)->vt.image; pixman_color_t fgcol, bgcol; =20 - assert(surface); + assert(image); if (t_attrib->invers) { bgcol =3D color_table_rgb[t_attrib->bold][t_attrib->fgcol]; fgcol =3D color_table_rgb[t_attrib->bold][t_attrib->bgcol]; @@ -180,7 +176,7 @@ static void vga_putcharxy(QemuConsole *s, int x, int y,= int ch, if (!glyphs[ch]) { glyphs[ch] =3D qemu_pixman_glyph_from_vgafont(FONT_HEIGHT, vgafont= 16, ch); } - qemu_pixman_glyph_render(glyphs[ch], surface->image, + qemu_pixman_glyph_render(glyphs[ch], image, &fgcol, &bgcol, x, y, FONT_WIDTH, FONT_HEIGHT= ); } =20 @@ -233,20 +229,20 @@ static void console_show_cursor(QemuTextConsole *s, i= nt show) =20 static void console_refresh(QemuTextConsole *s) { - DisplaySurface *surface =3D qemu_console_surface(QEMU_CONSOLE(s)); QemuVT100 *vt =3D &s->vt; TextCell *c; int x, y, y1; + int w =3D pixman_image_get_width(vt->image); + int h =3D pixman_image_get_height(vt->image); =20 - assert(surface); vt->text_x[0] =3D 0; vt->text_y[0] =3D 0; vt->text_x[1] =3D vt->width - 1; vt->text_y[1] =3D vt->height - 1; vt->cursor_invalidate =3D 1; =20 - qemu_console_fill_rect(QEMU_CONSOLE(s), 0, 0, surface_width(surface), = surface_height(surface), - color_table_rgb[0][QEMU_COLOR_BLACK]); + image_fill_rect(vt->image, 0, 0, w, h, + color_table_rgb[0][QEMU_COLOR_BLACK]); y1 =3D vt->y_displayed; for (y =3D 0; y < vt->height; y++) { c =3D vt->cells + y1 * vt->width; @@ -260,8 +256,7 @@ static void console_refresh(QemuTextConsole *s) } } console_show_cursor(s, 1); - dpy_gfx_update(QEMU_CONSOLE(s), 0, 0, - surface_width(surface), surface_height(surface)); + dpy_gfx_update(QEMU_CONSOLE(s), 0, 0, w, h); } =20 static void console_scroll(QemuTextConsole *s, int ydelta) @@ -401,8 +396,9 @@ static void text_console_resize(QemuTextConsole *t) =20 assert(s->scanout.kind =3D=3D SCANOUT_SURFACE); =20 - w =3D surface_width(s->surface) / FONT_WIDTH; - h =3D surface_height(s->surface) / FONT_HEIGHT; + t->vt.image =3D s->surface->image; + w =3D pixman_image_get_width(t->vt.image) / FONT_WIDTH; + h =3D pixman_image_get_height(t->vt.image) / FONT_HEIGHT; if (w =3D=3D t->vt.width && h =3D=3D t->vt.height) { return; } @@ -464,12 +460,12 @@ static void vc_put_lf(VCChardev *vc) vt->text_x[1] =3D vt->width - 1; vt->text_y[1] =3D vt->height - 1; =20 - qemu_console_bitblt(QEMU_CONSOLE(s), 0, FONT_HEIGHT, 0, 0, - vt->width * FONT_WIDTH, - (vt->height - 1) * FONT_HEIGHT); - qemu_console_fill_rect(QEMU_CONSOLE(s), 0, (vt->height - 1) * = FONT_HEIGHT, - vt->width * FONT_WIDTH, FONT_HEIGHT, - color_table_rgb[0][TEXT_ATTRIBUTES_DEFA= ULT.bgcol]); + image_bitblt(vt->image, 0, FONT_HEIGHT, 0, 0, + vt->width * FONT_WIDTH, + (vt->height - 1) * FONT_HEIGHT); + image_fill_rect(vt->image, 0, (vt->height - 1) * FONT_HEIGHT, + vt->width * FONT_WIDTH, FONT_HEIGHT, + color_table_rgb[0][TEXT_ATTRIBUTES_DEFAULT.bgc= ol]); vt->update_x0 =3D 0; vt->update_y0 =3D 0; vt->update_x1 =3D vt->width * FONT_WIDTH; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848895; cv=none; d=zohomail.com; s=zohoarc; b=Q1Ip6UpWvr3cmbUDwrCX/O268V5VfGBqy1ZO3hrPkahbQE5ZZn+lADKmUhsWrNM87MA+JKNS5Qe6w8NwXIjmCWuPKUZgBuTtU9Jc4uDpOb5z0mJlIPwdVSMt0qVtl5t8zmNAuvK5W/l81pDoCyr2AmShROOpnb5rHUysByLGrik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848895; 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=lcRo5CAEdOjBKNJZHbtN+cZpcnk/HQwcXTjPRUQ1/pE=; b=caGZSN/d+AA4yaXOnrmtxj4K4LzQCWXFhHYhdvfEE5PBJf6odJVAG4yxgDl1iGISlYluL2sMGzAC+9qV2IzyqwrgqRnAgWMpLhh6eeH1CD0EbKDiFnRD71RVclsrEFjmt4oDfV+XdykPDp/TezZfU4aYTcEq/yo6lHXX1fzsAlg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848895405885.613394349191; Fri, 10 Apr 2026 12:21:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPj-0005kd-42; Fri, 10 Apr 2026 15:21:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHP4-0004wW-Qg for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHP2-00019S-Ou for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:30 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-678-Ircw8FBgMVyrEHqCKOJBww-1; Fri, 10 Apr 2026 15:20:26 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E9458180034C; Fri, 10 Apr 2026 19:20:25 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B64BC3000C16; Fri, 10 Apr 2026 19:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848828; 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=lcRo5CAEdOjBKNJZHbtN+cZpcnk/HQwcXTjPRUQ1/pE=; b=emplc0/zuznbgyJHuNRmOe/AhXJbT3wiO+fgZtliqOVBRVFlunnArLryPE4cqIb7MBc6pT NdmQ6QWWFjLLUMh+umh9Yk6YNDQTKN9SixVnJoCRyHWqjMo96n79Z8GZcA3C4/VPzv4N8K c7yJfr0LyFypEZJmt9d/UoZl9+dZywE= X-MC-Unique: Ircw8FBgMVyrEHqCKOJBww-1 X-Mimecast-MFC-AGG-ID: Ircw8FBgMVyrEHqCKOJBww_1775848826 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:37 +0400 Subject: [PATCH v2 15/67] ui/console-vc: vga_putcharxy()->vt100_putcharxy() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-15-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=3119; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=dJnrgMgCNfQEna7bGX8u4UyoRqB7oR/YhWc7dLzoiB4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0U0QucN7JfDEej9Oa6Ra67Dz528AdEQkzoP 6fwa/KloHaJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5d+FD/wOXk0on7NYopkFwW/T1dRMhCfcIPrj+PQzJwe+Ar/FUfGPqagBjjPV8XoTUKybukUbOhY btgJo6jaa5ul+TAJTcCm4azYNEbO2M/ho8jyVslmNtst3275gaYT6ohhpaaNoHR3fQgdteIX6Ra gKBRtE7gHLqWLctuC7aOL7iuARmQLeOYBy59syc1oyH4IATTr3B4TrzHW2wEoPsvoD4OPQlKqyg 5HwSRFvmH6AcsuGoiM8wzHF5Cbzpn7M7bZ5X4NF32gxvhvRAOLQfOC20JxvE3s4DwG2e2pCMQsW xMiCNJlUFxjkcLtsdpN2Q82QDbpoM1IerKISAdtZb2Ebf+yl62rP0UP7qD9vXLTTghYjPw+boOH i2IcywMTUEKUq4UYJ+8NgPoqsl43PqrOaab9Gx3qsLywa+qUDXx3+txhE5sbfwBk83liNb+9Thx HoJomGd/Vd2Q/PvMnyxJ1IImCD28O/cP7/24z5qXQltmUYaBM8furmxbQWNmWiwBw/flBHQKogd o42F2t6BUNxFYM0Koplzh870VvgRxRau7dsebvUWCcE5letdFmvTfN/JDNGbb7PVQCbSElL7hMZ 3lHZdQPkGITAvj42TskUhBC5U/fJTLS7OcaNjbC81F3zI3J0mmFC3uRH8LgPO00NcLxyRMvVVJX yFZeIbNesPeog/w== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848896887154100 Have the character rendering function operate on QemuVT100 directly instead of taking a QemuConsole and extracting the VT100 state internally. This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 267620689e4..cf087c64fb2 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -157,14 +157,13 @@ static void image_bitblt(pixman_image_t *image, xs, ys, 0, 0, xd, yd, w, h); } =20 -static void vga_putcharxy(QemuConsole *s, int x, int y, int ch, - TextAttributes *t_attrib) +static void vt100_putcharxy(QemuVT100 *vt, int x, int y, int ch, + TextAttributes *t_attrib) { static pixman_image_t *glyphs[256]; - pixman_image_t *image =3D QEMU_TEXT_CONSOLE(s)->vt.image; pixman_color_t fgcol, bgcol; =20 - assert(image); + assert(vt->image); if (t_attrib->invers) { bgcol =3D color_table_rgb[t_attrib->bold][t_attrib->fgcol]; fgcol =3D color_table_rgb[t_attrib->bold][t_attrib->bgcol]; @@ -176,7 +175,7 @@ static void vga_putcharxy(QemuConsole *s, int x, int y,= int ch, if (!glyphs[ch]) { glyphs[ch] =3D qemu_pixman_glyph_from_vgafont(FONT_HEIGHT, vgafont= 16, ch); } - qemu_pixman_glyph_render(glyphs[ch], image, + qemu_pixman_glyph_render(glyphs[ch], vt->image, &fgcol, &bgcol, x, y, FONT_WIDTH, FONT_HEIGHT= ); } =20 @@ -219,9 +218,9 @@ static void console_show_cursor(QemuTextConsole *s, int= show) if (show && cursor_visible_phase) { TextAttributes t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; t_attrib.invers =3D !(t_attrib.invers); /* invert fg and bg */ - vga_putcharxy(QEMU_CONSOLE(s), x, y, c->ch, &t_attrib); + vt100_putcharxy(&s->vt, x, y, c->ch, &t_attrib); } else { - vga_putcharxy(QEMU_CONSOLE(s), x, y, c->ch, &(c->t_attrib)); + vt100_putcharxy(&s->vt, x, y, c->ch, &(c->t_attrib)); } invalidate_xy(s, x, y); } @@ -247,7 +246,7 @@ static void console_refresh(QemuTextConsole *s) for (y =3D 0; y < vt->height; y++) { c =3D vt->cells + y1 * vt->width; for (x =3D 0; x < vt->width; x++) { - vga_putcharxy(QEMU_CONSOLE(s), x, y, c->ch, + vt100_putcharxy(vt, x, y, c->ch, &(c->t_attrib)); c++; } @@ -593,7 +592,7 @@ static void vc_update_xy(VCChardev *vc, int x, int y) x =3D vt->width - 1; } c =3D &vt->cells[y1 * vt->width + x]; - vga_putcharxy(QEMU_CONSOLE(s), x, y2, c->ch, + vt100_putcharxy(vt, x, y2, c->ch, &(c->t_attrib)); invalidate_xy(s, x, y2); } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848877; cv=none; d=zohomail.com; s=zohoarc; b=cOQxRUqLsD1aK5qAAPF3bpw8XDvTvelxNLiAZTcu+bdlbv7sPxevPkQY5OvuEavho6WUmy2YscW7SPf73GtUsjNQeRm0qu0s6oofn2cxMIpa9/wXfZQ7HvVnaNqZ98rgPfpIDcZYR4+o/FzODUaxDx3QwOYhqNfGF3iEiSIA3/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848877; 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=8Zn7scE4lRCbc2GAfCsAVHlUaaYW/OSWPb6ggmWUO1c=; b=anU01W2IGG7x+dtgmNRbkFriX1uX3oGGEyY2SYjOr7kAI9PCeaIRurzxZdxBwGxiPnju6avvuFKOUXRuNbAHI1MsLIydYiVXszAaiiT4c58B7u9/8ez+HW717J5TxbK3i1hL5gzvBKObKDoO2RYmS2coW5x0fwHe9Sx+ekQLGzM= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848877502889.3334537743373; Fri, 10 Apr 2026 12:21:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPk-000613-F5; Fri, 10 Apr 2026 15:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPE-00051f-37 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPB-0001Aq-Jt for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:39 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-315-0Y_XP9TWOxqWfo6igi5P8Q-1; Fri, 10 Apr 2026 15:20:33 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 252BE180057A; Fri, 10 Apr 2026 19:20:32 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0053A180049F; Fri, 10 Apr 2026 19:20:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848836; 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=8Zn7scE4lRCbc2GAfCsAVHlUaaYW/OSWPb6ggmWUO1c=; b=ay3qL9Ko4/HQkmFF6coWUtig9OO7aGnGhW+MoS/tFHUlHe3WqSZXKKzA9abhRFoimKgxn+ gUM2ZztM+uJGRa6Ujx3C5a2Jq8Ec8wtKZIq76v+pXkAnG+D1ntFU7VU/vUhsKmCvyujq9j 72z4KDzg6nifSy+efXLlyPg+RAkG0/A= X-MC-Unique: 0Y_XP9TWOxqWfo6igi5P8Q-1 X-Mimecast-MFC-AGG-ID: 0Y_XP9TWOxqWfo6igi5P8Q_1775848832 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:38 +0400 Subject: [PATCH v2 16/67] ui/console-vc: make invalidate_xy() take vt100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-16-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2178; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=jvcgWFNlKqlrN3nVcfOXq9ZC2/xDMncef+UtF1pVUuQ=; b=owEBbAKT/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0U4AM+QDPfGOpu9rVejfoMBydoLI85vdCIg fuurh5dRjGJAjIEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5eReD/jh99E1jBIhmZFu6EH1u+gN9rCYVbQAt93K5FTBe7UKKtuE2lJOx7Zx3yBTCn6uBLDy3hu qLNmKbr2mzrS2vRRhH4INv0EV3fKYfwn7ilJwbo1DJQkBZH1ouJi66Jiyd39xQc8c+XPvaJA9S4 EZmoKoRzGULXNcPxuZ6ORdbSdgqraPZ0f1Bk9vp2VvZo6JvIgl2QyCInPrlZ3JxUplY6UB3CbPS XE2L4+p7SFkLDelLMSi1NUBdhF8I+yoYghSvbw7Dz0bo2OpqK4tOBPEFHj1pK1ZnDEpFaE55H1m xxeACkHmh54H2zPVB4VmNT+P/LIiQctndp8uCwEo9FJxWzb3FFcRizddWWb/CXiQFGPDs+yrPMZ fU1wet6DRPEErB6lsBxepWHOIhE+c//oIkfyOIuIV47GG3KVpCov0GQCN/s0OoAJ/fYVOcbG9tP IRAVdQwTnOSoPB/EAkTIqTtiMtGEb5UmR2p1cIk7RjmETaccdAHJeRGwp5pLTLqfaDsQ5ypoumw hjui2QJUBPNFfmcksDAAZRE1N7KT4w3MBK3I2iP+rIg8ZhbUWKNl+7DrE3m+t4BvjfjaTOfEjwL mMnwWkWQzj6f1j1YZxj6E1tYIJTFPMIlb/kRx0bPdtF77VPgA9PHY1xH/cb/Jj0foZa0IjdYEby 5dRdKfZWbP3x4 X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848878499154100 This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Style fixes. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index cf087c64fb2..9566ce592f2 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -179,21 +179,20 @@ static void vt100_putcharxy(QemuVT100 *vt, int x, int= y, int ch, &fgcol, &bgcol, x, y, FONT_WIDTH, FONT_HEIGHT= ); } =20 -static void invalidate_xy(QemuTextConsole *s, int x, int y) +static void vt100_invalidate_xy(QemuVT100 *vt, int x, int y) { - QemuVT100 *vt =3D &s->vt; - - if (!qemu_console_is_visible(QEMU_CONSOLE(s))) { - return; - } - if (vt->update_x0 > x * FONT_WIDTH) + if (vt->update_x0 > x * FONT_WIDTH) { vt->update_x0 =3D x * FONT_WIDTH; - if (vt->update_y0 > y * FONT_HEIGHT) + } + if (vt->update_y0 > y * FONT_HEIGHT) { vt->update_y0 =3D y * FONT_HEIGHT; - if (vt->update_x1 < (x + 1) * FONT_WIDTH) + } + if (vt->update_x1 < (x + 1) * FONT_WIDTH) { vt->update_x1 =3D (x + 1) * FONT_WIDTH; - if (vt->update_y1 < (y + 1) * FONT_HEIGHT) + } + if (vt->update_y1 < (y + 1) * FONT_HEIGHT) { vt->update_y1 =3D (y + 1) * FONT_HEIGHT; + } } =20 static void console_show_cursor(QemuTextConsole *s, int show) @@ -222,7 +221,7 @@ static void console_show_cursor(QemuTextConsole *s, int= show) } else { vt100_putcharxy(&s->vt, x, y, c->ch, &(c->t_attrib)); } - invalidate_xy(s, x, y); + vt100_invalidate_xy(&s->vt, x, y); } } =20 @@ -594,7 +593,7 @@ static void vc_update_xy(VCChardev *vc, int x, int y) c =3D &vt->cells[y1 * vt->width + x]; vt100_putcharxy(vt, x, y2, c->ch, &(c->t_attrib)); - invalidate_xy(s, x, y2); + vt100_invalidate_xy(&s->vt, x, y2); } } =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848910; cv=none; d=zohomail.com; s=zohoarc; b=b/G5DqfAYe4+kO2IL9uc83FNTthHdTDYmuFKVEtmbd6gPi7FGgTf+Np1MTTfAFIKloOo9b2Lszjhy5ujJb3fRFq/GooiO1XNVpGL9WtLX7mgyj9pI1PZuKHoN8EKoU38DOQYPeRx6vVoF1l3+IccOE9ZQi/mX9jdvKbJn8tkJpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848910; 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=wzw0Q7jMhFS0CoqoqexwKXYGuuONVk8KgOpTU6X44uM=; b=muEckZ9jQTLn0+s1kqWRSxHWAkC7grd1AogYoXrqC47YI9jRP6AjAALlHBdIJij1vVs9DHP4RP87DKOQ3l3iCFLvAtnuF3fv0sCvh0Wq2/SAC3obEEXpocEXKCkDYV5+jgP8d+BDaBNumbOtVK68qXdhRifmNErhwuoaRBGo9Vo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848910819209.15372781496194; Fri, 10 Apr 2026 12:21:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPl-0006CA-F5; Fri, 10 Apr 2026 15:21:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPJ-00059V-8H for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPH-0001Dw-6k for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:44 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-597-Ub6Cv9fSM9-U5Yzm9hE_iw-1; Fri, 10 Apr 2026 15:20:38 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EF328180034C; Fri, 10 Apr 2026 19:20:37 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D049D195608E; Fri, 10 Apr 2026 19:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848840; 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=wzw0Q7jMhFS0CoqoqexwKXYGuuONVk8KgOpTU6X44uM=; b=ghtcvanhfLeFMsADe2qeAp6wOQMFQVXeZDYlQO0BILXAqrFiSNkZgq76toWSwXfIYOf8+y gNILu+9QlSrKTMjNh8Omm5lqS6tC5InMjAxvIOACqQHwhHRoOy0pQAViAv7KwybdnRLYkU o+eLwC/uV0g8yT03ohoak82bNHVzFjs= X-MC-Unique: Ub6Cv9fSM9-U5Yzm9hE_iw-1 X-Mimecast-MFC-AGG-ID: Ub6Cv9fSM9-U5Yzm9hE_iw_1775848838 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:39 +0400 Subject: [PATCH v2 17/67] ui/console-vc: make show_cursor() take vt100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-17-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2266; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=+MJMtm41zBshumDQWeZwFchRZmla0eMFHyqBboYlYwo=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UGQCSmj+OldGGyA9i77jQ878tmP6Pc3ITH pLbwbHSHAKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5SqgD/97+RkVyBjeuglfl75mfumZ/yZm/7dbuf5OqVEMor3dKFyhAXcIQslj/EgOWtvVnAd0JX8 EyvjnrzZJUiXvzYtWxxBoLbghl+8AWH+sFYiYKJrJscypzZWaE2BwLliSUC8JQEKheko2VmEu14 AuvZjYaXhQz36Bu+qT3CJ2/RB/5px4CmZq6ICx9WhEkeuBYRS4TbK0zGfCXO2WrxZ7QychQ9B9+ d1t8lpcgFMJYkuJpLII79Nqf4TTlInjAPUY5C9Y2BmWtu/0kvhdk8nV/8pr9L/Y7rDR+ZWLyu0/ uCNNQ3G0L8jxe1RTlp0+eIvw0RJQ6lAMbCKgW7k2Y5k8RA30lX7DMrnBj04CSSgB/ztFRvr1VXh lKlmdlt23UJUzQCo+fX1AangdmUh84Dj7va9Jc3DGiu07M9/azFeRT2eto9wC0NigM7OXwSo/VQ qMD140wKNGBh5SdMInIXKcE3lTjsKqyO3WLNYRca90L+xspW5w2AKqtdf0/vWx+cLzwKwVZwgcu u69+GQwFpcaUruWEetts7SYrS1XPP9kQBc8NWdYu7XZJDhAGm4NNyqDGELnQl5SnV+MIFLRjLy1 lcWT0GUJjtHWrHvHjPiXGrzYuCDojFL1Ca909yx+ZA7De1AxgOOcG4hiciF/Xmsi9cYQY7c/o60 ZKnmYjATFXsRcqw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848911370158500 Decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 9566ce592f2..61d72a0cc27 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -195,9 +195,8 @@ static void vt100_invalidate_xy(QemuVT100 *vt, int x, i= nt y) } } =20 -static void console_show_cursor(QemuTextConsole *s, int show) +static void vt100_show_cursor(QemuVT100 *vt, int show) { - QemuVT100 *vt =3D &s->vt; TextCell *c; int y, y1; int x =3D vt->x; @@ -217,11 +216,11 @@ static void console_show_cursor(QemuTextConsole *s, i= nt show) if (show && cursor_visible_phase) { TextAttributes t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; t_attrib.invers =3D !(t_attrib.invers); /* invert fg and bg */ - vt100_putcharxy(&s->vt, x, y, c->ch, &t_attrib); + vt100_putcharxy(vt, x, y, c->ch, &t_attrib); } else { - vt100_putcharxy(&s->vt, x, y, c->ch, &(c->t_attrib)); + vt100_putcharxy(vt, x, y, c->ch, &(c->t_attrib)); } - vt100_invalidate_xy(&s->vt, x, y); + vt100_invalidate_xy(vt, x, y); } } =20 @@ -253,7 +252,7 @@ static void console_refresh(QemuTextConsole *s) y1 =3D 0; } } - console_show_cursor(s, 1); + vt100_show_cursor(&s->vt, 1); dpy_gfx_update(QEMU_CONSOLE(s), 0, 0, w, h); } =20 @@ -1084,11 +1083,11 @@ static int vc_chr_write(Chardev *chr, const uint8_t= *buf, int len) vt->update_y0 =3D vt->height * FONT_HEIGHT; vt->update_x1 =3D 0; vt->update_y1 =3D 0; - console_show_cursor(s, 0); + vt100_show_cursor(vt, 0); for(i =3D 0; i < len; i++) { vc_putchar(drv, buf[i]); } - console_show_cursor(s, 1); + vt100_show_cursor(vt, 1); if (vt->update_x0 < vt->update_x1) { dpy_gfx_update(QEMU_CONSOLE(s), vt->update_x0, vt->update_y0, vt->update_x1 - vt->update_x0, --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848910; cv=none; d=zohomail.com; s=zohoarc; b=aEjkBv0EvAS6KuQDvOixkX403iV0z0kAgnBM1jecMAi8WyzNqgDGE/4gnOgegkyIbZv5ppVvl7z0snUVwiG4YiCgt/2+WQq/rXtADVd64y4S2sDbCMYQD08CeKJ5K1vMCbZgVpYTIavPX5w59w39ST3iuIvBLtmLoeSxVOseriI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848910; 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=xHwaCg3VfefxTP+gUSxcezpwPgnHezvTvMyyDg7E+NE=; b=C5Xy+kRR1rrh/Bpif09xOKYwbIt9unm6K/4Y8J04jQkIVFKkH1dJF79FWW8qPfYbowk8Cr6As7xnINlToFDhT8Gc/srGAbcmm+efUOggGhRdwAuSbJijtOFEl59M14+lNGcCZEAvpwd7xKyf9NxZSC2D+BBsZXPSYKa3j0aihUA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848910391309.70618452637984; Fri, 10 Apr 2026 12:21:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPn-0006Yf-QE; Fri, 10 Apr 2026 15:21:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPS-0005JW-NO for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPM-0001NX-QJ for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:51 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-8r7Ehv1xPeCWPV1XShcxyw-1; Fri, 10 Apr 2026 15:20:44 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D668218002CA; Fri, 10 Apr 2026 19:20:43 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 652EA1800357; Fri, 10 Apr 2026 19:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848848; 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=xHwaCg3VfefxTP+gUSxcezpwPgnHezvTvMyyDg7E+NE=; b=ebkM14KdgtSl9OTJw/jnUAb9zxVZHGfh7vQLdwrVgw3H/359n8Y4xF0sKKZ/ePLufexRc6 Ls8ROD8NkrPDP++hXjqPsR7Pgp9sS/ZwDkc4yAZJnCxDYh2BH31ZLLjiPUXzf91DsThMbr I3ZVS99WI+4MF3tk3a//uwNWyzhvdq4= X-MC-Unique: 8r7Ehv1xPeCWPV1XShcxyw-1 X-Mimecast-MFC-AGG-ID: 8r7Ehv1xPeCWPV1XShcxyw_1775848843 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:40 +0400 Subject: [PATCH v2 18/67] ui/console-vc: decouple VT100 display updates via function pointer MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-18-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=3323; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=zv3j1wO3naVlcsBKGmflvlEq7Rd0dCKKbluzj0h8VNQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0U38SUjK/LioQPmHvhEsjq34cn48mh6eqhE k3oTmUhqUSJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5f3iEACrnIuErEdrjXBI6dY7Eu0yE5Tf15dOrdUP7KAMDYRqqkjicKQ638CEgu7mjTPLCozYot+ nx3WCtGMoynVpUpvPPZdHAml+Pbg/NOswLbPRJ35/ALOzE71ojvvDMYxv+aIvSmTIa0FAk/X/eE P3+KnDKBw6IVOD+HT6tcWchPmOQX45hGWTMPM6nXhNMzL4lle/LIBKCOM614J0h/vgSUi9vmo1g 9q5+AiUyudLNSynQqEPwCzCI203XczLImoctkO/398QnkwyJ7k3KOLY+bhfoUjpaxxzdJ2oedBP SS70MWQhV9mhiUpAY78ZIEirx3r2iQid0qP8Jc9lrhwNvVJJ9T9JxjVrIK9q9/O5F88xzKgiocj A8uq5auEDJhLblYL321vB8URl6jDq5rGgbM8W7M0OhUc7bo2uaWgFh9kkZMwXrhYGf7Wg1lSMWg lPwa0PqE3osTkX/1XQzrtiwuxhsVGUP5yFTm5Vif4hrv7Xefgev6Sx2G6filCT6lbfSok/xuc77 V1NSsXe2gCVfrX/KguUxE509Ms64QX2yClD6y4WIGKHBe5z53RDuN2eyq3odq+GipnpU5EOn6OE Wb/O/PKF+Ffc8LcItAN1TzqRm+L0bri8d2yNOJtEKyIP1hL0wY6MwEXh3SLj8o+/lpNj9o2wirp IgWJ8n1AvaDZGNA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848913045154101 Replace direct dpy_gfx_update() calls from the VT100 emulation code with an indirect call through a new image_update function pointer in QemuVT100. This decouples the VT100 terminal emulation from the QEMU display layer, allowing different backends to provide their own image update implementation. The QemuVT100 typedef is changed to a forward-declared struct so the function pointer signature can reference QemuVT100 itself. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 61d72a0cc27..f8682d2d1dc 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -48,8 +48,11 @@ enum TTYState { TTY_STATE_OSC, }; =20 -typedef struct QemuVT100 { +typedef struct QemuVT100 QemuVT100; + +struct QemuVT100 { pixman_image_t *image; + void (*image_update)(QemuVT100 *vt, int x, int y, int width, int heigh= t); =20 int width; int height; @@ -66,7 +69,7 @@ typedef struct QemuVT100 { int update_y0; int update_x1; int update_y1; -} QemuVT100; +}; =20 typedef struct QemuTextConsole { QemuConsole parent; @@ -224,6 +227,11 @@ static void vt100_show_cursor(QemuVT100 *vt, int show) } } =20 +static void vt100_image_update(QemuVT100 *vt, int x, int y, int width, int= height) +{ + vt->image_update(vt, x, y, width, height); +} + static void console_refresh(QemuTextConsole *s) { QemuVT100 *vt =3D &s->vt; @@ -253,7 +261,7 @@ static void console_refresh(QemuTextConsole *s) } } vt100_show_cursor(&s->vt, 1); - dpy_gfx_update(QEMU_CONSOLE(s), 0, 0, w, h); + vt100_image_update(&s->vt, 0, 0, w, h); } =20 static void console_scroll(QemuTextConsole *s, int ydelta) @@ -1089,9 +1097,9 @@ static int vc_chr_write(Chardev *chr, const uint8_t *= buf, int len) } vt100_show_cursor(vt, 1); if (vt->update_x0 < vt->update_x1) { - dpy_gfx_update(QEMU_CONSOLE(s), vt->update_x0, vt->update_y0, - vt->update_x1 - vt->update_x0, - vt->update_y1 - vt->update_y0); + vt100_image_update(vt, vt->update_x0, vt->update_y0, + vt->update_x1 - vt->update_x0, + vt->update_y1 - vt->update_y0); } return len; } @@ -1189,6 +1197,13 @@ void qemu_text_console_update_size(QemuTextConsole *= c) dpy_text_resize(QEMU_CONSOLE(c), c->vt.width, c->vt.height); } =20 +static void text_console_image_update(QemuVT100 *vt, int x, int y, int wid= th, int height) +{ + QemuTextConsole *console =3D container_of(vt, QemuTextConsole, vt); + + dpy_gfx_update(QEMU_CONSOLE(console), x, y, width, height); +} + static bool vc_chr_open(Chardev *chr, ChardevBackend *backend, Error **err= p) { ChardevVC *vc =3D backend->u.vc.data; @@ -1219,6 +1234,7 @@ static bool vc_chr_open(Chardev *chr, ChardevBackend = *backend, Error **errp) } =20 dpy_gfx_replace_surface(QEMU_CONSOLE(s), qemu_create_displaysurface(wi= dth, height)); + s->vt.image_update =3D text_console_image_update; =20 s->chr =3D chr; drv->console =3D s; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848881; cv=none; d=zohomail.com; s=zohoarc; b=Yt+1Nv4XNc4K/CtmPYrhc6lqWf2S3ivFUfTNz/c+xO0/+CiIH2uGB2WliJuh9DFL/X7PnDHqBERM4uNOwPhDqkSFgKB/Gu46XS5xBe/bC0tia1zJhlZ1tCf6E1zLI6KXUhbe3bzFglY0+cmMVlr3CMh9XljtLHqceEF2CKEg66A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848881; 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=35NB0NPv2qOWBVLdjvh0a4RCEHDwikxV3x+wq6dGcfw=; b=Py9hl1Aupm082TDruZ2NroLvyOTveYEQrsHgElxc2x4dpmxP6VCs9UebkTgx/GtFsey4jKY+aBRR8OWJtT4TYDEZeckrxtpU5C6lllpQ+RmEBYJetjuON5mF9OirBnhvJBXEpSZifLCrQ0OcxYu2gVBVG0Sbs5fFVxhVIBynJ44= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848881491187.0138024708317; Fri, 10 Apr 2026 12:21:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPk-00062S-Qe; Fri, 10 Apr 2026 15:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPU-0005N9-Ss for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPQ-0001Q5-SB for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:55 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-nEzCD_YROImaoDvcWAUpFw-1; Fri, 10 Apr 2026 15:20:50 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 79AB8180044D; Fri, 10 Apr 2026 19:20:49 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 46748180057F; Fri, 10 Apr 2026 19:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848851; 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=35NB0NPv2qOWBVLdjvh0a4RCEHDwikxV3x+wq6dGcfw=; b=NjWfm8TvlfVVLRDLeTO+ttXLaOixwvHJJmVP2XKFXF6MmcwICK1cvPjtxqNUdF2yn/7WNp u+5XuVKd6O9pfd2TPOOMLVT8oDs5Cp+hGlljzQbrAi120q3B+K0Ka66WUeHmH8Blg3kXvb vsDDr5xOc3usiC5uf+Oh5uiYylRLjNU= X-MC-Unique: nEzCD_YROImaoDvcWAUpFw-1 X-Mimecast-MFC-AGG-ID: nEzCD_YROImaoDvcWAUpFw_1775848849 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:41 +0400 Subject: [PATCH v2 19/67] ui/console-vc: console_refresh() -> vt100_refresh() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-19-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1727; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Alv36LrSEk9pffbsC7R8BXcgJH+s8HLIVfm8/6cC23I=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UTC5YnAx3mhJRtjWlIqasqVJDGZhAcwAaI +MFO5Xw9CCJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5aFEEACLRFsKMZr8qCaCwzt+QoEcPge1PEDuVs9OqT+ZcBrOsXsJfHQ/69gbwYBF7aI2x3MkQLf s4PWaUpME6JhZuDP5SDGAe+5saE/E11UR0YTk3cwzi7Nl6orGiRwlMfnwPpJc7IRuCmpO6v5YHj z8YGHYoWFwbqY/DgW62pVwXfxOoPl8qn7LAjLal/v+r0ir81BKLDAaZKBJecY9A6bE4d5goSCZF 5xmlXxXd6stNxu3xxpuGzf5dY+3lZQnIR3z87GFY7+aOMHKpoNRw3LyZ+jEXbv7WS1oZNsfGinC UZDFkLQbgOL/pQ7As7sSLM4SWFZZ9OeNzCuov74IwSrWvRcrtlU4a0x7eswfJf7J1eb5VryrE4/ lFgFqmlpB1JGw+m4BjxwOkGXU3uLIn1RVRxHRwMT9KZ6IAqKuGYh0Qzw1VM11lv+JuOS+TyZRPY u+ctXTFpSygNVevk8rLw2MHKdy/Vcz7myDcViwRRPUM9zbCMxprmQt5B8QrZlHo+SB9nR3jRNTs OcYM3xwcII7O7LJJTXlkNHWqRGvYz2fIhB2zIblYK8ErVkULURIohF+dwm9nIvKa+52fX9rg70K 20Bg9SsWRWMmuGf8b2j4JJvBNauw7ekAt/OUGrpv2U1oMQKT0Sh42AEgE7IaXz1F1ulsVq5LCx/ 0jyXfbQXrvaaouQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848883243158500 This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index f8682d2d1dc..d46dcb6a678 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -232,9 +232,8 @@ static void vt100_image_update(QemuVT100 *vt, int x, in= t y, int width, int heigh vt->image_update(vt, x, y, width, height); } =20 -static void console_refresh(QemuTextConsole *s) +static void vt100_refresh(QemuVT100 *vt) { - QemuVT100 *vt =3D &s->vt; TextCell *c; int x, y, y1; int w =3D pixman_image_get_width(vt->image); @@ -260,8 +259,8 @@ static void console_refresh(QemuTextConsole *s) y1 =3D 0; } } - vt100_show_cursor(&s->vt, 1); - vt100_image_update(&s->vt, 0, 0, w, h); + vt100_show_cursor(vt, 1); + vt100_image_update(vt, 0, 0, w, h); } =20 static void console_scroll(QemuTextConsole *s, int ydelta) @@ -291,7 +290,7 @@ static void console_scroll(QemuTextConsole *s, int ydel= ta) vt->y_displayed =3D vt->total_height - 1; } } - console_refresh(s); + vt100_refresh(&s->vt); } =20 static void kbd_send_chars(QemuTextConsole *s) @@ -1127,7 +1126,7 @@ static void text_console_invalidate(void *opaque) if (!QEMU_IS_FIXED_TEXT_CONSOLE(s)) { text_console_resize(QEMU_TEXT_CONSOLE(s)); } - console_refresh(s); + vt100_refresh(&s->vt); } =20 static void --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848877; cv=none; d=zohomail.com; s=zohoarc; b=mFiUISu+Hda6+6NYg8qDR8JY+Kzx3DPpwuY1Fc75BOl3klGdzs8P5CNfM2PXaRWlhKbVGLfr2TPU+qSzIm791voaFFiUP/9eVbnIY7H4jFRzdCxIEbBC/8+PybvSggnoeXDwdctNP//rTZj6SmiVcbN1HCItE3/QNGoKm2Ml27U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848877; 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=GJtPVEml1iOK2+K7tckw0IWuMjNfHvInu91vVbDRD40=; b=VsYgTnsAubIFoAZVQRnBIDxmCoBdNFRiEiRQzqvgHOOP6mVOrdi0gJVW+j8nUpjFkgek9R4eE4/uFB9Zj8MDGw1prpevG/QrGoiBZLzVt8aMWGdxKU18e1nP4ifHCFPuVhqLfNPn0x7JdOMWf3J3tJdGMOv9tofPjDgIR0Kd1jQ= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848877642167.28696523630003; Fri, 10 Apr 2026 12:21:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPn-0006TS-Cy; Fri, 10 Apr 2026 15:21:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPY-0005Qx-1W for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPV-0001YU-Ui for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:20:59 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-442-EIFxwp4OP1GJH1JKv9NcDg-1; Fri, 10 Apr 2026 15:20:56 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3D8DA195608D for ; Fri, 10 Apr 2026 19:20:55 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1BA913000C16; Fri, 10 Apr 2026 19:20:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848857; 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=GJtPVEml1iOK2+K7tckw0IWuMjNfHvInu91vVbDRD40=; b=IJMjoJxMZZMM9xI/77POhJkmO1MiHAsBxL/riCiQEgsVP4LnJP8ekDkOolD3hiOhJd8lci u+zC2oIjU7Q4lZMsULAxWU4TIqhi0r34UxQHoAOfwaQ5hSIAiOcdWMFdBgqNewcIlXnr9T Q8N+DpPy7NkHw/mTfV6Fok8sGeqrAiM= X-MC-Unique: EIFxwp4OP1GJH1JKv9NcDg-1 X-Mimecast-MFC-AGG-ID: EIFxwp4OP1GJH1JKv9NcDg_1775848855 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:42 +0400 Subject: [PATCH v2 20/67] ui/console-vc: move cursor blinking logic into VT100 layer MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-20-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=5150; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=THg3kb3eky9MQNSqzzOIG7g/WozpZqAHz7OdHuv3imo=; b=kA0DAAoB2ujhCXWWnOUByyZiAGnZTRSix9Nz3xQgMaMgO+PKBvxcrO7zsLK3O1s5aVYSstfyB 4kCMwQAAQoAHRYhBIepvZM/h8YG0nb2Ldro4Ql1lpzlBQJp2U0UAAoJENro4Ql1lpzl7joP/jCu aJXbvew5GD+IMbRIrXTLZnImIhQgFaEMzci/Erq7eopbI0VqPZAyfJmO41ZR0n1MSe58pQC/ujj VEWepK6foHCrpPQ8g/AXAeFB5BZT8b9z1ll8SBvLYwMw1h1T/Y6QgPPon2z/uhdvrBqfIFySzf2 OQutk/tqETjJ8KdC9PJ8L5rHEDXQvRaCTVkTvGPP/bgfe56sMp/u7AiIoo/qJZf0LtnYkMla9o2 ZK/rcUdIgaHrGWWHEoHQ3Kcc6g/8OfpyN183Rr8xT2Zbq/89ZDKIntLpMskiFCZwsrUiOCU/r8x S420v0yNm3TqjGe/EepNJ3WjYLemgP90k/4QSlRw+mlmDC7i/Ps5v8oPIp9g+Q6wyq0ysDz5H// iwraXfz9cS9QragNShIhYZv1lpus8zKoUhCXDAofwdMwpQ70kDBya4FncWdH8Se2FDWSuI139Y8 rII3BxKxQIsWzU0xw8Ecso2MwSpbDxYgougncF0WiSUM40gJsUEBm+9zhse+QBGWqEq59DbOMK4 9QmoVgUjhqwjkzMRgotD5wSSl/qHOmNH4euQF4gampQFsPuAlN0H33mr5MqN7yNjOUOGvPDVoLs ooo+JPK8PwsT+pZXY6k9cWddOwo1yTXjZSucnqcGowXbNyAfJu7d5gj1r5+rjIX0JlZivf+FnOX XTij5 X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848878588154100 Maintain a list of QemuVT100 instances so the cursor timer can directly iterate over them and call vt100_refresh(), instead of going through qemu_invalidate_text_consoles() which iterated over all consoles (including graphic ones) and called back into the generic display layer. This removes the qemu_invalidate_text_consoles() function from console.c, further decoupling VT100 text rendering from the console core. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 1 - ui/console-priv.h | 2 +- ui/console-vc-stubs.c | 2 +- ui/console-vc.c | 28 +++++++++++++++++++++++----- ui/console.c | 19 +------------------ 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 395a723e318..5b5bba46ec2 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -416,7 +416,6 @@ void qemu_console_set_window_id(QemuConsole *con, int w= indow_id); void qemu_console_resize(QemuConsole *con, int width, int height); DisplaySurface *qemu_console_surface(QemuConsole *con); void coroutine_fn qemu_console_co_wait_update(QemuConsole *con); -int qemu_invalidate_text_consoles(void); =20 /* console-gl.c */ #ifdef CONFIG_OPENGL diff --git a/ui/console-priv.h b/ui/console-priv.h index 2c2cfd99570..8bcdb79d914 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -36,7 +36,7 @@ struct QemuConsole { }; =20 void qemu_text_console_update_size(QemuTextConsole *c); -void qemu_text_console_update_cursor(void); +void vt100_update_cursor(void); void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym); =20 #endif diff --git a/ui/console-vc-stubs.c b/ui/console-vc-stubs.c index 8a7f19c1f44..d911a82f263 100644 --- a/ui/console-vc-stubs.c +++ b/ui/console-vc-stubs.c @@ -14,7 +14,7 @@ void qemu_text_console_update_size(QemuTextConsole *c) { } =20 -void qemu_text_console_update_cursor(void) +void vt100_update_cursor(void) { } =20 diff --git a/ui/console-vc.c b/ui/console-vc.c index d46dcb6a678..6694c5082f8 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -8,6 +8,7 @@ #include "qapi/error.h" #include "qemu/fifo8.h" #include "qemu/option.h" +#include "qemu/queue.h" #include "ui/console.h" #include "ui/cp437.h" =20 @@ -69,8 +70,13 @@ struct QemuVT100 { int update_y0; int update_x1; int update_y1; + + QTAILQ_ENTRY(QemuVT100) list; }; =20 +static QTAILQ_HEAD(QemuVT100Head, QemuVT100) vt100s =3D + QTAILQ_HEAD_INITIALIZER(vt100s); + typedef struct QemuTextConsole { QemuConsole parent; =20 @@ -1103,20 +1109,28 @@ static int vc_chr_write(Chardev *chr, const uint8_t= *buf, int len) return len; } =20 -void qemu_text_console_update_cursor(void) +void vt100_update_cursor(void) { + QemuVT100 *vt; + cursor_visible_phase =3D !cursor_visible_phase; =20 - if (qemu_invalidate_text_consoles()) { - timer_mod(cursor_timer, - qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + CONSOLE_CURSOR_= PERIOD / 2); + if (QTAILQ_EMPTY(&vt100s)) { + return; + } + + QTAILQ_FOREACH(vt, &vt100s, list) { + vt100_refresh(vt); } + + timer_mod(cursor_timer, + qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + CONSOLE_CURSOR_PERIOD / 2= ); } =20 static void cursor_timer_cb(void *opaque) { - qemu_text_console_update_cursor(); + vt100_update_cursor(); } =20 static void text_console_invalidate(void *opaque) @@ -1132,6 +1146,9 @@ static void text_console_invalidate(void *opaque) static void qemu_text_console_finalize(Object *obj) { + QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(obj); + + QTAILQ_REMOVE(&vt100s, &s->vt, list); } =20 static void @@ -1156,6 +1173,7 @@ qemu_text_console_init(Object *obj) { QemuTextConsole *c =3D QEMU_TEXT_CONSOLE(obj); =20 + QTAILQ_INSERT_HEAD(&vt100s, &c->vt, list); fifo8_create(&c->out_fifo, 16); c->vt.total_height =3D DEFAULT_BACKSCROLL; QEMU_CONSOLE(c)->hw_ops =3D &text_console_ops; diff --git a/ui/console.c b/ui/console.c index 24e4761e1f9..8af1dee0e22 100644 --- a/ui/console.c +++ b/ui/console.c @@ -752,7 +752,7 @@ void register_displaychangelistener(DisplayChangeListen= er *dcl) } else if (QEMU_IS_TEXT_CONSOLE(dcl->con)) { qemu_text_console_update_size(QEMU_TEXT_CONSOLE(dcl->con)); } - qemu_text_console_update_cursor(); + vt100_update_cursor(); } =20 void update_displaychangelistener(DisplayChangeListener *dcl, @@ -1457,23 +1457,6 @@ int qemu_console_get_height(QemuConsole *con, int fa= llback) } } =20 -int qemu_invalidate_text_consoles(void) -{ - QemuConsole *s; - int count =3D 0; - - QTAILQ_FOREACH(s, &consoles, next) { - if (qemu_console_is_graphic(s) || - !qemu_console_is_visible(s)) { - continue; - } - count++; - graphic_hw_invalidate(s); - } - - return count; -} - void qemu_console_resize(QemuConsole *s, int width, int height) { DisplaySurface *surface =3D qemu_console_surface(s); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848883; cv=none; d=zohomail.com; s=zohoarc; b=dHDNQrKVZRUr2gPwpKDBMrLnVDTYfrEPyr3/yxf+Chiuqg5WR6MxtO6syilJv3JcNzmKa/YljPNMNuFpJgA51fY4MpFAgRXlsiFqdQuzOZojb4xMUrcP6AIIaEoNkHuNN3soArOTFXq79OSl3VTAGtBDWLv42QTDmpdjvcuZyy4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848883; 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=0KcrzGeBjehjOUW8zw82kPtw6ySxe1QAmRnxkGVr+yI=; b=Bal7tyt6QbjW4baW6A65tNzcUVt2rEdvpK5tDeettLQvx0fuTEwvB2Q205wZRox09NWDetIXqdqXgODSs3QU3h6kEidEhiFPHju+6lAF3NPeE7KEIoXBLdRcpRQdhFeMF6L/OfqFcDMZfm8yahR4fB9EfBumNyIM6nwfUQF+Leg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848883645722.921357701175; Fri, 10 Apr 2026 12:21:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPp-0006ki-1y; Fri, 10 Apr 2026 15:21:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPe-0005aS-Db for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPc-0001Zw-VH for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:06 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-pPngN734NZGKOTPsw7JioA-1; Fri, 10 Apr 2026 15:21:01 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D5E6618002C0; Fri, 10 Apr 2026 19:21:00 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 924D11800357; Fri, 10 Apr 2026 19:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848864; 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=0KcrzGeBjehjOUW8zw82kPtw6ySxe1QAmRnxkGVr+yI=; b=dpirO8gDl++L9WoGtJyw4ium7gqJZVlmSdTgw3ZH+ymll97oniczPv4UdrbRMouoxmJ/4m owVo1hMWYoZz3KiC/MPAIuicFwcAIvN7QPQVNsxm1Y+Qn+mIsX3K5XB2KwTjO3q8bLvlez g2YPRHCQAYLQHxJzJ5GibQ5Dgdd/jNM= X-MC-Unique: pPngN734NZGKOTPsw7JioA-1 X-Mimecast-MFC-AGG-ID: pPngN734NZGKOTPsw7JioA_1775848860 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:43 +0400 Subject: [PATCH v2 21/67] ui/console-vc: console_scroll() -> vt100_scroll() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-21-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1735; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=LCbaWntss3vOkniSRUREb63eiybBKODUV21uJvRfJvM=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UqE90+OW3E/kOsn9Tat8TJWQhMG+K+TgT+ 2WbXHrIqzSJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5TuID/4yGZ5k1R7kVJMsB6f6chvSgx1G8noAmeDsHby7zlW+rEDw+8QFsol9ksvFVsbr+XdR/qA dAZuUWAwPZhPD39adrW5cvi0OO5HM5GNu42RwFVTrPfHeWWzzpl2or5Z86Z90BqHc2p1W0FYffx HElULhp6cNhdSB0bQypnUaxWckXxey4ZdyjsMZUPnQ3inOURnl0dCdiob2lOl57obfxKCroqaTV X2q64EiPZ/mgTdVEi4U+s1sOiauF7rTDodpmvHjK48gnZc8S6rMwiY3gtZNv1fr0Uiy/cstgD+H aSv2HoG0ZLd1jJNuBiYs7WklKns6iqlY5/7gQBKQVQvHphH+iRr4roxCXAMG6381Gwo4tWGAzFR KaUlFWcmyfByoGMAbI4P+wGaIJRG3c7Cd3/D3AuuRuXYPbho11t9RmB3JEXGznK1OWXC2sUH/yx FG8YiPH29KhHRzvJ/zs1ir1W82UVXIgJ6CDbbwH2owsDCSMtec/OH5UxYZCQAuN+jZzweZhP4pj 96ZH4Thi217wy1fLU5zRhy3WQbcPWqu/nrct1a/EwFzenPNbrqZPMmOrWXwki65bHZ/tSw7iW7A i55T+6at7F1BVOER+aCQRj7XZ4UTcYdZgNBJK3OEXWmQO7J0eOcQV6dpy+V4BaqvieH+SBa3bNo uxw8x8nZrs58yaQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848884610154100 This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 6694c5082f8..c6846af3697 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -269,9 +269,8 @@ static void vt100_refresh(QemuVT100 *vt) vt100_image_update(vt, 0, 0, w, h); } =20 -static void console_scroll(QemuTextConsole *s, int ydelta) +static void vt100_scroll(QemuVT100 *vt, int ydelta) { - QemuVT100 *vt =3D &s->vt; int i, y1; =20 if (ydelta > 0) { @@ -296,7 +295,7 @@ static void console_scroll(QemuTextConsole *s, int ydel= ta) vt->y_displayed =3D vt->total_height - 1; } } - vt100_refresh(&s->vt); + vt100_refresh(vt); } =20 static void kbd_send_chars(QemuTextConsole *s) @@ -326,16 +325,16 @@ void qemu_text_console_handle_keysym(QemuTextConsole = *s, int keysym) =20 switch(keysym) { case QEMU_KEY_CTRL_UP: - console_scroll(s, -1); + vt100_scroll(&s->vt, -1); break; case QEMU_KEY_CTRL_DOWN: - console_scroll(s, 1); + vt100_scroll(&s->vt, 1); break; case QEMU_KEY_CTRL_PAGEUP: - console_scroll(s, -10); + vt100_scroll(&s->vt, -10); break; case QEMU_KEY_CTRL_PAGEDOWN: - console_scroll(s, 10); + vt100_scroll(&s->vt, 10); break; default: /* convert the QEMU keysym to VT100 key string */ --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848915; cv=none; d=zohomail.com; s=zohoarc; b=HbuuPQWK8q1kbzyeEuV/+H9zLGQM7z9Y6j7zPqC4JnkzuON1B265JU7ZyV6RS2gvV2WHMaUFjlT3B8Ev2T2FLfn7KY1MXE3hoLugyrb4aQ1WOMSXs45eBGISjzuGPlF+ERM6DkwhTZk9HYgjUm/GnjxrEjcCk59Lu0XlAHu/Qrk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848915; 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=HrbyBCyRCrUTpCfsw4FXQ87PN8E4xHrqUwFNeptatsY=; b=W49KhTysuBHCjEWWgnbcD6pn4Pf40fIG5IsTWbI5MR/m/FEwRs64HrfBatOLS413qBvMJp79P3AgefZNZIqBsvtfly1x+Hi4Akk40mqd98Uf/05jRWzlbSN+9ybsKLwZ8ADru6NeVMwJ+LGZjmdrD9qrhuqwUvUyHFHohBH0GmA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848915097877.51539383457; Fri, 10 Apr 2026 12:21:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHPo-0006em-Cm; Fri, 10 Apr 2026 15:21:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPj-0005wP-P8 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPi-0001aq-8s for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:11 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-209-2ArQdatZMJKQFVrASN263Q-1; Fri, 10 Apr 2026 15:21:07 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8888819560AA; Fri, 10 Apr 2026 19:21:06 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 159FB1800357; Fri, 10 Apr 2026 19:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848869; 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=HrbyBCyRCrUTpCfsw4FXQ87PN8E4xHrqUwFNeptatsY=; b=ETf79tEtEDc2c9YmK71Xu8/AjQuJdMW4CsFKqe27Ydnp83ibnQMMeqYfl3zU6mkN4kxmz1 2WRo7QLa9UzmLHlTNGOErBXt/TR8+Om8UwDqdx/H8ht7tU1jgZIrMI2M5T/msqIcnUkBCA mDjldvS3Kfahl0VdUc8E39f0Rrj+SvQ= X-MC-Unique: 2ArQdatZMJKQFVrASN263Q-1 X-Mimecast-MFC-AGG-ID: 2ArQdatZMJKQFVrASN263Q_1775848866 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:44 +0400 Subject: [PATCH v2 22/67] ui/console-vc: refactor text_console_resize() into vt100_set_image() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-22-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=3458; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=hGNex5Z8ktmnpUuKhaz5DK+qq1hXD5X1R8yragDrE5U=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0U+HIV6XWW8Qz/7MOjA4aUz0nyXldqx1LE/ BwtXpzSRiiJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5aF0EACOYeHXi6Btb2ohEhaIeQA05wJCLLgak/Hz884HpdYIetGTvquYONb5bVlTX4B4ANhmLNS Yo9iNdGwpEhCPqo/x6cKlx1V+8xtJnZv7Im/3evQO6a+PIxCwxiryfEX8UJnpFjVN+3HSA/+uJH HSZQDKytWq1UcCPnaeD7Xjb9ltPyqbik+lJ+QourrHILp9170d+E9gyRAtmnLARt+QoAxcSHgxD gkKDC6mCgPCxOAc2vFnL4n/Ku60jZxV9MbtmRf+z/GspQEBHb5XFKp4G1S0o9oUCFAPeETk5p/V ZXaWO4iGc7Sas/SxKsvNS1+cA+odxpjBpnDcWeYA6bxoOvN0zZBXsbEUWZ9LA2Gh2/Q0VnZtUhQ GVPch1iUpf3+CtkfIqTmJDD4vHJtVIJwz8ML5+WV0zEpIjkVf3EPiKXfjf5xsPwjbL+6E5RpWTt VPwDYRzHZ0Hhfq8GVut5UxbhPG1SsFguqAJCqe9+yhAW2LLGopx0On+g/uqRCwaEpVCo4Z8mujl Zr7FxdNskKkuMnEw1ZgHpOEhfLBJpRpNmMtDS6sCyYnbGqQHW9yEu8pPwO7Ma3BtOAkIuWTWj/i qcYEqO4d4x/RPlEUivfdutKupSRi/NF7Sz+7FWHLZnG5EJxRtzLNT6oQxp6j/AOMleOD2STpvyN 3UXRk2/m35ksEyQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848915430158500 Decouple the resize logic from QemuTextConsole by operating on QemuVT100 and taking a pixman_image_t directly, instead of reaching into the console's scanout surface. The callers now pass the image explicitly, which makes the VT100 layer independent of the console object hierarchy. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index c6846af3697..85c794062fc 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -12,6 +12,7 @@ #include "ui/console.h" #include "ui/cp437.h" =20 +#include "pixman.h" #include "trace.h" #include "console-priv.h" =20 @@ -397,44 +398,41 @@ static void text_console_update(void *opaque, console= _ch_t *chardata) } } =20 -static void text_console_resize(QemuTextConsole *t) +static void vt100_set_image(QemuVT100 *vt, pixman_image_t *image) { - QemuConsole *s =3D QEMU_CONSOLE(t); TextCell *cells, *c, *c1; int w1, x, y, last_width, w, h; =20 - assert(s->scanout.kind =3D=3D SCANOUT_SURFACE); - - t->vt.image =3D s->surface->image; - w =3D pixman_image_get_width(t->vt.image) / FONT_WIDTH; - h =3D pixman_image_get_height(t->vt.image) / FONT_HEIGHT; - if (w =3D=3D t->vt.width && h =3D=3D t->vt.height) { + vt->image =3D image; + w =3D pixman_image_get_width(image) / FONT_WIDTH; + h =3D pixman_image_get_height(image) / FONT_HEIGHT; + if (w =3D=3D vt->width && h =3D=3D vt->height) { return; } =20 - last_width =3D t->vt.width; - t->vt.width =3D w; - t->vt.height =3D h; + last_width =3D vt->width; + vt->width =3D w; + vt->height =3D h; =20 - w1 =3D MIN(t->vt.width, last_width); + w1 =3D MIN(vt->width, last_width); =20 - cells =3D g_new(TextCell, t->vt.width * t->vt.total_height + 1); - for (y =3D 0; y < t->vt.total_height; y++) { - c =3D &cells[y * t->vt.width]; + cells =3D g_new(TextCell, vt->width * vt->total_height + 1); + for (y =3D 0; y < vt->total_height; y++) { + c =3D &cells[y * vt->width]; if (w1 > 0) { - c1 =3D &t->vt.cells[y * last_width]; + c1 =3D &vt->cells[y * last_width]; for (x =3D 0; x < w1; x++) { *c++ =3D *c1++; } } - for (x =3D w1; x < t->vt.width; x++) { + for (x =3D w1; x < vt->width; x++) { c->ch =3D ' '; c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; c++; } } - g_free(t->vt.cells); - t->vt.cells =3D cells; + g_free(vt->cells); + vt->cells =3D cells; } =20 static void vc_put_lf(VCChardev *vc) @@ -1137,7 +1135,7 @@ static void text_console_invalidate(void *opaque) QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(opaque); =20 if (!QEMU_IS_FIXED_TEXT_CONSOLE(s)) { - text_console_resize(QEMU_TEXT_CONSOLE(s)); + vt100_set_image(&s->vt, QEMU_CONSOLE(s)->surface->image); } vt100_refresh(&s->vt); } @@ -1257,7 +1255,7 @@ static bool vc_chr_open(Chardev *chr, ChardevBackend = *backend, Error **errp) =20 /* set current text attributes to default */ drv->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - text_console_resize(s); + vt100_set_image(&s->vt, QEMU_CONSOLE(s)->surface->image); =20 if (chr->label) { char *msg; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848909; cv=none; d=zohomail.com; s=zohoarc; b=IOmjfH8LV/vE6AfQRmajxtYnUK7eVyQZi7Rd+KXf6O/N4/DvZGth4012HDEvdRlE8lCSaIsnHsJDItW3Sws7DdJikwsvSUw6F1QGOoHPA+AlVInbwkn60kqtg8tXsS44MfdeYMWYmYbOjzvBLVD328j+C9NPEVsCZiG5ibAN4Bo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848909; 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=7wOl7UndXUNuRv23Xd7plO7oSwHYgXZFefU88CGlrWo=; b=fhzx4DisX6sw699OxlYZh5sMYO46awnISJaX1urFZ+GdMtLFQZTmnwRWyWO3THrwjCyr7nyKiBSETxFkUq3cYuVbwwssB8fuWE8kfuoMIb7loaHP/9M+bzquXo1F5tzT8K+e6RO2j3fbE5oMgQ6a2B+9/VRr2HDOKYPfAmTUpS8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848909818520.9414791990171; Fri, 10 Apr 2026 12:21:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQ0-0007Un-4E; Fri, 10 Apr 2026 15:21:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPp-0006uI-Pu for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPo-0001bG-52 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:17 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-198-33THIKEINRa3I6ztWQeWAA-1; Fri, 10 Apr 2026 15:21:13 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 938011800371; Fri, 10 Apr 2026 19:21:12 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 68DE718002A6; Fri, 10 Apr 2026 19:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848875; 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=7wOl7UndXUNuRv23Xd7plO7oSwHYgXZFefU88CGlrWo=; b=jSfT/D3/aoQ+x8ejo9asTSgef4TKTwdwVQh0QoERE+J5VajlQaFFH8rupxng0UtawYz+YT GwzwFWKZpolEm0iPx/00GcLmlqSitoC2l/hKPBUvTSgJwDyATZFphjQA6jiyKb00rKTVH8 TvQPj+EMMEiqcBbcSuAMmciYBnuBkOs= X-MC-Unique: 33THIKEINRa3I6ztWQeWAA-1 X-Mimecast-MFC-AGG-ID: 33THIKEINRa3I6ztWQeWAA_1775848872 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:45 +0400 Subject: [PATCH v2 23/67] ui/console-vc: move vc_put_lf() to VT100 layer as vt100_put_lf() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-23-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1898; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=AbfZ7yrsZMJ8QK+onxLgGeGlwus1yT9WAbcxhWv1EDs=; b=kA0DAAoB2ujhCXWWnOUByyZiAGnZTRSgbJELCZ8+YVtBLxn0WLm/AHqIyV2ivFLGAgPYD2etz YkCMwQAAQoAHRYhBIepvZM/h8YG0nb2Ldro4Ql1lpzlBQJp2U0UAAoJENro4Ql1lpzlMxoP/RSI elvMxJ19JraDqcVVMUxnkrDAmV/xshygLsDF52ImukkKWInt3zGyhphnjjMtlKnT9v7IjtIX8Li g/t5mOyVjlFK1bqSq6suD9dvt/6+YH0JejpJ8MSIAVjMWjIhw5UJdtXRSS8Z3Q7EFk7mRbblDlL 7JQFZVJmqiaIWMgqkztaScjpGNeaOoWePErc6mjuz46rON/4y7qYUHzc7HRB7LU+k/7pQQgs0/V Ry6tajdhRwphgnxFoFoLGwJUoDuwzAyYBbJxLIGV/4RlzJSJUuyuP+J/pVNIY9h/hArN3mz/jZe Ww7F65Z7FINndZJW01D5I7KBL/MHR3YezSpH+Sz93Fy2sKajaW2fuor8HMMv+oeNLuaeHx6z9jY 91UhLypBjLZfAwYUp5LTEBF7LYMIfCBZyJZcq/VfAAhOCs4hDbqCMJkZ2IC5i3derqCjCU40lpZ 56CgVgnUkBe/pKCT1dX/H2umtxBNanTcA9OQZU6fy86TZWH8LRvyXBadK+Ioa8hVOBHrCeKIazK NAwL0vLUhwEfFVAFbvXKk7wtGK3x6fuZSYrhK4Q2eTzWc8QVpbYdk1N0xYtCyQKeil9tpNGL/0X pVt4gaEO49hA/OvChzOwM5ymg08xTc88gJd4n2uHKEZ3tEym7nzOBl0QxQ5j5CDHUulfm6kFGPG zOoBp X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848911399158500 Decouple the line-feed handling from VCChardev by operating on QemuVT100 directly. The function no longer needs the chardev or console pointers =E2=80=94 callers pass &s->vt instead. This continues the effort to make the VT100 terminal emulation self-contained. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 85c794062fc..a367622d819 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -435,10 +435,8 @@ static void vt100_set_image(QemuVT100 *vt, pixman_imag= e_t *image) vt->cells =3D cells; } =20 -static void vc_put_lf(VCChardev *vc) +static void vt100_put_lf(QemuVT100 *vt) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; TextCell *c; int x, y1; =20 @@ -669,7 +667,7 @@ static void vc_put_one(VCChardev *vc, int ch) if (vt->x >=3D vt->width) { /* line wrap */ vt->x =3D 0; - vc_put_lf(vc); + vt100_put_lf(vt); } y1 =3D (vt->y_base + vt->y) % vt->total_height; c =3D &vt->cells[y1 * vt->width + vt->x]; @@ -853,7 +851,7 @@ static void vc_putchar(VCChardev *vc, int ch) vt->x =3D 0; break; case '\n': /* newline */ - vc_put_lf(vc); + vt100_put_lf(&s->vt); break; case '\b': /* backspace */ if (vt->x > 0) @@ -862,7 +860,7 @@ static void vc_putchar(VCChardev *vc, int ch) case '\t': /* tabspace */ if (vt->x + (8 - (vt->x % 8)) > vt->width) { vt->x =3D 0; - vc_put_lf(vc); + vt100_put_lf(vt); } else { vt->x =3D vt->x + (8 - (vt->x % 8)); } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848933; cv=none; d=zohomail.com; s=zohoarc; b=kZBmekBq+XcxklCnd532SSUCUyC7yFJCWbaz9IZpzd787oczPCnpzug6Ux9rBmTvpWbQcsT94kP62FwkFRS70t3oWpEBfOu+Bp98pbBlK1wanGrg7Iw3l3MzjAxzZ+gL3Wsp3y+LWqA8rrG+mev8G/v60h9HhRxHXQ4ylS6HJiY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848933; 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=NqgxaN0EQEIbeZuRUaIOBEyt8RA8ds5FauGylw3GKZI=; b=SpHc4nXGy8lXXxrM3wJjxn30aiJxHtBTgGiMf+YsufSnXiLuOOkcPaXlBd0JRxNKWl19Trnph1YrNZQZhYixNeDdNz3viQzUDySttRTliFm9li9eFeQ2/iGnaXQOnES9CpMXOpoHZpQBHRwbz+lPrjlJ6ZVhae0rgLrymiDLFQA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848933018514.564757220752; Fri, 10 Apr 2026 12:22:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQG-00006V-1u; Fri, 10 Apr 2026 15:21:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPw-0007RM-Vw for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHPv-0001bs-H4 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:24 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-488-LoRkLvprNCKrTKnzoDH0cw-1; Fri, 10 Apr 2026 15:21:19 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AE0A719541AE; Fri, 10 Apr 2026 19:21:18 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 354963000C16; Fri, 10 Apr 2026 19:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848882; 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=NqgxaN0EQEIbeZuRUaIOBEyt8RA8ds5FauGylw3GKZI=; b=DLlyXWy/AseaiBsRY/9qA8vd2jE/Ljyan2+nClKvuOKxsxPf7+yz1FeTsGsvN/EOW51rhL z3GlXXZ+exDo7TmgVPfzVkDIzbCfvlzokxTia7bEQFW93eEnkYQCTGo/qSVCvnhGLvjYRf JiV50i3KVeZ9Q7rWpm0fIXiENlJO3Q8= X-MC-Unique: LoRkLvprNCKrTKnzoDH0cw-1 X-Mimecast-MFC-AGG-ID: LoRkLvprNCKrTKnzoDH0cw_1775848878 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:46 +0400 Subject: [PATCH v2 24/67] ui/console-vc: unify the write path MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-24-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=3629; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=rgqd45Vmz4hS+I+bczTQrpcE/mb67kdr0yCJlR22ZB0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UPqYOF1m5ya5lKn8/auDoKhIR4oTiZOU5Z ZKPp/TtlpiJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5fT8EACWINBORQ4Cenul7+RKJwjvxKGY8Lj/dKFDOjE20z7ETotmTAuY7BRoWF7HAcwQtP3opP2 07q1KC0mYlG/UZ3nuOAO+BUPUQn21V3RpOSECDHDKwnm12oviNhOAHRK3+qumV2dl51WdzdUjnB gCJBBA34f5//vEqAs+Rka0MUUBqN3JswcDTZUeu8yjaBw1m72nmv1sCrSVyeMoSClY4Ix8ikbdh vbJBbIwFI46HiwzTob44+MH7G3C/8kVgxlLJDCCd7hZRa9ZFmxFzXuU0Mi6hjsQWD3jreDmCLLg 51J7nGDyVw7KS4YF1abGFdwkos5QVdrV1zMv06uHHWj/IuEsEWOXNx2GNF845JCX28Dy3ebhsdH HVlpm8EtkiqFl0/Z56sPG0Ey99k1C/5r8cb8MaDan932VaSsMNLH6zAEgP+o5fGSnoAaOaOncI6 FPWEJ0Y+vFxvkT1s4SSavyDypMHYwoxjeJgGE67mDMcmIzWFaU+obYd4Ja8Jngwrhhqp5Nk7tOQ Zq/VBPkHtIrgXq0A20sDt1bhs/wWVYvTGivNQS+oVn/tKUoxH5YOWcthy3h+kpTOQ7ToOL1hgf/ tlYvF4KfEn5DC98bkNF1q3X2WSH7VYDNszGk9mjQ/xtiZgrmSSWDOqwtDdRvxLt3+Ii7nYWMOfs RoCnxac6ibCqukQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848933539158500 VT100 escape responses (DSR) used qemu_chr_be_write() to write directly to the chardev backend, bypassing the output FIFO, while keyboard input went through the FIFO and flush path. This inconsistency could lead to out-of-order delivery when both paths are active. Introduce qemu_text_console_write() that pushes data into the output FIFO and flushes it, and use it for both keyboard input and VT100 responses. Remove the now-unnecessary vc_respond_str() helper. Rename kbd_send_chars() to qemu_text_console_flush() to better reflect its purpose. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index a367622d819..bba1fe614ef 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -299,7 +299,7 @@ static void vt100_scroll(QemuVT100 *vt, int ydelta) vt100_refresh(vt); } =20 -static void kbd_send_chars(QemuTextConsole *s) +static void qemu_text_console_flush(QemuTextConsole *s) { uint32_t len, avail; =20 @@ -316,13 +316,21 @@ static void kbd_send_chars(QemuTextConsole *s) } } =20 +static void qemu_text_console_write(QemuTextConsole *s, const void *buf, s= ize_t len) +{ + uint32_t num_free; + + num_free =3D fifo8_num_free(&s->out_fifo); + fifo8_push_all(&s->out_fifo, buf, MIN(num_free, len)); + qemu_text_console_flush(s); +} + /* called when an ascii key is pressed */ void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) { QemuVT100 *vt =3D &s->vt; uint8_t buf[16], *q; int c; - uint32_t num_free; =20 switch(keysym) { case QEMU_KEY_CTRL_UP: @@ -361,9 +369,7 @@ void qemu_text_console_handle_keysym(QemuTextConsole *s= , int keysym) if (vt->echo) { qemu_chr_write(s->chr, buf, q - buf, true); } - num_free =3D fifo8_num_free(&s->out_fifo); - fifo8_push_all(&s->out_fifo, buf, MIN(num_free, q - buf)); - kbd_send_chars(s); + qemu_text_console_write(s, buf, q - buf); break; } } @@ -677,13 +683,6 @@ static void vc_put_one(VCChardev *vc, int ch) vt->x++; } =20 -static void vc_respond_str(VCChardev *vc, const char *buf) -{ - QemuTextConsole *s =3D vc->console; - - qemu_chr_be_write(s->chr, (const uint8_t *)buf, strlen(buf)); -} - /* set cursor, checking bounds */ static void vc_set_cursor(VCChardev *vc, int x, int y) { @@ -1028,13 +1027,13 @@ static void vc_putchar(VCChardev *vc, int ch) switch (vc->esc_params[0]) { case 5: /* report console status (always succeed)*/ - vc_respond_str(vc, "\033[0n"); + qemu_text_console_write(s, "\033[0n", 4); break; case 6: /* report cursor position */ response =3D g_strdup_printf("\033[%d;%dR", vt->y + 1, vt->x + 1); - vc_respond_str(vc, response); + qemu_text_console_write(s, response, strlen(response)); break; } break; @@ -1194,7 +1193,7 @@ static void vc_chr_accept_input(Chardev *chr) { VCChardev *drv =3D VC_CHARDEV(chr); =20 - kbd_send_chars(drv->console); + qemu_text_console_flush(drv->console); } =20 static void vc_chr_set_echo(Chardev *chr, bool echo) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848922; cv=none; d=zohomail.com; s=zohoarc; b=mUwq/upvNZR622ZQvQM0G34/3ApnIyakOvKzUTXwO6J2tceWd2+HIcIEWFl4YdrU816Flt1SMln6imlHsoFBKwX5wCtFj4uT9MEprfbg6z1boXz6yIdtRVR3wgHYK9g2oXHBNXSJRExebH1SPTVe9PrlnbZiE5WFs1pNZZK2liQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848922; 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=eev7ZgDt7TuG9zqc7JFbqu+7TfwNceZf9Sx5cioSKfc=; b=V/DzmFUVAv0pVhHMK6X2V+5QNqPaNDOwi1q3x3kplX03Wtc3tWwyKOGxZ+4laC5WREcBqIOQqObeOCBpKo+ss27DKr8VIATLGA37BSKbZA8JRLtotnJDaYXSid8aJtkm6e13AafvKJQiHn6wpm4oqO8OWsPMtLfefvvKeU0SBa8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848922113156.0263822338983; Fri, 10 Apr 2026 12:22:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQH-0000MQ-LH; Fri, 10 Apr 2026 15:21:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQ3-0007s8-U8 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQ0-0001cS-JO for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:31 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-687-DmQzhfBQNziv3cF7vOBDoQ-1; Fri, 10 Apr 2026 15:21:26 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6AF2119560B7 for ; Fri, 10 Apr 2026 19:21:25 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D747180057F; Fri, 10 Apr 2026 19:21:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848887; 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=eev7ZgDt7TuG9zqc7JFbqu+7TfwNceZf9Sx5cioSKfc=; b=jSGZMHO3WsMgtct5/YSdXpvnupM8zZBMRHTttw+9TCt7uZf9tGdaKOI4pWsKbNLnjbYzpI +Fa2NMOS6PAwkBjzfRJepxjBj/Zfv6QGDjxvNGMoHTHbJmnlok6Psaw95POW3sk0L/U3ug ucx8SSFML/QTy2YqB9vQLGo9C02povY= X-MC-Unique: DmQzhfBQNziv3cF7vOBDoQ-1 X-Mimecast-MFC-AGG-ID: DmQzhfBQNziv3cF7vOBDoQ_1775848885 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:47 +0400 Subject: [PATCH v2 25/67] ui/console-vc: move VT100 state machine and output FIFO into QemuVT100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-25-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=32396; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=PUHVzwpUuSJhv3fv9Q/KSd6OQTNQ0Wo8/FtWCxla3rc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Uu5D6XB2ok14O8BvhaKHqEXFAu2YyAL0cT croY93vPcSJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5eG+EACzXd7JZWoWXB5zpPyFdEg0MOD3ZubOdc4UQ7HQKHzLGlnzUKyqcQJQN08ORbXKn9SuiWL 42phqXNu2HLgwdl6X/CVmzMOi1D2XI4WWOpd4Gxs2A7BQKSN86HzewdcTVc3oYzocgTlaoAA0nQ vOk510uNaTfg4bv9N6QUZzSmRpzjCp9CtsTaPJzkqTq7RF83kWkG5uwC1JtTNZ3Z5FRLz0k9XAf 8Q6JLwVFAooz5OMZQA4ZVr2jjOLDg46FjAtfyRdmv0wy5g4ycIw2JPcu77MEauO+nAzrfl+esdH 23BKMTh0rJ/yMVyqZFjVSlh98MfU0axDH8Shv0GJgll/ENA41SchqNmyaqgPjzXg1UZT9xhhtZp P37IVNOWyyOydir5BRIrtK3ZHp/2++2vvUQrsF3pI298oIImN5xB5hlWRjMFYpGdxoC0Ovbf1pP mk7io1PKdxvRzP2pg263EvZBhIzwg0fqqWy0xLg38lsAy9Mxmf1OM4A0h8px1vmMEZWhUXy7k/f xiDLa8SC6hTiQuRKcEiL5Fmr07O4n9eiWpnLpjnf5YVVYjWfigw5SlELLMU830//34GdmOCehzq RUiO/mRJmzUYdhBz6dsM0emqWSpfynI2ckciuoL3Li9NTPu5U0WGefN+m7OGbsMtxsl2YSsnPNX lOiYWbhSeMFEJWA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848923224154100 Move the terminal escape sequence parser state (TTYState, esc_params, text attributes, saved cursor position) and the output FIFO from VCChardev/QemuTextConsole into QemuVT100. Rename the corresponding functions from vc_* to vt100_* to reflect they now operate on the VT100 layer directly, removing the indirection through vc->console->vt. Add an out_flush callback to QemuVT100 so vt100_write() can flush output without knowing about QemuTextConsole, and move FIFO/VT100 initialization from qemu_text_console_init() to vc_chr_open() where the callback can be wired up. This continues the decoupling of VT100 terminal emulation from the chardev layer, making QemuVT100 a self-contained terminal emulator. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 375 +++++++++++++++++++++++++++-------------------------= ---- 1 file changed, 180 insertions(+), 195 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index bba1fe614ef..5cfb3dfcf72 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -72,6 +72,18 @@ struct QemuVT100 { int update_x1; int update_y1; =20 + enum TTYState state; + int esc_params[MAX_ESC_PARAMS]; + int nb_esc_params; + uint32_t utf8_state; /* UTF-8 DFA decoder state */ + uint32_t utf8_codepoint; /* accumulated UTF-8 code point */ + TextAttributes t_attrib; /* currently active text attributes */ + TextAttributes t_attrib_saved; + int x_saved, y_saved; + /* fifo for key pressed */ + Fifo8 out_fifo; + void (*out_flush)(QemuVT100 *vt); + QTAILQ_ENTRY(QemuVT100) list; }; =20 @@ -83,8 +95,6 @@ typedef struct QemuTextConsole { =20 QemuVT100 vt; Chardev *chr; - /* fifo for key pressed */ - Fifo8 out_fifo; } QemuTextConsole; =20 typedef QemuConsoleClass QemuTextConsoleClass; @@ -102,15 +112,6 @@ OBJECT_DEFINE_TYPE(QemuFixedTextConsole, qemu_fixed_te= xt_console, QEMU_FIXED_TEX struct VCChardev { Chardev parent; QemuTextConsole *console; - - enum TTYState state; - int esc_params[MAX_ESC_PARAMS]; - int nb_esc_params; - uint32_t utf8_state; /* UTF-8 DFA decoder state */ - uint32_t utf8_codepoint; /* accumulated UTF-8 code point */ - TextAttributes t_attrib; /* currently active text attributes */ - TextAttributes t_attrib_saved; - int x_saved, y_saved; }; typedef struct VCChardev VCChardev; =20 @@ -299,36 +300,35 @@ static void vt100_scroll(QemuVT100 *vt, int ydelta) vt100_refresh(vt); } =20 -static void qemu_text_console_flush(QemuTextConsole *s) +static void qemu_text_console_out_flush(QemuTextConsole *s) { uint32_t len, avail; =20 len =3D qemu_chr_be_can_write(s->chr); - avail =3D fifo8_num_used(&s->out_fifo); + avail =3D fifo8_num_used(&s->vt.out_fifo); while (len > 0 && avail > 0) { const uint8_t *buf; uint32_t size; =20 - buf =3D fifo8_pop_bufptr(&s->out_fifo, MIN(len, avail), &size); + buf =3D fifo8_pop_bufptr(&s->vt.out_fifo, MIN(len, avail), &size); qemu_chr_be_write(s->chr, buf, size); len =3D qemu_chr_be_can_write(s->chr); avail -=3D size; } } =20 -static void qemu_text_console_write(QemuTextConsole *s, const void *buf, s= ize_t len) +static void vt100_write(QemuVT100 *vt, const void *buf, size_t len) { uint32_t num_free; =20 - num_free =3D fifo8_num_free(&s->out_fifo); - fifo8_push_all(&s->out_fifo, buf, MIN(num_free, len)); - qemu_text_console_flush(s); + num_free =3D fifo8_num_free(&vt->out_fifo); + fifo8_push_all(&vt->out_fifo, buf, MIN(num_free, len)); + vt->out_flush(vt); } =20 /* called when an ascii key is pressed */ void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) { - QemuVT100 *vt =3D &s->vt; uint8_t buf[16], *q; int c; =20 @@ -360,16 +360,16 @@ void qemu_text_console_handle_keysym(QemuTextConsole = *s, int keysym) *q++ =3D '\033'; *q++ =3D '['; *q++ =3D keysym & 0xff; - } else if (vt->echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'))= { + } else if (s->vt.echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'= )) { qemu_chr_write(s->chr, (uint8_t *)"\r", 1, true); *q++ =3D '\n'; } else { *q++ =3D keysym; } - if (vt->echo) { + if (s->vt.echo) { qemu_chr_write(s->chr, buf, q - buf, true); } - qemu_text_console_write(s, buf, q - buf); + vt100_write(&s->vt, buf, q - buf); break; } } @@ -377,30 +377,29 @@ void qemu_text_console_handle_keysym(QemuTextConsole = *s, int keysym) static void text_console_update(void *opaque, console_ch_t *chardata) { QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(opaque); - QemuVT100 *vt =3D &s->vt; int i, j, src; =20 - if (vt->text_x[0] <=3D vt->text_x[1]) { - src =3D (vt->y_base + vt->text_y[0]) * vt->width; - chardata +=3D vt->text_y[0] * vt->width; - for (i =3D vt->text_y[0]; i <=3D vt->text_y[1]; i ++) - for (j =3D 0; j < vt->width; j++, src++) { + if (s->vt.text_x[0] <=3D s->vt.text_x[1]) { + src =3D (s->vt.y_base + s->vt.text_y[0]) * s->vt.width; + chardata +=3D s->vt.text_y[0] * s->vt.width; + for (i =3D s->vt.text_y[0]; i <=3D s->vt.text_y[1]; i ++) + for (j =3D 0; j < s->vt.width; j++, src++) { console_write_ch(chardata ++, - ATTR2CHTYPE(vt->cells[src].ch, - vt->cells[src].t_attrib.fgcol, - vt->cells[src].t_attrib.bgcol, - vt->cells[src].t_attrib.bold)= ); + ATTR2CHTYPE(s->vt.cells[src].ch, + s->vt.cells[src].t_attrib.fgc= ol, + s->vt.cells[src].t_attrib.bgc= ol, + s->vt.cells[src].t_attrib.bol= d)); } - dpy_text_update(QEMU_CONSOLE(s), vt->text_x[0], vt->text_y[0], - vt->text_x[1] - vt->text_x[0], i - vt->text_y[0]); - vt->text_x[0] =3D vt->width; - vt->text_y[0] =3D vt->height; - vt->text_x[1] =3D 0; - vt->text_y[1] =3D 0; + dpy_text_update(QEMU_CONSOLE(s), s->vt.text_x[0], s->vt.text_y[0], + s->vt.text_x[1] - s->vt.text_x[0], i - s->vt.text_= y[0]); + s->vt.text_x[0] =3D s->vt.width; + s->vt.text_y[0] =3D s->vt.height; + s->vt.text_x[1] =3D 0; + s->vt.text_y[1] =3D 0; } - if (vt->cursor_invalidate) { - dpy_text_cursor(QEMU_CONSOLE(s), vt->x, vt->y); - vt->cursor_invalidate =3D 0; + if (s->vt.cursor_invalidate) { + dpy_text_cursor(QEMU_CONSOLE(s), s->vt.x, s->vt.y); + s->vt.cursor_invalidate =3D 0; } } =20 @@ -489,103 +488,101 @@ static void vt100_put_lf(QemuVT100 *vt) * NOTE: I know this code is not very efficient (checking every color for = it * self) but it is more readable and better maintainable. */ -static void vc_handle_escape(VCChardev *vc) +static void vt100_handle_escape(QemuVT100 *vt) { int i; =20 - for (i =3D 0; i < vc->nb_esc_params; i++) { - switch (vc->esc_params[i]) { + for (i =3D 0; i < vt->nb_esc_params; i++) { + switch (vt->esc_params[i]) { case 0: /* reset all console attributes to default */ - vc->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + vt->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; break; case 1: - vc->t_attrib.bold =3D 1; + vt->t_attrib.bold =3D 1; break; case 4: - vc->t_attrib.uline =3D 1; + vt->t_attrib.uline =3D 1; break; case 5: - vc->t_attrib.blink =3D 1; + vt->t_attrib.blink =3D 1; break; case 7: - vc->t_attrib.invers =3D 1; + vt->t_attrib.invers =3D 1; break; case 8: - vc->t_attrib.unvisible =3D 1; + vt->t_attrib.unvisible =3D 1; break; case 22: - vc->t_attrib.bold =3D 0; + vt->t_attrib.bold =3D 0; break; case 24: - vc->t_attrib.uline =3D 0; + vt->t_attrib.uline =3D 0; break; case 25: - vc->t_attrib.blink =3D 0; + vt->t_attrib.blink =3D 0; break; case 27: - vc->t_attrib.invers =3D 0; + vt->t_attrib.invers =3D 0; break; case 28: - vc->t_attrib.unvisible =3D 0; + vt->t_attrib.unvisible =3D 0; break; /* set foreground color */ case 30: - vc->t_attrib.fgcol =3D QEMU_COLOR_BLACK; + vt->t_attrib.fgcol =3D QEMU_COLOR_BLACK; break; case 31: - vc->t_attrib.fgcol =3D QEMU_COLOR_RED; + vt->t_attrib.fgcol =3D QEMU_COLOR_RED; break; case 32: - vc->t_attrib.fgcol =3D QEMU_COLOR_GREEN; + vt->t_attrib.fgcol =3D QEMU_COLOR_GREEN; break; case 33: - vc->t_attrib.fgcol =3D QEMU_COLOR_YELLOW; + vt->t_attrib.fgcol =3D QEMU_COLOR_YELLOW; break; case 34: - vc->t_attrib.fgcol =3D QEMU_COLOR_BLUE; + vt->t_attrib.fgcol =3D QEMU_COLOR_BLUE; break; case 35: - vc->t_attrib.fgcol =3D QEMU_COLOR_MAGENTA; + vt->t_attrib.fgcol =3D QEMU_COLOR_MAGENTA; break; case 36: - vc->t_attrib.fgcol =3D QEMU_COLOR_CYAN; + vt->t_attrib.fgcol =3D QEMU_COLOR_CYAN; break; case 37: - vc->t_attrib.fgcol =3D QEMU_COLOR_WHITE; + vt->t_attrib.fgcol =3D QEMU_COLOR_WHITE; break; /* set background color */ case 40: - vc->t_attrib.bgcol =3D QEMU_COLOR_BLACK; + vt->t_attrib.bgcol =3D QEMU_COLOR_BLACK; break; case 41: - vc->t_attrib.bgcol =3D QEMU_COLOR_RED; + vt->t_attrib.bgcol =3D QEMU_COLOR_RED; break; case 42: - vc->t_attrib.bgcol =3D QEMU_COLOR_GREEN; + vt->t_attrib.bgcol =3D QEMU_COLOR_GREEN; break; case 43: - vc->t_attrib.bgcol =3D QEMU_COLOR_YELLOW; + vt->t_attrib.bgcol =3D QEMU_COLOR_YELLOW; break; case 44: - vc->t_attrib.bgcol =3D QEMU_COLOR_BLUE; + vt->t_attrib.bgcol =3D QEMU_COLOR_BLUE; break; case 45: - vc->t_attrib.bgcol =3D QEMU_COLOR_MAGENTA; + vt->t_attrib.bgcol =3D QEMU_COLOR_MAGENTA; break; case 46: - vc->t_attrib.bgcol =3D QEMU_COLOR_CYAN; + vt->t_attrib.bgcol =3D QEMU_COLOR_CYAN; break; case 47: - vc->t_attrib.bgcol =3D QEMU_COLOR_WHITE; + vt->t_attrib.bgcol =3D QEMU_COLOR_WHITE; break; } } } =20 -static void vc_update_xy(VCChardev *vc, int x, int y) +static void vt100_update_xy(QemuVT100 *vt, int x, int y) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; TextCell *c; int y1, y2; =20 @@ -606,14 +603,12 @@ static void vc_update_xy(VCChardev *vc, int x, int y) c =3D &vt->cells[y1 * vt->width + x]; vt100_putcharxy(vt, x, y2, c->ch, &(c->t_attrib)); - vt100_invalidate_xy(&s->vt, x, y2); + vt100_invalidate_xy(vt, x, y2); } } =20 -static void vc_clear_xy(VCChardev *vc, int x, int y) +static void vt100_clear_xy(QemuVT100 *vt, int x, int y) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; int y1 =3D (vt->y_base + y) % vt->total_height; if (x >=3D vt->width) { x =3D vt->width - 1; @@ -621,7 +616,7 @@ static void vc_clear_xy(VCChardev *vc, int x, int y) TextCell *c =3D &vt->cells[y1 * vt->width + x]; c->ch =3D ' '; c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - vc_update_xy(vc, x, y); + vt100_update_xy(vt, x, y); } =20 /* @@ -664,10 +659,8 @@ static uint32_t bh_utf8_decode(uint32_t *state, uint32= _t *codep, uint32_t byte) return *state; } =20 -static void vc_put_one(VCChardev *vc, int ch) +static void vt100_put_one(QemuVT100 *vt, int ch) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; TextCell *c; int y1; if (vt->x >=3D vt->width) { @@ -678,17 +671,14 @@ static void vc_put_one(VCChardev *vc, int ch) y1 =3D (vt->y_base + vt->y) % vt->total_height; c =3D &vt->cells[y1 * vt->width + vt->x]; c->ch =3D ch; - c->t_attrib =3D vc->t_attrib; - vc_update_xy(vc, vt->x, vt->y); + c->t_attrib =3D vt->t_attrib; + vt100_update_xy(vt, vt->x, vt->y); vt->x++; } =20 /* set cursor, checking bounds */ -static void vc_set_cursor(VCChardev *vc, int x, int y) +static void vt100_set_cursor(QemuVT100 *vt, int x, int y) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; - if (x < 0) { x =3D 0; } @@ -712,10 +702,8 @@ static void vc_set_cursor(VCChardev *vc, int x, int y) * characters between the cursor and right margin move to the * left. Character attributes move with the characters. */ -static void vc_csi_P(struct VCChardev *vc, unsigned int nr) +static void vt100_csi_P(QemuVT100 *vt, unsigned int nr) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; TextCell *c1, *c2; unsigned int x1, x2, y; unsigned int end, len; @@ -739,12 +727,12 @@ static void vc_csi_P(struct VCChardev *vc, unsigned i= nt nr) c2 =3D &vt->cells[y * vt->width + x2]; memmove(c1, c2, len * sizeof(*c1)); for (end =3D x1 + len; x1 < end; x1++) { - vc_update_xy(vc, x1, vt->y); + vt100_update_xy(vt, x1, vt->y); } } /* Clear the rest */ for (; x1 < vt->width; x1++) { - vc_clear_xy(vc, x1, vt->y); + vt100_clear_xy(vt, x1, vt->y); } } =20 @@ -754,10 +742,8 @@ static void vc_csi_P(struct VCChardev *vc, unsigned in= t nr) * blank characters. Text between the cursor and right margin moves to * the right. Characters scrolled past the right margin are lost. */ -static void vc_csi_at(struct VCChardev *vc, unsigned int nr) +static void vt100_csi_at(QemuVT100 *vt, unsigned int nr) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; TextCell *c1, *c2; unsigned int x1, x2, y; unsigned int end, len; @@ -781,61 +767,53 @@ static void vc_csi_at(struct VCChardev *vc, unsigned = int nr) c2 =3D &vt->cells[y * vt->width + x2]; memmove(c1, c2, len * sizeof(*c1)); for (end =3D x1 + len; x1 < end; x1++) { - vc_update_xy(vc, x1, vt->y); + vt100_update_xy(vt, x1, vt->y); } } /* Insert blanks */ for (x1 =3D vt->x; x1 < vt->x + nr; x1++) { - vc_clear_xy(vc, x1, vt->y); + vt100_clear_xy(vt, x1, vt->y); } } =20 /** - * vc_save_cursor() - saves cursor position and character attributes. + * vt100_save_cursor() - saves cursor position and character attributes. */ -static void vc_save_cursor(VCChardev *vc) +static void vt100_save_cursor(QemuVT100 *vt) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; - - vc->x_saved =3D vt->x; - vc->y_saved =3D vt->y; - vc->t_attrib_saved =3D vc->t_attrib; + vt->x_saved =3D vt->x; + vt->y_saved =3D vt->y; + vt->t_attrib_saved =3D vt->t_attrib; } =20 /** - * vc_restore_cursor() - restores cursor position and character + * vt100_restore_cursor() - restores cursor position and character * attributes from saved state. */ -static void vc_restore_cursor(VCChardev *vc) +static void vt100_restore_cursor(QemuVT100 *vt) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; - - vt->x =3D vc->x_saved; - vt->y =3D vc->y_saved; - vc->t_attrib =3D vc->t_attrib_saved; + vt->x =3D vt->x_saved; + vt->y =3D vt->y_saved; + vt->t_attrib =3D vt->t_attrib_saved; } =20 -static void vc_putchar(VCChardev *vc, int ch) +static void vt100_putchar(QemuVT100 *vt, int ch) { - QemuTextConsole *s =3D vc->console; - QemuVT100 *vt =3D &s->vt; int i; int x, y; g_autofree char *response =3D NULL; =20 - switch(vc->state) { + switch (vt->state) { case TTY_STATE_NORM: /* Feed byte through the UTF-8 DFA decoder */ if (ch >=3D 0x80) { - switch (bh_utf8_decode(&vc->utf8_state, &vc->utf8_codepoint, c= h)) { + switch (bh_utf8_decode(&vt->utf8_state, &vt->utf8_codepoint, c= h)) { case BH_UTF8_ACCEPT: - vc_put_one(vc, unicode_to_cp437(vc->utf8_codepoint)); + vt100_put_one(vt, unicode_to_cp437(vt->utf8_codepoint)); break; case BH_UTF8_REJECT: /* Reset state so the decoder can resync */ - vc->utf8_state =3D BH_UTF8_ACCEPT; + vt->utf8_state =3D BH_UTF8_ACCEPT; break; default: /* Need more bytes */ @@ -844,13 +822,13 @@ static void vc_putchar(VCChardev *vc, int ch) break; } /* ASCII byte: abort any pending UTF-8 sequence */ - vc->utf8_state =3D BH_UTF8_ACCEPT; + vt->utf8_state =3D BH_UTF8_ACCEPT; switch(ch) { case '\r': /* carriage return */ vt->x =3D 0; break; case '\n': /* newline */ - vt100_put_lf(&s->vt); + vt100_put_lf(vt); break; case '\b': /* backspace */ if (vt->x > 0) @@ -874,95 +852,95 @@ static void vc_putchar(VCChardev *vc, int ch) /* SI (shift in), character set 0 (ignored) */ break; case 27: /* esc (introducing an escape sequence) */ - vc->state =3D TTY_STATE_ESC; + vt->state =3D TTY_STATE_ESC; break; default: - vc_put_one(vc, ch); + vt100_put_one(vt, ch); break; } break; case TTY_STATE_ESC: /* check if it is a terminal escape sequence */ if (ch =3D=3D '[') { for(i=3D0;iesc_params[i] =3D 0; - vc->nb_esc_params =3D 0; - vc->state =3D TTY_STATE_CSI; + vt->esc_params[i] =3D 0; + vt->nb_esc_params =3D 0; + vt->state =3D TTY_STATE_CSI; } else if (ch =3D=3D '(') { - vc->state =3D TTY_STATE_G0; + vt->state =3D TTY_STATE_G0; } else if (ch =3D=3D ')') { - vc->state =3D TTY_STATE_G1; + vt->state =3D TTY_STATE_G1; } else if (ch =3D=3D ']' || ch =3D=3D 'P' || ch =3D=3D 'X' || ch =3D=3D '^' || ch =3D=3D '_') { /* String sequences: OSC, DCS, SOS, PM, APC */ - vc->state =3D TTY_STATE_OSC; + vt->state =3D TTY_STATE_OSC; } else if (ch =3D=3D '7') { - vc_save_cursor(vc); - vc->state =3D TTY_STATE_NORM; + vt100_save_cursor(vt); + vt->state =3D TTY_STATE_NORM; } else if (ch =3D=3D '8') { - vc_restore_cursor(vc); - vc->state =3D TTY_STATE_NORM; + vt100_restore_cursor(vt); + vt->state =3D TTY_STATE_NORM; } else { - vc->state =3D TTY_STATE_NORM; + vt->state =3D TTY_STATE_NORM; } break; case TTY_STATE_CSI: /* handle escape sequence parameters */ if (ch >=3D '0' && ch <=3D '9') { - if (vc->nb_esc_params < MAX_ESC_PARAMS) { - int *param =3D &vc->esc_params[vc->nb_esc_params]; + if (vt->nb_esc_params < MAX_ESC_PARAMS) { + int *param =3D &vt->esc_params[vt->nb_esc_params]; int digit =3D (ch - '0'); =20 *param =3D (*param <=3D (INT_MAX - digit) / 10) ? *param * 10 + digit : INT_MAX; } } else { - if (vc->nb_esc_params < MAX_ESC_PARAMS) - vc->nb_esc_params++; + if (vt->nb_esc_params < MAX_ESC_PARAMS) + vt->nb_esc_params++; if (ch =3D=3D ';' || ch =3D=3D '?') { break; } - trace_console_putchar_csi(vc->esc_params[0], vc->esc_params[1], - ch, vc->nb_esc_params); - vc->state =3D TTY_STATE_NORM; + trace_console_putchar_csi(vt->esc_params[0], vt->esc_params[1], + ch, vt->nb_esc_params); + vt->state =3D TTY_STATE_NORM; switch(ch) { case 'A': /* move cursor up */ - if (vc->esc_params[0] =3D=3D 0) { - vc->esc_params[0] =3D 1; + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; } - vc_set_cursor(vc, vt->x, vt->y - vc->esc_params[0]); + vt100_set_cursor(vt, vt->x, vt->y - vt->esc_params[0]); break; case 'B': /* move cursor down */ - if (vc->esc_params[0] =3D=3D 0) { - vc->esc_params[0] =3D 1; + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; } - vc_set_cursor(vc, vt->x, vt->y + vc->esc_params[0]); + vt100_set_cursor(vt, vt->x, vt->y + vt->esc_params[0]); break; case 'C': /* move cursor right */ - if (vc->esc_params[0] =3D=3D 0) { - vc->esc_params[0] =3D 1; + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; } - vc_set_cursor(vc, vt->x + vc->esc_params[0], vt->y); + vt100_set_cursor(vt, vt->x + vt->esc_params[0], vt->y); break; case 'D': /* move cursor left */ - if (vc->esc_params[0] =3D=3D 0) { - vc->esc_params[0] =3D 1; + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; } - vc_set_cursor(vc, vt->x - vc->esc_params[0], vt->y); + vt100_set_cursor(vt, vt->x - vt->esc_params[0], vt->y); break; case 'G': /* move cursor to column */ - vc_set_cursor(vc, vc->esc_params[0] - 1, vt->y); + vt100_set_cursor(vt, vt->esc_params[0] - 1, vt->y); break; case 'f': case 'H': /* move cursor to row, column */ - vc_set_cursor(vc, vc->esc_params[1] - 1, vc->esc_params[0]= - 1); + vt100_set_cursor(vt, vt->esc_params[1] - 1, vt->esc_params= [0] - 1); break; case 'J': - switch (vc->esc_params[0]) { + switch (vt->esc_params[0]) { case 0: /* clear to end of screen */ for (y =3D vt->y; y < vt->height; y++) { @@ -970,7 +948,7 @@ static void vc_putchar(VCChardev *vc, int ch) if (y =3D=3D vt->y && x < vt->x) { continue; } - vc_clear_xy(vc, x, y); + vt100_clear_xy(vt, x, y); } } break; @@ -981,7 +959,7 @@ static void vc_putchar(VCChardev *vc, int ch) if (y =3D=3D vt->y && x > vt->x) { break; } - vc_clear_xy(vc, x, y); + vt100_clear_xy(vt, x, y); } } break; @@ -989,62 +967,62 @@ static void vc_putchar(VCChardev *vc, int ch) /* clear entire screen */ for (y =3D 0; y < vt->height; y++) { for (x =3D 0; x < vt->width; x++) { - vc_clear_xy(vc, x, y); + vt100_clear_xy(vt, x, y); } } break; } break; case 'K': - switch (vc->esc_params[0]) { + switch (vt->esc_params[0]) { case 0: /* clear to eol */ for(x =3D vt->x; x < vt->width; x++) { - vc_clear_xy(vc, x, vt->y); + vt100_clear_xy(vt, x, vt->y); } break; case 1: /* clear from beginning of line */ for (x =3D 0; x <=3D vt->x && x < vt->width; x++) { - vc_clear_xy(vc, x, vt->y); + vt100_clear_xy(vt, x, vt->y); } break; case 2: /* clear entire line */ for(x =3D 0; x < vt->width; x++) { - vc_clear_xy(vc, x, vt->y); + vt100_clear_xy(vt, x, vt->y); } break; } break; case 'P': - vc_csi_P(vc, vc->esc_params[0]); + vt100_csi_P(vt, vt->esc_params[0]); break; case 'm': - vc_handle_escape(vc); + vt100_handle_escape(vt); break; case 'n': - switch (vc->esc_params[0]) { + switch (vt->esc_params[0]) { case 5: /* report console status (always succeed)*/ - qemu_text_console_write(s, "\033[0n", 4); + vt100_write(vt, "\033[0n", 4); break; case 6: /* report cursor position */ response =3D g_strdup_printf("\033[%d;%dR", vt->y + 1, vt->x + 1); - qemu_text_console_write(s, response, strlen(response)); + vt100_write(vt, response, strlen(response)); break; } break; case 's': - vc_save_cursor(vc); + vt100_save_cursor(vt); break; case 'u': - vc_restore_cursor(vc); + vt100_restore_cursor(vt); break; case '@': - vc_csi_at(vc, vc->esc_params[0]); + vt100_csi_at(vt, vt->esc_params[0]); break; default: trace_console_putchar_unhandled(ch); @@ -1056,10 +1034,10 @@ static void vc_putchar(VCChardev *vc, int ch) case TTY_STATE_OSC: /* Operating System Command: ESC ] ... BEL/ST */ if (ch =3D=3D '\a') { /* BEL terminates OSC */ - vc->state =3D TTY_STATE_NORM; + vt->state =3D TTY_STATE_NORM; } else if (ch =3D=3D 27) { /* ESC might start ST (ESC \) */ - vc->state =3D TTY_STATE_ESC; + vt->state =3D TTY_STATE_ESC; } /* All other bytes are silently consumed */ break; @@ -1070,7 +1048,7 @@ static void vc_putchar(VCChardev *vc, int ch) /* Latin-1 map */ break; } - vc->state =3D TTY_STATE_NORM; + vt->state =3D TTY_STATE_NORM; break; } } @@ -1083,22 +1061,21 @@ static int vc_chr_write(Chardev *chr, const uint8_t= *buf, int len) { VCChardev *drv =3D VC_CHARDEV(chr); QemuTextConsole *s =3D drv->console; - QemuVT100 *vt =3D &s->vt; int i; =20 - vt->update_x0 =3D vt->width * FONT_WIDTH; - vt->update_y0 =3D vt->height * FONT_HEIGHT; - vt->update_x1 =3D 0; - vt->update_y1 =3D 0; - vt100_show_cursor(vt, 0); + s->vt.update_x0 =3D s->vt.width * FONT_WIDTH; + s->vt.update_y0 =3D s->vt.height * FONT_HEIGHT; + s->vt.update_x1 =3D 0; + s->vt.update_y1 =3D 0; + vt100_show_cursor(&s->vt, 0); for(i =3D 0; i < len; i++) { - vc_putchar(drv, buf[i]); + vt100_putchar(&s->vt, buf[i]); } - vt100_show_cursor(vt, 1); - if (vt->update_x0 < vt->update_x1) { - vt100_image_update(vt, vt->update_x0, vt->update_y0, - vt->update_x1 - vt->update_x0, - vt->update_y1 - vt->update_y0); + vt100_show_cursor(&s->vt, 1); + if (s->vt.update_x0 < s->vt.update_x1) { + vt100_image_update(&s->vt, s->vt.update_x0, s->vt.update_y0, + s->vt.update_x1 - s->vt.update_x0, + s->vt.update_y1 - s->vt.update_y0); } return len; } @@ -1167,9 +1144,6 @@ qemu_text_console_init(Object *obj) { QemuTextConsole *c =3D QEMU_TEXT_CONSOLE(obj); =20 - QTAILQ_INSERT_HEAD(&vt100s, &c->vt, list); - fifo8_create(&c->out_fifo, 16); - c->vt.total_height =3D DEFAULT_BACKSCROLL; QEMU_CONSOLE(c)->hw_ops =3D &text_console_ops; QEMU_CONSOLE(c)->hw =3D c; } @@ -1193,7 +1167,7 @@ static void vc_chr_accept_input(Chardev *chr) { VCChardev *drv =3D VC_CHARDEV(chr); =20 - qemu_text_console_flush(drv->console); + qemu_text_console_out_flush(drv->console); } =20 static void vc_chr_set_echo(Chardev *chr, bool echo) @@ -1215,6 +1189,13 @@ static void text_console_image_update(QemuVT100 *vt,= int x, int y, int width, in dpy_gfx_update(QEMU_CONSOLE(console), x, y, width, height); } =20 +static void text_console_out_flush(QemuVT100 *vt) +{ + QemuTextConsole *console =3D container_of(vt, QemuTextConsole, vt); + + qemu_text_console_out_flush(console); +} + static bool vc_chr_open(Chardev *chr, ChardevBackend *backend, Error **err= p) { ChardevVC *vc =3D backend->u.vc.data; @@ -1244,24 +1225,28 @@ static bool vc_chr_open(Chardev *chr, ChardevBacken= d *backend, Error **errp) s =3D QEMU_TEXT_CONSOLE(object_new(TYPE_QEMU_FIXED_TEXT_CONSOLE)); } =20 + QTAILQ_INSERT_HEAD(&vt100s, &s->vt, list); + fifo8_create(&s->vt.out_fifo, 16); + s->vt.total_height =3D DEFAULT_BACKSCROLL; dpy_gfx_replace_surface(QEMU_CONSOLE(s), qemu_create_displaysurface(wi= dth, height)); s->vt.image_update =3D text_console_image_update; + s->vt.out_flush =3D text_console_out_flush; =20 s->chr =3D chr; drv->console =3D s; =20 /* set current text attributes to default */ - drv->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + s->vt.t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; vt100_set_image(&s->vt, QEMU_CONSOLE(s)->surface->image); =20 if (chr->label) { char *msg; =20 - drv->t_attrib.bgcol =3D QEMU_COLOR_BLUE; + s->vt.t_attrib.bgcol =3D QEMU_COLOR_BLUE; msg =3D g_strdup_printf("%s console\r\n", chr->label); qemu_chr_write(chr, (uint8_t *)msg, strlen(msg), true); g_free(msg); - drv->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + s->vt.t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; } =20 qemu_chr_be_event(chr, CHR_EVENT_OPENED); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848959; cv=none; d=zohomail.com; s=zohoarc; b=Nke8CtRwxg83780PF0/INaX98YEg5a2PHTtrdrd9xpOdXQU0j3bJ1rxx9qCzXrJ7JlMLyrjvkywDP3llRodFztO0byxSPMVvenLxl7/H0nt8YQksESbW9ziaUlFMPvLuDvycowqPTkYsqMXtoqx5JHcy8IUIRvuEAm8BNrxGC74= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848958; 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=Nlf2o8mRqacvDJSwzpHGOMMjfkTarzsBxasECZnZ52w=; b=gY3sd6nU3TSgzHyDmLkR7dH1ybOMCi63N/Zw25o86u3TSqLv5+LHCJsmy3ce2a/cmrqFbd8NNjlo/9z568VQ3Fk2kwKPiodW0hvGtsTcBRwWZHvr5eJVLB+iUrMXIV7q50FxGVqnfj17+tiv0bXIsH53fU+iV00g/P75ufLKXfA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848958991287.88921961103847; Fri, 10 Apr 2026 12:22:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQI-0000Xt-D3; Fri, 10 Apr 2026 15:21:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQ9-0008Lq-IJ for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQ7-0001dN-Tw for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:37 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-iGkVYhm7Mp27tI82cdbnXw-1; Fri, 10 Apr 2026 15:21:31 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0573B195609D; Fri, 10 Apr 2026 19:21:31 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EB5E11800357; Fri, 10 Apr 2026 19:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848895; 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=Nlf2o8mRqacvDJSwzpHGOMMjfkTarzsBxasECZnZ52w=; b=SI2xdqCST6qvYRJ06ADo3p61qOaJFnVsGFAuAL9OKj4Tmo3oETNupjlIkm1vkIv9NoYT+K at1tc0q4mmKeeahZI0Rdlmwu7MqZ/DQ5WWxlT2QWmMKjV8HEpL/0OA2eA7/YLhHh1Nbt2e PIAJDQbYca7vzPtvYYwaba9C0ZVwJ2k= X-MC-Unique: iGkVYhm7Mp27tI82cdbnXw-1 X-Mimecast-MFC-AGG-ID: iGkVYhm7Mp27tI82cdbnXw_1775848891 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:48 +0400 Subject: [PATCH v2 26/67] ui/console-vc: extract vt100_input() from vc_chr_write() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-26-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2581; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=TYkIOGSAidOPC1GAUAmf1ai1B20Ef3cKVdaaYTLqsSc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0UC+ZcTORFPunFNKAFArqyjf73drBZpEU6O PZgTCUA3QqJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFAAKCRDa6OEJdZac 5d76EACknccvmeujT9lmEtJYNq5TH/2P28Av+Tfxl13hAFDh5fKsr1Zc8VthN9h4y/E7CqM92Hh PJYFcbtZrRYIhltxj/dKCstiB+kll0R40PG2jyNsTNDE886PXgX0LbC2dJZykKrYX++FVqW6RBX 6jPYMT5DLohLmRYSF+5SoyS6uVo+Uz98HvKFWNoYtiOtKpcS+5zFAGzCyKeFKbUXZIRN0sxCrMc MHqRy8MqaLSBtluQ+M1xwajPoimVHbEsRMqHTRImGDUTinEY0LA2VQg8dcaCcTDrrUqqowT3V/j +pKxCXCRmm311+O4jNIu5UwMAl7BTBmSctGO6MrvcvhiZnccsVDOGypIsfddB4NUOqRKQahM7F8 WZ0Ze/xCV2ozfpur9cZ+2iXYAr1STvBaXDQ3F/kvBFqRpHzaxPVyAeqdMK0YetZqa9QtJbcBW0G 2Tpe8FOS7v9z423UCOnBDHNLkG66BdmlX7FZVlx06ilqiyLB9fYo1nV51e6hZiYQN7Ce9cItaoV I9naMIlfdsftN1gBt6z/JBhtRng270pBeMQZ4GgSwibU8l7Xms5nx+hkG4qaCnmhIsUSbLE6dRj a18bwhiD0PvkAGsVc2OaX0F15EK9XGD9fz81CorQX8FWWCWCPy/CVF6sZdTmRKIq6ZuSG/kdt1z uT10k5nel20LK6Q== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848959876154100 Move the VT100 input processing logic out of vc_chr_write() into a new vt100_input() function that operates on QemuVT100 directly, rather than going through the Chardev/VCChardev layers. This continues the effort to decouple the VT100 emulation from the chardev backend, making the VT100 layer self-contained and reusable. vc_chr_write() becomes a thin wrapper that extracts the QemuVT100 from the chardev and delegates to vt100_input(). Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 5cfb3dfcf72..15600128380 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -1057,29 +1057,35 @@ static void vt100_putchar(QemuVT100 *vt, int ch) DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV, TYPE_CHARDEV_VC) =20 -static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len) +static size_t vt100_input(QemuVT100 *vt, const uint8_t *buf, size_t len) { - VCChardev *drv =3D VC_CHARDEV(chr); - QemuTextConsole *s =3D drv->console; int i; =20 - s->vt.update_x0 =3D s->vt.width * FONT_WIDTH; - s->vt.update_y0 =3D s->vt.height * FONT_HEIGHT; - s->vt.update_x1 =3D 0; - s->vt.update_y1 =3D 0; - vt100_show_cursor(&s->vt, 0); + vt->update_x0 =3D vt->width * FONT_WIDTH; + vt->update_y0 =3D vt->height * FONT_HEIGHT; + vt->update_x1 =3D 0; + vt->update_y1 =3D 0; + vt100_show_cursor(vt, 0); for(i =3D 0; i < len; i++) { - vt100_putchar(&s->vt, buf[i]); + vt100_putchar(vt, buf[i]); } - vt100_show_cursor(&s->vt, 1); - if (s->vt.update_x0 < s->vt.update_x1) { - vt100_image_update(&s->vt, s->vt.update_x0, s->vt.update_y0, - s->vt.update_x1 - s->vt.update_x0, - s->vt.update_y1 - s->vt.update_y0); + vt100_show_cursor(vt, 1); + if (vt->update_x0 < vt->update_x1) { + vt100_image_update(vt, vt->update_x0, vt->update_y0, + vt->update_x1 - vt->update_x0, + vt->update_y1 - vt->update_y0); } return len; } =20 +static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len) +{ + VCChardev *drv =3D VC_CHARDEV(chr); + QemuTextConsole *s =3D drv->console; + + return vt100_input(&s->vt, buf, len); +} + void vt100_update_cursor(void) { QemuVT100 *vt; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848935; cv=none; d=zohomail.com; s=zohoarc; b=LcyzhiUwViA6zGnKiijDSBP104pHB/PWlyAPJ6D9Vo+oZGCh27cmkrND6OgVpg6Av6596AhQWtAJ9GJeuS/OPUoPI7K16laPzXVBKu4G7rkPawJqCt4cwaUWjIREGK4KyXA5Xkj+ItYy0IzsUdey4y56nnw7fyzZNzuTjO4buag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848935; 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=mDLYNXZjlTlSxzcMb74MrLDpQtk/TMaFCRV7hGZTqqY=; b=TIZAJpNqdamQON3tuOTTRSZZjTBrM6A/hgupbO164w4bitj001e4DlS49CjcUMMbjgpJN9IJyy92B39CVc054cL207pG7iOhqeJzmicU+HYChOUSy2t06ZzNBGDAJd3uJRtLjsE9UfaIXk9GYvNejYnbMBvyXFMYLfV2XBkCfW0= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848935231444.86242821842256; Fri, 10 Apr 2026 12:22:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQK-0000nz-4d; Fri, 10 Apr 2026 15:21:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQG-0000Ar-0K for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQD-0001eO-GF for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:43 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-4spDCFraP0WJ1VHOYwUL1g-1; Fri, 10 Apr 2026 15:21:37 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9EDC5180058D; Fri, 10 Apr 2026 19:21:36 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 53CD0180049F; Fri, 10 Apr 2026 19:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848900; 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=mDLYNXZjlTlSxzcMb74MrLDpQtk/TMaFCRV7hGZTqqY=; b=AHwq2CGu2NP9kzBCf8jalcdv3vLpe/g26PFAdXbaEsfUoHYULUvckSJPEe6JXDjV7nWJXd YW5cD4323B1JO/TjBq74uUV6/c4xNlzeq0y+a4snfcni82sgTT7OiGeoLUih6nXvIi8u7G ZQolQB4zn6LJgQPLvM/6VYR/M1C3r9k= X-MC-Unique: 4spDCFraP0WJ1VHOYwUL1g-1 X-Mimecast-MFC-AGG-ID: 4spDCFraP0WJ1VHOYwUL1g_1775848896 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:49 +0400 Subject: [PATCH v2 27/67] ui/console-vc: extract vt100_keysym() from qemu_text_console_handle_keysym() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-27-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2776; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=+oqf6AEhVnc97NT06e9h+2Bd4I1hHF+5HPYR62+f2m8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VPs59GxFP3E5IRXlZpPNm436UNDAUqvSYm W5mRcmifl2JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5YmBEAC60zh88rRAHw0/RtJ+Ol8A5TrU0qPxzRl+l9mkNV0burQiw9ftROtdRiy4q2/+Wsqgpwf sT7ccQPYHyU2nWpHQOnMrdDFbklXq0ohk3RzezjecKP9qqN6wIcMIEZ1gCEUB4xB50p9Zk4hQ/v yk/H//av7lOlAgaTZ8qnUqwhQ2kAcI+W8zKy+r4xMWfC6hVMyFhz5qpeF564WdTJC46gVpG073R dTflZYGep1yh6X6aZ63f+iFFXNEYtBTs4KMCYGQdje3EDMfWwwdmG3LbeedW7oD9W2iZv5duLNN 7H/fMOnEu+YNHTMdgR+KGyR1SPg/4BDJYct6X16L7TKhp4/aOdGnPNpCLF9rm+RpAGNqxWVqPqx LfngY77vYTjIfAztoq9IQYyM1DLJZKvLpc/UsuUKpulgp+umXtXC+PjegUuezx8qJJhmdtAALf0 wiTSauHzH0UbFGXDQpbb3G8t/CsJ8KVPSfZueSAlFsYrEbDHBpm5YOousGvAFK2LjCXX0osTuuH sOFUXXmeKHvUXAcB2wmKCCsQIFf6gww4ZOUZtxloHPcdhDuuFwqMN24oikMSa/WiLLyS6sedp4d koITS+OL09+mDlsRBckPi7nbJ1CfToOKtRm8ImpPpH0lZBKCSE9dkP+iyGk1ZaoCmaMEvEcR7YG N8ErT9xNAIXk2dw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848937479154100 Move the keysym handling logic out of qemu_text_console_handle_keysym() into a new vt100_keysym() helper that operates on QemuVT100 directly, continuing the effort to decouple the VT100 layer from the console layer. The echo path is updated to call vt100_input() instead of qemu_chr_write(), since the function no longer has direct access to the chardev. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 15600128380..194233f41df 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -326,24 +326,25 @@ static void vt100_write(QemuVT100 *vt, const void *bu= f, size_t len) vt->out_flush(vt); } =20 -/* called when an ascii key is pressed */ -void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) +static int vt100_input(QemuVT100 *vt, const uint8_t *buf, int len); + +static void vt100_keysym(QemuVT100 *vt, int keysym) { uint8_t buf[16], *q; int c; =20 switch(keysym) { case QEMU_KEY_CTRL_UP: - vt100_scroll(&s->vt, -1); + vt100_scroll(vt, -1); break; case QEMU_KEY_CTRL_DOWN: - vt100_scroll(&s->vt, 1); + vt100_scroll(vt, 1); break; case QEMU_KEY_CTRL_PAGEUP: - vt100_scroll(&s->vt, -10); + vt100_scroll(vt, -10); break; case QEMU_KEY_CTRL_PAGEDOWN: - vt100_scroll(&s->vt, 10); + vt100_scroll(vt, 10); break; default: /* convert the QEMU keysym to VT100 key string */ @@ -360,18 +361,24 @@ void qemu_text_console_handle_keysym(QemuTextConsole = *s, int keysym) *q++ =3D '\033'; *q++ =3D '['; *q++ =3D keysym & 0xff; - } else if (s->vt.echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'= )) { - qemu_chr_write(s->chr, (uint8_t *)"\r", 1, true); + } else if (vt->echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'))= { + vt100_input(vt, (uint8_t *)"\r", 1); *q++ =3D '\n'; } else { *q++ =3D keysym; } - if (s->vt.echo) { - qemu_chr_write(s->chr, buf, q - buf, true); + if (vt->echo) { + vt100_input(vt, buf, q - buf); } - vt100_write(&s->vt, buf, q - buf); + vt100_write(vt, buf, q - buf); break; } + +} +/* called when an ascii key is pressed */ +void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) +{ + vt100_keysym(&s->vt, keysym); } =20 static void text_console_update(void *opaque, console_ch_t *chardata) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848928; cv=none; d=zohomail.com; s=zohoarc; b=GA0aQsz1e9DZrMRqQ80m8pWWlUtje0CYcIbA80WZqxBGvaVGUI16w8H8egLE6JSlZi12M2XxEZxuvVm8bRiGQN3v6JEaB9Jg4qLDQ8y9SFAOytXwU6H/mUi7AVXS1Bfplm9PLUjoxbC8J2fkCFDW5J44KiiV1695FxB4AzKC7Bc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848928; 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=PlKFwmWjmC8Lncf18Tdazfm1QoSVzgcnfKazbHyaKp4=; b=ZMJxTCVC7TzFBNJCBmG9SYB53r/PhO0mYYJBWK7VVqgpbl9/NSfbuYx6lg4ymz5h8jSswS3lKOAGVqIPL8WVEhjLui8RGrYmFd1HDjod+giZkp3NyOS85W4L7q3I+THUQoTByIaVtnBM6UeVQb+ZMlajL+wwHKbi/hLIryxfk8w= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848928973426.9031000896731; Fri, 10 Apr 2026 12:22:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQL-000148-K8; Fri, 10 Apr 2026 15:21:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQK-0000wj-GU for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQI-0001f3-RH for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:48 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-122-tDXGYv-7ORGlXlUSR0ftFQ-1; Fri, 10 Apr 2026 15:21:43 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 79FB8180034F; Fri, 10 Apr 2026 19:21:42 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5AC5A3000C16; Fri, 10 Apr 2026 19:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848906; 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=PlKFwmWjmC8Lncf18Tdazfm1QoSVzgcnfKazbHyaKp4=; b=YHVxxAhF1y0atuY/OByx+3OCcbEWUoULNxKthr2xDAKDSsK6efjOIfmV+azh5yWpM3cA/e gKTQyhVhfR0nG5rUniHqC1KNgtHseRX9iq3HqGptuHbapRYQXrqU82d2q8EceC+EH8VnmJ xkNM4waIPDyZLTPsxHwPzNmJMKXQJZU= X-MC-Unique: tDXGYv-7ORGlXlUSR0ftFQ-1 X-Mimecast-MFC-AGG-ID: tDXGYv-7ORGlXlUSR0ftFQ_1775848902 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:50 +0400 Subject: [PATCH v2 28/67] ui/console-vc: extract vt100_init() and vt100_fini() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-28-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=3601; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Zhp6CmSbOUhHIMaEnP1CemI0/3Yw4E1NhjHME/nu10Y=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VpE3etBJUMcNi+ptl4BrW55cT9JMcpDHCr BOQnQqsii+JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5Y9QEAC11lsjNwwM37vnUAH+upQxOaUp62dJNnAiIh0z2IozourdPhmj5j7sSkDpIdTpS14yzUl IWncyp75mfwUDLn+mx+8/smy5WkYbIC241ZVt7FmsnaeKEGo/MuIFtaehbMLZe6K011tzcPCjcC tJEm/VUu19finhGWPbTnhiyMgExa2RoDMVlB4ZNMvBEhvPF4pet3CLAKcIn2ktDwtNyeevCDnAP /KtTrUIH8BAl4xcq04ri5Qf6vU9kf7GLFjH8kmrWYh8PapGRIGAuiqnxNwkdU4NdLpK0bSHvO0e +tdLo4Nu2uDZRgontHBV2CUtR6w/6XgKREgLT2/l96ZWUfh5q9SdY5q7gQ8WsRU/UdLHmFfnfVi 1MPf3Py6c2PS8L6rOi3ThIeaU0t3fbR0eqRz1PmTtktgLe2/KoN7OE4F3bJmkfvKzKqM2NeCJb6 18c1P0mKC4o3BuPVlM4p+HiGF/R8fd/rmrcASDbXZ+7tmIQfTqqJuZ5DOb1m1wDCuALtnm7Piiz 9KHIaOBeqOuyTXAtHx/3uyVlmwB2QrlYVXPidErPPoAobH+tNt17erK2/fPVzF4nS9d+nsX/Lxf WPMqAjL5M5kVejnoufpBgFa1b5IipjNLa1EHJKejseoFj0DioKoL/7TOdkC2FrZRNQPrlVFlDFz sCshkIRZKWSg/wQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848929529158500 Consolidate VT100 initialization and finalization into dedicated functions, continuing the extraction of the VT100 layer from the console/chardev code. vt100_init() gathers the scattered setup (cursor timer, list insertion, FIFO creation, default attributes, and image) that was previously spread across vc_chr_open() and qemu_text_console_class_init(). vt100_fini() pairs with it by handling list removal, FIFO destruction, and cells cleanup, replacing the open-coded QTAILQ_REMOVE in qemu_text_console_finalize(). Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-vc.c | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 194233f41df..84944f845e1 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -1127,12 +1127,19 @@ static void text_console_invalidate(void *opaque) vt100_refresh(&s->vt); } =20 +static void vt100_fini(QemuVT100 *vt) +{ + QTAILQ_REMOVE(&vt100s, vt, list); + fifo8_destroy(&vt->out_fifo); + g_free(vt->cells); +} + static void qemu_text_console_finalize(Object *obj) { QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(obj); =20 - QTAILQ_REMOVE(&vt100s, &s->vt, list); + vt100_fini(&s->vt); } =20 static void @@ -1140,10 +1147,6 @@ qemu_text_console_class_init(ObjectClass *oc, const = void *data) { QemuConsoleClass *cc =3D QEMU_CONSOLE_CLASS(oc); =20 - if (!cursor_timer) { - cursor_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, cursor_timer_cb= , NULL); - } - cc->get_label =3D qemu_text_console_get_label; } =20 @@ -1209,6 +1212,25 @@ static void text_console_out_flush(QemuVT100 *vt) qemu_text_console_out_flush(console); } =20 +static void vt100_init(QemuVT100 *vt, + pixman_image_t *image, + void (*image_update)(QemuVT100 *vt, int x, int y, i= nt w, int h), + void (*out_flush)(QemuVT100 *vt)) +{ + if (!cursor_timer) { + cursor_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, cursor_timer_cb= , NULL); + } + + QTAILQ_INSERT_HEAD(&vt100s, vt, list); + fifo8_create(&vt->out_fifo, 16); + vt->total_height =3D DEFAULT_BACKSCROLL; + vt->image_update =3D image_update; + vt->out_flush =3D out_flush; + /* set current text attributes to default */ + vt->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + vt100_set_image(vt, image); +} + static bool vc_chr_open(Chardev *chr, ChardevBackend *backend, Error **err= p) { ChardevVC *vc =3D backend->u.vc.data; @@ -1238,20 +1260,14 @@ static bool vc_chr_open(Chardev *chr, ChardevBacken= d *backend, Error **errp) s =3D QEMU_TEXT_CONSOLE(object_new(TYPE_QEMU_FIXED_TEXT_CONSOLE)); } =20 - QTAILQ_INSERT_HEAD(&vt100s, &s->vt, list); - fifo8_create(&s->vt.out_fifo, 16); - s->vt.total_height =3D DEFAULT_BACKSCROLL; dpy_gfx_replace_surface(QEMU_CONSOLE(s), qemu_create_displaysurface(wi= dth, height)); - s->vt.image_update =3D text_console_image_update; - s->vt.out_flush =3D text_console_out_flush; + vt100_init(&s->vt, QEMU_CONSOLE(s)->surface->image, + text_console_image_update, + text_console_out_flush); =20 s->chr =3D chr; drv->console =3D s; =20 - /* set current text attributes to default */ - s->vt.t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - vt100_set_image(&s->vt, QEMU_CONSOLE(s)->surface->image); - if (chr->label) { char *msg; =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849189; cv=none; d=zohomail.com; s=zohoarc; b=B3UthcjF0hxb2fKOLDlZzDJ52Q88bi22cX/EpHWg60qUwVYWsqxTEgRlJ/NxM+YTX62wy/AsrK3Ti4fg2OsIl1fd//Mf0B2TA12wgM9u0HW1TyXo4OO00+XPXmsPIiKDiyNssSeqDUV256Qp3nLNO63dyVNWlBqGN0PUfNR0Hig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849189; 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=W8WmhM62vcjlMfIWeknYsUyZb9ok8DBEJ8pMwnWqNZk=; b=hKaWYGADN6E7DpWd0Efo5znV9jQF4niRZi73KZJ5uP3ywUmid1QvyB4p/hjLqJmaJglcDN9alw1LMpoMCnORAW6G8KO+XlcAQOrnxuNo7SacSJHMBwYHXng6DaRT0wXilhJqkqn/wQO3UIREtFG5LcOin2YG0SyyB58avBegDTw= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849189275604.8940374070171; Fri, 10 Apr 2026 12:26:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQS-0002NZ-0t; Fri, 10 Apr 2026 15:21:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQP-0001x7-Rs for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQN-0001mJ-SX for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:21:53 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-FmmBAiSbMoSOL0urhiJNYw-1; Fri, 10 Apr 2026 15:21:48 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 218051956088 for ; Fri, 10 Apr 2026 19:21:48 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D8A17180049F; Fri, 10 Apr 2026 19:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848911; 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=W8WmhM62vcjlMfIWeknYsUyZb9ok8DBEJ8pMwnWqNZk=; b=AH6CX3QkvOC3ozdFKMRLVrfv3WRLwm8Lnl6xBv/vjc3fGoQiadjAUf7lz+YdUF26aki9dK p7pw2A+UCEJdxqpRoeMzu1qgUJocHztobJ2WHoCaWqqGLSd/jZ9exEZ8RFjtOm1UdA0OOe DL3Gn6cmgnq5gNqJ/r3a0nF1ZZa/MGU= X-MC-Unique: FmmBAiSbMoSOL0urhiJNYw-1 X-Mimecast-MFC-AGG-ID: FmmBAiSbMoSOL0urhiJNYw_1775848908 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:51 +0400 Subject: [PATCH v2 29/67] ui/console: remove console_ch_t typedef and console_write_ch() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-29-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=10951; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=TFoUqmf0MRQP1GY4HXtM1qmABrYOg9lFPh2W1ZlgYQE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VuTQ6eLEqSkAwpuBAjf2MRQycpgVk7jnxy vCbwxS9ddGJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5aC7EACxDdrbsbhfwiaHpj2NtGrEFgC3pfc34bdKMX+Oivwdv31KTFosV+6rCsUiCVOLRcvJQDn +30zmuf9gbkLUi65RRU7U6a2pooCHeM0uDLlqsS1xr4aQo7NE2VQ3mPplC+4iGuhFmg2/v1WPbM dPay863O29wkZYb5x3K/mb82d/cAHRB/KRBrFPF4+Z8g/9WGByUvamK/PdPVz9elD11Gj9rVbDF RfPu4iCp64AzEh0nkRc8nDLfD3Jg0oWPFpAJLCNn/mRfG476h5h7Ure/742AOi2L2u1eAI4PboR 2F422hGN2nSUw3lmfqI4eZ75PBkS6dfL3zPVvzh8JYthcHWVmR///4iW9SZd165JTNx8ObBukQv nnBIeQYqoffPJYo9a++EmWtzkp3TpFZjlK9KS/mF31P5CBJLEkeapFiAKVTDZ3ewXcnVUN6Y8AG rqd7u5qp82DWl4WkPpY4WMuUQPE00y0A2F/+Z3mMGkCN0dgKRwQd4Y2gsPWAZCo8sLWSh16SG1l o/ngf6mxHzo+9VD9g6408iLj5xfa6oL0Pjv531GciB5+BvhCKXvEdM9MM+pqfKKjT30m+XSKPbL x2NgQOQ0ORrP3XMeMfIfWCe3ovDg7GYCNfTLX2Aw6WXVfv7qJGpkBCJlfzq8CoTkW59Uw5eGxAo TZosQnysXe0pPIA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849190918158500 Since commit e2f82e924d05 ("console: purge curses bits from console.h"), console_ch_t is a plain uint32_t typedef and console_write_ch() is a trivial assignment (*dest =3D ch). These abstractions were originally needed because console_ch_t was the curses chtype when CONFIG_CURSES was enabled, and console_write_ch() handled VGA-to-curses character translation. That commit moved the curses logic into curses_update(), making the typedef and helper dead abstractions. Replace console_ch_t with uint32_t and console_write_ch() calls with direct assignments. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 11 ++--------- hw/display/jazz_led.c | 10 +++++----- hw/display/vga.c | 16 ++++++++-------- hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-vga.c | 2 +- hw/display/vmware_vga.c | 2 +- ui/console-vc.c | 11 +++++------ ui/console.c | 2 +- ui/curses.c | 6 +++--- 9 files changed, 27 insertions(+), 35 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 5b5bba46ec2..75cd48ed7ad 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -350,13 +350,6 @@ int dpy_gl_ctx_make_current(QemuConsole *con, QEMUGLCo= ntext ctx); =20 bool console_has_gl(QemuConsole *con); =20 -typedef uint32_t console_ch_t; - -static inline void console_write_ch(console_ch_t *dest, uint32_t ch) -{ - *dest =3D ch; -} - enum { GRAPHIC_FLAGS_NONE =3D 0, /* require a console/display with GL callbacks */ @@ -370,7 +363,7 @@ typedef struct GraphicHwOps { void (*invalidate)(void *opaque); void (*gfx_update)(void *opaque); bool gfx_update_async; /* if true, calls graphic_hw_update_done() */ - void (*text_update)(void *opaque, console_ch_t *text); + void (*text_update)(void *opaque, uint32_t *text); void (*ui_info)(void *opaque, uint32_t head, QemuUIInfo *info); void (*gl_block)(void *opaque, bool block); } GraphicHwOps; @@ -386,7 +379,7 @@ void graphic_console_close(QemuConsole *con); void graphic_hw_update(QemuConsole *con); void graphic_hw_update_done(QemuConsole *con); void graphic_hw_invalidate(QemuConsole *con); -void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata); +void graphic_hw_text_update(QemuConsole *con, uint32_t *chardata); void graphic_hw_gl_block(QemuConsole *con, bool block); =20 void qemu_console_early_init(void); diff --git a/hw/display/jazz_led.c b/hw/display/jazz_led.c index 9d62e51bed9..d5783982950 100644 --- a/hw/display/jazz_led.c +++ b/hw/display/jazz_led.c @@ -226,7 +226,7 @@ static void jazz_led_invalidate_display(void *opaque) s->state |=3D REDRAW_SEGMENTS | REDRAW_BACKGROUND; } =20 -static void jazz_led_text_update(void *opaque, console_ch_t *chardata) +static void jazz_led_text_update(void *opaque, uint32_t *chardata) { LedState *s =3D opaque; char buf[3]; @@ -236,10 +236,10 @@ static void jazz_led_text_update(void *opaque, consol= e_ch_t *chardata) =20 /* TODO: draw the segments */ snprintf(buf, 3, "%02hhx", s->segments); - console_write_ch(chardata++, ATTR2CHTYPE(buf[0], QEMU_COLOR_BLUE, - QEMU_COLOR_BLACK, 1)); - console_write_ch(chardata++, ATTR2CHTYPE(buf[1], QEMU_COLOR_BLUE, - QEMU_COLOR_BLACK, 1)); + *chardata++ =3D ATTR2CHTYPE(buf[0], QEMU_COLOR_BLUE, + QEMU_COLOR_BLACK, 1); + *chardata++ =3D ATTR2CHTYPE(buf[1], QEMU_COLOR_BLUE, + QEMU_COLOR_BLACK, 1); =20 dpy_text_update(s->con, 0, 0, 2, 1); } diff --git a/hw/display/vga.c b/hw/display/vga.c index ee7d97b5c21..36cfc59a74e 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1899,13 +1899,13 @@ static void vga_reset(void *opaque) ((v & 0x00000800) << 10) | ((v & 0x00007000) >> 1)) /* relay text rendering to the display driver * instead of doing a full vga_update_display() */ -static void vga_update_text(void *opaque, console_ch_t *chardata) +static void vga_update_text(void *opaque, uint32_t *chardata) { VGACommonState *s =3D opaque; int graphic_mode, i, cursor_offset, cursor_visible; int cw, cheight, width, height, size, c_min, c_max; uint32_t *src; - console_ch_t *dst, val; + uint32_t *dst, val; char msg_buffer[80]; int full_update =3D 0; =20 @@ -2005,14 +2005,14 @@ static void vga_update_text(void *opaque, console_c= h_t *chardata) =20 if (full_update) { for (i =3D 0; i < size; src ++, dst ++, i ++) - console_write_ch(dst, VMEM2CHTYPE(le32_to_cpu(*src))); + *dst =3D VMEM2CHTYPE(le32_to_cpu(*src)); =20 dpy_text_update(s->con, 0, 0, width, height); } else { c_max =3D 0; =20 for (i =3D 0; i < size; src ++, dst ++, i ++) { - console_write_ch(&val, VMEM2CHTYPE(le32_to_cpu(*src))); + val =3D VMEM2CHTYPE(le32_to_cpu(*src)); if (*dst !=3D val) { *dst =3D val; c_max =3D i; @@ -2021,7 +2021,7 @@ static void vga_update_text(void *opaque, console_ch_= t *chardata) } c_min =3D i; for (; i < size; src ++, dst ++, i ++) { - console_write_ch(&val, VMEM2CHTYPE(le32_to_cpu(*src))); + val =3D VMEM2CHTYPE(le32_to_cpu(*src)); if (*dst !=3D val) { *dst =3D val; c_max =3D i; @@ -2059,14 +2059,14 @@ static void vga_update_text(void *opaque, console_c= h_t *chardata) dpy_text_resize(s->con, s->last_width, height); =20 for (dst =3D chardata, i =3D 0; i < s->last_width * height; i ++) - console_write_ch(dst ++, ' '); + *dst++ =3D ' '; =20 size =3D strlen(msg_buffer); width =3D (s->last_width - size) / 2; dst =3D chardata + s->last_width + width; for (i =3D 0; i < size; i ++) - console_write_ch(dst ++, ATTR2CHTYPE(msg_buffer[i], QEMU_COLOR_BLU= E, - QEMU_COLOR_BLACK, 1)); + *dst++ =3D ATTR2CHTYPE(msg_buffer[i], QEMU_COLOR_BLUE, + QEMU_COLOR_BLACK, 1); =20 dpy_text_update(s->con, 0, 0, s->last_width, height); } diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index cb76302e2d8..7b107509510 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -87,7 +87,7 @@ static void virtio_gpu_update_display(void *opaque) { } =20 -static void virtio_gpu_text_update(void *opaque, console_ch_t *chardata) +static void virtio_gpu_text_update(void *opaque, uint32_t *chardata) { } =20 diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 5e087169f2f..02fb36b31fc 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -31,7 +31,7 @@ static void virtio_vga_base_update_display(void *opaque) } } =20 -static void virtio_vga_base_text_update(void *opaque, console_ch_t *charda= ta) +static void virtio_vga_base_text_update(void *opaque, uint32_t *chardata) { VirtIOVGABase *vvga =3D opaque; VirtIOGPUBase *g =3D vvga->vgpu; diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index c2c6bc76e90..1e154e7f99e 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1183,7 +1183,7 @@ static void vmsvga_invalidate_display(void *opaque) s->invalidated =3D 1; } =20 -static void vmsvga_text_update(void *opaque, console_ch_t *chardata) +static void vmsvga_text_update(void *opaque, uint32_t *chardata) { struct vmsvga_state_s *s =3D opaque; =20 diff --git a/ui/console-vc.c b/ui/console-vc.c index 84944f845e1..d58917c1850 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -381,7 +381,7 @@ void qemu_text_console_handle_keysym(QemuTextConsole *s= , int keysym) vt100_keysym(&s->vt, keysym); } =20 -static void text_console_update(void *opaque, console_ch_t *chardata) +static void text_console_update(void *opaque, uint32_t *chardata) { QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(opaque); int i, j, src; @@ -391,11 +391,10 @@ static void text_console_update(void *opaque, console= _ch_t *chardata) chardata +=3D s->vt.text_y[0] * s->vt.width; for (i =3D s->vt.text_y[0]; i <=3D s->vt.text_y[1]; i ++) for (j =3D 0; j < s->vt.width; j++, src++) { - console_write_ch(chardata ++, - ATTR2CHTYPE(s->vt.cells[src].ch, - s->vt.cells[src].t_attrib.fgc= ol, - s->vt.cells[src].t_attrib.bgc= ol, - s->vt.cells[src].t_attrib.bol= d)); + *chardata++ =3D ATTR2CHTYPE(s->vt.cells[src].ch, + s->vt.cells[src].t_attrib.fgcol, + s->vt.cells[src].t_attrib.bgcol, + s->vt.cells[src].t_attrib.bold); } dpy_text_update(QEMU_CONSOLE(s), s->vt.text_x[0], s->vt.text_y[0], s->vt.text_x[1] - s->vt.text_x[0], i - s->vt.text_= y[0]); diff --git a/ui/console.c b/ui/console.c index 8af1dee0e22..b2b879e8533 100644 --- a/ui/console.c +++ b/ui/console.c @@ -214,7 +214,7 @@ void graphic_hw_invalidate(QemuConsole *con) } } =20 -void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata) +void graphic_hw_text_update(QemuConsole *con, uint32_t *chardata) { if (con && con->hw_ops->text_update) { con->hw_ops->text_update(con->hw, chardata); diff --git a/ui/curses.c b/ui/curses.c index 161f78c35c3..78f21d940e3 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -57,7 +57,7 @@ enum maybe_keycode { }; =20 static DisplayChangeListener *dcl; -static console_ch_t *screen; +static uint32_t *screen; static WINDOW *screenpad =3D NULL; static int width, height, gwidth, gheight, invalidate; static int px, py, sminx, sminy, smaxx, smaxy; @@ -68,7 +68,7 @@ static cchar_t *vga_to_curses; static void curses_update(DisplayChangeListener *dcl, int x, int y, int w, int h) { - console_ch_t *line; + uint32_t *line; g_autofree cchar_t *curses_line =3D g_new(cchar_t, width); wchar_t wch[CCHARW_MAX]; attr_t attrs; @@ -796,7 +796,7 @@ static void curses_display_init(DisplayState *ds, Displ= ayOptions *opts) if (opts->u.curses.charset) { font_charset =3D opts->u.curses.charset; } - screen =3D g_new0(console_ch_t, 160 * 100); + screen =3D g_new0(uint32_t, 160 * 100); vga_to_curses =3D g_new0(cchar_t, 256); curses_setup(); curses_keyboard_setup(); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849217; cv=none; d=zohomail.com; s=zohoarc; b=Nlq1XFSfqrdGibJJe9AndT0QDwMrVkjnyp3U+Yik0a/nAZ/nSQE7UJDock9Ydg2TtuccO8EhL3/uxeBVC+uYdmtcupwgRu6ssOlcVIwY3xwuYX4Iicmguf0IpKWEXIKYZG5MEyighITwjdn6dDpEgs1HS+R90QSp2EFS/IEJXHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849217; 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=ZGmThGmWlihoAUwBv09IXl3bcz6EVpuiW5BD6P8w7yQ=; b=e9mi+1Du52sc1Qw3CKaRIsiGYJSQ8bSStOd8HfLx3mo74aQdbPouVo9qzzlPLdbl03KHQiJUIZJUnSfE59yXsAQtp+md+B/YlaD+rxmc7VFCHRNqxnH/afmxngtziNDYujRw2KQe8AhKUqIp8C8o3mvvjBvFTb+6ZnsTKgR7IDQ= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849217643422.65628904360074; Fri, 10 Apr 2026 12:26:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQd-0003Cq-Fy; Fri, 10 Apr 2026 15:22:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQb-0003CM-Mu for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQW-0001po-VO for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:05 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-rkW0XRLOP5q3rcjkS4jzTg-1; Fri, 10 Apr 2026 15:21:58 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5E7DE19560B7; Fri, 10 Apr 2026 19:21:57 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 047A719560AB; Fri, 10 Apr 2026 19:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848920; 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=ZGmThGmWlihoAUwBv09IXl3bcz6EVpuiW5BD6P8w7yQ=; b=VFs8blf+uXEVoWNdu1FqvRqsfBocLxi6o6OgAJOnli7nqgPB8wUwjsznTp80LD/ceqyQBe BKBjcKQ5ebqOrFjGLqzZN+ejJLvsdgZXI5fGpCl5u2cJ/5+l86UT8WRr8WbGFWma8apnub oakaqNdIzMXrI6M36GljcWrFDybCKsM= X-MC-Unique: rkW0XRLOP5q3rcjkS4jzTg-1 X-Mimecast-MFC-AGG-ID: rkW0XRLOP5q3rcjkS4jzTg_1775848917 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:52 +0400 Subject: [PATCH v2 30/67] ui: avoid duplicating vgafont16 in each translation unit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-30-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=237300; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=6sF/0zokvcknL0vpn5YDp0bcCGcYHuN9sDclWz8RbDA=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0V+iqt+8MlsoIaqMGgi3YyVIe5ktkWda0Zo MD5D2+DBiOJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5UhXEACeAcBIJWNT9pLb5tmac6UfX+J4iK+eZV7eiQteXQ8TGCExRO6HUzjnZPWYG/zJialXH9W ikk3T3N3MDLnuDIqbwAZkSYgMqfjjefQxctAim2Kj+VmqZq0iZwAySQX6rvP+q4jgcKW6flX/+/ xb4e53SJdfP6TXX6rBYjT9cGg46ZbZSHKLDUtsrMxYUYsm50WARvR+/Fyvz3keCVpFCwt/uyhYB Gtk4ODsxn7bc2s39clR9EeT7acIvFjJ7P8Pzh7t/vXxWt8384fcHeiVU5xVKOVKqLEvihORFUhh n96x6yr8XdQoYwam7jzH6XF/GaTDEvO0JvkByV9ZjII7I+TJ0LrmmYkKmIv9DoyB5FoftApdSoV hwhBcucbkHuRy4u2l7fcpdLOb0rV3gUWXjp+qprKag8lGftosJCLeaxb/CMBr4Yhp5riAlG0y97 YhpJanVUq3uU2ZM2C2r+sioAnRTz+dDEwOr1Yq9+O8m3EBLrDQsqmbsQQscY8T/ZpHO+g/P9+Z4 Jf4VFuTR7nKvlAOVgWnfcg0d+VVjdAE3nB3lVjF6/+/FcMWwKPwHO83Z8Mog0Jj6MdGQZNpX1VS s4l6ZZ96gey6QbXd6FljU80YYDYDMaCqApNTjznKCVgG3LCIT/7gTbQ4MEF/rufdzOuuzTtMnIZ NkSK8I/OzoyX9sg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849219384158500 vgafont.h defined vgafont16 as a static const array, so every .c file that included it (via console-priv.h) got its own 4 KiB copy, that the linker may or not deduplicate? Move the array definition into a new vgafont.c compilation unit and turn the header into a proper extern declaration with an include guard. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vgafont.h | 4613 +---------------------------------------------------= ---- ui/vgafont.c | 4613 ++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ ui/meson.build | 1 + 3 files changed, 4619 insertions(+), 4608 deletions(-) diff --git a/ui/vgafont.h b/ui/vgafont.h index 7e1fc473f75..4498ac4e07b 100644 --- a/ui/vgafont.h +++ b/ui/vgafont.h @@ -1,4611 +1,8 @@ -static const uint8_t vgafont16[256 * 16] =3D { +#ifndef VGAFONT_H +#define VGAFONT_H =20 - /* 0 0x00 '^@' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ +#include =20 - /* 1 0x01 '^A' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x81, /* 10000001 */ - 0xa5, /* 10100101 */ - 0x81, /* 10000001 */ - 0x81, /* 10000001 */ - 0xbd, /* 10111101 */ - 0x99, /* 10011001 */ - 0x81, /* 10000001 */ - 0x81, /* 10000001 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ +extern const uint8_t vgafont16[256 * 16]; =20 - /* 2 0x02 '^B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xff, /* 11111111 */ - 0xdb, /* 11011011 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xc3, /* 11000011 */ - 0xe7, /* 11100111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 3 0x03 '^C' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 4 0x04 '^D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 5 0x05 '^E' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0xe7, /* 11100111 */ - 0xe7, /* 11100111 */ - 0xe7, /* 11100111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 6 0x06 '^F' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 7 0x07 '^G' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 8 0x08 '^H' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xe7, /* 11100111 */ - 0xc3, /* 11000011 */ - 0xc3, /* 11000011 */ - 0xe7, /* 11100111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 9 0x09 '^I' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x42, /* 01000010 */ - 0x42, /* 01000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 10 0x0a '^J' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xc3, /* 11000011 */ - 0x99, /* 10011001 */ - 0xbd, /* 10111101 */ - 0xbd, /* 10111101 */ - 0x99, /* 10011001 */ - 0xc3, /* 11000011 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 11 0x0b '^K' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 00011110 */ - 0x0e, /* 00001110 */ - 0x1a, /* 00011010 */ - 0x32, /* 00110010 */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 12 0x0c '^L' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 13 0x0d '^M' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x33, /* 00110011 */ - 0x3f, /* 00111111 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x70, /* 01110000 */ - 0xf0, /* 11110000 */ - 0xe0, /* 11100000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 14 0x0e '^N' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7f, /* 01111111 */ - 0x63, /* 01100011 */ - 0x7f, /* 01111111 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x63, /* 01100011 */ - 0x67, /* 01100111 */ - 0xe7, /* 11100111 */ - 0xe6, /* 11100110 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 15 0x0f '^O' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xdb, /* 11011011 */ - 0x3c, /* 00111100 */ - 0xe7, /* 11100111 */ - 0x3c, /* 00111100 */ - 0xdb, /* 11011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 16 0x10 '^P' */ - 0x00, /* 00000000 */ - 0x80, /* 10000000 */ - 0xc0, /* 11000000 */ - 0xe0, /* 11100000 */ - 0xf0, /* 11110000 */ - 0xf8, /* 11111000 */ - 0xfe, /* 11111110 */ - 0xf8, /* 11111000 */ - 0xf0, /* 11110000 */ - 0xe0, /* 11100000 */ - 0xc0, /* 11000000 */ - 0x80, /* 10000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 17 0x11 '^Q' */ - 0x00, /* 00000000 */ - 0x02, /* 00000010 */ - 0x06, /* 00000110 */ - 0x0e, /* 00001110 */ - 0x1e, /* 00011110 */ - 0x3e, /* 00111110 */ - 0xfe, /* 11111110 */ - 0x3e, /* 00111110 */ - 0x1e, /* 00011110 */ - 0x0e, /* 00001110 */ - 0x06, /* 00000110 */ - 0x02, /* 00000010 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 18 0x12 '^R' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 19 0x13 '^S' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 20 0x14 '^T' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7f, /* 01111111 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7b, /* 01111011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 21 0x15 '^U' */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x0c, /* 00001100 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 22 0x16 '^V' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 23 0x17 '^W' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 24 0x18 '^X' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 25 0x19 '^Y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 26 0x1a '^Z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0xfe, /* 11111110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 27 0x1b '^[' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xfe, /* 11111110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 28 0x1c '^\' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 29 0x1d '^]' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x28, /* 00101000 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x28, /* 00101000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 30 0x1e '^^' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0x7c, /* 01111100 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 31 0x1f '^_' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0x7c, /* 01111100 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 32 0x20 ' ' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 33 0x21 '!' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 34 0x22 '"' */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x24, /* 00100100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 35 0x23 '#' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 36 0x24 '$' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x86, /* 10000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 37 0x25 '%' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc2, /* 11000010 */ - 0xc6, /* 11000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0x86, /* 10000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 38 0x26 '&' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 39 0x27 ''' */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 40 0x28 '(' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 41 0x29 ')' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 42 0x2a '*' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0xff, /* 11111111 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 43 0x2b '+' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 44 0x2c ',' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 45 0x2d '-' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 46 0x2e '.' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 47 0x2f '/' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x02, /* 00000010 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x80, /* 10000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 48 0x30 '0' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 49 0x31 '1' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x38, /* 00111000 */ - 0x78, /* 01111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 50 0x32 '2' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 51 0x33 '3' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x3c, /* 00111100 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 52 0x34 '4' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x1c, /* 00011100 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xfe, /* 11111110 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x1e, /* 00011110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 53 0x35 '5' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfc, /* 11111100 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 54 0x36 '6' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xfc, /* 11111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 55 0x37 '7' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 56 0x38 '8' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 57 0x39 '9' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 58 0x3a ':' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 59 0x3b ';' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 60 0x3c '<' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 61 0x3d '=3D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 62 0x3e '>' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 63 0x3f '?' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 64 0x40 '@' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xde, /* 11011110 */ - 0xde, /* 11011110 */ - 0xde, /* 11011110 */ - 0xdc, /* 11011100 */ - 0xc0, /* 11000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 65 0x41 'A' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 66 0x42 'B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 67 0x43 'C' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc2, /* 11000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 68 0x44 'D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 69 0x45 'E' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x66, /* 01100110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x60, /* 01100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 70 0x46 'F' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x66, /* 01100110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 71 0x47 'G' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xde, /* 11011110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x66, /* 01100110 */ - 0x3a, /* 00111010 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 72 0x48 'H' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 73 0x49 'I' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 74 0x4a 'J' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 00011110 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 75 0x4b 'K' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe6, /* 11100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x78, /* 01111000 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 76 0x4c 'L' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf0, /* 11110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 77 0x4d 'M' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xee, /* 11101110 */ - 0xfe, /* 11111110 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 78 0x4e 'N' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xe6, /* 11100110 */ - 0xf6, /* 11110110 */ - 0xfe, /* 11111110 */ - 0xde, /* 11011110 */ - 0xce, /* 11001110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 79 0x4f 'O' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 80 0x50 'P' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 81 0x51 'Q' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xde, /* 11011110 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0x0e, /* 00001110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 82 0x52 'R' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfc, /* 11111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 83 0x53 'S' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x38, /* 00111000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 84 0x54 'T' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x5a, /* 01011010 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 85 0x55 'U' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 86 0x56 'V' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 87 0x57 'W' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xfe, /* 11111110 */ - 0xee, /* 11101110 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 88 0x58 'X' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x7c, /* 01111100 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x7c, /* 01111100 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 89 0x59 'Y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 90 0x5a 'Z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x86, /* 10000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc2, /* 11000010 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 91 0x5b '[' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 92 0x5c '\' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x80, /* 10000000 */ - 0xc0, /* 11000000 */ - 0xe0, /* 11100000 */ - 0x70, /* 01110000 */ - 0x38, /* 00111000 */ - 0x1c, /* 00011100 */ - 0x0e, /* 00001110 */ - 0x06, /* 00000110 */ - 0x02, /* 00000010 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 93 0x5d ']' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 94 0x5e '^' */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 95 0x5f '_' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 96 0x60 '`' */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 97 0x61 'a' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 98 0x62 'b' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 99 0x63 'c' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 100 0x64 'd' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00011100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 101 0x65 'e' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 102 0x66 'f' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00011100 */ - 0x36, /* 00110110 */ - 0x32, /* 00110010 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 103 0x67 'g' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0xcc, /* 11001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* 104 0x68 'h' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x6c, /* 01101100 */ - 0x76, /* 01110110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 105 0x69 'i' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 106 0x6a 'j' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - - /* 107 0x6b 'k' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xe0, /* 11100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x78, /* 01111000 */ - 0x78, /* 01111000 */ - 0x6c, /* 01101100 */ - 0x66, /* 01100110 */ - 0xe6, /* 11100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 108 0x6c 'l' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 109 0x6d 'm' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xec, /* 11101100 */ - 0xfe, /* 11111110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 110 0x6e 'n' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 111 0x6f 'o' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 112 0x70 'p' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - - /* 113 0x71 'q' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x7c, /* 01111100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x1e, /* 00011110 */ - 0x00, /* 00000000 */ - - /* 114 0x72 'r' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x76, /* 01110110 */ - 0x66, /* 01100110 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 115 0x73 's' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x38, /* 00111000 */ - 0x0c, /* 00001100 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 116 0x74 't' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0xfc, /* 11111100 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x36, /* 00110110 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 117 0x75 'u' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 118 0x76 'v' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 119 0x77 'w' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xd6, /* 11010110 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 120 0x78 'x' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 121 0x79 'y' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - - /* 122 0x7a 'z' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xcc, /* 11001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 123 0x7b '{' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0e, /* 00001110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 124 0x7c '|' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 125 0x7d '}' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x70, /* 01110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x0e, /* 00001110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 126 0x7e '~' */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 127 0x7f '=7F' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 128 0x80 '=C2=80' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0xc2, /* 11000010 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc2, /* 11000010 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 129 0x81 '=C2=81' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 130 0x82 '=C2=82' */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 131 0x83 '=C2=83' */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 132 0x84 '=C2=84' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 133 0x85 '=C2=85' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 134 0x86 '=C2=86' */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 135 0x87 '=C2=87' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 136 0x88 '=C2=88' */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 137 0x89 '=C2=89' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 138 0x8a '=C2=8A' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 139 0x8b '=C2=8B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 140 0x8c '=C2=8C' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 141 0x8d '=C2=8D' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 142 0x8e '=C2=8E' */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 143 0x8f '=C2=8F' */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 144 0x90 '=C2=90' */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x66, /* 01100110 */ - 0x62, /* 01100010 */ - 0x68, /* 01101000 */ - 0x78, /* 01111000 */ - 0x68, /* 01101000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 145 0x91 '=C2=91' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xec, /* 11101100 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x7e, /* 01111110 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x6e, /* 01101110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 146 0x92 '=C2=92' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3e, /* 00111110 */ - 0x6c, /* 01101100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xfe, /* 11111110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xce, /* 11001110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 147 0x93 '=C2=93' */ - 0x00, /* 00000000 */ - 0x10, /* 00010000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 148 0x94 '=C2=94' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 149 0x95 '=C2=95' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 150 0x96 '=C2=96' */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 151 0x97 '=C2=97' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 152 0x98 '=C2=98' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7e, /* 01111110 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x78, /* 01111000 */ - 0x00, /* 00000000 */ - - /* 153 0x99 '=C2=99' */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 154 0x9a '=C2=9A' */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 155 0x9b '=C2=9B' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 156 0x9c '=C2=9C' */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x64, /* 01100100 */ - 0x60, /* 01100000 */ - 0xf0, /* 11110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xe6, /* 11100110 */ - 0xfc, /* 11111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 157 0x9d '=C2=9D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 158 0x9e '=C2=9E' */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xf8, /* 11111000 */ - 0xc4, /* 11000100 */ - 0xcc, /* 11001100 */ - 0xde, /* 11011110 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 159 0x9f '=C2=9F' */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x1b, /* 00011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 160 0xa0 '=C2=A0' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0x0c, /* 00001100 */ - 0x7c, /* 01111100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 161 0xa1 '=C2=A1' */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 162 0xa2 '=C2=A2' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 163 0xa3 '=C2=A3' */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x00, /* 00000000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 164 0xa4 '=C2=A4' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0xdc, /* 11011100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 165 0xa5 '=C2=A5' */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0xc6, /* 11000110 */ - 0xe6, /* 11100110 */ - 0xf6, /* 11110110 */ - 0xfe, /* 11111110 */ - 0xde, /* 11011110 */ - 0xce, /* 11001110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 166 0xa6 '=C2=A6' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x3e, /* 00111110 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 167 0xa7 '=C2=A7' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 168 0xa8 '=C2=A8' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x7c, /* 01111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 169 0xa9 '=C2=A9' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 170 0xaa '=C2=AA' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 171 0xab '=C2=AB' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0xe0, /* 11100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xdc, /* 11011100 */ - 0x86, /* 10000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x3e, /* 00111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 172 0xac '=C2=AC' */ - 0x00, /* 00000000 */ - 0x60, /* 01100000 */ - 0xe0, /* 11100000 */ - 0x62, /* 01100010 */ - 0x66, /* 01100110 */ - 0x6c, /* 01101100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x66, /* 01100110 */ - 0xce, /* 11001110 */ - 0x9a, /* 10011010 */ - 0x3f, /* 00111111 */ - 0x06, /* 00000110 */ - 0x06, /* 00000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 173 0xad '=C2=AD' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 174 0xae '=C2=AE' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x36, /* 00110110 */ - 0x6c, /* 01101100 */ - 0xd8, /* 11011000 */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 175 0xaf '=C2=AF' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xd8, /* 11011000 */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x6c, /* 01101100 */ - 0xd8, /* 11011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 176 0xb0 '=C2=B0' */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - 0x11, /* 00010001 */ - 0x44, /* 01000100 */ - - /* 177 0xb1 '=C2=B1' */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - 0x55, /* 01010101 */ - 0xaa, /* 10101010 */ - - /* 178 0xb2 '=C2=B2' */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - 0xdd, /* 11011101 */ - 0x77, /* 01110111 */ - - /* 179 0xb3 '=C2=B3' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 180 0xb4 '=C2=B4' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 181 0xb5 '=C2=B5' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 182 0xb6 '=C2=B6' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 183 0xb7 '=C2=B7' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 184 0xb8 '=C2=B8' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 185 0xb9 '=C2=B9' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x06, /* 00000110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 186 0xba '=C2=BA' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 187 0xbb '=C2=BB' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x06, /* 00000110 */ - 0xf6, /* 11110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 188 0xbc '=C2=BC' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf6, /* 11110110 */ - 0x06, /* 00000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 189 0xbd '=C2=BD' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 190 0xbe '=C2=BE' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 191 0xbf '=C2=BF' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xf8, /* 11111000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 192 0xc0 '=C3=80' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 193 0xc1 '=C3=81' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 194 0xc2 '=C3=82' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 195 0xc3 '=C3=83' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 196 0xc4 '=C3=84' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 197 0xc5 '=C3=85' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 198 0xc6 '=C3=86' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 199 0xc7 '=C3=87' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 200 0xc8 '=C3=88' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x30, /* 00110000 */ - 0x3f, /* 00111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 201 0xc9 '=C3=89' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x30, /* 00110000 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 202 0xca '=C3=8A' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf7, /* 11110111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 203 0xcb '=C3=8B' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xf7, /* 11110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 204 0xcc '=C3=8C' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x37, /* 00110111 */ - 0x30, /* 00110000 */ - 0x37, /* 00110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 205 0xcd '=C3=8D' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 206 0xce '=C3=8E' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xf7, /* 11110111 */ - 0x00, /* 00000000 */ - 0xf7, /* 11110111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 207 0xcf '=C3=8F' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 208 0xd0 '=C3=90' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 209 0xd1 '=C3=91' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 210 0xd2 '=C3=92' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 211 0xd3 '=C3=93' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x3f, /* 00111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 212 0xd4 '=C3=94' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 213 0xd5 '=C3=95' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 214 0xd6 '=C3=96' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x3f, /* 00111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 215 0xd7 '=C3=97' */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0xff, /* 11111111 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - - /* 216 0xd8 '=C3=98' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0xff, /* 11111111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 217 0xd9 '=C3=99' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xf8, /* 11111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 218 0xda '=C3=9A' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1f, /* 00011111 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 219 0xdb '=C3=9B' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 220 0xdc '=C3=9C' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - - /* 221 0xdd '=C3=9D' */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - 0xf0, /* 11110000 */ - - /* 222 0xde '=C3=9E' */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - 0x0f, /* 00001111 */ - - /* 223 0xdf '=C3=9F' */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0xff, /* 11111111 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 224 0xe0 '=C3=A0' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xdc, /* 11011100 */ - 0x76, /* 01110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 225 0xe1 '=C3=A1' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x78, /* 01111000 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xcc, /* 11001100 */ - 0xd8, /* 11011000 */ - 0xcc, /* 11001100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xcc, /* 11001100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 226 0xe2 '=C3=A2' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 227 0xe3 '=C3=A3' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 228 0xe4 '=C3=A4' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 229 0xe5 '=C3=A5' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 230 0xe6 '=C3=A6' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - - /* 231 0xe7 '=C3=A7' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 232 0xe8 '=C3=A8' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 233 0xe9 '=C3=A9' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xfe, /* 11111110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 234 0xea '=C3=AA' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0xee, /* 11101110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 235 0xeb '=C3=AB' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1e, /* 00011110 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x3e, /* 00111110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x66, /* 01100110 */ - 0x3c, /* 00111100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 236 0xec '=C3=AC' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 237 0xed '=C3=AD' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x03, /* 00000011 */ - 0x06, /* 00000110 */ - 0x7e, /* 01111110 */ - 0xdb, /* 11011011 */ - 0xdb, /* 11011011 */ - 0xf3, /* 11110011 */ - 0x7e, /* 01111110 */ - 0x60, /* 01100000 */ - 0xc0, /* 11000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 238 0xee '=C3=AE' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x1c, /* 00011100 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x7c, /* 01111100 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 239 0xef '=C3=AF' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7c, /* 01111100 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0xc6, /* 11000110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 240 0xf0 '=C3=B0' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0xfe, /* 11111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 241 0xf1 '=C3=B1' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x7e, /* 01111110 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 242 0xf2 '=C3=B2' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x06, /* 00000110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 243 0xf3 '=C3=B3' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x30, /* 00110000 */ - 0x60, /* 01100000 */ - 0x30, /* 00110000 */ - 0x18, /* 00011000 */ - 0x0c, /* 00001100 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 244 0xf4 '=C3=B4' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x0e, /* 00001110 */ - 0x1b, /* 00011011 */ - 0x1b, /* 00011011 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - - /* 245 0xf5 '=C3=B5' */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0xd8, /* 11011000 */ - 0x70, /* 01110000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 246 0xf6 '=C3=B6' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 247 0xf7 '=C3=B7' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x76, /* 01110110 */ - 0xdc, /* 11011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 248 0xf8 '=C3=B8' */ - 0x00, /* 00000000 */ - 0x38, /* 00111000 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x38, /* 00111000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 249 0xf9 '=C3=B9' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 250 0xfa '=C3=BA' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x18, /* 00011000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 251 0xfb '=C3=BB' */ - 0x00, /* 00000000 */ - 0x0f, /* 00001111 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0x0c, /* 00001100 */ - 0xec, /* 11101100 */ - 0x6c, /* 01101100 */ - 0x6c, /* 01101100 */ - 0x3c, /* 00111100 */ - 0x1c, /* 00011100 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 252 0xfc '=C3=BC' */ - 0x00, /* 00000000 */ - 0x6c, /* 01101100 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x36, /* 00110110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 253 0xfd '=C3=BD' */ - 0x00, /* 00000000 */ - 0x3c, /* 00111100 */ - 0x66, /* 01100110 */ - 0x0c, /* 00001100 */ - 0x18, /* 00011000 */ - 0x32, /* 00110010 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 254 0xfe '=C3=BE' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x7e, /* 01111110 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - - /* 255 0xff '=C3=BF' */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - 0x00, /* 00000000 */ - -}; +#endif diff --git a/ui/vgafont.c b/ui/vgafont.c new file mode 100644 index 00000000000..708c845a6bf --- /dev/null +++ b/ui/vgafont.c @@ -0,0 +1,4613 @@ +#include "vgafont.h" + +const uint8_t vgafont16[256 * 16] =3D { + + /* 0 0x00 '^@' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 1 0x01 '^A' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x81, /* 10000001 */ + 0xa5, /* 10100101 */ + 0x81, /* 10000001 */ + 0x81, /* 10000001 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0x81, /* 10000001 */ + 0x81, /* 10000001 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 2 0x02 '^B' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xdb, /* 11011011 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 3 0x03 '^C' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 4 0x04 '^D' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 5 0x05 '^E' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 6 0x06 '^F' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 7 0x07 '^G' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 8 0x08 '^H' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xe7, /* 11100111 */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 9 0x09 '^I' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x42, /* 01000010 */ + 0x42, /* 01000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 10 0x0a '^J' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0x99, /* 10011001 */ + 0xbd, /* 10111101 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0xc3, /* 11000011 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 11 0x0b '^K' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 00011110 */ + 0x0e, /* 00001110 */ + 0x1a, /* 00011010 */ + 0x32, /* 00110010 */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 12 0x0c '^L' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 13 0x0d '^M' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x33, /* 00110011 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x70, /* 01110000 */ + 0xf0, /* 11110000 */ + 0xe0, /* 11100000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 14 0x0e '^N' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x67, /* 01100111 */ + 0xe7, /* 11100111 */ + 0xe6, /* 11100110 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 15 0x0f '^O' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xdb, /* 11011011 */ + 0x3c, /* 00111100 */ + 0xe7, /* 11100111 */ + 0x3c, /* 00111100 */ + 0xdb, /* 11011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 16 0x10 '^P' */ + 0x00, /* 00000000 */ + 0x80, /* 10000000 */ + 0xc0, /* 11000000 */ + 0xe0, /* 11100000 */ + 0xf0, /* 11110000 */ + 0xf8, /* 11111000 */ + 0xfe, /* 11111110 */ + 0xf8, /* 11111000 */ + 0xf0, /* 11110000 */ + 0xe0, /* 11100000 */ + 0xc0, /* 11000000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 17 0x11 '^Q' */ + 0x00, /* 00000000 */ + 0x02, /* 00000010 */ + 0x06, /* 00000110 */ + 0x0e, /* 00001110 */ + 0x1e, /* 00011110 */ + 0x3e, /* 00111110 */ + 0xfe, /* 11111110 */ + 0x3e, /* 00111110 */ + 0x1e, /* 00011110 */ + 0x0e, /* 00001110 */ + 0x06, /* 00000110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 18 0x12 '^R' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 19 0x13 '^S' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 20 0x14 '^T' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7f, /* 01111111 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7b, /* 01111011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 21 0x15 '^U' */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x0c, /* 00001100 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 22 0x16 '^V' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 23 0x17 '^W' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 24 0x18 '^X' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 25 0x19 '^Y' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 26 0x1a '^Z' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 27 0x1b '^[' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 28 0x1c '^\' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 29 0x1d '^]' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x28, /* 00101000 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x28, /* 00101000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 30 0x1e '^^' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 31 0x1f '^_' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 32 0x20 ' ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 33 0x21 '!' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 34 0x22 '"' */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 35 0x23 '#' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 36 0x24 '$' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc2, /* 11000010 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x86, /* 10000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 37 0x25 '%' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc2, /* 11000010 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0x86, /* 10000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 38 0x26 '&' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 39 0x27 ''' */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 40 0x28 '(' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 41 0x29 ')' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 42 0x2a '*' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0xff, /* 11111111 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 43 0x2b '+' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 44 0x2c ',' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 45 0x2d '-' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 46 0x2e '.' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 47 0x2f '/' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x02, /* 00000010 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 48 0x30 '0' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 49 0x31 '1' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x38, /* 00111000 */ + 0x78, /* 01111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 50 0x32 '2' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 51 0x33 '3' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 52 0x34 '4' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00001100 */ + 0x1c, /* 00011100 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 53 0x35 '5' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 54 0x36 '6' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 55 0x37 '7' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 56 0x38 '8' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 57 0x39 '9' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 58 0x3a ':' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 59 0x3b ';' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 60 0x3c '<' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 61 0x3d '=3D' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 62 0x3e '>' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 63 0x3f '?' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 64 0x40 '@' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xdc, /* 11011100 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 65 0x41 'A' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 66 0x42 'B' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 67 0x43 'C' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc2, /* 11000010 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc2, /* 11000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 68 0x44 'D' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 69 0x45 'E' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x66, /* 01100110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x60, /* 01100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 70 0x46 'F' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x66, /* 01100110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 71 0x47 'G' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc2, /* 11000010 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xde, /* 11011110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x66, /* 01100110 */ + 0x3a, /* 00111010 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 72 0x48 'H' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 73 0x49 'I' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 74 0x4a 'J' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 00011110 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 75 0x4b 'K' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xe6, /* 11100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 76 0x4c 'L' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 77 0x4d 'M' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xee, /* 11101110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 78 0x4e 'N' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xfe, /* 11111110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 79 0x4f 'O' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 80 0x50 'P' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 81 0x51 'Q' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xde, /* 11011110 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x0e, /* 00001110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 82 0x52 'R' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 83 0x53 'S' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x38, /* 00111000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 84 0x54 'T' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x5a, /* 01011010 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 85 0x55 'U' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 86 0x56 'V' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 87 0x57 'W' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0xee, /* 11101110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 88 0x58 'X' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 89 0x59 'Y' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 90 0x5a 'Z' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x86, /* 10000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc2, /* 11000010 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 91 0x5b '[' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 92 0x5c '\' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x80, /* 10000000 */ + 0xc0, /* 11000000 */ + 0xe0, /* 11100000 */ + 0x70, /* 01110000 */ + 0x38, /* 00111000 */ + 0x1c, /* 00011100 */ + 0x0e, /* 00001110 */ + 0x06, /* 00000110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 93 0x5d ']' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 94 0x5e '^' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 95 0x5f '_' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 96 0x60 '`' */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 97 0x61 'a' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 98 0x62 'b' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 99 0x63 'c' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 100 0x64 'd' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1c, /* 00011100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 101 0x65 'e' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 102 0x66 'f' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1c, /* 00011100 */ + 0x36, /* 00110110 */ + 0x32, /* 00110010 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 103 0x67 'g' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 104 0x68 'h' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x6c, /* 01101100 */ + 0x76, /* 01110110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 105 0x69 'i' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 106 0x6a 'j' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x0e, /* 00001110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 107 0x6b 'k' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 108 0x6c 'l' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 109 0x6d 'm' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xec, /* 11101100 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 110 0x6e 'n' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 111 0x6f 'o' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 112 0x70 'p' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 113 0x71 'q' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* 114 0x72 'r' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x66, /* 01100110 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 115 0x73 's' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x38, /* 00111000 */ + 0x0c, /* 00001100 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 116 0x74 't' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0xfc, /* 11111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x36, /* 00110110 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 117 0x75 'u' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 118 0x76 'v' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 119 0x77 'w' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 120 0x78 'x' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x38, /* 00111000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 121 0x79 'y' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + + /* 122 0x7a 'z' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xcc, /* 11001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 123 0x7b '{' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 124 0x7c '|' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 125 0x7d '}' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 126 0x7e '~' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 127 0x7f '=7F' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 128 0x80 '=C2=80' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc2, /* 11000010 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc2, /* 11000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 129 0x81 '=C2=81' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 130 0x82 '=C2=82' */ + 0x00, /* 00000000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 131 0x83 '=C2=83' */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 132 0x84 '=C2=84' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 133 0x85 '=C2=85' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 134 0x86 '=C2=86' */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 135 0x87 '=C2=87' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 136 0x88 '=C2=88' */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 137 0x89 '=C2=89' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 138 0x8a '=C2=8A' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 139 0x8b '=C2=8B' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 140 0x8c '=C2=8C' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 141 0x8d '=C2=8D' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 142 0x8e '=C2=8E' */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 143 0x8f '=C2=8F' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 144 0x90 '=C2=90' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x66, /* 01100110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 145 0x91 '=C2=91' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xec, /* 11101100 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x6e, /* 01101110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 146 0x92 '=C2=92' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3e, /* 00111110 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 147 0x93 '=C2=93' */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 148 0x94 '=C2=94' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 149 0x95 '=C2=95' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 150 0x96 '=C2=96' */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 151 0x97 '=C2=97' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 152 0x98 '=C2=98' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 153 0x99 '=C2=99' */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 154 0x9a '=C2=9A' */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 155 0x9b '=C2=9B' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 156 0x9c '=C2=9C' */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x64, /* 01100100 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xe6, /* 11100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 157 0x9d '=C2=9D' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 158 0x9e '=C2=9E' */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xf8, /* 11111000 */ + 0xc4, /* 11000100 */ + 0xcc, /* 11001100 */ + 0xde, /* 11011110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 159 0x9f '=C2=9F' */ + 0x00, /* 00000000 */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 160 0xa0 '=C2=A0' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 161 0xa1 '=C2=A1' */ + 0x00, /* 00000000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 162 0xa2 '=C2=A2' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 163 0xa3 '=C2=A3' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 164 0xa4 '=C2=A4' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 165 0xa5 '=C2=A5' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xfe, /* 11111110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 166 0xa6 '=C2=A6' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 167 0xa7 '=C2=A7' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 168 0xa8 '=C2=A8' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 169 0xa9 '=C2=A9' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 170 0xaa '=C2=AA' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 171 0xab '=C2=AB' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0xe0, /* 11100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xdc, /* 11011100 */ + 0x86, /* 10000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 172 0xac '=C2=AC' */ + 0x00, /* 00000000 */ + 0x60, /* 01100000 */ + 0xe0, /* 11100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xce, /* 11001110 */ + 0x9a, /* 10011010 */ + 0x3f, /* 00111111 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 173 0xad '=C2=AD' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 174 0xae '=C2=AE' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x36, /* 00110110 */ + 0x6c, /* 01101100 */ + 0xd8, /* 11011000 */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 175 0xaf '=C2=AF' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xd8, /* 11011000 */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x6c, /* 01101100 */ + 0xd8, /* 11011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 176 0xb0 '=C2=B0' */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + 0x11, /* 00010001 */ + 0x44, /* 01000100 */ + + /* 177 0xb1 '=C2=B1' */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + + /* 178 0xb2 '=C2=B2' */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + + /* 179 0xb3 '=C2=B3' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 180 0xb4 '=C2=B4' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 181 0xb5 '=C2=B5' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 182 0xb6 '=C2=B6' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 183 0xb7 '=C2=B7' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 184 0xb8 '=C2=B8' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 185 0xb9 '=C2=B9' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 186 0xba '=C2=BA' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 187 0xbb '=C2=BB' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 188 0xbc '=C2=BC' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 189 0xbd '=C2=BD' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 190 0xbe '=C2=BE' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 191 0xbf '=C2=BF' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 192 0xc0 '=C3=80' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 193 0xc1 '=C3=81' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 194 0xc2 '=C3=82' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 195 0xc3 '=C3=83' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 196 0xc4 '=C3=84' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 197 0xc5 '=C3=85' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 198 0xc6 '=C3=86' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 199 0xc7 '=C3=87' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 200 0xc8 '=C3=88' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 201 0xc9 '=C3=89' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 202 0xca '=C3=8A' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 203 0xcb '=C3=8B' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 204 0xcc '=C3=8C' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 205 0xcd '=C3=8D' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 206 0xce '=C3=8E' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 207 0xcf '=C3=8F' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 208 0xd0 '=C3=90' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 209 0xd1 '=C3=91' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 210 0xd2 '=C3=92' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 211 0xd3 '=C3=93' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 212 0xd4 '=C3=94' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 213 0xd5 '=C3=95' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 214 0xd6 '=C3=96' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 215 0xd7 '=C3=97' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 216 0xd8 '=C3=98' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 217 0xd9 '=C3=99' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 218 0xda '=C3=9A' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 219 0xdb '=C3=9B' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 220 0xdc '=C3=9C' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 221 0xdd '=C3=9D' */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + + /* 222 0xde '=C3=9E' */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + + /* 223 0xdf '=C3=9F' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 224 0xe0 '=C3=A0' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 225 0xe1 '=C3=A1' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 226 0xe2 '=C3=A2' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 227 0xe3 '=C3=A3' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 228 0xe4 '=C3=A4' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 229 0xe5 '=C3=A5' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 230 0xe6 '=C3=A6' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 231 0xe7 '=C3=A7' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 232 0xe8 '=C3=A8' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 233 0xe9 '=C3=A9' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 234 0xea '=C3=AA' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xee, /* 11101110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 235 0xeb '=C3=AB' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1e, /* 00011110 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x3e, /* 00111110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 236 0xec '=C3=AC' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 237 0xed '=C3=AD' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x03, /* 00000011 */ + 0x06, /* 00000110 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0xf3, /* 11110011 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 238 0xee '=C3=AE' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1c, /* 00011100 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 239 0xef '=C3=AF' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 240 0xf0 '=C3=B0' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 241 0xf1 '=C3=B1' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 242 0xf2 '=C3=B2' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 243 0xf3 '=C3=B3' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 244 0xf4 '=C3=B4' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 245 0xf5 '=C3=B5' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 246 0xf6 '=C3=B6' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 247 0xf7 '=C3=B7' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 248 0xf8 '=C3=B8' */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 249 0xf9 '=C3=B9' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 250 0xfa '=C3=BA' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 251 0xfb '=C3=BB' */ + 0x00, /* 00000000 */ + 0x0f, /* 00001111 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xec, /* 11101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x3c, /* 00111100 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 252 0xfc '=C3=BC' */ + 0x00, /* 00000000 */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 253 0xfd '=C3=BD' */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 254 0xfe '=C3=BE' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 255 0xff '=C3=BF' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + +}; diff --git a/ui/meson.build b/ui/meson.build index d4d9312b98c..25657af50e7 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -15,6 +15,7 @@ system_ss.add(files( 'ui-hmp-cmds.c', 'ui-qmp-cmds.c', 'util.c', + 'vgafont.c', )) system_ss.add(when: pixman, if_true: files('console-vc.c', 'cp437.c'), if_= false: files('console-vc-stubs.c')) if dbus_display --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848946; cv=none; d=zohomail.com; s=zohoarc; b=MJ3aVo0SZrqsqByb4pniSDULAhZfv/qP9d3elXf42gYl3O4I4ly7MnwQXQt9Kbr8UGIHNQfyPYNqYzyCcELsczKZCMipKtzOSbEuSE7sp7Jm1R0w4xLcW183IkBHtm0G5iNgX4MMk1tP2Rp1CIad0wm3eKSDPMzz6UG2mcFGoo0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848946; 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=rSGT99OkgCW307lrXTHvv+Q92/CHkGWCji9vCq1Sp1k=; b=gBFF8lLgXt83AR5CMexMrsuddifcXC5io8hlZKSr1/hQAJMsALVB+/40kfORGU2MKKwgIpLW7WQGOjIGmPwjekRz87daCU2hB22HoEbfdyR2BHNZ+VZFKcnuIh8ErpURqcjWNXQQy5FE1O+fBsNlLpqdzzl2gMG0nmO6Kz65SXk= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848946600589.441307096621; Fri, 10 Apr 2026 12:22:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQg-0003LV-RD; Fri, 10 Apr 2026 15:22:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQf-0003GP-P9 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQe-0001sw-5M for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:09 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-573-tGH2mWS_MbysZAyB2-ib0A-1; Fri, 10 Apr 2026 15:22:04 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 46B561956061; Fri, 10 Apr 2026 19:22:03 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 108B83000C16; Fri, 10 Apr 2026 19:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848927; 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=rSGT99OkgCW307lrXTHvv+Q92/CHkGWCji9vCq1Sp1k=; b=JaUl5+ffRB0+jOuL7vU0/O6fiwe0XQck2x42nCyAGkE++hgvSXMnbV1yk6JkdU0A6MPbnr A7Z+i5SnecQg86ydF1tJcz3Bgw88irjUxG8YTfSmp40lPtkAc6C/DS3B57Udc2Va0TLpaU srzGSVgVg5p2Ol+lNTNbV2fsNzBTXxU= X-MC-Unique: tGH2mWS_MbysZAyB2-ib0A-1 X-Mimecast-MFC-AGG-ID: tGH2mWS_MbysZAyB2-ib0A_1775848923 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:53 +0400 Subject: [PATCH v2 31/67] ui/vgafont: add SPDX license header MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-31-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Fabrice Bellard , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1074; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=UfWToAw+HREaYvavb2Mrm2wywGGo+qgGY+lv2y9kkzg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VX9RV6q3H+VA/ln5FFldU0eEbEnzPdSL1h m0rGylh62qJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5TJyEACIP15j01ci48x1HD7oXmRRvvoc6SICahQ79SRyF8xzqk4gJfpaS4bHHv7v2119OOl9Pbf v0qK5nCwOv8sfTqkp1biQsc1DTDK4uijHzymWvOZ658cR/hljqmlyWUa6n7Xx+i0KyoJ8HwB0kL 8SM05o92oQxwQuulX7DO9tZCuEWD3tXiZBKgfy4Fc7VFh836s0T1OBV5r0CwQe9uOSh+0CJmNKN U/+AQ1NioGBZBPB5Fdp/XTrxoHBfmqboJl4qI+RjfjR0ru6Bg2snGPkNpzJ3HKRkqtIJICrHWiN /e8ENF0pzGm4OYbnYs9eu25Ef9s2nqeyXsYCxZP15y6idXSpAk5amzHRBu9v7HicFW1FDxyKrdc k9I7ovsN4FwFjCfWROvlyb79FPQ+M2WZJ30vLJAJufyPX1RfCO54pNThzK1tFlXz+nZhkONO5l+ UmcFOj/ZEB3qk2VP9CsEoB3q/kcP3kqW/sEgNc/p3AKUi7Uv+U5ufOEzlcy8h1D3PiOHjAW5Kwg 7teUZK4Skqq8+FSXSVGy8eAiceDPdpi6aMqmkh+pfS7+aV34+V+LC4DzeyPHeEYuB6AlSddG7vQ cdI7BUoN/HBC/cFO0+USfl7fxaNwkt6as8FxMuUIoUzV88JOMULHQKGHcC/oAcgYCUk3S1hE0Dy dEshHniVQgeMi+w== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848949835158500 The vgafont was added without source origin, but it can be traced back to Linux kernel, which used GPL-2 (https://github.com/mpe/linux-fullhistory/blob/master/lib/fonts/font_= 8x16.c). commit c6f37d0e4feeb264a699eda289d3cc69405100b0 Author: Fabrice Bellard Date: Wed Jul 14 17:39:50 2004 +0000 virtual console Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vgafont.h | 3 +++ ui/vgafont.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/vgafont.h b/ui/vgafont.h index 4498ac4e07b..54aeeb7d192 100644 --- a/ui/vgafont.h +++ b/ui/vgafont.h @@ -1,3 +1,6 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VGAFONT_H #define VGAFONT_H =20 diff --git a/ui/vgafont.c b/ui/vgafont.c index 708c845a6bf..b9b9a7016f0 100644 --- a/ui/vgafont.c +++ b/ui/vgafont.c @@ -1,3 +1,6 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "vgafont.h" =20 const uint8_t vgafont16[256 * 16] =3D { --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849261; cv=none; d=zohomail.com; s=zohoarc; b=JftwEWvNgx0XhdaBweKEf95Mcotkx4+e2viqnRO5A9sN21ck4g23a6r/dwc5GaLIKDdcRyVu+uYyJAd7IOQKMqbgN9rVzryrA1SoQQJxjp8Jq6U/BOzZoktnjxKEFkdvMt8o+fbo6d5xqiN8dYacxTl489ik6yQhDu5lRfECMzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849261; 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=j3St06greiPm0gRjhv05vve6ioGFoJrPO6xToZlL5pk=; b=f2zt1AFq1HVBlO2Neae0MkfQA6E3giST7RWvkdmFxSkpDa8OcjMrSf1ojr69UAMQKZRiqhKvmzulwNSFnbTaHO0hBHyqupAsiQuRSl9EcHXjmcGaS9b8wLh3WL2cKdlHazSBgGvsLR4g8ov7MwMSlb/P0FGQOFChMAvUZ1EOmpk= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849261547706.5307605286788; Fri, 10 Apr 2026 12:27:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQm-0003q4-KD; Fri, 10 Apr 2026 15:22:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQl-0003je-8O for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQj-0001tK-PN for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:14 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-ypADfWsgOuiGXlPFHrS0tQ-1; Fri, 10 Apr 2026 15:22:10 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2219F19560B2; Fri, 10 Apr 2026 19:22:09 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DDDA21801ACA; Fri, 10 Apr 2026 19:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848933; 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=j3St06greiPm0gRjhv05vve6ioGFoJrPO6xToZlL5pk=; b=fwtbLeYkhXs9Vt7TeB2ZVIyHuBF8p7copaIh7PN5eFtwfEaXwDYuKwRBczbEIjXtz08wo1 10+1lrAhP2Hvtcvs2Eb6RWLBjKY09M+UydzIRtFgfIF38NTUmADl3CLga6zfj+wpsvWHlV wJIErqUBJPad0oEXyIorRLPg/FTMkbI= X-MC-Unique: ypADfWsgOuiGXlPFHrS0tQ-1 X-Mimecast-MFC-AGG-ID: ypADfWsgOuiGXlPFHrS0tQ_1775848929 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:54 +0400 Subject: [PATCH v2 32/67] ui: move FONT_WIDTH/HEIGHT to vgafont.h MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-32-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1762; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=bzagRfynX+IeSymorU/TnEpMIirjW/YFelY6j4BXYvo=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VHnt50kmy5xeEfHAKZmT6j4riJFT2+BYFQ fGa7WGh5xyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5U7CD/0f389iLnU6SZBvcz/VDFZzO9wIkSzyQwcUXFw/WF139c0XFZ3YukWrCj4ss0DZX0Y1o75 z9MFZrUFjNtAWIP3vtiOsB53jv/j5oVTc1x/87iEnTGImjG569tt68iTZQxYc2ahe7H+5cC3xbn oOuv5TG9qFy+gZc9lCZzjcbNByYGXCDt7A3u56LBbU2uNfly5Nf8zuIWbBSuLmFeUbqKKX3bck1 +URu+2OWep8VD+GkK2Vc42e/9aqOBS6J6IFqy6u+xlHF/t+2BT4eUpLENrDSB4npt8En3IKlms7 gVHVIAWYWKYK3Axd7vHk8c5rn0PZxtoCXC+p/6zqswn2eHK9WZzom8x3rAz1m5oPDGZaWxF0Pt/ AP3PPjvNDzuQGb5SD5VRu5YJSdSnnksTJZjExb9pyGGFy39qQdxeFYiGr6d0xdBfdS98LRMBZPi EwILWHW6XQXuk8i1vP1NaIJBaOwoN/BNCl1uS4Lt3NBLoNr+Z5lXMLhlzAQ8o8ASbRYQ8XKOO3n RRLj04qDTsGO+vZI5/DpiCrUaIwp/+3emOAqcskxm6v8450z+qfhbPoR1tpseZiQFJNEmvhliv7 6zyfElvhOc+jWbwGgf1/a1qNVrlJ8Gx9V9YRamv1JBGYyceZnetKhd4SLWWoiFqT3m44P3CLYRX GCjqopHtFBZP9KQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849264506154100 Since those values are related to the VGA font, it make sense to move them here. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-priv.h | 5 ----- ui/vgafont.h | 6 +++++- ui/console-vc.c | 1 + ui/console.c | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/console-priv.h b/ui/console-priv.h index 8bcdb79d914..39798c3e9d7 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -9,11 +9,6 @@ #include "qemu/coroutine.h" #include "qemu/timer.h" =20 -#include "vgafont.h" - -#define FONT_HEIGHT 16 -#define FONT_WIDTH 8 - struct QemuConsole { Object parent; =20 diff --git a/ui/vgafont.h b/ui/vgafont.h index 54aeeb7d192..d24b5d47a95 100644 --- a/ui/vgafont.h +++ b/ui/vgafont.h @@ -6,6 +6,10 @@ =20 #include =20 -extern const uint8_t vgafont16[256 * 16]; +/* supports only vga 8x16 */ +#define FONT_WIDTH 8 +#define FONT_HEIGHT 16 + +extern const uint8_t vgafont16[256 * FONT_HEIGHT]; =20 #endif diff --git a/ui/console-vc.c b/ui/console-vc.c index d58917c1850..0d7b943fdc7 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -11,6 +11,7 @@ #include "qemu/queue.h" #include "ui/console.h" #include "ui/cp437.h" +#include "ui/vgafont.h" =20 #include "pixman.h" #include "trace.h" diff --git a/ui/console.c b/ui/console.c index b2b879e8533..c997e8df572 100644 --- a/ui/console.c +++ b/ui/console.c @@ -24,6 +24,7 @@ =20 #include "qemu/osdep.h" #include "ui/console.h" +#include "ui/vgafont.h" #include "hw/core/qdev.h" #include "qapi/error.h" #include "qapi/qapi-commands-ui.h" --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849180; cv=none; d=zohomail.com; s=zohoarc; b=BxS752Xgw4xSzrudmSh50VIElkjz1bVLVYsx7y4RFzr10qQiMn7Thiq8EhhTKfYay72/49LxZlOzkY51h92Q/7wewa+/HMTUSVH9UVf1YP03pF9uiYCiBuGnZ05S6RM9S0r/2oyx55jr5VKejBEL66nqkH9ubUuDPQ4ehJk4JDI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849180; 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=5sprlmSV4Ur7GEPFpFtjT+bHK37r1JaLLvhvGQCYTXU=; b=GYtqE4XyZN175Y/GrJtRzEwl3NN4iU7vxyUXdNjX+s9C0NqhBOarxv9H9jNxX6H4q07gy1dL3f7Vqsi4d5OBqrt98hJYKmeEIn9YdykaPQ17NUeBAtZmjvbNxSec/Ik71Sl+jDuUQA0Ii6Fu4QkZLuDInLErmkXY/pHfwtXe5Vc= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584918090024.233435230327814; Fri, 10 Apr 2026 12:26:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQy-00047P-RQ; Fri, 10 Apr 2026 15:22:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQv-0003wd-Ar for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQr-0001uN-4W for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:25 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-kUN9afyjMwS_sj1z34ZWQQ-1; Fri, 10 Apr 2026 15:22:17 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DC36319560AA; Fri, 10 Apr 2026 19:22:16 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 550CB1955F2E; Fri, 10 Apr 2026 19:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848940; 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=5sprlmSV4Ur7GEPFpFtjT+bHK37r1JaLLvhvGQCYTXU=; b=AEYxx1Qdvx1FL5gI3ZQPFV9I1PNPVAqhhJv1YoP7X/PzgAApke1hBPHd23QSwqcr92BNY4 9WUmmYV6TpEwgGFFpHKBa6vgTibgOGlqP/3q4Z0Q3LvsTpOvG4sFxdODMMKA2U9vKVJ8fi VKiwcTTQlMII+RGAbqZrI4FD/O62LHE= X-MC-Unique: kUN9afyjMwS_sj1z34ZWQQ-1 X-Mimecast-MFC-AGG-ID: kUN9afyjMwS_sj1z34ZWQQ_1775848937 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:55 +0400 Subject: [PATCH v2 33/67] ui/console-vc: move VT100 emulation into separate unit MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-33-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=72162; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=N39MIt7cxo1bmXvUev5Ip0A4HDawvUj5+c2P3VT8sbE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VYHWJMxcdz9UL0PC7FK6+KeR5l+HoseRfM NRDdvz59veJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5QJED/4zDLKYPW1SLDYxaSMgzder2Mt195UyIXxwUBbTE1C8NNInhfuo4SGKyYWOXfQO78ZpxxX kfbOUOuyk5QWXDbMMzSPyFTGRb1XwV/jlJNqBkASUrugREvEokqFO9kLZTMLO0e65Dkruejh3VQ ZYPCsyr5nrpCmRXANDX/z1sbTBlLd1z2nwhs+i/Ezl0EvDtRQJYBwO4vFs4g5Wc1XlPn/V/Wi6f Xny4iAjd/2QGAKoSGOWA1l7Rw6v0/qPlGhGQ1WlDWbmcZztXAJzdafinfLCMO33al8Dr4E/IqoD GLRS2GWiNzu9zUKU9MCWaNzx9Rni0yICqz6sED15ICIO0tfh+LTT04kcqAZvlE9ECyVsvkAA+Of lNUh823gZXlUbEcDB933VJAk3DoGugWkCFM7MW3GYmZeBgaW0w60P6zg73LBbOb/FgXnuiMbIyd xrULCYjf4OxZbXSfSK0hM4Lk+k0eApLtA+lZ078u2EhikglLM1fGRo1Hc+j5EPpmD4JOvSAs1Jb 4aYSxGdGfWBa/6ckzFyPypRwDyGEXaQuMx6scSU9sqV5AZruEhLYJBqLrSeDpt/zYJS+zDP/ETx 0pvvKPRHqqNMhgvFr7CXYj+yoDhQ+lme6pILdPUHokJBnPeztwjNiYmfcITi8yIdmCEExyTbj9b LWAdiUohLybvctw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849183312154100 Move the VT100 terminal emulation code into dedicated ui/vt100.c and ui/vt100.h files, completing the extraction from console-vc.c started in the previous patches. This makes the VT100 layer a self-contained module that can be reused independently of the chardev/console infrastructure. The code is moved as-is, with minor coding style fixes (adding missing braces, fixing whitespace) applied during the move. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console-priv.h | 1 - ui/vt100.h | 92 +++++ ui/console-vc-stubs.c | 1 + ui/console-vc.c | 1034 +--------------------------------------------= ---- ui/console.c | 2 + ui/vt100.c | 986 ++++++++++++++++++++++++++++++++++++++++++++++ ui/meson.build | 4 +- 7 files changed, 1085 insertions(+), 1035 deletions(-) diff --git a/ui/console-priv.h b/ui/console-priv.h index 39798c3e9d7..f8855753e30 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -31,7 +31,6 @@ struct QemuConsole { }; =20 void qemu_text_console_update_size(QemuTextConsole *c); -void vt100_update_cursor(void); void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym); =20 #endif diff --git a/ui/vt100.h b/ui/vt100.h new file mode 100644 index 00000000000..79cf8c23b2f --- /dev/null +++ b/ui/vt100.h @@ -0,0 +1,92 @@ +/* + * SPDX-License-Identifier: MIT + * QEMU vt100 + */ +#ifndef VT100_H +#define VT100_H + +#include "ui/console.h" +#include "qemu/fifo8.h" +#include "qemu/queue.h" + +typedef struct TextAttributes { + uint8_t fgcol:4; + uint8_t bgcol:4; + uint8_t bold:1; + uint8_t uline:1; + uint8_t blink:1; + uint8_t invers:1; + uint8_t unvisible:1; +} TextAttributes; + +#define TEXT_ATTRIBUTES_DEFAULT ((TextAttributes) { \ + .fgcol =3D QEMU_COLOR_WHITE, \ + .bgcol =3D QEMU_COLOR_BLACK \ +}) + +typedef struct TextCell { + uint8_t ch; + TextAttributes t_attrib; +} TextCell; + +#define MAX_ESC_PARAMS 3 + +enum TTYState { + TTY_STATE_NORM, + TTY_STATE_ESC, + TTY_STATE_CSI, + TTY_STATE_G0, + TTY_STATE_G1, + TTY_STATE_OSC, +}; + +typedef struct QemuVT100 QemuVT100; + +struct QemuVT100 { + pixman_image_t *image; + void (*image_update)(QemuVT100 *vt, int x, int y, int width, int heigh= t); + + int width; + int height; + int total_height; + int backscroll_height; + int x, y; + int y_displayed; + int y_base; + TextCell *cells; + int text_x[2], text_y[2], cursor_invalidate; + int echo; + + int update_x0; + int update_y0; + int update_x1; + int update_y1; + + enum TTYState state; + int esc_params[MAX_ESC_PARAMS]; + int nb_esc_params; + uint32_t utf8_state; /* UTF-8 DFA decoder state */ + uint32_t utf8_codepoint; /* accumulated UTF-8 code point */ + TextAttributes t_attrib; /* currently active text attributes */ + TextAttributes t_attrib_saved; + int x_saved, y_saved; + /* fifo for key pressed */ + Fifo8 out_fifo; + void (*out_flush)(QemuVT100 *vt); + + QTAILQ_ENTRY(QemuVT100) list; +}; + +void vt100_init(QemuVT100 *vt, + pixman_image_t *image, + void (*image_update)(QemuVT100 *vt, int x, int y, int widt= h, int height), + void (*out_flush)(QemuVT100 *vt)); +void vt100_fini(QemuVT100 *vt); + +void vt100_update_cursor(void); +size_t vt100_input(QemuVT100 *vt, const uint8_t *buf, size_t len); +void vt100_keysym(QemuVT100 *vt, int keysym); +void vt100_set_image(QemuVT100 *vt, pixman_image_t *image); +void vt100_refresh(QemuVT100 *vt); + +#endif diff --git a/ui/console-vc-stubs.c b/ui/console-vc-stubs.c index d911a82f263..30e4d101197 100644 --- a/ui/console-vc-stubs.c +++ b/ui/console-vc-stubs.c @@ -9,6 +9,7 @@ #include "qemu/option.h" #include "chardev/char.h" #include "ui/console-priv.h" +#include "vt100.h" =20 void qemu_text_console_update_size(QemuTextConsole *c) { diff --git a/ui/console-vc.c b/ui/console-vc.c index 0d7b943fdc7..6e8f2552e41 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -6,91 +6,15 @@ =20 #include "chardev/char.h" #include "qapi/error.h" -#include "qemu/fifo8.h" #include "qemu/option.h" -#include "qemu/queue.h" #include "ui/console.h" -#include "ui/cp437.h" #include "ui/vgafont.h" +#include "ui/vt100.h" =20 #include "pixman.h" #include "trace.h" #include "console-priv.h" =20 -#define DEFAULT_BACKSCROLL 512 -#define CONSOLE_CURSOR_PERIOD 500 - -typedef struct TextAttributes { - uint8_t fgcol:4; - uint8_t bgcol:4; - uint8_t bold:1; - uint8_t uline:1; - uint8_t blink:1; - uint8_t invers:1; - uint8_t unvisible:1; -} TextAttributes; - -#define TEXT_ATTRIBUTES_DEFAULT ((TextAttributes) { \ - .fgcol =3D QEMU_COLOR_WHITE, \ - .bgcol =3D QEMU_COLOR_BLACK \ -}) - -typedef struct TextCell { - uint8_t ch; - TextAttributes t_attrib; -} TextCell; - -#define MAX_ESC_PARAMS 3 - -enum TTYState { - TTY_STATE_NORM, - TTY_STATE_ESC, - TTY_STATE_CSI, - TTY_STATE_G0, - TTY_STATE_G1, - TTY_STATE_OSC, -}; - -typedef struct QemuVT100 QemuVT100; - -struct QemuVT100 { - pixman_image_t *image; - void (*image_update)(QemuVT100 *vt, int x, int y, int width, int heigh= t); - - int width; - int height; - int total_height; - int backscroll_height; - int x, y; - int y_displayed; - int y_base; - TextCell *cells; - int text_x[2], text_y[2], cursor_invalidate; - int echo; - - int update_x0; - int update_y0; - int update_x1; - int update_y1; - - enum TTYState state; - int esc_params[MAX_ESC_PARAMS]; - int nb_esc_params; - uint32_t utf8_state; /* UTF-8 DFA decoder state */ - uint32_t utf8_codepoint; /* accumulated UTF-8 code point */ - TextAttributes t_attrib; /* currently active text attributes */ - TextAttributes t_attrib_saved; - int x_saved, y_saved; - /* fifo for key pressed */ - Fifo8 out_fifo; - void (*out_flush)(QemuVT100 *vt); - - QTAILQ_ENTRY(QemuVT100) list; -}; - -static QTAILQ_HEAD(QemuVT100Head, QemuVT100) vt100s =3D - QTAILQ_HEAD_INITIALIZER(vt100s); - typedef struct QemuTextConsole { QemuConsole parent; =20 @@ -116,32 +40,6 @@ struct VCChardev { }; typedef struct VCChardev VCChardev; =20 -static const pixman_color_t color_table_rgb[2][8] =3D { - { /* dark */ - [QEMU_COLOR_BLACK] =3D QEMU_PIXMAN_COLOR_BLACK, - [QEMU_COLOR_BLUE] =3D QEMU_PIXMAN_COLOR(0x00, 0x00, 0xaa), /* = blue */ - [QEMU_COLOR_GREEN] =3D QEMU_PIXMAN_COLOR(0x00, 0xaa, 0x00), /* = green */ - [QEMU_COLOR_CYAN] =3D QEMU_PIXMAN_COLOR(0x00, 0xaa, 0xaa), /* = cyan */ - [QEMU_COLOR_RED] =3D QEMU_PIXMAN_COLOR(0xaa, 0x00, 0x00), /* = red */ - [QEMU_COLOR_MAGENTA] =3D QEMU_PIXMAN_COLOR(0xaa, 0x00, 0xaa), /* = magenta */ - [QEMU_COLOR_YELLOW] =3D QEMU_PIXMAN_COLOR(0xaa, 0xaa, 0x00), /* = yellow */ - [QEMU_COLOR_WHITE] =3D QEMU_PIXMAN_COLOR_GRAY, - }, - { /* bright */ - [QEMU_COLOR_BLACK] =3D QEMU_PIXMAN_COLOR_BLACK, - [QEMU_COLOR_BLUE] =3D QEMU_PIXMAN_COLOR(0x00, 0x00, 0xff), /* = blue */ - [QEMU_COLOR_GREEN] =3D QEMU_PIXMAN_COLOR(0x00, 0xff, 0x00), /* = green */ - [QEMU_COLOR_CYAN] =3D QEMU_PIXMAN_COLOR(0x00, 0xff, 0xff), /* = cyan */ - [QEMU_COLOR_RED] =3D QEMU_PIXMAN_COLOR(0xff, 0x00, 0x00), /* = red */ - [QEMU_COLOR_MAGENTA] =3D QEMU_PIXMAN_COLOR(0xff, 0x00, 0xff), /* = magenta */ - [QEMU_COLOR_YELLOW] =3D QEMU_PIXMAN_COLOR(0xff, 0xff, 0x00), /* = yellow */ - [QEMU_COLOR_WHITE] =3D QEMU_PIXMAN_COLOR(0xff, 0xff, 0xff), /* = white */ - } -}; - -static bool cursor_visible_phase; -static QEMUTimer *cursor_timer; - static char * qemu_text_console_get_label(QemuConsole *c) { @@ -150,157 +48,6 @@ qemu_text_console_get_label(QemuConsole *c) return tc->chr ? g_strdup(tc->chr->label) : NULL; } =20 -static void image_fill_rect(pixman_image_t *image, int posx, int posy, - int width, int height, pixman_color_t color) -{ - pixman_rectangle16_t rect =3D { - .x =3D posx, .y =3D posy, .width =3D width, .height =3D height - }; - - pixman_image_fill_rectangles(PIXMAN_OP_SRC, image, &color, 1, &rect); -} - -/* copy from (xs, ys) to (xd, yd) a rectangle of size (w, h) */ -static void image_bitblt(pixman_image_t *image, - int xs, int ys, int xd, int yd, int w, int h) -{ - pixman_image_composite(PIXMAN_OP_SRC, - image, NULL, image, - xs, ys, 0, 0, xd, yd, w, h); -} - -static void vt100_putcharxy(QemuVT100 *vt, int x, int y, int ch, - TextAttributes *t_attrib) -{ - static pixman_image_t *glyphs[256]; - pixman_color_t fgcol, bgcol; - - assert(vt->image); - if (t_attrib->invers) { - bgcol =3D color_table_rgb[t_attrib->bold][t_attrib->fgcol]; - fgcol =3D color_table_rgb[t_attrib->bold][t_attrib->bgcol]; - } else { - fgcol =3D color_table_rgb[t_attrib->bold][t_attrib->fgcol]; - bgcol =3D color_table_rgb[t_attrib->bold][t_attrib->bgcol]; - } - - if (!glyphs[ch]) { - glyphs[ch] =3D qemu_pixman_glyph_from_vgafont(FONT_HEIGHT, vgafont= 16, ch); - } - qemu_pixman_glyph_render(glyphs[ch], vt->image, - &fgcol, &bgcol, x, y, FONT_WIDTH, FONT_HEIGHT= ); -} - -static void vt100_invalidate_xy(QemuVT100 *vt, int x, int y) -{ - if (vt->update_x0 > x * FONT_WIDTH) { - vt->update_x0 =3D x * FONT_WIDTH; - } - if (vt->update_y0 > y * FONT_HEIGHT) { - vt->update_y0 =3D y * FONT_HEIGHT; - } - if (vt->update_x1 < (x + 1) * FONT_WIDTH) { - vt->update_x1 =3D (x + 1) * FONT_WIDTH; - } - if (vt->update_y1 < (y + 1) * FONT_HEIGHT) { - vt->update_y1 =3D (y + 1) * FONT_HEIGHT; - } -} - -static void vt100_show_cursor(QemuVT100 *vt, int show) -{ - TextCell *c; - int y, y1; - int x =3D vt->x; - - vt->cursor_invalidate =3D 1; - - if (x >=3D vt->width) { - x =3D vt->width - 1; - } - y1 =3D (vt->y_base + vt->y) % vt->total_height; - y =3D y1 - vt->y_displayed; - if (y < 0) { - y +=3D vt->total_height; - } - if (y < vt->height) { - c =3D &vt->cells[y1 * vt->width + x]; - if (show && cursor_visible_phase) { - TextAttributes t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - t_attrib.invers =3D !(t_attrib.invers); /* invert fg and bg */ - vt100_putcharxy(vt, x, y, c->ch, &t_attrib); - } else { - vt100_putcharxy(vt, x, y, c->ch, &(c->t_attrib)); - } - vt100_invalidate_xy(vt, x, y); - } -} - -static void vt100_image_update(QemuVT100 *vt, int x, int y, int width, int= height) -{ - vt->image_update(vt, x, y, width, height); -} - -static void vt100_refresh(QemuVT100 *vt) -{ - TextCell *c; - int x, y, y1; - int w =3D pixman_image_get_width(vt->image); - int h =3D pixman_image_get_height(vt->image); - - vt->text_x[0] =3D 0; - vt->text_y[0] =3D 0; - vt->text_x[1] =3D vt->width - 1; - vt->text_y[1] =3D vt->height - 1; - vt->cursor_invalidate =3D 1; - - image_fill_rect(vt->image, 0, 0, w, h, - color_table_rgb[0][QEMU_COLOR_BLACK]); - y1 =3D vt->y_displayed; - for (y =3D 0; y < vt->height; y++) { - c =3D vt->cells + y1 * vt->width; - for (x =3D 0; x < vt->width; x++) { - vt100_putcharxy(vt, x, y, c->ch, - &(c->t_attrib)); - c++; - } - if (++y1 =3D=3D vt->total_height) { - y1 =3D 0; - } - } - vt100_show_cursor(vt, 1); - vt100_image_update(vt, 0, 0, w, h); -} - -static void vt100_scroll(QemuVT100 *vt, int ydelta) -{ - int i, y1; - - if (ydelta > 0) { - for(i =3D 0; i < ydelta; i++) { - if (vt->y_displayed =3D=3D vt->y_base) - break; - if (++vt->y_displayed =3D=3D vt->total_height) - vt->y_displayed =3D 0; - } - } else { - ydelta =3D -ydelta; - i =3D vt->backscroll_height; - if (i > vt->total_height - vt->height) - i =3D vt->total_height - vt->height; - y1 =3D vt->y_base - i; - if (y1 < 0) - y1 +=3D vt->total_height; - for(i =3D 0; i < ydelta; i++) { - if (vt->y_displayed =3D=3D y1) - break; - if (--vt->y_displayed < 0) - vt->y_displayed =3D vt->total_height - 1; - } - } - vt100_refresh(vt); -} - static void qemu_text_console_out_flush(QemuTextConsole *s) { uint32_t len, avail; @@ -318,64 +65,6 @@ static void qemu_text_console_out_flush(QemuTextConsole= *s) } } =20 -static void vt100_write(QemuVT100 *vt, const void *buf, size_t len) -{ - uint32_t num_free; - - num_free =3D fifo8_num_free(&vt->out_fifo); - fifo8_push_all(&vt->out_fifo, buf, MIN(num_free, len)); - vt->out_flush(vt); -} - -static int vt100_input(QemuVT100 *vt, const uint8_t *buf, int len); - -static void vt100_keysym(QemuVT100 *vt, int keysym) -{ - uint8_t buf[16], *q; - int c; - - switch(keysym) { - case QEMU_KEY_CTRL_UP: - vt100_scroll(vt, -1); - break; - case QEMU_KEY_CTRL_DOWN: - vt100_scroll(vt, 1); - break; - case QEMU_KEY_CTRL_PAGEUP: - vt100_scroll(vt, -10); - break; - case QEMU_KEY_CTRL_PAGEDOWN: - vt100_scroll(vt, 10); - break; - default: - /* convert the QEMU keysym to VT100 key string */ - q =3D buf; - if (keysym >=3D 0xe100 && keysym <=3D 0xe11f) { - *q++ =3D '\033'; - *q++ =3D '['; - c =3D keysym - 0xe100; - if (c >=3D 10) - *q++ =3D '0' + (c / 10); - *q++ =3D '0' + (c % 10); - *q++ =3D '~'; - } else if (keysym >=3D 0xe120 && keysym <=3D 0xe17f) { - *q++ =3D '\033'; - *q++ =3D '['; - *q++ =3D keysym & 0xff; - } else if (vt->echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'))= { - vt100_input(vt, (uint8_t *)"\r", 1); - *q++ =3D '\n'; - } else { - *q++ =3D keysym; - } - if (vt->echo) { - vt100_input(vt, buf, q - buf); - } - vt100_write(vt, buf, q - buf); - break; - } - -} /* called when an ascii key is pressed */ void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym) { @@ -410,681 +99,10 @@ static void text_console_update(void *opaque, uint32_= t *chardata) } } =20 -static void vt100_set_image(QemuVT100 *vt, pixman_image_t *image) -{ - TextCell *cells, *c, *c1; - int w1, x, y, last_width, w, h; - - vt->image =3D image; - w =3D pixman_image_get_width(image) / FONT_WIDTH; - h =3D pixman_image_get_height(image) / FONT_HEIGHT; - if (w =3D=3D vt->width && h =3D=3D vt->height) { - return; - } - - last_width =3D vt->width; - vt->width =3D w; - vt->height =3D h; - - w1 =3D MIN(vt->width, last_width); - - cells =3D g_new(TextCell, vt->width * vt->total_height + 1); - for (y =3D 0; y < vt->total_height; y++) { - c =3D &cells[y * vt->width]; - if (w1 > 0) { - c1 =3D &vt->cells[y * last_width]; - for (x =3D 0; x < w1; x++) { - *c++ =3D *c1++; - } - } - for (x =3D w1; x < vt->width; x++) { - c->ch =3D ' '; - c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - c++; - } - } - g_free(vt->cells); - vt->cells =3D cells; -} - -static void vt100_put_lf(QemuVT100 *vt) -{ - TextCell *c; - int x, y1; - - vt->y++; - if (vt->y >=3D vt->height) { - vt->y =3D vt->height - 1; - - if (vt->y_displayed =3D=3D vt->y_base) { - if (++vt->y_displayed =3D=3D vt->total_height) - vt->y_displayed =3D 0; - } - if (++vt->y_base =3D=3D vt->total_height) - vt->y_base =3D 0; - if (vt->backscroll_height < vt->total_height) - vt->backscroll_height++; - y1 =3D (vt->y_base + vt->height - 1) % vt->total_height; - c =3D &vt->cells[y1 * vt->width]; - for(x =3D 0; x < vt->width; x++) { - c->ch =3D ' '; - c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - c++; - } - if (vt->y_displayed =3D=3D vt->y_base) { - vt->text_x[0] =3D 0; - vt->text_y[0] =3D 0; - vt->text_x[1] =3D vt->width - 1; - vt->text_y[1] =3D vt->height - 1; - - image_bitblt(vt->image, 0, FONT_HEIGHT, 0, 0, - vt->width * FONT_WIDTH, - (vt->height - 1) * FONT_HEIGHT); - image_fill_rect(vt->image, 0, (vt->height - 1) * FONT_HEIGHT, - vt->width * FONT_WIDTH, FONT_HEIGHT, - color_table_rgb[0][TEXT_ATTRIBUTES_DEFAULT.bgc= ol]); - vt->update_x0 =3D 0; - vt->update_y0 =3D 0; - vt->update_x1 =3D vt->width * FONT_WIDTH; - vt->update_y1 =3D vt->height * FONT_HEIGHT; - } - } -} - -/* Set console attributes depending on the current escape codes. - * NOTE: I know this code is not very efficient (checking every color for = it - * self) but it is more readable and better maintainable. - */ -static void vt100_handle_escape(QemuVT100 *vt) -{ - int i; - - for (i =3D 0; i < vt->nb_esc_params; i++) { - switch (vt->esc_params[i]) { - case 0: /* reset all console attributes to default */ - vt->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - break; - case 1: - vt->t_attrib.bold =3D 1; - break; - case 4: - vt->t_attrib.uline =3D 1; - break; - case 5: - vt->t_attrib.blink =3D 1; - break; - case 7: - vt->t_attrib.invers =3D 1; - break; - case 8: - vt->t_attrib.unvisible =3D 1; - break; - case 22: - vt->t_attrib.bold =3D 0; - break; - case 24: - vt->t_attrib.uline =3D 0; - break; - case 25: - vt->t_attrib.blink =3D 0; - break; - case 27: - vt->t_attrib.invers =3D 0; - break; - case 28: - vt->t_attrib.unvisible =3D 0; - break; - /* set foreground color */ - case 30: - vt->t_attrib.fgcol =3D QEMU_COLOR_BLACK; - break; - case 31: - vt->t_attrib.fgcol =3D QEMU_COLOR_RED; - break; - case 32: - vt->t_attrib.fgcol =3D QEMU_COLOR_GREEN; - break; - case 33: - vt->t_attrib.fgcol =3D QEMU_COLOR_YELLOW; - break; - case 34: - vt->t_attrib.fgcol =3D QEMU_COLOR_BLUE; - break; - case 35: - vt->t_attrib.fgcol =3D QEMU_COLOR_MAGENTA; - break; - case 36: - vt->t_attrib.fgcol =3D QEMU_COLOR_CYAN; - break; - case 37: - vt->t_attrib.fgcol =3D QEMU_COLOR_WHITE; - break; - /* set background color */ - case 40: - vt->t_attrib.bgcol =3D QEMU_COLOR_BLACK; - break; - case 41: - vt->t_attrib.bgcol =3D QEMU_COLOR_RED; - break; - case 42: - vt->t_attrib.bgcol =3D QEMU_COLOR_GREEN; - break; - case 43: - vt->t_attrib.bgcol =3D QEMU_COLOR_YELLOW; - break; - case 44: - vt->t_attrib.bgcol =3D QEMU_COLOR_BLUE; - break; - case 45: - vt->t_attrib.bgcol =3D QEMU_COLOR_MAGENTA; - break; - case 46: - vt->t_attrib.bgcol =3D QEMU_COLOR_CYAN; - break; - case 47: - vt->t_attrib.bgcol =3D QEMU_COLOR_WHITE; - break; - } - } -} - -static void vt100_update_xy(QemuVT100 *vt, int x, int y) -{ - TextCell *c; - int y1, y2; - - vt->text_x[0] =3D MIN(vt->text_x[0], x); - vt->text_x[1] =3D MAX(vt->text_x[1], x); - vt->text_y[0] =3D MIN(vt->text_y[0], y); - vt->text_y[1] =3D MAX(vt->text_y[1], y); - - y1 =3D (vt->y_base + y) % vt->total_height; - y2 =3D y1 - vt->y_displayed; - if (y2 < 0) { - y2 +=3D vt->total_height; - } - if (y2 < vt->height) { - if (x >=3D vt->width) { - x =3D vt->width - 1; - } - c =3D &vt->cells[y1 * vt->width + x]; - vt100_putcharxy(vt, x, y2, c->ch, - &(c->t_attrib)); - vt100_invalidate_xy(vt, x, y2); - } -} - -static void vt100_clear_xy(QemuVT100 *vt, int x, int y) -{ - int y1 =3D (vt->y_base + y) % vt->total_height; - if (x >=3D vt->width) { - x =3D vt->width - 1; - } - TextCell *c =3D &vt->cells[y1 * vt->width + x]; - c->ch =3D ' '; - c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - vt100_update_xy(vt, x, y); -} - -/* - * UTF-8 DFA decoder by Bjoern Hoehrmann. - * Copyright (c) 2008-2010 Bjoern Hoehrmann - * See https://github.com/polijan/utf8_decode for details. - * - * SPDX-License-Identifier: MIT - */ -#define BH_UTF8_ACCEPT 0 -#define BH_UTF8_REJECT 12 - -static uint32_t bh_utf8_decode(uint32_t *state, uint32_t *codep, uint32_t = byte) -{ - static const uint8_t utf8d[] =3D { - /* character class lookup */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, - 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, - 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, - 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, - - /* state transition lookup */ - 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,= 12,12, - 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24= ,12,12, - 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24= ,12,12, - 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36= ,12,12, - 12,36,12,12,12,12,12,12,12,12,12,12, - }; - uint32_t type =3D utf8d[byte]; - - *codep =3D (*state !=3D BH_UTF8_ACCEPT) ? - (byte & 0x3fu) | (*codep << 6) : - (0xffu >> type) & (byte); - - *state =3D utf8d[256 + *state + type]; - return *state; -} - -static void vt100_put_one(QemuVT100 *vt, int ch) -{ - TextCell *c; - int y1; - if (vt->x >=3D vt->width) { - /* line wrap */ - vt->x =3D 0; - vt100_put_lf(vt); - } - y1 =3D (vt->y_base + vt->y) % vt->total_height; - c =3D &vt->cells[y1 * vt->width + vt->x]; - c->ch =3D ch; - c->t_attrib =3D vt->t_attrib; - vt100_update_xy(vt, vt->x, vt->y); - vt->x++; -} - -/* set cursor, checking bounds */ -static void vt100_set_cursor(QemuVT100 *vt, int x, int y) -{ - if (x < 0) { - x =3D 0; - } - if (y < 0) { - y =3D 0; - } - if (y >=3D vt->height) { - y =3D vt->height - 1; - } - if (x >=3D vt->width) { - x =3D vt->width - 1; - } - - vt->x =3D x; - vt->y =3D y; -} - -/** - * vc_csi_P() - (DCH) deletes one or more characters from the cursor - * position to the right. As characters are deleted, the remaining - * characters between the cursor and right margin move to the - * left. Character attributes move with the characters. - */ -static void vt100_csi_P(QemuVT100 *vt, unsigned int nr) -{ - TextCell *c1, *c2; - unsigned int x1, x2, y; - unsigned int end, len; - - if (!nr) { - nr =3D 1; - } - if (nr > vt->width - vt->x) { - nr =3D vt->width - vt->x; - if (!nr) { - return; - } - } - - x1 =3D vt->x; - x2 =3D vt->x + nr; - len =3D vt->width - x2; - if (len) { - y =3D (vt->y_base + vt->y) % vt->total_height; - c1 =3D &vt->cells[y * vt->width + x1]; - c2 =3D &vt->cells[y * vt->width + x2]; - memmove(c1, c2, len * sizeof(*c1)); - for (end =3D x1 + len; x1 < end; x1++) { - vt100_update_xy(vt, x1, vt->y); - } - } - /* Clear the rest */ - for (; x1 < vt->width; x1++) { - vt100_clear_xy(vt, x1, vt->y); - } -} - -/** - * vc_csi_at() - (ICH) inserts `nr` blank characters with the default - * character attribute. The cursor remains at the beginning of the - * blank characters. Text between the cursor and right margin moves to - * the right. Characters scrolled past the right margin are lost. - */ -static void vt100_csi_at(QemuVT100 *vt, unsigned int nr) -{ - TextCell *c1, *c2; - unsigned int x1, x2, y; - unsigned int end, len; - - if (!nr) { - nr =3D 1; - } - if (nr > vt->width - vt->x) { - nr =3D vt->width - vt->x; - if (!nr) { - return; - } - } - - x1 =3D vt->x + nr; - x2 =3D vt->x; - len =3D vt->width - x1; - if (len) { - y =3D (vt->y_base + vt->y) % vt->total_height; - c1 =3D &vt->cells[y * vt->width + x1]; - c2 =3D &vt->cells[y * vt->width + x2]; - memmove(c1, c2, len * sizeof(*c1)); - for (end =3D x1 + len; x1 < end; x1++) { - vt100_update_xy(vt, x1, vt->y); - } - } - /* Insert blanks */ - for (x1 =3D vt->x; x1 < vt->x + nr; x1++) { - vt100_clear_xy(vt, x1, vt->y); - } -} - -/** - * vt100_save_cursor() - saves cursor position and character attributes. - */ -static void vt100_save_cursor(QemuVT100 *vt) -{ - vt->x_saved =3D vt->x; - vt->y_saved =3D vt->y; - vt->t_attrib_saved =3D vt->t_attrib; -} - -/** - * vt100_restore_cursor() - restores cursor position and character - * attributes from saved state. - */ -static void vt100_restore_cursor(QemuVT100 *vt) -{ - vt->x =3D vt->x_saved; - vt->y =3D vt->y_saved; - vt->t_attrib =3D vt->t_attrib_saved; -} - -static void vt100_putchar(QemuVT100 *vt, int ch) -{ - int i; - int x, y; - g_autofree char *response =3D NULL; - - switch (vt->state) { - case TTY_STATE_NORM: - /* Feed byte through the UTF-8 DFA decoder */ - if (ch >=3D 0x80) { - switch (bh_utf8_decode(&vt->utf8_state, &vt->utf8_codepoint, c= h)) { - case BH_UTF8_ACCEPT: - vt100_put_one(vt, unicode_to_cp437(vt->utf8_codepoint)); - break; - case BH_UTF8_REJECT: - /* Reset state so the decoder can resync */ - vt->utf8_state =3D BH_UTF8_ACCEPT; - break; - default: - /* Need more bytes */ - break; - } - break; - } - /* ASCII byte: abort any pending UTF-8 sequence */ - vt->utf8_state =3D BH_UTF8_ACCEPT; - switch(ch) { - case '\r': /* carriage return */ - vt->x =3D 0; - break; - case '\n': /* newline */ - vt100_put_lf(vt); - break; - case '\b': /* backspace */ - if (vt->x > 0) - vt->x--; - break; - case '\t': /* tabspace */ - if (vt->x + (8 - (vt->x % 8)) > vt->width) { - vt->x =3D 0; - vt100_put_lf(vt); - } else { - vt->x =3D vt->x + (8 - (vt->x % 8)); - } - break; - case '\a': /* alert aka. bell */ - /* TODO: has to be implemented */ - break; - case 14: - /* SO (shift out), character set 1 (ignored) */ - break; - case 15: - /* SI (shift in), character set 0 (ignored) */ - break; - case 27: /* esc (introducing an escape sequence) */ - vt->state =3D TTY_STATE_ESC; - break; - default: - vt100_put_one(vt, ch); - break; - } - break; - case TTY_STATE_ESC: /* check if it is a terminal escape sequence */ - if (ch =3D=3D '[') { - for(i=3D0;iesc_params[i] =3D 0; - vt->nb_esc_params =3D 0; - vt->state =3D TTY_STATE_CSI; - } else if (ch =3D=3D '(') { - vt->state =3D TTY_STATE_G0; - } else if (ch =3D=3D ')') { - vt->state =3D TTY_STATE_G1; - } else if (ch =3D=3D ']' || ch =3D=3D 'P' || ch =3D=3D 'X' - || ch =3D=3D '^' || ch =3D=3D '_') { - /* String sequences: OSC, DCS, SOS, PM, APC */ - vt->state =3D TTY_STATE_OSC; - } else if (ch =3D=3D '7') { - vt100_save_cursor(vt); - vt->state =3D TTY_STATE_NORM; - } else if (ch =3D=3D '8') { - vt100_restore_cursor(vt); - vt->state =3D TTY_STATE_NORM; - } else { - vt->state =3D TTY_STATE_NORM; - } - break; - case TTY_STATE_CSI: /* handle escape sequence parameters */ - if (ch >=3D '0' && ch <=3D '9') { - if (vt->nb_esc_params < MAX_ESC_PARAMS) { - int *param =3D &vt->esc_params[vt->nb_esc_params]; - int digit =3D (ch - '0'); - - *param =3D (*param <=3D (INT_MAX - digit) / 10) ? - *param * 10 + digit : INT_MAX; - } - } else { - if (vt->nb_esc_params < MAX_ESC_PARAMS) - vt->nb_esc_params++; - if (ch =3D=3D ';' || ch =3D=3D '?') { - break; - } - trace_console_putchar_csi(vt->esc_params[0], vt->esc_params[1], - ch, vt->nb_esc_params); - vt->state =3D TTY_STATE_NORM; - switch(ch) { - case 'A': - /* move cursor up */ - if (vt->esc_params[0] =3D=3D 0) { - vt->esc_params[0] =3D 1; - } - vt100_set_cursor(vt, vt->x, vt->y - vt->esc_params[0]); - break; - case 'B': - /* move cursor down */ - if (vt->esc_params[0] =3D=3D 0) { - vt->esc_params[0] =3D 1; - } - vt100_set_cursor(vt, vt->x, vt->y + vt->esc_params[0]); - break; - case 'C': - /* move cursor right */ - if (vt->esc_params[0] =3D=3D 0) { - vt->esc_params[0] =3D 1; - } - vt100_set_cursor(vt, vt->x + vt->esc_params[0], vt->y); - break; - case 'D': - /* move cursor left */ - if (vt->esc_params[0] =3D=3D 0) { - vt->esc_params[0] =3D 1; - } - vt100_set_cursor(vt, vt->x - vt->esc_params[0], vt->y); - break; - case 'G': - /* move cursor to column */ - vt100_set_cursor(vt, vt->esc_params[0] - 1, vt->y); - break; - case 'f': - case 'H': - /* move cursor to row, column */ - vt100_set_cursor(vt, vt->esc_params[1] - 1, vt->esc_params= [0] - 1); - break; - case 'J': - switch (vt->esc_params[0]) { - case 0: - /* clear to end of screen */ - for (y =3D vt->y; y < vt->height; y++) { - for (x =3D 0; x < vt->width; x++) { - if (y =3D=3D vt->y && x < vt->x) { - continue; - } - vt100_clear_xy(vt, x, y); - } - } - break; - case 1: - /* clear from beginning of screen */ - for (y =3D 0; y <=3D vt->y; y++) { - for (x =3D 0; x < vt->width; x++) { - if (y =3D=3D vt->y && x > vt->x) { - break; - } - vt100_clear_xy(vt, x, y); - } - } - break; - case 2: - /* clear entire screen */ - for (y =3D 0; y < vt->height; y++) { - for (x =3D 0; x < vt->width; x++) { - vt100_clear_xy(vt, x, y); - } - } - break; - } - break; - case 'K': - switch (vt->esc_params[0]) { - case 0: - /* clear to eol */ - for(x =3D vt->x; x < vt->width; x++) { - vt100_clear_xy(vt, x, vt->y); - } - break; - case 1: - /* clear from beginning of line */ - for (x =3D 0; x <=3D vt->x && x < vt->width; x++) { - vt100_clear_xy(vt, x, vt->y); - } - break; - case 2: - /* clear entire line */ - for(x =3D 0; x < vt->width; x++) { - vt100_clear_xy(vt, x, vt->y); - } - break; - } - break; - case 'P': - vt100_csi_P(vt, vt->esc_params[0]); - break; - case 'm': - vt100_handle_escape(vt); - break; - case 'n': - switch (vt->esc_params[0]) { - case 5: - /* report console status (always succeed)*/ - vt100_write(vt, "\033[0n", 4); - break; - case 6: - /* report cursor position */ - response =3D g_strdup_printf("\033[%d;%dR", - vt->y + 1, vt->x + 1); - vt100_write(vt, response, strlen(response)); - break; - } - break; - case 's': - vt100_save_cursor(vt); - break; - case 'u': - vt100_restore_cursor(vt); - break; - case '@': - vt100_csi_at(vt, vt->esc_params[0]); - break; - default: - trace_console_putchar_unhandled(ch); - break; - } - break; - } - break; - case TTY_STATE_OSC: /* Operating System Command: ESC ] ... BEL/ST */ - if (ch =3D=3D '\a') { - /* BEL terminates OSC */ - vt->state =3D TTY_STATE_NORM; - } else if (ch =3D=3D 27) { - /* ESC might start ST (ESC \) */ - vt->state =3D TTY_STATE_ESC; - } - /* All other bytes are silently consumed */ - break; - case TTY_STATE_G0: /* set character sets */ - case TTY_STATE_G1: /* set character sets */ - switch (ch) { - case 'B': - /* Latin-1 map */ - break; - } - vt->state =3D TTY_STATE_NORM; - break; - } -} - #define TYPE_CHARDEV_VC "chardev-vc" DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV, TYPE_CHARDEV_VC) =20 -static size_t vt100_input(QemuVT100 *vt, const uint8_t *buf, size_t len) -{ - int i; - - vt->update_x0 =3D vt->width * FONT_WIDTH; - vt->update_y0 =3D vt->height * FONT_HEIGHT; - vt->update_x1 =3D 0; - vt->update_y1 =3D 0; - vt100_show_cursor(vt, 0); - for(i =3D 0; i < len; i++) { - vt100_putchar(vt, buf[i]); - } - vt100_show_cursor(vt, 1); - if (vt->update_x0 < vt->update_x1) { - vt100_image_update(vt, vt->update_x0, vt->update_y0, - vt->update_x1 - vt->update_x0, - vt->update_y1 - vt->update_y0); - } - return len; -} - static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len) { VCChardev *drv =3D VC_CHARDEV(chr); @@ -1093,30 +111,6 @@ static int vc_chr_write(Chardev *chr, const uint8_t *= buf, int len) return vt100_input(&s->vt, buf, len); } =20 -void vt100_update_cursor(void) -{ - QemuVT100 *vt; - - cursor_visible_phase =3D !cursor_visible_phase; - - if (QTAILQ_EMPTY(&vt100s)) { - return; - } - - QTAILQ_FOREACH(vt, &vt100s, list) { - vt100_refresh(vt); - } - - timer_mod(cursor_timer, - qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + CONSOLE_CURSOR_PERIOD / 2= ); -} - -static void -cursor_timer_cb(void *opaque) -{ - vt100_update_cursor(); -} - static void text_console_invalidate(void *opaque) { QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(opaque); @@ -1127,13 +121,6 @@ static void text_console_invalidate(void *opaque) vt100_refresh(&s->vt); } =20 -static void vt100_fini(QemuVT100 *vt) -{ - QTAILQ_REMOVE(&vt100s, vt, list); - fifo8_destroy(&vt->out_fifo); - g_free(vt->cells); -} - static void qemu_text_console_finalize(Object *obj) { @@ -1212,25 +199,6 @@ static void text_console_out_flush(QemuVT100 *vt) qemu_text_console_out_flush(console); } =20 -static void vt100_init(QemuVT100 *vt, - pixman_image_t *image, - void (*image_update)(QemuVT100 *vt, int x, int y, i= nt w, int h), - void (*out_flush)(QemuVT100 *vt)) -{ - if (!cursor_timer) { - cursor_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, cursor_timer_cb= , NULL); - } - - QTAILQ_INSERT_HEAD(&vt100s, vt, list); - fifo8_create(&vt->out_fifo, 16); - vt->total_height =3D DEFAULT_BACKSCROLL; - vt->image_update =3D image_update; - vt->out_flush =3D out_flush; - /* set current text attributes to default */ - vt->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; - vt100_set_image(vt, image); -} - static bool vc_chr_open(Chardev *chr, ChardevBackend *backend, Error **err= p) { ChardevVC *vc =3D backend->u.vc.data; diff --git a/ui/console.c b/ui/console.c index c997e8df572..7ffea2776ef 100644 --- a/ui/console.c +++ b/ui/console.c @@ -39,6 +39,8 @@ #include "system/memory.h" #include "qom/object.h" #include "qemu/memfd.h" +#include "ui/vt100.h" +#include "vgafont.h" =20 #include "console-priv.h" =20 diff --git a/ui/vt100.c b/ui/vt100.c new file mode 100644 index 00000000000..ef97eb7ba67 --- /dev/null +++ b/ui/vt100.c @@ -0,0 +1,986 @@ +/* + * SPDX-License-Identifier: MIT + * QEMU vt100 + */ +#include "qemu/osdep.h" +#include "qemu/timer.h" +#include "cp437.h" +#include "vgafont.h" +#include "vt100.h" + +#include "trace.h" + +#define DEFAULT_BACKSCROLL 512 +#define CONSOLE_CURSOR_PERIOD 500 + +static const pixman_color_t color_table_rgb[2][8] =3D { + { /* dark */ + [QEMU_COLOR_BLACK] =3D QEMU_PIXMAN_COLOR_BLACK, + [QEMU_COLOR_BLUE] =3D QEMU_PIXMAN_COLOR(0x00, 0x00, 0xaa), /* = blue */ + [QEMU_COLOR_GREEN] =3D QEMU_PIXMAN_COLOR(0x00, 0xaa, 0x00), /* = green */ + [QEMU_COLOR_CYAN] =3D QEMU_PIXMAN_COLOR(0x00, 0xaa, 0xaa), /* = cyan */ + [QEMU_COLOR_RED] =3D QEMU_PIXMAN_COLOR(0xaa, 0x00, 0x00), /* = red */ + [QEMU_COLOR_MAGENTA] =3D QEMU_PIXMAN_COLOR(0xaa, 0x00, 0xaa), /* = magenta */ + [QEMU_COLOR_YELLOW] =3D QEMU_PIXMAN_COLOR(0xaa, 0xaa, 0x00), /* = yellow */ + [QEMU_COLOR_WHITE] =3D QEMU_PIXMAN_COLOR_GRAY, + }, + { /* bright */ + [QEMU_COLOR_BLACK] =3D QEMU_PIXMAN_COLOR_BLACK, + [QEMU_COLOR_BLUE] =3D QEMU_PIXMAN_COLOR(0x00, 0x00, 0xff), /* = blue */ + [QEMU_COLOR_GREEN] =3D QEMU_PIXMAN_COLOR(0x00, 0xff, 0x00), /* = green */ + [QEMU_COLOR_CYAN] =3D QEMU_PIXMAN_COLOR(0x00, 0xff, 0xff), /* = cyan */ + [QEMU_COLOR_RED] =3D QEMU_PIXMAN_COLOR(0xff, 0x00, 0x00), /* = red */ + [QEMU_COLOR_MAGENTA] =3D QEMU_PIXMAN_COLOR(0xff, 0x00, 0xff), /* = magenta */ + [QEMU_COLOR_YELLOW] =3D QEMU_PIXMAN_COLOR(0xff, 0xff, 0x00), /* = yellow */ + [QEMU_COLOR_WHITE] =3D QEMU_PIXMAN_COLOR(0xff, 0xff, 0xff), /* = white */ + } +}; + +static bool cursor_visible_phase; +static QEMUTimer *cursor_timer; +static QTAILQ_HEAD(QemuVT100Head, QemuVT100) vt100s =3D + QTAILQ_HEAD_INITIALIZER(vt100s); + +static void image_fill_rect(pixman_image_t *image, int posx, int posy, + int width, int height, pixman_color_t color) +{ + pixman_rectangle16_t rect =3D { + .x =3D posx, .y =3D posy, .width =3D width, .height =3D height + }; + + pixman_image_fill_rectangles(PIXMAN_OP_SRC, image, + &color, 1, &rect); +} + +/* copy from (xs, ys) to (xd, yd) a rectangle of size (w, h) */ +static void image_bitblt(pixman_image_t *image, + int xs, int ys, int xd, int yd, int w, int h) +{ + pixman_image_composite(PIXMAN_OP_SRC, + image, NULL, image, + xs, ys, 0, 0, xd, yd, w, h); +} + +static void vt100_putcharxy(QemuVT100 *vt, int x, int y, int ch, + TextAttributes *t_attrib) +{ + static pixman_image_t *glyphs[256]; + pixman_color_t fgcol, bgcol; + + assert(vt->image); + if (t_attrib->invers) { + bgcol =3D color_table_rgb[t_attrib->bold][t_attrib->fgcol]; + fgcol =3D color_table_rgb[t_attrib->bold][t_attrib->bgcol]; + } else { + fgcol =3D color_table_rgb[t_attrib->bold][t_attrib->fgcol]; + bgcol =3D color_table_rgb[t_attrib->bold][t_attrib->bgcol]; + } + + if (!glyphs[ch]) { + glyphs[ch] =3D qemu_pixman_glyph_from_vgafont(FONT_HEIGHT, vgafont= 16, ch); + } + qemu_pixman_glyph_render(glyphs[ch], vt->image, + &fgcol, &bgcol, x, y, FONT_WIDTH, FONT_HEIGHT= ); +} + +static void vt100_invalidate_xy(QemuVT100 *vt, int x, int y) +{ + if (vt->update_x0 > x * FONT_WIDTH) { + vt->update_x0 =3D x * FONT_WIDTH; + } + if (vt->update_y0 > y * FONT_HEIGHT) { + vt->update_y0 =3D y * FONT_HEIGHT; + } + if (vt->update_x1 < (x + 1) * FONT_WIDTH) { + vt->update_x1 =3D (x + 1) * FONT_WIDTH; + } + if (vt->update_y1 < (y + 1) * FONT_HEIGHT) { + vt->update_y1 =3D (y + 1) * FONT_HEIGHT; + } +} + +static void vt100_show_cursor(QemuVT100 *vt, int show) +{ + TextCell *c; + int y, y1; + int x =3D vt->x; + + vt->cursor_invalidate =3D 1; + + if (x >=3D vt->width) { + x =3D vt->width - 1; + } + y1 =3D (vt->y_base + vt->y) % vt->total_height; + y =3D y1 - vt->y_displayed; + if (y < 0) { + y +=3D vt->total_height; + } + if (y < vt->height) { + c =3D &vt->cells[y1 * vt->width + x]; + if (show && cursor_visible_phase) { + TextAttributes t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + t_attrib.invers =3D !(t_attrib.invers); /* invert fg and bg */ + vt100_putcharxy(vt, x, y, c->ch, &t_attrib); + } else { + vt100_putcharxy(vt, x, y, c->ch, &(c->t_attrib)); + } + vt100_invalidate_xy(vt, x, y); + } +} + +static void vt100_image_update(QemuVT100 *vt, int x, int y, int width, int= height) +{ + vt->image_update(vt, x, y, width, height); +} + +void vt100_refresh(QemuVT100 *vt) +{ + TextCell *c; + int x, y, y1; + int w =3D pixman_image_get_width(vt->image); + int h =3D pixman_image_get_height(vt->image); + + vt->text_x[0] =3D 0; + vt->text_y[0] =3D 0; + vt->text_x[1] =3D vt->width - 1; + vt->text_y[1] =3D vt->height - 1; + vt->cursor_invalidate =3D 1; + + image_fill_rect(vt->image, 0, 0, w, h, + color_table_rgb[0][QEMU_COLOR_BLACK]); + y1 =3D vt->y_displayed; + for (y =3D 0; y < vt->height; y++) { + c =3D vt->cells + y1 * vt->width; + for (x =3D 0; x < vt->width; x++) { + vt100_putcharxy(vt, x, y, c->ch, + &(c->t_attrib)); + c++; + } + if (++y1 =3D=3D vt->total_height) { + y1 =3D 0; + } + } + vt100_show_cursor(vt, 1); + vt100_image_update(vt, 0, 0, w, h); +} + +static void vt100_scroll(QemuVT100 *vt, int ydelta) +{ + int i, y1; + + if (ydelta > 0) { + for (i =3D 0; i < ydelta; i++) { + if (vt->y_displayed =3D=3D vt->y_base) { + break; + } + if (++vt->y_displayed =3D=3D vt->total_height) { + vt->y_displayed =3D 0; + } + } + } else { + ydelta =3D -ydelta; + i =3D vt->backscroll_height; + if (i > vt->total_height - vt->height) { + i =3D vt->total_height - vt->height; + } + y1 =3D vt->y_base - i; + if (y1 < 0) { + y1 +=3D vt->total_height; + } + for (i =3D 0; i < ydelta; i++) { + if (vt->y_displayed =3D=3D y1) { + break; + } + if (--vt->y_displayed < 0) { + vt->y_displayed =3D vt->total_height - 1; + } + } + } + vt100_refresh(vt); +} + +static void vt100_write(QemuVT100 *vt, const void *buf, size_t len) +{ + uint32_t num_free; + + num_free =3D fifo8_num_free(&vt->out_fifo); + fifo8_push_all(&vt->out_fifo, buf, MIN(num_free, len)); + vt->out_flush(vt); +} + +void vt100_set_image(QemuVT100 *vt, pixman_image_t *image) +{ + TextCell *cells, *c, *c1; + int w1, x, y, last_width, w, h; + + vt->image =3D image; + w =3D pixman_image_get_width(vt->image) / FONT_WIDTH; + h =3D pixman_image_get_height(vt->image) / FONT_HEIGHT; + if (w =3D=3D vt->width && h =3D=3D vt->height) { + return; + } + + last_width =3D vt->width; + vt->width =3D w; + vt->height =3D h; + + w1 =3D MIN(vt->width, last_width); + + cells =3D g_new(TextCell, vt->width * vt->total_height + 1); + for (y =3D 0; y < vt->total_height; y++) { + c =3D &cells[y * vt->width]; + if (w1 > 0) { + c1 =3D &vt->cells[y * last_width]; + for (x =3D 0; x < w1; x++) { + *c++ =3D *c1++; + } + } + for (x =3D w1; x < vt->width; x++) { + c->ch =3D ' '; + c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + c++; + } + } + g_free(vt->cells); + vt->cells =3D cells; +} + +static void vt100_put_lf(QemuVT100 *vt) +{ + TextCell *c; + int x, y1; + + vt->y++; + if (vt->y >=3D vt->height) { + vt->y =3D vt->height - 1; + + if (vt->y_displayed =3D=3D vt->y_base) { + if (++vt->y_displayed =3D=3D vt->total_height) { + vt->y_displayed =3D 0; + } + } + if (++vt->y_base =3D=3D vt->total_height) { + vt->y_base =3D 0; + } + if (vt->backscroll_height < vt->total_height) { + vt->backscroll_height++; + } + y1 =3D (vt->y_base + vt->height - 1) % vt->total_height; + c =3D &vt->cells[y1 * vt->width]; + for (x =3D 0; x < vt->width; x++) { + c->ch =3D ' '; + c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + c++; + } + if (vt->y_displayed =3D=3D vt->y_base) { + vt->text_x[0] =3D 0; + vt->text_y[0] =3D 0; + vt->text_x[1] =3D vt->width - 1; + vt->text_y[1] =3D vt->height - 1; + + image_bitblt(vt->image, 0, FONT_HEIGHT, 0, 0, + vt->width * FONT_WIDTH, + (vt->height - 1) * FONT_HEIGHT); + image_fill_rect(vt->image, 0, (vt->height - 1) * FONT_HEIGHT, + vt->width * FONT_WIDTH, FONT_HEIGHT, + color_table_rgb[0][TEXT_ATTRIBUTES_DEFAULT.bgc= ol]); + vt->update_x0 =3D 0; + vt->update_y0 =3D 0; + vt->update_x1 =3D vt->width * FONT_WIDTH; + vt->update_y1 =3D vt->height * FONT_HEIGHT; + } + } +} + +/* + * Set console attributes depending on the current escape codes. + * NOTE: I know this code is not very efficient (checking every color for = it + * self) but it is more readable and better maintainable. + */ +static void vt100_handle_escape(QemuVT100 *vt) +{ + int i; + + for (i =3D 0; i < vt->nb_esc_params; i++) { + switch (vt->esc_params[i]) { + case 0: /* reset all console attributes to default */ + vt->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + break; + case 1: + vt->t_attrib.bold =3D 1; + break; + case 4: + vt->t_attrib.uline =3D 1; + break; + case 5: + vt->t_attrib.blink =3D 1; + break; + case 7: + vt->t_attrib.invers =3D 1; + break; + case 8: + vt->t_attrib.unvisible =3D 1; + break; + case 22: + vt->t_attrib.bold =3D 0; + break; + case 24: + vt->t_attrib.uline =3D 0; + break; + case 25: + vt->t_attrib.blink =3D 0; + break; + case 27: + vt->t_attrib.invers =3D 0; + break; + case 28: + vt->t_attrib.unvisible =3D 0; + break; + /* set foreground color */ + case 30: + vt->t_attrib.fgcol =3D QEMU_COLOR_BLACK; + break; + case 31: + vt->t_attrib.fgcol =3D QEMU_COLOR_RED; + break; + case 32: + vt->t_attrib.fgcol =3D QEMU_COLOR_GREEN; + break; + case 33: + vt->t_attrib.fgcol =3D QEMU_COLOR_YELLOW; + break; + case 34: + vt->t_attrib.fgcol =3D QEMU_COLOR_BLUE; + break; + case 35: + vt->t_attrib.fgcol =3D QEMU_COLOR_MAGENTA; + break; + case 36: + vt->t_attrib.fgcol =3D QEMU_COLOR_CYAN; + break; + case 37: + vt->t_attrib.fgcol =3D QEMU_COLOR_WHITE; + break; + /* set background color */ + case 40: + vt->t_attrib.bgcol =3D QEMU_COLOR_BLACK; + break; + case 41: + vt->t_attrib.bgcol =3D QEMU_COLOR_RED; + break; + case 42: + vt->t_attrib.bgcol =3D QEMU_COLOR_GREEN; + break; + case 43: + vt->t_attrib.bgcol =3D QEMU_COLOR_YELLOW; + break; + case 44: + vt->t_attrib.bgcol =3D QEMU_COLOR_BLUE; + break; + case 45: + vt->t_attrib.bgcol =3D QEMU_COLOR_MAGENTA; + break; + case 46: + vt->t_attrib.bgcol =3D QEMU_COLOR_CYAN; + break; + case 47: + vt->t_attrib.bgcol =3D QEMU_COLOR_WHITE; + break; + } + } +} + +static void vt100_update_xy(QemuVT100 *vt, int x, int y) +{ + TextCell *c; + int y1, y2; + + vt->text_x[0] =3D MIN(vt->text_x[0], x); + vt->text_x[1] =3D MAX(vt->text_x[1], x); + vt->text_y[0] =3D MIN(vt->text_y[0], y); + vt->text_y[1] =3D MAX(vt->text_y[1], y); + + y1 =3D (vt->y_base + y) % vt->total_height; + y2 =3D y1 - vt->y_displayed; + if (y2 < 0) { + y2 +=3D vt->total_height; + } + if (y2 < vt->height) { + if (x >=3D vt->width) { + x =3D vt->width - 1; + } + c =3D &vt->cells[y1 * vt->width + x]; + vt100_putcharxy(vt, x, y2, c->ch, + &(c->t_attrib)); + vt100_invalidate_xy(vt, x, y2); + } +} + +static void vt100_clear_xy(QemuVT100 *vt, int x, int y) +{ + int y1 =3D (vt->y_base + y) % vt->total_height; + if (x >=3D vt->width) { + x =3D vt->width - 1; + } + TextCell *c =3D &vt->cells[y1 * vt->width + x]; + c->ch =3D ' '; + c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + vt100_update_xy(vt, x, y); +} + +/* + * UTF-8 DFA decoder by Bjoern Hoehrmann. + * Copyright (c) 2008-2010 Bjoern Hoehrmann + * See https://github.com/polijan/utf8_decode for details. + * + * SPDX-License-Identifier: MIT + */ +#define BH_UTF8_ACCEPT 0 +#define BH_UTF8_REJECT 12 + +static uint32_t bh_utf8_decode(uint32_t *state, uint32_t *codep, uint32_t = byte) +{ + static const uint8_t utf8d[] =3D { + /* character class lookup */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8, + + /* state transition lookup */ + 0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,= 12,12, + 12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24= ,12,12, + 12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24= ,12,12, + 12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36= ,12,12, + 12,36,12,12,12,12,12,12,12,12,12,12, + }; + uint32_t type =3D utf8d[byte]; + + *codep =3D (*state !=3D BH_UTF8_ACCEPT) ? + (byte & 0x3fu) | (*codep << 6) : + (0xffu >> type) & (byte); + + *state =3D utf8d[256 + *state + type]; + return *state; +} + +static void vt100_put_one(QemuVT100 *vt, int ch) +{ + TextCell *c; + int y1; + if (vt->x >=3D vt->width) { + /* line wrap */ + vt->x =3D 0; + vt100_put_lf(vt); + } + y1 =3D (vt->y_base + vt->y) % vt->total_height; + c =3D &vt->cells[y1 * vt->width + vt->x]; + c->ch =3D ch; + c->t_attrib =3D vt->t_attrib; + vt100_update_xy(vt, vt->x, vt->y); + vt->x++; +} + +/* set cursor, checking bounds */ +static void vt100_set_cursor(QemuVT100 *vt, int x, int y) +{ + if (x < 0) { + x =3D 0; + } + if (y < 0) { + y =3D 0; + } + if (y >=3D vt->height) { + y =3D vt->height - 1; + } + if (x >=3D vt->width) { + x =3D vt->width - 1; + } + + vt->x =3D x; + vt->y =3D y; +} + +/** + * vt100_csi_P() - (DCH) deletes one or more characters from the cursor + * position to the right. As characters are deleted, the remaining + * characters between the cursor and right margin move to the + * left. Character attributes move with the characters. + */ +static void vt100_csi_P(QemuVT100 *vt, unsigned int nr) +{ + TextCell *c1, *c2; + unsigned int x1, x2, y; + unsigned int end, len; + + if (!nr) { + nr =3D 1; + } + if (nr > vt->width - vt->x) { + nr =3D vt->width - vt->x; + if (!nr) { + return; + } + } + + x1 =3D vt->x; + x2 =3D vt->x + nr; + len =3D vt->width - x2; + if (len) { + y =3D (vt->y_base + vt->y) % vt->total_height; + c1 =3D &vt->cells[y * vt->width + x1]; + c2 =3D &vt->cells[y * vt->width + x2]; + memmove(c1, c2, len * sizeof(*c1)); + for (end =3D x1 + len; x1 < end; x1++) { + vt100_update_xy(vt, x1, vt->y); + } + } + /* Clear the rest */ + for (; x1 < vt->width; x1++) { + vt100_clear_xy(vt, x1, vt->y); + } +} + +/** + * vt100_csi_at() - (ICH) inserts `nr` blank characters with the default + * character attribute. The cursor remains at the beginning of the + * blank characters. Text between the cursor and right margin moves to + * the right. Characters scrolled past the right margin are lost. + */ +static void vt100_csi_at(QemuVT100 *vt, unsigned int nr) +{ + TextCell *c1, *c2; + unsigned int x1, x2, y; + unsigned int end, len; + + if (!nr) { + nr =3D 1; + } + if (nr > vt->width - vt->x) { + nr =3D vt->width - vt->x; + if (!nr) { + return; + } + } + + x1 =3D vt->x + nr; + x2 =3D vt->x; + len =3D vt->width - x1; + if (len) { + y =3D (vt->y_base + vt->y) % vt->total_height; + c1 =3D &vt->cells[y * vt->width + x1]; + c2 =3D &vt->cells[y * vt->width + x2]; + memmove(c1, c2, len * sizeof(*c1)); + for (end =3D x1 + len; x1 < end; x1++) { + vt100_update_xy(vt, x1, vt->y); + } + } + /* Insert blanks */ + for (x1 =3D vt->x; x1 < vt->x + nr; x1++) { + vt100_clear_xy(vt, x1, vt->y); + } +} + +/** + * vt100_save_cursor() - saves cursor position and character attributes. + */ +static void vt100_save_cursor(QemuVT100 *vt) +{ + vt->x_saved =3D vt->x; + vt->y_saved =3D vt->y; + vt->t_attrib_saved =3D vt->t_attrib; +} + +/** + * vt100_restore_cursor() - restores cursor position and character + * attributes from saved state. + */ +static void vt100_restore_cursor(QemuVT100 *vt) +{ + vt->x =3D vt->x_saved; + vt->y =3D vt->y_saved; + vt->t_attrib =3D vt->t_attrib_saved; +} + +static void vt100_putchar(QemuVT100 *vt, int ch) +{ + int i; + int x, y; + g_autofree char *response =3D NULL; + + switch (vt->state) { + case TTY_STATE_NORM: + /* Feed byte through the UTF-8 DFA decoder */ + if (ch >=3D 0x80) { + switch (bh_utf8_decode(&vt->utf8_state, &vt->utf8_codepoint, c= h)) { + case BH_UTF8_ACCEPT: + vt100_put_one(vt, unicode_to_cp437(vt->utf8_codepoint)); + break; + case BH_UTF8_REJECT: + /* Reset state so the decoder can resync */ + vt->utf8_state =3D BH_UTF8_ACCEPT; + break; + default: + /* Need more bytes */ + break; + } + break; + } + /* ASCII byte: abort any pending UTF-8 sequence */ + vt->utf8_state =3D BH_UTF8_ACCEPT; + switch (ch) { + case '\r': /* carriage return */ + vt->x =3D 0; + break; + case '\n': /* newline */ + vt100_put_lf(vt); + break; + case '\b': /* backspace */ + if (vt->x > 0) { + vt->x--; + } + break; + case '\t': /* tabspace */ + if (vt->x + (8 - (vt->x % 8)) > vt->width) { + vt->x =3D 0; + vt100_put_lf(vt); + } else { + vt->x =3D vt->x + (8 - (vt->x % 8)); + } + break; + case '\a': /* alert aka. bell */ + /* TODO: has to be implemented */ + break; + case 14: + /* SO (shift out), character set 1 (ignored) */ + break; + case 15: + /* SI (shift in), character set 0 (ignored) */ + break; + case 27: /* esc (introducing an escape sequence) */ + vt->state =3D TTY_STATE_ESC; + break; + default: + vt100_put_one(vt, ch); + break; + } + break; + case TTY_STATE_ESC: /* check if it is a terminal escape sequence */ + if (ch =3D=3D '[') { + for (i =3D 0; i < MAX_ESC_PARAMS; i++) { + vt->esc_params[i] =3D 0; + } + vt->nb_esc_params =3D 0; + vt->state =3D TTY_STATE_CSI; + } else if (ch =3D=3D '(') { + vt->state =3D TTY_STATE_G0; + } else if (ch =3D=3D ')') { + vt->state =3D TTY_STATE_G1; + } else if (ch =3D=3D ']' || ch =3D=3D 'P' || ch =3D=3D 'X' + || ch =3D=3D '^' || ch =3D=3D '_') { + /* String sequences: OSC, DCS, SOS, PM, APC */ + vt->state =3D TTY_STATE_OSC; + } else if (ch =3D=3D '7') { + vt100_save_cursor(vt); + vt->state =3D TTY_STATE_NORM; + } else if (ch =3D=3D '8') { + vt100_restore_cursor(vt); + vt->state =3D TTY_STATE_NORM; + } else { + vt->state =3D TTY_STATE_NORM; + } + break; + case TTY_STATE_CSI: /* handle escape sequence parameters */ + if (ch >=3D '0' && ch <=3D '9') { + if (vt->nb_esc_params < MAX_ESC_PARAMS) { + int *param =3D &vt->esc_params[vt->nb_esc_params]; + int digit =3D (ch - '0'); + + *param =3D (*param <=3D (INT_MAX - digit) / 10) ? + *param * 10 + digit : INT_MAX; + } + } else { + if (vt->nb_esc_params < MAX_ESC_PARAMS) { + vt->nb_esc_params++; + } + if (ch =3D=3D ';' || ch =3D=3D '?') { + break; + } + trace_console_putchar_csi(vt->esc_params[0], vt->esc_params[1], + ch, vt->nb_esc_params); + vt->state =3D TTY_STATE_NORM; + switch (ch) { + case 'A': + /* move cursor up */ + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; + } + vt100_set_cursor(vt, vt->x, vt->y - vt->esc_params[0]); + break; + case 'B': + /* move cursor down */ + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; + } + vt100_set_cursor(vt, vt->x, vt->y + vt->esc_params[0]); + break; + case 'C': + /* move cursor right */ + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; + } + vt100_set_cursor(vt, vt->x + vt->esc_params[0], vt->y); + break; + case 'D': + /* move cursor left */ + if (vt->esc_params[0] =3D=3D 0) { + vt->esc_params[0] =3D 1; + } + vt100_set_cursor(vt, vt->x - vt->esc_params[0], vt->y); + break; + case 'G': + /* move cursor to column */ + vt100_set_cursor(vt, vt->esc_params[0] - 1, vt->y); + break; + case 'f': + case 'H': + /* move cursor to row, column */ + vt100_set_cursor(vt, vt->esc_params[1] - 1, vt->esc_params= [0] - 1); + break; + case 'J': + switch (vt->esc_params[0]) { + case 0: + /* clear to end of screen */ + for (y =3D vt->y; y < vt->height; y++) { + for (x =3D 0; x < vt->width; x++) { + if (y =3D=3D vt->y && x < vt->x) { + continue; + } + vt100_clear_xy(vt, x, y); + } + } + break; + case 1: + /* clear from beginning of screen */ + for (y =3D 0; y <=3D vt->y; y++) { + for (x =3D 0; x < vt->width; x++) { + if (y =3D=3D vt->y && x > vt->x) { + break; + } + vt100_clear_xy(vt, x, y); + } + } + break; + case 2: + /* clear entire screen */ + for (y =3D 0; y < vt->height; y++) { + for (x =3D 0; x < vt->width; x++) { + vt100_clear_xy(vt, x, y); + } + } + break; + } + break; + case 'K': + switch (vt->esc_params[0]) { + case 0: + /* clear to eol */ + for (x =3D vt->x; x < vt->width; x++) { + vt100_clear_xy(vt, x, vt->y); + } + break; + case 1: + /* clear from beginning of line */ + for (x =3D 0; x <=3D vt->x && x < vt->width; x++) { + vt100_clear_xy(vt, x, vt->y); + } + break; + case 2: + /* clear entire line */ + for (x =3D 0; x < vt->width; x++) { + vt100_clear_xy(vt, x, vt->y); + } + break; + } + break; + case 'P': + vt100_csi_P(vt, vt->esc_params[0]); + break; + case 'm': + vt100_handle_escape(vt); + break; + case 'n': + switch (vt->esc_params[0]) { + case 5: + /* report console status (always succeed)*/ + vt100_write(vt, "\033[0n", 4); + break; + case 6: + /* report cursor position */ + response =3D g_strdup_printf("\033[%d;%dR", + vt->y + 1, vt->x + 1); + vt100_write(vt, response, strlen(response)); + break; + } + break; + case 's': + vt100_save_cursor(vt); + break; + case 'u': + vt100_restore_cursor(vt); + break; + case '@': + vt100_csi_at(vt, vt->esc_params[0]); + break; + default: + trace_console_putchar_unhandled(ch); + break; + } + break; + } + break; + case TTY_STATE_OSC: /* Operating System Command: ESC ] ... BEL/ST */ + if (ch =3D=3D '\a') { + /* BEL terminates OSC */ + vt->state =3D TTY_STATE_NORM; + } else if (ch =3D=3D 27) { + /* ESC might start ST (ESC \) */ + vt->state =3D TTY_STATE_ESC; + } + /* All other bytes are silently consumed */ + break; + case TTY_STATE_G0: /* set character sets */ + case TTY_STATE_G1: /* set character sets */ + switch (ch) { + case 'B': + /* Latin-1 map */ + break; + } + vt->state =3D TTY_STATE_NORM; + break; + } + +} + +size_t vt100_input(QemuVT100 *vt, const uint8_t *buf, size_t len) +{ + int i; + + vt->update_x0 =3D vt->width * FONT_WIDTH; + vt->update_y0 =3D vt->height * FONT_HEIGHT; + vt->update_x1 =3D 0; + vt->update_y1 =3D 0; + vt100_show_cursor(vt, 0); + for (i =3D 0; i < len; i++) { + vt100_putchar(vt, buf[i]); + } + vt100_show_cursor(vt, 1); + if (vt->update_x0 < vt->update_x1) { + vt100_image_update(vt, vt->update_x0, vt->update_y0, + vt->update_x1 - vt->update_x0, + vt->update_y1 - vt->update_y0); + } + return len; +} + +void vt100_keysym(QemuVT100 *vt, int keysym) +{ + uint8_t buf[16], *q; + int c; + + switch (keysym) { + case QEMU_KEY_CTRL_UP: + vt100_scroll(vt, -1); + break; + case QEMU_KEY_CTRL_DOWN: + vt100_scroll(vt, 1); + break; + case QEMU_KEY_CTRL_PAGEUP: + vt100_scroll(vt, -10); + break; + case QEMU_KEY_CTRL_PAGEDOWN: + vt100_scroll(vt, 10); + break; + default: + /* convert the QEMU keysym to VT100 key string */ + q =3D buf; + if (keysym >=3D 0xe100 && keysym <=3D 0xe11f) { + *q++ =3D '\033'; + *q++ =3D '['; + c =3D keysym - 0xe100; + if (c >=3D 10) { + *q++ =3D '0' + (c / 10); + } + *q++ =3D '0' + (c % 10); + *q++ =3D '~'; + } else if (keysym >=3D 0xe120 && keysym <=3D 0xe17f) { + *q++ =3D '\033'; + *q++ =3D '['; + *q++ =3D keysym & 0xff; + } else if (vt->echo && (keysym =3D=3D '\r' || keysym =3D=3D '\n'))= { + vt100_input(vt, (uint8_t *)"\r", 1); + *q++ =3D '\n'; + } else { + *q++ =3D keysym; + } + if (vt->echo) { + vt100_input(vt, buf, q - buf); + } + vt100_write(vt, buf, q - buf); + break; + } +} + +void vt100_update_cursor(void) +{ + QemuVT100 *vt; + + cursor_visible_phase =3D !cursor_visible_phase; + + if (QTAILQ_EMPTY(&vt100s)) { + return; + } + + QTAILQ_FOREACH(vt, &vt100s, list) { + vt100_refresh(vt); + } + + timer_mod(cursor_timer, + qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + CONSOLE_CURSOR_PERIOD / 2= ); +} + +static void +cursor_timer_cb(void *opaque) +{ + vt100_update_cursor(); +} + +void vt100_init(QemuVT100 *vt, + pixman_image_t *image, + void (*image_update)(QemuVT100 *vt, int x, int y, int w, i= nt h), + void (*out_flush)(QemuVT100 *vt)) +{ + if (!cursor_timer) { + cursor_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, cursor_timer_cb= , NULL); + } + + QTAILQ_INSERT_HEAD(&vt100s, vt, list); + fifo8_create(&vt->out_fifo, 16); + vt->total_height =3D DEFAULT_BACKSCROLL; + vt->image_update =3D image_update; + vt->out_flush =3D out_flush; + /* set current text attributes to default */ + vt->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; + vt100_set_image(vt, image); +} + +void vt100_fini(QemuVT100 *vt) +{ + QTAILQ_REMOVE(&vt100s, vt, list); + fifo8_destroy(&vt->out_fifo); + g_free(vt->cells); +} diff --git a/ui/meson.build b/ui/meson.build index 25657af50e7..9ece6f262b6 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -3,6 +3,7 @@ system_ss.add(png) system_ss.add(files( 'clipboard.c', 'console.c', + 'cp437.c', 'cursor.c', 'dmabuf.c', 'input-keymap.c', @@ -16,8 +17,9 @@ system_ss.add(files( 'ui-qmp-cmds.c', 'util.c', 'vgafont.c', + 'vt100.c', )) -system_ss.add(when: pixman, if_true: files('console-vc.c', 'cp437.c'), if_= false: files('console-vc-stubs.c')) +system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: file= s('console-vc-stubs.c')) if dbus_display system_ss.add(files('dbus-module.c')) endif --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849216; cv=none; d=zohomail.com; s=zohoarc; b=FG6Z7xu2nCqvA1fJkDxK+k0CFot3kY4dwr9wtx6xJcqpY1Rv6oc9uDzFnWzbx54HTvrcb98ewuGolx4CgOty08vTNch+PcdCwzP4HKARlf6YI5nwFEGSMV6WDYn5R7u7QFCgcfjpILQ6KVp0gvNc24PotPbmXLJQyTXZT2Xz9fA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849216; 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=EC2mtSmBN/QpQXCOVvzyWCJ+zIxqCQ8Cl/n8dli4yDk=; b=ZBzB7hS9T32Q6Kvy86YB81djQe/TahBJtLLY1StebRpMOS2QPdQST2RSnC20h7qVEPLjiDaWEgjG1HseoxiyEvhfwE1q7u719+4mVfhTZRntPAYtDpq+f9tSle9c/ruVQCNasm0AB7tfSwKqME8EaVCfIHCJ7CdVriAGtIA5c7I= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17758492163281015.7869141579135; Fri, 10 Apr 2026 12:26:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHQz-0004CB-Oi; Fri, 10 Apr 2026 15:22:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQw-00041O-J4 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHQu-0001vC-W8 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:26 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-doYNB4NBM-Og8ax6zSP9bw-1; Fri, 10 Apr 2026 15:22:23 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2BE80180062A; Fri, 10 Apr 2026 19:22:22 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 06DB019560AB; Fri, 10 Apr 2026 19:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848944; 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=EC2mtSmBN/QpQXCOVvzyWCJ+zIxqCQ8Cl/n8dli4yDk=; b=RpmXcH99SruIKP4lPRaRTbwjSTJd2EkunkX5JcSHfb2YnJIKvA2jnRfc0BM5GRQm8tq3Ox NNsSKVD6MZsEA2uwe/2kmlwFX9sVFCu7lAZIkuOUl9LzziSUl7tuoyyBmIi58h220Cb65S h44l/vQilTvzAUeOIThf+Io3zwEVas4= X-MC-Unique: doYNB4NBM-Og8ax6zSP9bw-1 X-Mimecast-MFC-AGG-ID: doYNB4NBM-Og8ax6zSP9bw_1775848942 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:56 +0400 Subject: [PATCH v2 34/67] util: move datadir.c from system/ MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-34-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2578; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=GnyGZFXxnwQTX053ioyr310RQ/Jwl1OJBR8gcP9DCrY=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Vkbw3IhZw7lFLSU8wW1asF2gmYIZeDBVCH RjQJEZ/FEeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5afuEACqUuHlq/rqHDVVNtjMO4j5+dRv5GU4IM3URxuuLwHDxYinDNa95I3n73SPW0gIDiIZ1/X YT+/h5r7DEoqWz5gwShQAYGkpIyb0f0LW8At0yRgvfbQEMxi1MV2wwAEXHM8+MoH7P+pWkFQDsg MMv0UcI/YEX95oJbWrpRnlToKovU/+NBKnbTWlmxeoxpvB6R4Jqcl8R9xDXVky7OrmLKaHMO5/E OY5E8WDpm/bmD66gLmAsw3ylKJP+ZPDUj2KU6ceC4x1tNkduxGEz1Ru+gJIldnNacR73tyeI2p3 RzxftO9X6mArnXOhPliP7b5ISpLnYHXhDTC4vntx8c0m4ZVypoDnFY3CtacrG3E+KF3IvM8bPme l5FK7IRkQAtqaiooUtFVT2v9aj9QG6vHr4lTIoWKMr9/LO+cQTvVotUibzgFpSgYrDVFwuTD/J8 Sp2cJFmAQkqH0X1MhrHzDYAStJtkHg+9Hi9ut57xUllxkK8Q+0LIAk6ckhSyoDD5eOMYSTEDS5f sjWhxct/+BMMQPtki3tymufHLcZsdDcPCVipqTnnByveRXRGw0MhFv/JP+1rU7fs/6fP0NjWn4D Q6aBwoR674Q61SIF5asG/EVYreoMkhxSt3rJ7In9zXS4s7chVWC3O+GEyqKFQPgCjk/Rkk1FiyS hscadYdQYN2FGLA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849217076158500 The datadir module provides general-purpose data file lookup utilities that are not specific to system emulation. Move it to util/ so it can be reused more broadly. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- {system =3D> util}/datadir.c | 0 system/meson.build | 1 - system/trace-events | 1 - util/meson.build | 1 + util/trace-events | 3 +++ 5 files changed, 4 insertions(+), 2 deletions(-) diff --git a/system/datadir.c b/util/datadir.c similarity index 100% rename from system/datadir.c rename to util/datadir.c diff --git a/system/meson.build b/system/meson.build index 579e8353d53..9cdfe1b3e75 100644 --- a/system/meson.build +++ b/system/meson.build @@ -8,7 +8,6 @@ system_ss.add(files( 'bootdevice.c', 'cpus.c', 'cpu-timers.c', - 'datadir.c', 'dirtylimit.c', 'dma-helpers.c', 'exit-with-parent.c', diff --git a/system/trace-events b/system/trace-events index 6d29a823f04..e6e1b612798 100644 --- a/system/trace-events +++ b/system/trace-events @@ -46,7 +46,6 @@ vm_stop_flush_all(int ret) "ret %d" =20 # vl.c vm_state_notify(int running, int reason, const char *reason_str) "running = %d reason %d (%s)" -load_file(const char *name, const char *path) "name %s location %s" runstate_set(int current_state, const char *current_state_str, int new_sta= te, const char *new_state_str) "current_run_state %d (%s) new_state %d (%s)" system_wakeup_request(int reason) "reason=3D%d" qemu_system_shutdown_request(int reason) "reason=3D%d" diff --git a/util/meson.build b/util/meson.build index 5d3fff0eea4..8bed0267c07 100644 --- a/util/meson.build +++ b/util/meson.build @@ -30,6 +30,7 @@ util_ss.add(when: linux_io_uring, if_true: files('fdmon-i= o_uring.c')) if glib_has_gslice util_ss.add(files('qtree.c')) endif +util_ss.add(files('datadir.c')) util_ss.add(files('defer-call.c')) util_ss.add(files('envlist.c', 'path.c', 'module.c')) util_ss.add(files('event.c')) diff --git a/util/trace-events b/util/trace-events index 540d6625073..df549646d12 100644 --- a/util/trace-events +++ b/util/trace-events @@ -114,3 +114,6 @@ uffd_unregister_memory_failed(void *addr, uint64_t leng= th, int err) "addr: %p le # module.c module_load_module(const char *name) "file %s" module_lookup_object_type(const char *name) "name %s" + +# datadir.c +load_file(const char *name, const char *path) "name %s location %s" --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775848996; cv=none; d=zohomail.com; s=zohoarc; b=Fr9UIRfI1wafifu/3G178gHzcYAVZWb3++qM/8bqs/TUa2JNAylBIU5IZmuxZgbxOk+ySy2iSp8riOmkQVxCo+Cr2KhkJvwlb1V4vOEvX1UNHcuvOGL8FVsqeJdA8J4cWsFHeGgtBX2TP254B97fAkv8OtFmnMuZBmFBqBalYH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775848996; 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=3LNuPoQo1Zb1a/2wcDI/iPeJu3JZHwmOC/OpCwhaFTQ=; b=EyTsju22YOCwWbj1FMvNCdSjX2tiUym6l7m+4+YrlW2V9C2RRfO3qczZY8rsUbnqYucLmKNUJ82ZqViia1epyuVrVR3DVnlv1j5mAXl3NV14vTjq4YShec0UcRcpqDcyeooqoCel8XFPPM1PD1RRbkmexWTt2efCX1oEJbZ77VU= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775848996632364.45553224876994; Fri, 10 Apr 2026 12:23:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHR5-0004qT-BY; Fri, 10 Apr 2026 15:22:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHR4-0004qF-HZ for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHR2-0001w8-EM for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:34 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-316-R2EfsumIOjOSDrNkEd6olQ-1; Fri, 10 Apr 2026 15:22:28 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CD981195608F; Fri, 10 Apr 2026 19:22:27 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A9E753000C16; Fri, 10 Apr 2026 19:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848951; 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=3LNuPoQo1Zb1a/2wcDI/iPeJu3JZHwmOC/OpCwhaFTQ=; b=L8Mn3QbVrMBopm7lAwWYT/Ypg1hU/ErKTCDV5LSyAg/3FingizjGTG3zRwgKDe/8DFfV2E 7qnSsnGaP/1tjxU2493Okd4Zt1FCnxfa4nQM4E3Jzj+Zvogu5MMeYVaXCvRgxW7kvmgkXL Ll2sV8h8TWS6zQSS9YPcUsjaVzMhDAg= X-MC-Unique: R2EfsumIOjOSDrNkEd6olQ-1 X-Mimecast-MFC-AGG-ID: R2EfsumIOjOSDrNkEd6olQ_1775848947 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:57 +0400 Subject: [PATCH v2 35/67] ui: move DisplaySurface functions to display-surface.c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-35-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=8074; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=ip6J6xhBFa1TM9CJ2RiUKz+3a5NwlbQbCiticjMAo+4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VulXShd3rujT5uudBvVvm2e0/8h788nd6D iZ/oBTI4xuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5bgNEAC0C0YF6YMTJvLQqXbIEdYKE0ucWlk76Z1TualYN+GLQ+aHEOBeyWiwdDlRqCM+bYQQB0m 47c1EdaZnTFzekLdYp7NHyG2gxDb+wQtsycZht+4DtNISwYzcp/hA09bz9o4vwOm7qxAoq1wLdS a1RuJ1Rgi25i67t3ld/Cnwuc+BWmcF/xwRrTr3YvccQyrfgu4kYvO2V589biTFVrYdt1zFQEnlo 3w4vDeLeUi7bpqwhHpYKd8CGryMzEPBBmSO9lrHsRepgL5xHg33xW+QVShSrWR4hNvh+lyUqt9G iAqfc8DNU1EB0kWUYjV6n6W+NUM6IAPGTkny6ANCCFFEYgnZ9xdM+MrMncx2FJRZ0AC45isaRpR G/ttn+liX6JTyqNkiGIyyX8jPeDxUBU8uG042w3C1mGbmCAJEXPNYK2iJldxTi0KHkHqkSutXVB nup+ySJ4+c2XxzlfIkYpFOedjtXgz3b2IGJfBbuGiNzfkqebH+uZ/bX4hLEFSXjWN4ANmyKcuVH mcKUjCsKRReOmX8REM48RyekGnjXc1xdvC6UWvZ1U0QK3jOJ+9MgOQLZQQA7HugPepU6N8PGJ7C ABaxoCUZleW9jAB3kwRzdz7fmZEy1r4ZSZfIGmwHaf7ijOwz4It/ORbHEKe94e7XI4Ei07m6uvl x7BhcudVKurSxwA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775848998618154100 Extract DisplaySurface creation and destruction functions from console.c into their own file to reduce the size of console.c and improve code organization. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console.c | 96 --------------------------------------------- ui/display-surface.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++= ++++ ui/meson.build | 1 + 3 files changed, 108 insertions(+), 96 deletions(-) diff --git a/ui/console.c b/ui/console.c index 7ffea2776ef..24794e5a9dc 100644 --- a/ui/console.c +++ b/ui/console.c @@ -507,102 +507,6 @@ qemu_graphic_console_init(Object *obj) { } =20 -void qemu_displaysurface_set_share_handle(DisplaySurface *surface, - qemu_pixman_shareable handle, - uint32_t offset) -{ - assert(surface->share_handle =3D=3D SHAREABLE_NONE); - - surface->share_handle =3D handle; - surface->share_handle_offset =3D offset; - -} - -DisplaySurface *qemu_create_displaysurface(int width, int height) -{ - trace_displaysurface_create(width, height); - - return qemu_create_displaysurface_from( - width, height, - PIXMAN_x8r8g8b8, - width * 4, NULL - ); -} - -DisplaySurface *qemu_create_displaysurface_from(int width, int height, - pixman_format_code_t forma= t, - int linesize, uint8_t *dat= a) -{ - DisplaySurface *surface =3D g_new0(DisplaySurface, 1); - - trace_displaysurface_create_from(surface, width, height, format); - surface->share_handle =3D SHAREABLE_NONE; - - if (data) { - surface->image =3D pixman_image_create_bits(format, - width, height, - (void *)data, linesize); - } else { - qemu_pixman_image_new_shareable(&surface->image, - &surface->share_handle, - "displaysurface", - format, - width, - height, - linesize, - &error_abort); - surface->flags =3D QEMU_ALLOCATED_FLAG; - } - - assert(surface->image !=3D NULL); - return surface; -} - -DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image) -{ - DisplaySurface *surface =3D g_new0(DisplaySurface, 1); - - trace_displaysurface_create_pixman(surface); - surface->share_handle =3D SHAREABLE_NONE; - surface->image =3D pixman_image_ref(image); - - return surface; -} - -DisplaySurface *qemu_create_placeholder_surface(int w, int h, - const char *msg) -{ - DisplaySurface *surface =3D qemu_create_displaysurface(w, h); -#ifdef CONFIG_PIXMAN - pixman_color_t bg =3D QEMU_PIXMAN_COLOR_BLACK; - pixman_color_t fg =3D QEMU_PIXMAN_COLOR_GRAY; - pixman_image_t *glyph; - int len, x, y, i; - - len =3D strlen(msg); - x =3D (w / FONT_WIDTH - len) / 2; - y =3D (h / FONT_HEIGHT - 1) / 2; - for (i =3D 0; i < len; i++) { - glyph =3D qemu_pixman_glyph_from_vgafont(FONT_HEIGHT, vgafont16, m= sg[i]); - qemu_pixman_glyph_render(glyph, surface->image, &fg, &bg, - x+i, y, FONT_WIDTH, FONT_HEIGHT); - qemu_pixman_image_unref(glyph); - } -#endif - surface->flags |=3D QEMU_PLACEHOLDER_FLAG; - return surface; -} - -void qemu_free_displaysurface(DisplaySurface *surface) -{ - if (surface =3D=3D NULL) { - return; - } - trace_displaysurface_free(surface); - qemu_pixman_image_unref(surface->image); - g_free(surface); -} - bool console_has_gl(QemuConsole *con) { return con->gl !=3D NULL; diff --git a/ui/display-surface.c b/ui/display-surface.c new file mode 100644 index 00000000000..38e408513cc --- /dev/null +++ b/ui/display-surface.c @@ -0,0 +1,107 @@ +/* + * QEMU graphical console surface helper + * + * Copyright (c) 2004 Fabrice Bellard + * + * SPDX-License-Identifier: MIT + */ +#include "qemu/osdep.h" +#include "ui/console.h" +#include "ui/vgafont.h" +#include "trace.h" + +void qemu_displaysurface_set_share_handle(DisplaySurface *surface, + qemu_pixman_shareable handle, + uint32_t offset) +{ + assert(surface->share_handle =3D=3D SHAREABLE_NONE); + + surface->share_handle =3D handle; + surface->share_handle_offset =3D offset; + +} + +DisplaySurface *qemu_create_displaysurface(int width, int height) +{ + trace_displaysurface_create(width, height); + + return qemu_create_displaysurface_from( + width, height, + PIXMAN_x8r8g8b8, + width * 4, NULL + ); +} + +DisplaySurface *qemu_create_displaysurface_from(int width, int height, + pixman_format_code_t forma= t, + int linesize, uint8_t *dat= a) +{ + DisplaySurface *surface =3D g_new0(DisplaySurface, 1); + + trace_displaysurface_create_from(surface, width, height, format); + surface->share_handle =3D SHAREABLE_NONE; + + if (data) { + surface->image =3D pixman_image_create_bits(format, + width, height, + (void *)data, linesize); + } else { + qemu_pixman_image_new_shareable(&surface->image, + &surface->share_handle, + "displaysurface", + format, + width, + height, + linesize, + &error_abort); + surface->flags =3D QEMU_ALLOCATED_FLAG; + } + + assert(surface->image !=3D NULL); + return surface; +} + +DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image) +{ + DisplaySurface *surface =3D g_new0(DisplaySurface, 1); + + trace_displaysurface_create_pixman(surface); + surface->share_handle =3D SHAREABLE_NONE; + surface->image =3D pixman_image_ref(image); + + return surface; +} + +DisplaySurface *qemu_create_placeholder_surface(int w, int h, + const char *msg) +{ + DisplaySurface *surface =3D qemu_create_displaysurface(w, h); +#ifdef CONFIG_PIXMAN + pixman_color_t bg =3D QEMU_PIXMAN_COLOR_BLACK; + pixman_color_t fg =3D QEMU_PIXMAN_COLOR_GRAY; + pixman_image_t *glyph; + int len, x, y, i; + + len =3D strlen(msg); + x =3D (w / FONT_WIDTH - len) / 2; + y =3D (h / FONT_HEIGHT - 1) / 2; + for (i =3D 0; i < len; i++) { + glyph =3D qemu_pixman_glyph_from_vgafont(FONT_HEIGHT, vgafont16, m= sg[i]); + qemu_pixman_glyph_render(glyph, surface->image, &fg, &bg, + x + i, y, FONT_WIDTH, FONT_HEIGHT); + qemu_pixman_image_unref(glyph); + } +#endif + surface->flags |=3D QEMU_PLACEHOLDER_FLAG; + return surface; +} + +void qemu_free_displaysurface(DisplaySurface *surface) +{ + if (surface =3D=3D NULL) { + return; + } + trace_displaysurface_free(surface); + qemu_pixman_image_unref(surface->image); + g_free(surface); +} diff --git a/ui/meson.build b/ui/meson.build index 9ece6f262b6..bae6ea0d2dc 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -5,6 +5,7 @@ system_ss.add(files( 'console.c', 'cp437.c', 'cursor.c', + 'display-surface.c', 'dmabuf.c', 'input-keymap.c', 'input-legacy.c', --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849183; cv=none; d=zohomail.com; s=zohoarc; b=Tl/4mIJ0/pOv9vogYgpyX+gqpTWV5KqvnipzqOlmKfaafU7QbGPWXdmmtlriU+1Q0OubNhPpabjfOKXqbA7FXi77I8+9DUSZxunsIwbWCVK3EeLzgUGvnAKWnNFS6ON00BVLUYfYhDBBGVrsZMct8fBAP283edDYirXEL6madH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849183; 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=jg06xNsDHiAjS1cpxEPhGzH0lDWKplTKePp+SKWf2pw=; b=JsdTNmFVoU0euHw++O6yk9zsOAJF7OKMEQQzRtMSm8V9HO30mMl6pkFy4qFDbA2fCHgQSne9jyWSfNgy5HPcMKoobkQKCYZN7qY2YSfUdZczPF1rO2BXDjccQLi6R0QibUbeAGlGnqDHbOu4tRSgUlSmCUNGp7t6p5CT4uVFCMM= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849183856154.1246914989183; Fri, 10 Apr 2026 12:26:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHR9-0004tk-Bm; Fri, 10 Apr 2026 15:22:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHR7-0004rK-MK for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHR6-0001xT-92 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:37 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-126-Qtbiv3tpN82m0euDqHH_Pg-1; Fri, 10 Apr 2026 15:22:34 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9F3831955DAE for ; Fri, 10 Apr 2026 19:22:33 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6CA2F1955E84; Fri, 10 Apr 2026 19:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848955; 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=jg06xNsDHiAjS1cpxEPhGzH0lDWKplTKePp+SKWf2pw=; b=L3gIto1y+V+6zxX6WVpIMDWUr7VjeGSENIOWErgUzfNG+M4EUq9qNHXT7zuWJVBVdcjRzH V14Q0n0igULqHmDuFmIeSwG/qy5v+RVyU54PvbOp9LxEwtudpy+VoQptLm8V0uYFhDMfll dL/1ZaMKP5OGS06Bxv9woquYWJy02q4= X-MC-Unique: Qtbiv3tpN82m0euDqHH_Pg-1 X-Mimecast-MFC-AGG-ID: Qtbiv3tpN82m0euDqHH_Pg_1775848953 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:58 +0400 Subject: [PATCH v2 36/67] ui: make qemu_default_pixelformat() static inline MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-36-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2417; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=J76FKl9tH/d0oVk3sn0TrxBVo9ODvG49qjWGz2g7+78=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VfTC5N7taSyNlI89/Sk+QwR7eAG/Tf1qkA vIYYWiWUTWJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5cjBD/wMYMeeHtOhi3CyRSANX9bi8iS8ZvSuUWK/eCHsIzud3RMzfJDaJUwF/5EnqvMFgs358pS MDJGSok9bpi53p2/ePptl0qUGzdFDLRe2ygEp+5rBjmA2XJSpOn5AWa683DF9qvSIo4x7FJaJvf 74qM955QfPHQdTzQPqGz2J3H3VZiCZkoBTCZFnGLSIcMQZVD+eC71SSYG6aMwFaOIo6LX/LLjHv OdO/MZAi1nZrz0xDc3faSpwlukeeoPHzm9V526SkOvkKxWnJFrERRsMGkliKwfOJYkFhVBEf+Jf eAh+mLqnktkb/cQr3IL6oeCL7PSjOd7Q8MB2Vz/0oa2oiE8Mxc2zCBK0SNpm6qFf82JYhspG7w7 Ybdeio8k5/uylVKyKrUyy/zREmG4CjuoCK37HH4NR7x0Gomy+zicRYze9h9TRYRkl9Iw30ts+nC tBqJx3+TqiaLHgPJmQA3QiagTe8LqCfozzmST0R0UwkGgK/m0vp5veSLRIqhbFxg5I0K0LTKFbb r6vqz0BzNrIBvSXouD8n/ogx7Qt60IvKAipaXfnXVyXO0Hdf7WGtpXnnApOCYuYe1AWiuAzRACQ NryS5xNThCuNtaRLuW2N1Qw3fYx8sKl+4PKkzPX0BVrP4r8Z9PW/e1qeBCROu1BDnwff9Aas/63 eDZmKIMRS/Ohaxw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849185399154100 The function is a trivial wrapper around qemu_default_pixman_format() and qemu_pixelformat_from_pixman(), so make it static inline in qemu-pixman.h instead of a standalone function in console.c, allowing to be easily reused. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/qemu-pixman.h | 8 ++++++++ include/ui/surface.h | 2 -- ui/console.c | 7 ------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 2ca0ed7029c..4bc7a59698e 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @@ -73,6 +73,14 @@ typedef struct PixelFormat { =20 PixelFormat qemu_pixelformat_from_pixman(pixman_format_code_t format); pixman_format_code_t qemu_default_pixman_format(int bpp, bool native_endia= n); + +static inline PixelFormat qemu_default_pixelformat(int bpp) +{ + pixman_format_code_t fmt =3D qemu_default_pixman_format(bpp, true); + PixelFormat pf =3D qemu_pixelformat_from_pixman(fmt); + return pf; +} + pixman_format_code_t qemu_drm_format_to_pixman(uint32_t drm_format); uint32_t qemu_pixman_to_drm_format(pixman_format_code_t pixman); int qemu_pixman_get_type(int rshift, int gshift, int bshift, int endian); diff --git a/include/ui/surface.h b/include/ui/surface.h index d2542d3ace5..8e5f3e35e8c 100644 --- a/include/ui/surface.h +++ b/include/ui/surface.h @@ -24,8 +24,6 @@ typedef struct DisplaySurface { uint32_t share_handle_offset; } DisplaySurface; =20 -PixelFormat qemu_default_pixelformat(int bpp); - DisplaySurface *qemu_create_displaysurface_from(int width, int height, pixman_format_code_t forma= t, int linesize, uint8_t *dat= a); diff --git a/ui/console.c b/ui/console.c index 24794e5a9dc..78b0ac27827 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1392,13 +1392,6 @@ DisplaySurface *qemu_console_surface(QemuConsole *co= nsole) } } =20 -PixelFormat qemu_default_pixelformat(int bpp) -{ - pixman_format_code_t fmt =3D qemu_default_pixman_format(bpp, true); - PixelFormat pf =3D qemu_pixelformat_from_pixman(fmt); - return pf; -} - static QemuDisplay *dpys[DISPLAY_TYPE__MAX]; =20 void qemu_display_register(QemuDisplay *ui) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849109; cv=none; d=zohomail.com; s=zohoarc; b=NYciIKTOEO51SS6c/uK/R1QDlUVWob0gL2cFDXY44g4i8i96skt2elehoFsfVllztS5FelylhOgueC9ZMoYCVJItQiDU/US8//8zP3rP7evCW/hTvKsF8htAQANDmKjFJnaQYZ4fdvra3Q+VJ9wveasdpsXcCjxq4kAdF6KpuhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849109; 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=fxv00SmkigX0eFKKwcb6xmktHwJFPanppwAzp1Uwo0w=; b=Qs3D41MSAKyLBw2Va33TwN4otD2QeEsAtnFpnvwCDOs3vTvbmpgwDvvrzIgF9xzHmKIvcW2CWdoTFu08cjwbnj9wKFXyKhztWY5KZaYfiVuwSH9kjsNAumYV5/JMUcQwsMGdbQ9PQBH2wOTKps+Fqnmt4YynFBj5Sm8aGLdXtDU= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849109454552.1251585467676; Fri, 10 Apr 2026 12:25:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRG-00058q-5s; Fri, 10 Apr 2026 15:22:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRE-00058Y-0s for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRC-0001zD-OU for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:43 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-492-A_fKgsjEPD2CrqG1DUV-Sw-1; Fri, 10 Apr 2026 15:22:39 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 24CD019560AE for ; Fri, 10 Apr 2026 19:22:39 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DBD97195608E; Fri, 10 Apr 2026 19:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848962; 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=fxv00SmkigX0eFKKwcb6xmktHwJFPanppwAzp1Uwo0w=; b=Zq50lfsk1CfeV/3FK1oe65vhQF/GnN2BY4Cs0A4KKyNusQ15NLBXHcK/tc9keqW+v1cTab 0DLYcvXvo8jKtQYj4J07amsPapZ4BueGneyePVzy5claCQGIGgcj1UNEFH5zFb+dfG0MvG Dji07wbk+ardgT3HBvouHkm45rQitWc= X-MC-Unique: A_fKgsjEPD2CrqG1DUV-Sw-1 X-Mimecast-MFC-AGG-ID: A_fKgsjEPD2CrqG1DUV-Sw_1775848959 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:18:59 +0400 Subject: [PATCH v2 37/67] ui: make unregister_displaychangelistener() skip unregistered MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-37-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=709; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=mKDJcefNbZvW1FtuWUfadq8onlX8URsT/PcKiCsR0qc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0V+9shZNMBKN7ZrtmVN/1t5oEfGqTN4NY9c VDC53PCISuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5YHvD/9bxBApzq5Mpp2hZX4ys26my3i1vMJAu52UPbbuJB7u8Ka1VLncnPylNkP+g4NV+VKXymr pbTRsZah0vS0StIPBOWdFI+coNW1nq7HOBZ0xXrGDf6BnXeZpZeebU2M+gS/WbWgwZicmC20y6B sfDZ8GTnMPb18VMmaC7WT2mAUEVJMm1kKWrbdHMIwCoM5ZgMMsJ1Z3vKirHOGr59wtzBqlDhbCT HC+R5mThman0B7caOzoOdMoq7bwP+2LTicfOwkO+rht8HQ1oyfxE22QmoddSK5x83EfgB1zMfW2 YQvNUcx0VcCYLH3VtK2aaRsto3Q5A3U/hKHvoy5VimLhBdBjfdFAqgMbVUylTl0p1T4mnWIU0Pu 8O16C+sYZ5AIVOHAA+OQih/q3u2aVorzEpQf7c7XE1PXxBG71j/5v0m7IEB6bCm8vApXiUdRn17 HM9lInGnKFqLiEMJvHeqCtU8VrMJxTtQ/Azm02DfWezeAro3YFtg7Fktrla/77mURbR8C66lATI wqTHEAc8/XxP+ft9MoKsUzjQfP3Q9UBrz5GiAVGdk8FLJlJcQ/YjPvfN6RwUesPvnjYNECeaTdC xJZJOOLHKL5RnCtDb+3KXEoSIgy/O0R6X0nDdw0Ad7QI+q3v455v07GspnYOP0Me5fpLBctej4l P2GlD1RPaRUPfFQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849110593158500 If the listener doesn't have associate ds / display state, it is already unregistered. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/console.c b/ui/console.c index 78b0ac27827..a9132e09eac 100644 --- a/ui/console.c +++ b/ui/console.c @@ -677,6 +677,9 @@ void unregister_displaychangelistener(DisplayChangeList= ener *dcl) { DisplayState *ds =3D dcl->ds; trace_displaychangelistener_unregister(dcl, dcl->ops->dpy_name); + if (!ds) { + return; + } if (dcl->con) { dcl->con->dcls--; } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849304; cv=none; d=zohomail.com; s=zohoarc; b=CNEw+Sypm1XVC0Ch9/aZzXSqMG1fPo3+gvuaglup1IhKe7s1KxrIHuDGQKpj4/+qlhGpdvT2Oatk0zZirirmEONzkC8abni0qpB+9VBjXqVIBksYeQyqjxFYhTB9mctsgQ1haMkfJTBdbgY7Rg2p/YiOcCgGLHB21ghzlSHCtk4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849304; 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=Y6txHtHza4oPO6jN+3NWocTvhcHQbFK0yWPa0mHLVQk=; b=YDT/faUOUosdJmvC7IruX08xUTPay9bqsUPkk8s2EDm9IWAQs5F6Wv2+u3u/jKS/shZrXlsr6+nkPzzH8+cCtrGpzf9SV2AeMNu44akU/pYVA+ocP1JeNSB5O+H23kewf29cEdTtdk7yuZuYJ1h01RnsL07Ec7J0lMG2J1V4u4g= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584930449734.99371383990524; Fri, 10 Apr 2026 12:28:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRL-0005Cx-O9; Fri, 10 Apr 2026 15:22:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRJ-0005CU-1C for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRH-00020W-Nw for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:48 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-rd7g0PCLNM2XPBRpf2ACVg-1; Fri, 10 Apr 2026 15:22:45 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B82FD1956095; Fri, 10 Apr 2026 19:22:44 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 684E6180057F; Fri, 10 Apr 2026 19:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848967; 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=Y6txHtHza4oPO6jN+3NWocTvhcHQbFK0yWPa0mHLVQk=; b=MMGEdqjEP+MT/li2ajN+Cz/pJZi1xaATBy6lk8cCHdF1CVHXqb4u/WkN9vkxNd9ebj8Wae plZz64lTlj7bu0RKZFqmg5boX+3hHGAx5xJ1bunarR5jqomRygPmZS+Fv8aeuAlMkTTLvk vOU7LJ0I/As8tkvhZuXoWBrr2SCX1r8= X-MC-Unique: rd7g0PCLNM2XPBRpf2ACVg-1 X-Mimecast-MFC-AGG-ID: rd7g0PCLNM2XPBRpf2ACVg_1775848964 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:00 +0400 Subject: [PATCH v2 38/67] ui: minor code simplification MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-38-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1849; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=woJUhrs5y76Ek6vAQ8nlLqeubW55veqdmpH8rHOvF60=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Vf0b6sNiBc2Vp3A5w+FOBQY8dKF3l1XwXr OuCCCMf3siJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5QhgD/9unmznd4NhfKdIDr2UrlyA3qhKfdkRU0fmU6ptVDUGGt5c865knSApLXR5mQgQVkqoTsf YHkScTCzc07M+GrGoGuu6H8gc2g7fbOYZDRQNYIm6m1MHhK70iDl+XU3PVBIQts/Oc4FueELTcH C3GN2WMHMI+I4Aw8niBLnCrwtIvbfUEpyfCxpOf97THuLb2c1Js+NSsRp19gNzZZCLxhY1icH6g C67deXjVjMtJGXZNfRGiJMoJKXdGuSpxnp3NyZlV83HB3DBlVeAjVdeSDGVQHsvmeApyGfgRlFf eWSyJbJbum/quXj86kab3gRWLTETV8Iboz1aoHLaqsXdqtf24z8N4XGSL1uJp8Ax8oiUtF0nki/ HFEZFtK4LAO0rYLrqsRPLjRxkjfR08/5TGzlwPI59uxk32LXbsEv5F2JxItr+qsCaJINzYYjWEC QbKW636SaN6Kb0mGWY7fCtiSk6YzWWkpWiS/vCQ7UbYJXBWXpNPR5nePWM2SnC8qaWXtXjeWzj/ jkrRkwUExb4xw/f8z0l8PF7iryk+BsBEcuLJEC6qd9Zsx7Rw3lgKLkGQHrs9LNl3JWkcddsNNTB 3lh8NvOxekGqPR6rWtfcIntd8SlgEsKIWwN6259HJmk1FF8yABaEV19xMmNEchQwlyCzBRKw7tD +CuXp30IL95HVGg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849305451158500 Drop memset() usage. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/sdl2.c | 8 ++++---- ui/vnc.c | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index aaaede56e0e..30e0042fe29 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -600,10 +600,10 @@ static void handle_windowevent(SDL_Event *ev) switch (ev->window.event) { case SDL_WINDOWEVENT_RESIZED: { - QemuUIInfo info; - memset(&info, 0, sizeof(info)); - info.width =3D ev->window.data1; - info.height =3D ev->window.data2; + QemuUIInfo info =3D { + .width =3D ev->window.data1, + .height =3D ev->window.data2, + }; dpy_set_ui_info(scon->dcl.con, &info, true); } sdl2_redraw(scon); diff --git a/ui/vnc.c b/ui/vnc.c index 4aa446a48d7..9c8fe280bc9 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -43,6 +43,7 @@ #include "qapi/qapi-events-ui.h" #include "qapi/error.h" #include "qapi/qapi-commands-ui.h" +#include "ui/console.h" #include "ui/input.h" #include "crypto/hash.h" #include "crypto/tlscreds.h" @@ -2638,10 +2639,7 @@ static int protocol_client_msg(VncState *vs, uint8_t= *data, size_t len) =20 trace_vnc_msg_client_set_desktop_size(vs, vs->ioc, w, h, screens); if (dpy_ui_info_supported(vs->vd->dcl.con)) { - QemuUIInfo info; - memset(&info, 0, sizeof(info)); - info.width =3D w; - info.height =3D h; + QemuUIInfo info =3D { .width =3D w, .height =3D h }; dpy_set_ui_info(vs->vd->dcl.con, &info, false); vnc_desktop_resize_ext(vs, 4 /* Request forwarded */); } else { --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849211; cv=none; d=zohomail.com; s=zohoarc; b=hDovoEKRqQzS9ZXX8JIgx+El8XJVcB3i0bf2HQfGOxVPN6V/NViD7frMown19zVixLV0fst8J17RDAAqRnI1VYarCHVEEcSqm743KpCUpIG/tNTYu57+XqNviATimQFuYlEfDsUTYMhnqoSdEAM3eycffkI/xl6ToKlLrrsKevA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849211; 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=kt7NH/XIYgIrwD2NGiKfd1jgayk8UZ2mCDKH0ZQ4964=; b=IU+n64kZCn07C/uR/zWphbTOkuR14fvG7Y1ha6kfS2rlb1RWczxItkt5CpRPe3eMzBtJvtlBMHwLUQ51yWhkDbIPnjAJdOc7a3SnmIundtchhFH5DcdY/2JJx9gbzueOYUYQ7xl9KVtwDiE3m8mrhHd4dNuZbpBEQafbRVjOf80= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849211542226.7719757424734; Fri, 10 Apr 2026 12:26:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRQ-0005Kj-Up; Fri, 10 Apr 2026 15:22:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRO-0005DH-B5 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRN-00021G-2L for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:22:54 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-373-CnQEuzT5OMOjgpUZDJYUlQ-1; Fri, 10 Apr 2026 15:22:51 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6BFC818002E5 for ; Fri, 10 Apr 2026 19:22:50 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2343B19560AB; Fri, 10 Apr 2026 19:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848972; 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=kt7NH/XIYgIrwD2NGiKfd1jgayk8UZ2mCDKH0ZQ4964=; b=U99smANz2zV6qRFdJAcZgFYqus5d+IcE27FRyqhAwEC1kEKTseSsGCk0GmL6Zh9DI2krv0 t6y8j4zb516MfUDCm+67lL7E29fUKag/e3Ubd2ayyGcSjGi2Q362pIF8Nkv0kITlLxav10 uoojwT++ukZWHb1Hdn5miKOhDc+OaNE= X-MC-Unique: CnQEuzT5OMOjgpUZDJYUlQ-1 X-Mimecast-MFC-AGG-ID: CnQEuzT5OMOjgpUZDJYUlQ_1775848970 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:01 +0400 Subject: [PATCH v2 39/67] system: make qemu_del_vm_change_state_handler accept NULL MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-39-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=655; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=kz8yJp42ZZuqZiIEby41N4itmZG4iK/xogowe6wEggE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VeI5hTtnIKbBv0tD+I9tJ16kpnpeTvzUP6 W012n/f32WJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5fsxD/916LAxro0D86D7hueh/q1CjewFsigAQQdoyv+DFnd9f9PLhTSARRwuBklZ0gv2kf46l09 n0YJoNp6697UWNg1oFlWXopteA50QipRk0HH4VBO582lNhFPPswsDGx58pwkz1X/5DCuvUmzG/G O9Rk8Pq4UKhLPKMGlgPZY7pINcoN5dPqXxBYBoh9cwDemos5dg3vdnBB8UFQLDGVXhXfSLWyX/y kbTjrS+asgxI4CdUMk4TqpGy6GaS+ajt8GpPSkwKoT0zahrsWsPWHcjO1HQh2GgmH576lm9k37K VGW4fhn6PbKOmYQ5no97xzyXiEY0gx5FOtI5vzYGzKgmtN1ApCAMJjBYPLqXSDEJZUAtd35TD2m amnf/lHOKNEQQoHzf4k/Tr26kPvb31LiCVkeywilR9zri9txFS5GzL26KTPUkPditXVx8OqwdBp z6O9HegyG+e94OEmy/jn+DiQEarpPVMJNetwoZ0xjrwylAeK6H0mWKnxaLU+4SHrggZy4MqtU5K a6FhxcVEwMYRLw/g+FaShmp8MaZLuu/s8gMUUrWPsj+jlRguaVx4i2/bNSDpMUNSGr/aVtdu7l4 0PKDltSARti/do0edIS7/sZWsSRC7IiyUthrpKRDYaQilNa2d8quT+TZk0ys9PQ5Cnx8sWw/nMh RKhZDiZ0VL+4LwQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849213749154100 For convenience. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- system/runstate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/runstate.c b/system/runstate.c index 2d4e95a2166..770253b467b 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -349,6 +349,9 @@ VMChangeStateEntry *qemu_add_vm_change_state_handler(VM= ChangeStateHandler *cb, =20 void qemu_del_vm_change_state_handler(VMChangeStateEntry *e) { + if (!e) { + return; + } QTAILQ_REMOVE(&vm_change_state_head, e, entries); g_free(e); } --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849132; cv=none; d=zohomail.com; s=zohoarc; b=LyzKiEKEBaJRuq+Z+HglDhE0uJ9/v/zXjCXlAuKISjxVFCkUhhfhUmHm/rKOgnj3O9km8GI+TrvbhU3qzNRm9GjXVUX5MvkNEZYlcuTvovRrWqqTSRNzxM0U0T982/I/oLUp0kbKM4useTNgb2kQHm//UHkEF83BdgaHC57ZU6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849132; 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=4kWlbYarbpq8q7vX6x2MmnM15GIOhf9S8XQMmsXaO9s=; b=XGs3+ZeegYrrc9y2Ky0cDS5Vf+4dpjtpkCjzHqwIWG2J3cORaggKtce/9LY4P4e28IOKell/XwYJn0mxZ/g6nNWUxIB6hvCNY3s+MPGFHVb48O9QFWEtNlDOR/sHG5wSj8vvYv/59bNM6Cf7k7FzGY7IEt2mVeVhbF+GDKDRfEU= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849132309592.4440006973708; Fri, 10 Apr 2026 12:25:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRX-0005gm-Uz; Fri, 10 Apr 2026 15:23:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRW-0005c3-06 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRU-00021j-ML for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:01 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-l0V46jO-MjK_dbROrs67Qg-1; Fri, 10 Apr 2026 15:22:57 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5335519560A7; Fri, 10 Apr 2026 19:22:56 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F00A2195608E; Fri, 10 Apr 2026 19:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848979; 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=4kWlbYarbpq8q7vX6x2MmnM15GIOhf9S8XQMmsXaO9s=; b=ViSOSgB46VTQ2vjXVYQn1EPr7yqUVsKGKaSvkYMAuJr6RuyTJFYGekpMwGfSq9C560rPnc uWugUJwdGPnUTeM/NvQwCJPhpXKc5qc3YqrIL0u1nYCCgcC7VCJhlbW4HzoG6Lc71lBIqt KyrV6GWc4xPT14Qk0LBfATwVM31NzKE= X-MC-Unique: l0V46jO-MjK_dbROrs67Qg-1 X-Mimecast-MFC-AGG-ID: l0V46jO-MjK_dbROrs67Qg_1775848976 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:02 +0400 Subject: [PATCH v2 40/67] ui/vnc: assert preconditions instead of silently returning MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-40-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1439; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=da7UZtFscHYGKLrYZuUkMO/YLUmJ4YfpeTA/WP9zdYE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Vydsrx4tA+tY+1afN3tj6rYtyIpSK7bgbm IT1fiD91F+JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5fyHD/4y5jUz4y1iEgQGRBG23K69av/mdL8wDipxaueP84smEmQfsl1dHylFCM2mkcAoqUPozQn mMXESWJ9p78HXK21oCYmRN3hPfBoLPho+afJJtuw4IB1TT7j7NYiMFF4lE9waR0ZLjOZ3ClJw5o 2DAF6T9O9IL9+Ekfh/qKLlTqzYWKBlTBJel6FDrvAR9NL07tQyOgSjn9JmGzuKn689TCE/3Nsvo nBL2U73PRbZSbY0Wjs9vBtdK/AS4ab8h+4sjsv1Jr7DTULDkzZMpMeTlqTP0VlZWH2t3sRz2WhM rUjVrINzOBfPadKFGTBjklt/G+KwHwPeQtkAEqmXE7RIc2FlnqV/PpiqapTnvKgaUrQWGk1arLx cU0GFVHOyfU0GSHPGpHh3tK3QRyfSTc56Qs7/0Xe77Xn8zfItpi88tDadGqkHPacxBkmFebycOr TC539gu3QxOx7Movx3c9CCbAGXDhUbsJl64dChTjrO8Bo6fkkHC9zpJXPmNBiKsAwiKIYpKuyQJ Gaa2rEPN4ma7JxwCUg4D3VP+iKwGcJjIEOethhMpLIqhjW2hW8vpBUWR2DkcG4akuqS4Nr9R9H1 bq0CG+8cBVbo6t8M9viuofLfQguk/aFlnp/fKL9gjzqRB8JCuCgXloBVafQMNcMthJGpr13EPg+ +dPKwbIgrFI5/Lw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849134662158500 Replace defensive NULL guards with assert() in vnc_display_close() and vnc_display_open(). These are internal functions whose callers guarantee non-NULL arguments, so a NULL value would indicate a programming error rather than a runtime condition. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 9c8fe280bc9..3633fbeb6ce 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3465,9 +3465,7 @@ void vnc_display_init(const char *id, Error **errp) =20 static void vnc_display_close(VncDisplay *vd) { - if (!vd) { - return; - } + assert(vd); =20 if (vd->listener) { qio_net_listener_disconnect(vd->listener); @@ -4068,15 +4066,10 @@ void vnc_display_open(const char *id, Error **errp) const char *audiodev; const char *passwordSecret; =20 - if (!vd) { - error_setg(errp, "VNC display not active"); - return; - } - vnc_display_close(vd); + assert(vd); + assert(opts); =20 - if (!opts) { - return; - } + vnc_display_close(vd); =20 reverse =3D qemu_opt_get_bool(opts, "reverse", false); if (vnc_display_get_addresses(opts, reverse, &saddr_list, &wsaddr_list, --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849003; cv=none; d=zohomail.com; s=zohoarc; b=kFibWv1gUpQ1uz24PdauqBrSJAhEJ4zsbOjPv1x1T/qVaUYwhIrhjEeWc6jDemanyd2e6AjfaXtUkKDv1Y5BXOSB83xMg42C5MwWrQ1kK/08JF0bCQU3b+UM2YeeM15KBi2yA3se2vsH/l4D0oOWZTvpsjb+mTg09yZcTIdFS1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849003; 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=wvZdzUIzdaeckoqtlkTa5p+Wqgu1dxUiASLnYQALEl4=; b=MQyOoAVzOWX0uQfUY/VQi6ZAUEeOXVfXSp6vCZRAHHNCCsnk4jUzI719g8ed70XRmnYaw/N+AmsJhBg7tFrmOkOVcKqo1OdsQHHalbMfmxdWSlI9f9+24kcHcHloV34V5FRYYfQDe3ghfjwJmteNZdHqWsIT/7ptxqVAnOtucjQ= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17758490030101021.7181727576381; Fri, 10 Apr 2026 12:23:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRc-0005hI-D8; Fri, 10 Apr 2026 15:23:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRa-0005gz-8V for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRY-00022M-UR for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:06 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-463-XYqAu1PGMnW--sdu6K7WEg-1; Fri, 10 Apr 2026 15:23:03 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 37BB019560B2; Fri, 10 Apr 2026 19:23:02 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0CCD7180057F; Fri, 10 Apr 2026 19:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848984; 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=wvZdzUIzdaeckoqtlkTa5p+Wqgu1dxUiASLnYQALEl4=; b=SMne8MAPEPyQNvZzTuXkNIDfUpn4AAqRllSKI3MoqV14tdnM4IKgx5NMUzEr4UynPcR99N 4sHpXkqZzmKX0KlTKD+ncpNUBLHVMljWd1Qx3s5Ghnn1ch2DrwJax1moUcYwQfzB3ihCPB jsYGN07Hd/PxhXt1JYoIAFpWhhI5Xp4= X-MC-Unique: XYqAu1PGMnW--sdu6K7WEg-1 X-Mimecast-MFC-AGG-ID: XYqAu1PGMnW--sdu6K7WEg_1775848982 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:03 +0400 Subject: [PATCH v2 41/67] ui/vnc: simplify vnc_init_func error handling MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-41-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1168; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=MRz/TL0HF7a6DU/hBk95ZC2vvHeCoQttUAyFaMDhRS8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VPBOcLojet3g5aspIqmuLIeMAJF4FtPCHB Sb50Oea9CeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5fnxEACnxCxqRuxq2L8vaqOaLxDK62MvytHfGv1ZRHujPSkiH3qWWvok7fzKbLcAC+hbldYk5H8 vB8OZtNM8mHP4MV19QDiZ0OLsqTLWstNlGYh1yhmdy3EYP8RwfPPQZJBq7ha0TJ/UEdLMBZ5CBI n+B78GQ7rv/rK2BL73+sAk68G5pmdw1ql5XY90qHgJvwBhiuAqbtmbFDtoA5Kw6mXkribMoFNO6 ea8Qs2VCU516a8XzNDBUrxFZ2dYVsPOBCDGt3ZFEYQQmT0b8fJatIi3rEbskY0reylP5YO/hzxS reA/T3j3AJTlbeDhCO6E7FfNZ4IusewyGzn/PE9T4abA0oLkiiRtwLduMWUlFfPMHJH3BhC7AdU H5rvhv6kSAMl6lzaMMRElSWPVFfbTlkJ4iNs6dBCNe6P8tCHxjFOYe/HnHIRCSNb4BReVhINx1L O1GMksSqkBXIYXMYCTJw+wkWUXNExGKrK1IRVHDmRoUhmDQ/+ifsN08STZnZKSRqCcblMXR9zDB +r2N/UEt1Jvs16Sq5eymvjA21CKOXZD2G4fsNI7gl5P17HtxUECstjjZTGwIHvnK7c/wrVc1dHZ HhToR3rdDZ+xZIKokCAl8xoXpzNV/eNPQVgguQLmWNggUd79B9yPpxfgjTLTmuyG/X1Sr5xjsLI 3iDADtp28zgpuGA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849004489154100 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 3633fbeb6ce..2df91642570 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -4319,7 +4319,7 @@ void vnc_parse(const char *str) =20 int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp) { - Error *local_err =3D NULL; + ERRP_GUARD(); char *id =3D (char *)qemu_opts_id(opts); =20 if (!id) { @@ -4327,14 +4327,12 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Err= or **errp) id =3D vnc_auto_assign_id(opts); } =20 - vnc_display_init(id, &local_err); - if (local_err) { - error_propagate(errp, local_err); + vnc_display_init(id, errp); + if (*errp) { return -1; } - vnc_display_open(id, &local_err); - if (local_err !=3D NULL) { - error_propagate(errp, local_err); + vnc_display_open(id, errp); + if (*errp) { return -1; } return 0; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849109; cv=none; d=zohomail.com; s=zohoarc; b=h9tQynIzj+sY9OKLE7wAjCSCW6AccVuEf6BiOuGeKVyPV5loPZfWXcNee5w2rtprWGNOmFp0gxr+nhP02OZTeOd1kPSA4CL6Qy+gBVqGeuIB5rUWGz3zm8cz3BAUJqONFuftS+ukXY7AaNak4xiMI0Qor9W+kMURCmgL0ZzgH2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849109; 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=u8+aGOrlZvbLe8b3dP8NZl4yaXIo8XPnd+wSuT5ylyA=; b=lNjKTdsul36CTTmLjsGI4byMgIau3JTlIov2AcWaVoPXT0q73A9Wf88Ao9ron8wWUYthv9YGZy58QNYZMlk2bIoPgdafebgzhEUknj+L8CAUkpSAx0xQKDcAT2mYggBe0/ucqbC2Md4RlSvpEDglbbSrj9pEjQKmyY1fSl0EZik= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849109363980.3878800665964; Fri, 10 Apr 2026 12:25:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRh-0005hu-Ph; Fri, 10 Apr 2026 15:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRg-0005hi-FO for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRf-00022w-3I for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:12 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-158-3ul0VVN4MRmwyLf21reDkA-1; Fri, 10 Apr 2026 15:23:08 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1C1551956067 for ; Fri, 10 Apr 2026 19:23:08 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D980D1800B7F; Fri, 10 Apr 2026 19:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848990; 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=u8+aGOrlZvbLe8b3dP8NZl4yaXIo8XPnd+wSuT5ylyA=; b=aMlitUIJAhk6MbDrMBYFc3sQUHHXzM9qQL2o9immMGPPT9YBzKOb4KhoAkwsuV+Jsyg5p/ HnT8FEYV+S/EaksTQvivid/At1P7BB4PlPON1GEkEiR5bQEWU5mUOZ7EMbaM6BgC1mqY1T jm8hmpaRLXE9DOAvnj7xbL64F3u964E= X-MC-Unique: 3ul0VVN4MRmwyLf21reDkA-1 X-Mimecast-MFC-AGG-ID: 3ul0VVN4MRmwyLf21reDkA_1775848988 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:04 +0400 Subject: [PATCH v2 42/67] ui/vnc: VncDisplay.id is not const MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-42-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1171; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=mSk65SLNJlDbzx9MsgD8lSsR+rYOCydI8294L/iqyCg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0VCXgLnjmpdsJW0W/ZyAOFeHmRTAzdcEM50 w8fYAdlEnyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFQAKCRDa6OEJdZac 5agJD/9QzXNOtAUPm2MNYRiTQR9Knb6h3YLd3fqh0Q5Wc9Pvw3UtkYaIrmhqpAItckxG/6g0Xu1 9IOaPu0a/VNPr7rdYnnx6SMKkMa5WnTKU3YYUQ2HaztIHVci3X0pUiL2S5K3P2JXYwj4jIroWLF sC2nstF2v2ggjdLBmvRlklHWBtE96auSO2izrzX1S2xDRPE5Id7sVnrSrTsCbqPqBO+1Fee2cPa 5jq7STeRvHX0W28LVgwIpY7EgNbk789RXN+OF9UCb3Q+DJuQFUiKYcWRJP+ZGVmVpTjzAChtcQB WKapJi9k0gk42Psw/gDmMKTbbWd43iqBVBmMrOf/p47WhgKntyes71thREvm03glMNpIH7OsRpe +gpEMTPiko2XnoDMBVrHeTDmC4hhWAIMROE0We0PKjM8d/X8/zrpk57zXiOWUI/URf5/SROasUQ xMlWUCLRbmB3wz4Xr5JRmLp1epJmmwY4N8MEZ3ZNDLF5QuJh3SutrmYW4ufksHk6ww9Mi0B4KCB 8twzeFzKBck2XvcegS3kkZKNWK4cCtr6WrUvLeZyy011+vkk29pEHPQ9yk87aK2I8kJoZaD/85n 4zxTahwbH8QpSHdbaTbiJ65WYP0ZaaV20KO0IxlLi/Vof4e3uMTOjljnA0shmLUGh7Msy6C8zyO CWTNz+SSJIDTN4Q== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849110598158500 s/strdup/g_strdup to highlight the issue and be consistent with other allocations. The next patch is going to introduce vnc_display_free() to take care of deallocating it. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.h | 2 +- ui/vnc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index ec8d0c91b57..c5d678ac31e 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -166,7 +166,7 @@ struct VncDisplay pixman_image_t *server; /* vnc server surface */ int true_width; /* server surface width before rounding up */ =20 - const char *id; + char *id; QTAILQ_ENTRY(VncDisplay) next; char *password; time_t expires; diff --git a/ui/vnc.c b/ui/vnc.c index 2df91642570..522d4d8fb88 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3431,7 +3431,7 @@ void vnc_display_init(const char *id, Error **errp) } vd =3D g_malloc0(sizeof(*vd)); =20 - vd->id =3D strdup(id); + vd->id =3D g_strdup(id); QTAILQ_INSERT_TAIL(&vnc_displays, vd, next); =20 QTAILQ_INIT(&vd->clients); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849311; cv=none; d=zohomail.com; s=zohoarc; b=mWYvrZYWurzOb8oGH8iqH4C6X8mCKO6eAQv564fe9BZ/UNjs0R+KzSrqsCWR6jTBI0DEvEqvJh8hvs+5CJbsRotjOfgnlb5yQzrkodqILpqyqkJJr0N+Q+o1aIGSighcZGsuhmt0tBf5TMOZvDX1F/BNhiIho9h1q8BOrlSl4Uk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849311; 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=thtgrXJ52vS/oWAHRG9bnZ6YV3gy9fKuuRW+1nnw0yw=; b=PzCej9w0oiSe0TMvxunw06Z/qtxXD6hnS0AidK8olUal3dOAP6lXum4d/19H0f5r8TJZ/Vg1o+Hs/W2ZCMOLSjtVnWVPk2VYGk+3eTDxVopez6vg/adky7sk9YIaUMKq6MYyCYi3A11SFdz3nhQqkoRmdrZ/ZDPt2oy57P1/yYo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849311106740.2079458404462; Fri, 10 Apr 2026 12:28:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRn-0005lE-5m; Fri, 10 Apr 2026 15:23:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRl-0005kl-H9 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRk-00023Z-5M for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:17 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-240-Nq7hokqPO8yqsCO9t17kdQ-1; Fri, 10 Apr 2026 15:23:14 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A104718002E7 for ; Fri, 10 Apr 2026 19:23:13 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8F02B3000C16; Fri, 10 Apr 2026 19:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775848995; 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=thtgrXJ52vS/oWAHRG9bnZ6YV3gy9fKuuRW+1nnw0yw=; b=LtPwRa2iQorafqWnZlHtHCxRohFJfIvTAmYaWCTF/0Icm2yxtz+v8GOHHkCX+madsHN4jL wrFbaMcvJyRzJvqEuUOpveC4GBU7ca55ENb6LRcBlVZ8TB8ufu8y4fsYOIQBBNUw83HARv jXJ8JNxaFq3slFYI6teJoN3O9ZFcV8o= X-MC-Unique: Nq7hokqPO8yqsCO9t17kdQ-1 X-Mimecast-MFC-AGG-ID: Nq7hokqPO8yqsCO9t17kdQ_1775848993 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:05 +0400 Subject: [PATCH v2 43/67] ui/keymaps: introduce kbd_layout_free() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-43-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1687; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=iQh+Fm1P/evY7D8sUcJsQUp91gqqVpdcJuZbaqvuho8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WM1eIXQjibSxb5CStcoqC4XscLDaHWGLOX Vwrb8PwLi6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5a3mD/9J/chsJjbNnz6qHmGS7Clf6oiRmlome4WLpxIFMWTdgrCCa/hxgsdg6PTqqNl7TKYispO heSzVzM1OK0883VBSAymnB7sR6LbDMN69y7EDopzVYniXEUvLfG7l6K3+3Ino7eVz2ldKwg3Gmy +QL8dVFKKj5xHfz7HIGik98Wav/vKs5FKIof1HfjkJ2HgBjiCbsd8TPikbMeHSWTQ2jIxWbPGbg Q2VA3kood64IlhndzUqsvh8nNiV/Z7wOWsod55KNp6fwEmQvaecglLDz/+5TqFk2fDRiAdbMJsO t+CnFGrTeR2Ah1Wk2sRZUZPIXXTmJDHn2YcITDqwsH0SdzafnsBMrvfwMqcg0F852OXGoZlsBBt SGVbdXdmxGfJQcn3B3hPLQBM1hN9WYWiUmpehadweObSAafiKmKee8Wjus0K4K8O3jEuzGcVtvQ +6LYqkWm68N90nsKmxG2Vp9803tA0/KfyLQi/ceTiSKw2tZ+8L5jBXR4RK8R+xaHQoars1lVB7C c1t9XnT5MfuhVrmHYD0icCqaT9QLfYgyh5bWQGKpI77Bi6Gl6EhA40Q85aXK2DRb+YSoEuy9FjT Qld2GyNNPbfI0lJvMExDriN3wviO1sAsqLg5/vS9nkZIOmpVk7Z147zFUN4+tPgjdDiJXSQ0PQ4 huxHG7OwUhNw8Sw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849313347154100 Enable callers to properly tear down keyboard layouts. Reviewed-by: Marc-Andr=C3=A9 Lureau --- ui/keymaps.h | 1 + ui/keymaps.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ui/keymaps.h b/ui/keymaps.h index 3d52c0882a1..e8917e56404 100644 --- a/ui/keymaps.h +++ b/ui/keymaps.h @@ -54,6 +54,7 @@ typedef struct kbd_layout_t kbd_layout_t; =20 kbd_layout_t *init_keyboard_layout(const name2keysym_t *table, const char *language, Error **errp); +void kbd_layout_free(kbd_layout_t *k); int keysym2scancode(kbd_layout_t *k, int keysym, QKbdState *kbd, bool down); int keycode_is_keypad(kbd_layout_t *k, int keycode); diff --git a/ui/keymaps.c b/ui/keymaps.c index 2359dbfe7e6..d1b3f43dc8a 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -178,6 +178,14 @@ out: return ret; } =20 +void kbd_layout_free(kbd_layout_t *k) +{ + if (!k) { + return; + } + g_hash_table_unref(k->hash); + g_free(k); +} =20 kbd_layout_t *init_keyboard_layout(const name2keysym_t *table, const char *language, Error **errp) @@ -185,10 +193,9 @@ kbd_layout_t *init_keyboard_layout(const name2keysym_t= *table, kbd_layout_t *k; =20 k =3D g_new0(kbd_layout_t, 1); - k->hash =3D g_hash_table_new(NULL, NULL); + k->hash =3D g_hash_table_new_full(NULL, NULL, NULL, g_free); if (parse_keyboard_layout(k, table, language, errp) < 0) { - g_hash_table_unref(k->hash); - g_free(k); + kbd_layout_free(k); return NULL; } return k; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849312; cv=none; d=zohomail.com; s=zohoarc; b=SDgNfCsBckES+ZS/e14oWWdwyeDsLYLIQy6ZtO8ye9F8P/N1jyidaAhSrUtb22oZjmSJ02JwUn6HoYsY6ZeQX+znMP5s1n7Ytm7OmPg7aG8ro93aktD0h4AJ07CcXsAvW6DDbzBoOrhi9zzOpo2uoQKme5fy0fZ+wMNFaolyb8E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849312; 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=r5ipliGEfImsYLWRZ8XtsDDq+jSdUO3d2Undg+vDmX0=; b=HGsMFPv2jXaJXjYyjxWZQ2DggyFLkTXWBS1A9vTM1tRUHwKXs2jFmVizoA8oaTtM2MSg06ZrJHib+DOsnXqybkGH5+SMpY7y/tz7040xqM5TvVBqOXGaaAEAPyKufRKPREgcZgFiOSV4IKk0daP7qH0fCYB3yY0Tq/rYW58nC9o= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849312752825.040806914679; Fri, 10 Apr 2026 12:28:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRt-0005oz-CL; Fri, 10 Apr 2026 15:23:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRr-0005oO-S9 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRq-00023s-Cv for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:23 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629-EHsQiA3PM2i4BSxHpFdgtg-1; Fri, 10 Apr 2026 15:23:20 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 99EBF180044D for ; Fri, 10 Apr 2026 19:23:19 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 860E63000C16; Fri, 10 Apr 2026 19:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849001; 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=r5ipliGEfImsYLWRZ8XtsDDq+jSdUO3d2Undg+vDmX0=; b=jHuL2ZVl83ihIJg0CNSKtYEf2Ky4OMYQZ53y7fhOB5YUlYGgPmhjesITiAfGZ3kt6vPY8o UeCq3WFfL+GrRmqdSqMVRaSBuyQ6hNu3NWr9JCxarQGUSFi8qGgu7JVL/C2kqyU6bW7LjD AWnD0DkYiYBo8oZXxVaBbMjftNjqoX4= X-MC-Unique: EHsQiA3PM2i4BSxHpFdgtg-1 X-Mimecast-MFC-AGG-ID: EHsQiA3PM2i4BSxHpFdgtg_1775848999 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:06 +0400 Subject: [PATCH v2 44/67] ui/vnc: fix vnc_display_init() leak on failure MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-44-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2626; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=xGMPjiKUOaS83BNgVUACNJ3GgkwfP0afhLEHwJZ2v0Y=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WEsTxXciBVknFi5uX03YbTlWDL5b/ExK7E i0skVNu71OJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5eD6EACYernzMfW9MGdD3eHc8MlFZQIwkwxO8EAv366QUGSiZWxNXOFNrYTqjG1DP4sPX4dF1vs UU1NTCkoGERCY0lVEL7eIgHTBz7jbBHKEMZc7sJusRkSthCDTDKQbSYwRYOMm86EbnTsgXaWBZ2 obIpP0MnteIrMTVCFi30Y6zhJIUnUl9DgpcCvG5lWWD8kd7kBEgYgHD7dYahd/j18eQPkhnc8FB kkFAoKgdyE+cHGCjbPt0BRCNBjOa7j3A1yf3Tam4OwdmE8hJqIF6RnoJNKN3RC7q+RdNdHuw9XB PO2Vd81ixfUh8/ETCptJvwjHr3oY4Moo3llzRWlE2gcqkbh7w1/bJ0CJwtJTlpFHkG1gtxkbqKO QIDCvopBxgCPo7A+8e/gnUVC6nNS1PZ5ilAKXKBRcpiVpSowUk0XGjUYoL/k/JkNRCzPpvm5Jy+ Li53n9TA0OT8HKYMC8dIgMq1wxrdOZwHy0d0WtXndkVROg6gU7+slx75+5iqLsz2z1evrnTNscb bHQgmMk+C5KCfluZr0pfL1SWSldxPp0h80VrTXwU+DaCf1w4Dt6XU7IO06kvXZQ3J5cb6378ZXM s61XkWHX1p5dGUhuMZpbIxxUTYXkelXlZJGElyedHfp34MhwyyZbBOVUK3yD3JoQMJjtuc4pmwE lIpqfOH9oF3jabw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849315309154100 Do not add the display state to the vnc list, if the initialization failed. Add vnc_display_free(), to free the display state and associated data in such case. The function is meant to be public and reused in the following changes. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 522d4d8fb88..512e11d687e 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3422,6 +3422,8 @@ static void vmstate_change_handler(void *opaque, bool= running, RunState state) update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); } =20 +static void vnc_display_free(VncDisplay *vd); + void vnc_display_init(const char *id, Error **errp) { VncDisplay *vd; @@ -3431,8 +3433,9 @@ void vnc_display_init(const char *id, Error **errp) } vd =3D g_malloc0(sizeof(*vd)); =20 + qemu_mutex_init(&vd->mutex); vd->id =3D g_strdup(id); - QTAILQ_INSERT_TAIL(&vnc_displays, vd, next); + vd->dcl.ops =3D &dcl_ops; =20 QTAILQ_INIT(&vd->clients); vd->expires =3D TIME_MAX; @@ -3446,22 +3449,22 @@ void vnc_display_init(const char *id, Error **errp) } =20 if (!vd->kbd_layout) { + vnc_display_free(vd); return; } =20 vd->share_policy =3D VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; vd->connections_limit =3D 32; =20 - qemu_mutex_init(&vd->mutex); vnc_start_worker_thread(); =20 - vd->dcl.ops =3D &dcl_ops; register_displaychangelistener(&vd->dcl); vd->kbd =3D qkbd_state_init(vd->dcl.con); vd->vmstate_handler_entry =3D qemu_add_vm_change_state_handler( &vmstate_change_handler, vd); -} =20 + QTAILQ_INSERT_TAIL(&vnc_displays, vd, next); +} =20 static void vnc_display_close(VncDisplay *vd) { @@ -3505,6 +3508,28 @@ static void vnc_display_close(VncDisplay *vd) #endif } =20 +static void vnc_display_free(VncDisplay *vd) +{ + if (!vd) { + return; + } + + assert(QTAILQ_EMPTY(&vd->clients)); + + vnc_display_close(vd); + unregister_displaychangelistener(&vd->dcl); + qkbd_state_free(vd->kbd); + qemu_del_vm_change_state_handler(vd->vmstate_handler_entry); + kbd_layout_free(vd->kbd_layout); + qemu_mutex_destroy(&vd->mutex); + if (QTAILQ_IN_USE(vd, next)) { + QTAILQ_REMOVE(&vnc_displays, vd, next); + } + g_free(vd->id); + g_free(vd); +} + + int vnc_display_password(const char *id, const char *password, Error **err= p) { VncDisplay *vd =3D vnc_display_find(id); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849200; cv=none; d=zohomail.com; s=zohoarc; b=Gw1AYjivF0Yz+JUp6TUx0dZa9Emd35IqKNY5ncdZcCqqZojkTUSoEC77HMhnOOwmDXEYAToLdi7DlISosHBakZwdUfUKRG6FPFcpNXHFgQEUwdI1oypnyj45U1YGOxk1KRdX5LFSLxESJTeeCC0d/gHaeHAi90CLTbx41ThM848= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849200; 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=YhExG9TArFQDlmGymQu8tjVvDR/BAoOXKx/Gp/p2Yt4=; b=ia2bUikDp9Jd5mssQy0652lwpMaqCqynPSC0dW4cJzIk7MDDCAVFqNizOhjeIQtFKEuFsvtlPLTBYXm6F4dbC1eQlzAUPRWD2FTGBNPCYqWdbO8Zo4k1nAt2MVoobJ8TNJ7F7udPVIbTkCg7LlsYK352F5kq3nxThHWUIbU5eGM= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849200467853.6964393451437; Fri, 10 Apr 2026 12:26:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHRy-0005sf-Oi; Fri, 10 Apr 2026 15:23:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRx-0005s4-HX for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHRw-00024m-3z for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:29 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-197-ZNyNI8IxPbOBTe_AAGtJ4Q-1; Fri, 10 Apr 2026 15:23:26 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 65D29180062A for ; Fri, 10 Apr 2026 19:23:25 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E4331800B7F; Fri, 10 Apr 2026 19:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849007; 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=YhExG9TArFQDlmGymQu8tjVvDR/BAoOXKx/Gp/p2Yt4=; b=ab4zImlej5PiEGVHC1T85LUsxwjJf13epZxkFOG94y27lmxXyCsZtMl9B1zT8+VwGRCdRp pcHZUEaewMthzBKKf2EGpdBjJsGMmLzCbDpJNYEQLBEfwYD3Mm246SO8z94pLHO7GuLz4D wMuSw1lhz3e9mlqJfoKynj+qMBT/QUQ= X-MC-Unique: ZNyNI8IxPbOBTe_AAGtJ4Q-1 X-Mimecast-MFC-AGG-ID: ZNyNI8IxPbOBTe_AAGtJ4Q_1775849005 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:07 +0400 Subject: [PATCH v2 45/67] ui/vnc: make vnc_disconnect_finish() private MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-45-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1270; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=TI0Ey03CiCOcFcFkocFPywnSpvg2ppZYx+CVIUcYMR4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0W48bMUDp+7T96KrzO9AXMeSYuc2ttt9gAu 4rN/ot5KraJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5c2kD/9t8wr5w0D/np3Cw1eTSFqQ9mjsoDAIircW1D9WMmzwSUPWVjhh4uzr99uz8tlrjQG6kDJ sYWZ0Al3fCEyYzVH9g/Q3J1uY+F2zifMcWbdolu/6JYEwd+PTtE/D81oJxoSlirUMtR20U2uVy3 tDuag5O2V0kXu3relHlACMbv6MrsnqSSw62POIoMsU5jRIkScR67Nto1IxpFq3hr2xZ0Xo8PFBz mQrcizLcCjqoGl9obv0AKijNPG1WDFzqYcV1+Z/cK4fs4mNPxpJqIpEr4AbCBu/g2Smf6AlOd4R 6DbYqM8fikTgVlZNELK1QG1fCBMqDLxt6v7W6jQzmM402eCPKK78tymgA2oPsFADQISMvY4+moE kFEfvd3w5OqPdpfLhu3zjDElQK+MFCKJgrLOcQjWk3sxVbwSIVkKdcXFFCpcYB0qaFHxU2poEAb isaLJ9Wykgvdb9bVYwYHbGlkxMMmzmupBU99aFDVfFG3R1pGEnOsKthrE9dKbP4iFltYlo+2M9W Vxw70WWGnYSZEEe8Jg0rQLb2AfTGoRvQJmxV+5Lv95lBAtowlsNGeX09OAJtrNzy7YivCu6tmuw 441vlOPnXTfa5GFY/lONWg+rnfYVBdlUdPNTUgkKGaNllR4cm9tycTZ2BHhguLIzBqG/IoCRlx3 r/2HOtCE4qG/P1Q== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849201559154100 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.h | 1 - ui/vnc.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index c5d678ac31e..110c2bd4600 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -570,7 +570,6 @@ void vnc_write_u16(VncState *vs, uint16_t value); void vnc_write_u8(VncState *vs, uint8_t value); void vnc_flush(VncState *vs); void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting); -void vnc_disconnect_finish(VncState *vs); void vnc_start_protocol(VncState *vs); =20 =20 diff --git a/ui/vnc.c b/ui/vnc.c index 512e11d687e..ba7376360e6 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -71,6 +71,7 @@ static QTAILQ_HEAD(, VncDisplay) vnc_displays =3D =20 static int vnc_cursor_define(VncState *vs); static void vnc_update_throttle_offset(VncState *vs); +static void vnc_disconnect_finish(VncState *vs); =20 static void vnc_set_share_mode(VncState *vs, VncShareMode mode) { @@ -1307,7 +1308,7 @@ static void vnc_disconnect_start(VncState *vs) vs->disconnecting =3D TRUE; } =20 -void vnc_disconnect_finish(VncState *vs) +static void vnc_disconnect_finish(VncState *vs) { VncConnection *vc =3D container_of(vs, VncConnection, vs); =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849091; cv=none; d=zohomail.com; s=zohoarc; b=jj3+XiHFPfNeiGCcKeyh8PjlG/F4IubGEpIoo0mbPN1rbTUtRrxP5/72VI2IVSD3j1IswIyVW8f0tsZcYb04xKgEGI8yLPL0nH1zskBwMx59C2iJFH5ZkXWwvNVbO/CgM4m2VLSSJUpsEGRf+qlGbJyl/+DmNxmQ0T/MHVP0SF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849091; 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=RjANnCQtzhl6inA3QcoNqtJZnUi7lbkVyXloCs2jogQ=; b=FQer2QKuCkheV2GndjzhQGaR2AbUU3OFc5pvA3Ct8gTCZJ4y1MPKQFGGQyTIuforGkGv+cfGzo8CqkWgDE6yRDrw0v/zUsA+9JAg0hZZgwm3JEmKdVipJYu6BFxFOxUXs4nbOB3SfXhyX5Nj4hnbC8UhUXzjzypMMlIaikIJdJQ= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849091677549.3158001193387; Fri, 10 Apr 2026 12:24:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHS5-00066d-Iy; Fri, 10 Apr 2026 15:23:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHS4-00066S-KL for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHS2-000269-06 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:36 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-520-bBjnj4wFMuSlttqBDi6Sjw-1; Fri, 10 Apr 2026 15:23:32 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 251C118007F2 for ; Fri, 10 Apr 2026 19:23:31 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E272C18002A6; Fri, 10 Apr 2026 19:23:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849013; 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=RjANnCQtzhl6inA3QcoNqtJZnUi7lbkVyXloCs2jogQ=; b=C7ohMJoHE2wLFKxLKoxCO1kjHfNJFkq6KMA1lbrW0+rCAUFGipnzmyq9K2LSerJ6NyuAxz ReEzsbfU7SuT75HtdCOLlmcrNqYoJ5j0Ala5yjRh+ZCzeTTe/AsiLEhFs+7Iq+kUB+8gKz W0Ovs6ObEb7Jga5dfr4md2jp50EQ1u0= X-MC-Unique: bBjnj4wFMuSlttqBDi6Sjw-1 X-Mimecast-MFC-AGG-ID: bBjnj4wFMuSlttqBDi6Sjw_1775849011 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:08 +0400 Subject: [PATCH v2 46/67] ui/vnc: make the worker thread per-VncDisplay MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-46-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=6611; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=wV7SjAq/U+a/ra5a7o/iGvyaoNptnoDE1TurKaPvPMg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WEzI16+jx9n6AMtIuctj1KHkUtFoap7DHq D1N8ORn8oaJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5aI4D/9tnb8M7lqML2GQunDfZM0ZxVFYOOury+BWxjW1+oiP+YEosFr4ouxXIgGzITbinRt+3g2 +IyE76wchhxheb0ccjr0CojnbCM2DSrof8FCr2mDpQJ7T1tViAJkwdQVXW1P5rCictnjw8bXmfe O5HxSPWKQmf4ujqZ1KirNwuMaVA5CBtASR3SW5WPcFOkGK/G/4j4IaAdkGYFy6DwII89i1vv5HU 7GBIFV97NByWRbQsqFWuB+HVMFqN+W+9f/AS92G61OUstQDd9c8cpvcusyBv12hlCRgr1rGpi2H EOSbmJHSnVgkYJyWWp4/PuuExxvk6xEZ2NX+WBLmLzSoyXAMvqhmxP1FK2sd0+5hEGtTztkqds6 3vAxBYvrqorN4hGJVbsKborpl3V1J3D2MQjUlkHqb2aF7es6CUeJf0t7PgAUhyI2tRlt3XZiO+c r7LK8gZdD9cVFda7RtWThRJ79Y6NCeUIB92RxZArfiPhohYfCPb2A7GxA0oqXq/gY50Zc23d/7l L7sfywr6UbZkU0wxYn0SWY8Fct+yETBW4Zidob7qWbtHAz96bbhwwvUnxgevJKIIRXesvYTt67e Iy9XmNKvGI/z9PSqQyH8qOM8dS1VpMKRGlbz9jUy/VBXcRtMiV5ZSKHbrZCtFPBbMglFtBS49tp RHuIzaNaOVizRLw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849094145154100 The VNC encoding worker thread was using a single global queue shared across all VNC displays, with no way to stop it. This made it impossible to properly clean up resources when a VncDisplay is freed. Move the VncJobQueue from a file-scoped global to a per-VncDisplay member, so each display owns its worker thread and queue. Add vnc_stop_worker_thread() to perform an orderly shutdown: signal the thread to exit, join it, and destroy the queue. The thread is now created as QEMU_THREAD_JOINABLE instead of QEMU_THREAD_DETACHED. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.h | 3 ++- ui/vnc.h | 2 ++ ui/vnc-jobs.c | 76 +++++++++++++++++++++++++++++++++----------------------= ---- ui/vnc.c | 3 ++- 4 files changed, 49 insertions(+), 35 deletions(-) diff --git a/ui/vnc-jobs.h b/ui/vnc-jobs.h index 59f66bcc353..e5ab55c1da6 100644 --- a/ui/vnc-jobs.h +++ b/ui/vnc-jobs.h @@ -37,7 +37,8 @@ void vnc_job_push(VncJob *job); void vnc_jobs_join(VncState *vs); =20 void vnc_jobs_consume_buffer(VncState *vs); -void vnc_start_worker_thread(void); +void vnc_start_worker_thread(VncDisplay *vd); +void vnc_stop_worker_thread(VncDisplay *vd); =20 /* Locks */ static inline int vnc_trylock_display(VncDisplay *vd) diff --git a/ui/vnc.h b/ui/vnc.h index 110c2bd4600..9a09fcdad8b 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -62,6 +62,7 @@ =20 typedef struct VncState VncState; typedef struct VncJob VncJob; +typedef struct VncJobQueue VncJobQueue; typedef struct VncRect VncRect; typedef struct VncRectEntry VncRectEntry; =20 @@ -158,6 +159,7 @@ struct VncDisplay int ledstate; QKbdState *kbd; QemuMutex mutex; + VncJobQueue *queue; =20 int cursor_msize; uint8_t *cursor_mask; diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 5b17ef54091..c809287dd3a 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -29,8 +29,6 @@ #include "qemu/osdep.h" #include "vnc.h" #include "vnc-jobs.h" -#include "qemu/sockets.h" -#include "qemu/main-loop.h" #include "trace.h" =20 /* @@ -56,17 +54,10 @@ struct VncJobQueue { QemuCond cond; QemuMutex mutex; QemuThread thread; + bool exit; QTAILQ_HEAD(, VncJob) jobs; }; =20 -typedef struct VncJobQueue VncJobQueue; - -/* - * We use a single global queue, but most of the functions are - * already reentrant, so we can easily add more than one encoding thread - */ -static VncJobQueue *queue; - static void vnc_lock_queue(VncJobQueue *queue) { qemu_mutex_lock(&queue->mutex); @@ -125,19 +116,22 @@ static void vnc_job_free(VncJob *job) */ void vnc_job_push(VncJob *job) { + VncJobQueue *queue =3D job->vs->vd->queue; + assert(!QTAILQ_IN_USE(job, next)); =20 if (QLIST_EMPTY(&job->rectangles)) { vnc_job_free(job); } else { vnc_lock_queue(queue); + assert(!queue->exit); QTAILQ_INSERT_TAIL(&queue->jobs, job, next); qemu_cond_broadcast(&queue->cond); vnc_unlock_queue(queue); } } =20 -static bool vnc_has_job_locked(VncState *vs) +static bool vnc_has_job_locked(VncJobQueue *queue, VncState *vs) { VncJob *job; =20 @@ -151,8 +145,10 @@ static bool vnc_has_job_locked(VncState *vs) =20 void vnc_jobs_join(VncState *vs) { + VncJobQueue *queue =3D vs->vd->queue; + vnc_lock_queue(queue); - while (vnc_has_job_locked(vs)) { + while (vnc_has_job_locked(queue, vs)) { qemu_cond_wait(&queue->cond, &queue->mutex); } vnc_unlock_queue(queue); @@ -252,9 +248,13 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) int saved_offset; =20 vnc_lock_queue(queue); - while (QTAILQ_EMPTY(&queue->jobs)) { + while (QTAILQ_EMPTY(&queue->jobs) && !queue->exit) { qemu_cond_wait(&queue->cond, &queue->mutex); } + if (queue->exit) { + vnc_unlock_queue(queue); + return 1; + } job =3D QTAILQ_FIRST(&queue->jobs); vnc_unlock_queue(queue); =20 @@ -340,39 +340,49 @@ disconnected: return 0; } =20 -static VncJobQueue *vnc_queue_init(void) -{ - VncJobQueue *queue =3D g_new0(VncJobQueue, 1); - - qemu_cond_init(&queue->cond); - qemu_mutex_init(&queue->mutex); - QTAILQ_INIT(&queue->jobs); - return queue; -} - static void *vnc_worker_thread(void *arg) { VncJobQueue *queue =3D arg; =20 while (!vnc_worker_thread_loop(queue)) ; - g_assert_not_reached(); + return NULL; } =20 -static bool vnc_worker_thread_running(void) +void vnc_start_worker_thread(VncDisplay *vd) { - return queue; /* Check global queue */ + VncJobQueue *queue; + + assert(vd->queue =3D=3D NULL); + + queue =3D g_new0(VncJobQueue, 1); + qemu_cond_init(&queue->cond); + qemu_mutex_init(&queue->mutex); + QTAILQ_INIT(&queue->jobs); + vd->queue =3D queue; + + qemu_thread_create(&queue->thread, "vnc_worker", vnc_worker_thread, qu= eue, + QEMU_THREAD_JOINABLE); } =20 -void vnc_start_worker_thread(void) +void vnc_stop_worker_thread(VncDisplay *vd) { - VncJobQueue *q; + VncJobQueue *queue =3D vd->queue; =20 - if (vnc_worker_thread_running()) + if (!queue) { return; + } + + /* all VNC clients must have finished before we can stop the worker th= read */ + vnc_lock_queue(queue); + assert(QTAILQ_EMPTY(&queue->jobs)); + queue->exit =3D true; + qemu_cond_broadcast(&queue->cond); + vnc_unlock_queue(queue); =20 - q =3D vnc_queue_init(); - qemu_thread_create(&q->thread, "vnc_worker", vnc_worker_thread, q, - QEMU_THREAD_DETACHED); - queue =3D q; /* Set global queue */ + qemu_thread_join(&queue->thread); + qemu_cond_destroy(&queue->cond); + qemu_mutex_destroy(&queue->mutex); + g_free(queue); + vd->queue =3D NULL; } diff --git a/ui/vnc.c b/ui/vnc.c index ba7376360e6..4e5a9ee0341 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3457,7 +3457,7 @@ void vnc_display_init(const char *id, Error **errp) vd->share_policy =3D VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; vd->connections_limit =3D 32; =20 - vnc_start_worker_thread(); + vnc_start_worker_thread(vd); =20 register_displaychangelistener(&vd->dcl); vd->kbd =3D qkbd_state_init(vd->dcl.con); @@ -3517,6 +3517,7 @@ static void vnc_display_free(VncDisplay *vd) =20 assert(QTAILQ_EMPTY(&vd->clients)); =20 + vnc_stop_worker_thread(vd); vnc_display_close(vd); unregister_displaychangelistener(&vd->dcl); qkbd_state_free(vd->kbd); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849263; cv=none; d=zohomail.com; s=zohoarc; b=Bqy/kCIR6f7AB9Xkfbcyx6BWK3/DJ2IbZTUVlNisWjCSdHkPUy2U5Fm/AAjnyKAzc6nAkcPu3ZnMDMN4yMTbirYEfhyINGQNNx98+1S7Qf6MUiJHsQ780AvmoCYzOBw8ZniyCQSzpiPnGPk28vbmkx1feGnNLg6xUv69elGTgzg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849263; 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=AaYgLyQHGS1El8i7WXeapVRA3A7DlDOzohvzbOUY51A=; b=h0CHBwH12OBnSCLqKilr2VsJ1Ew5DqXLygx2ps41jzGAly4zlCfHRx/+GUXG/Z99vzLQcmp9iwskn8xqL0ihYacJia+772lD/XYP7rww7zVYgJ5TrU0EZxi4rUu0oxvCvxYbhfmnOiLYirB0f8JtRbHXu3/lCXaN9dXmsr4EEDo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849263265123.80023492078215; Fri, 10 Apr 2026 12:27:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSA-0006Jr-4e; Fri, 10 Apr 2026 15:23:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHS8-0006DW-VJ for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHS7-00028E-Ct for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:40 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-xH-Xz9-2P1-k8t1AG7xHZg-1; Fri, 10 Apr 2026 15:23:37 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C086F195608F for ; Fri, 10 Apr 2026 19:23:36 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A4C7D19560AB; Fri, 10 Apr 2026 19:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849018; 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=AaYgLyQHGS1El8i7WXeapVRA3A7DlDOzohvzbOUY51A=; b=KW/SNFyo+e7Lbtn0DQvL1YRow9cvYDQ+lK4OEYJBfTLn54k1QE1cTdhFyp+Xe6VsCZygyJ uZxR9ZOomEipraVzg6mOkG7xz+zG0hFovVkrEn77UoPZExO2vQ1iFwqMXZbxEpzCzXldUJ LDFLuFPBD3T4VQsIUK+E0/KkqbVYiMU= X-MC-Unique: xH-Xz9-2P1-k8t1AG7xHZg-1 X-Mimecast-MFC-AGG-ID: xH-Xz9-2P1-k8t1AG7xHZg_1775849016 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:09 +0400 Subject: [PATCH v2 47/67] ui/vnc: vnc_display_init() and vnc_display_open() return bool MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-47-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=3270; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=hnN7DWHiJasepbkzKlsPFEQRnAxLd59i6FLsvNgF744=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0W7noNxUG+0zIoAuAo5Ca5DgUU87qDif7UG ku+GZ4sRH2JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5XUwD/oCVQ0iGXLZecRKNKPkxwCrNPiUSDJEdHw6FybDX0rO/M20AaAtlFQ230o+bmRJRTYNQRY 8rC2gtNVwsbwLgWJqQQOEKiVAfH1zcPt5Et6fIQ23WU0Ns6yJ26EomwTJa5RfpGkLt1GCYICTmG AeBj3FbHTtRhlChdTrUwYHoAqiSh0qV2SDhGB+GZDRSGr1kGIFr/+CtwEsIy6hKze1bxUbxvmyi thqmg4D6a9GXQvgFUB7xe+UiE/0/7CjXnvR4VKy+dSlSVs4DdEmIHdQ+AC8+U8wzA8zLrj5jSHy ySEq8FXUsrHf5TXVI5A3g8ZmsjSr6QX8uOhWnzKApzXKsBZ5PTSc21pyZeh1iUDRvAeP9unKNaV bKrAkrVqiOtbWz9HatihMloX/V3CW7IKfn3RTn/+ebCmepKDhQS1SyYUpvEjWkNrKokyoexANVa alEzA2DIMnAL2HQYqWmBqYnq9IbR0rsqrPIogrNCx2AywSE2F/xXg7tBnn2v9dRdXtEqVS2L3dP drQcSojjBCYTThrPM89NZrOArdfV55azqUIPnVD2n8ISvK7gultL4HXnKpQkSMddElQY+skoQ6w sbyIviMNLt54kgaueobb3lre06f2DROG/c3rJsIutC03IyMMWNa69n4Or4l7lLo4QKOd5ytUqyZ K0BWT/cv0fEWLvA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849264507154100 Use the QEMU-style error pattern returning "true" on success. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 4 ++-- ui/vnc.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 75cd48ed7ad..f9b4665cb90 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -448,8 +448,8 @@ const char *qemu_display_get_vc(DisplayOptions *opts); void qemu_display_help(void); =20 /* vnc.c */ -void vnc_display_init(const char *id, Error **errp); -void vnc_display_open(const char *id, Error **errp); +bool vnc_display_init(const char *id, Error **errp); +bool vnc_display_open(const char *id, Error **errp); void vnc_display_add_client(const char *id, int csock, bool skipauth); int vnc_display_password(const char *id, const char *password, Error **err= p); int vnc_display_pw_expire(const char *id, time_t expires); diff --git a/ui/vnc.c b/ui/vnc.c index 4e5a9ee0341..0775417c418 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3425,12 +3425,12 @@ static void vmstate_change_handler(void *opaque, bo= ol running, RunState state) =20 static void vnc_display_free(VncDisplay *vd); =20 -void vnc_display_init(const char *id, Error **errp) +bool vnc_display_init(const char *id, Error **errp) { VncDisplay *vd; =20 if (vnc_display_find(id) !=3D NULL) { - return; + return true; } vd =3D g_malloc0(sizeof(*vd)); =20 @@ -3451,7 +3451,7 @@ void vnc_display_init(const char *id, Error **errp) =20 if (!vd->kbd_layout) { vnc_display_free(vd); - return; + return false; } =20 vd->share_policy =3D VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; @@ -3465,6 +3465,7 @@ void vnc_display_init(const char *id, Error **errp) &vmstate_change_handler, vd); =20 QTAILQ_INSERT_TAIL(&vnc_displays, vd, next); + return true; } =20 static void vnc_display_close(VncDisplay *vd) @@ -4074,7 +4075,7 @@ bool vnc_display_update(DisplayUpdateOptionsVNC *arg,= Error **errp) return true; } =20 -void vnc_display_open(const char *id, Error **errp) +bool vnc_display_open(const char *id, Error **errp) { VncDisplay *vd =3D vnc_display_find(id); QemuOpts *opts =3D qemu_opts_find(&qemu_vnc_opts, id); @@ -4277,7 +4278,7 @@ void vnc_display_open(const char *id, Error **errp) qkbd_state_set_delay(vd->kbd, key_delay_ms); =20 if (saddr_list =3D=3D NULL) { - return; + return true; } =20 if (reverse) { @@ -4295,10 +4296,11 @@ void vnc_display_open(const char *id, Error **errp) } =20 /* Success */ - return; + return true; =20 fail: vnc_display_close(vd); + return false; } =20 void vnc_display_add_client(const char *id, int csock, bool skipauth) @@ -4354,12 +4356,10 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Err= or **errp) id =3D vnc_auto_assign_id(opts); } =20 - vnc_display_init(id, errp); - if (*errp) { + if (!vnc_display_init(id, errp)) { return -1; } - vnc_display_open(id, errp); - if (*errp) { + if (!vnc_display_open(id, errp)) { return -1; } return 0; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849131; cv=none; d=zohomail.com; s=zohoarc; b=Wa8fv6smqbw0NqyrRc7PPe+lWRjGVwjhlgVpbv39wSd5cErBB719E+qc/TG0bNRyx4q8PhWC/foVuy02oE4kL4NGyWZ1yZ9grIsm8hTCCuRMpJAgqvCX9OPHGaGOlLmUNklCefFO84S4TAd4GUiO4R/86a75fGuv2JBVMO1Lhrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849131; 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=YSrakXYMXwFeSDbn9jY/8QGvj0ZPy2rloyVnNF6g3gY=; b=X4DqK5CSs+HCfBm2hJFzrbO+7rZhegv04ACx7DQ6osjdx1Z8dy3FFLZzBaOMOKTL5WcY76LdgS3g/IXiuMl4BaA/jfLUTpRP8biHhdEB82YFWZKcrZExKqXotvQXNQ/SmzYnVKJ0+KwcDGUAauoXcckQd6k5sorR1t1MLx4tdBk= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849131195323.1383838770705; Fri, 10 Apr 2026 12:25:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSG-0006L8-W1; Fri, 10 Apr 2026 15:23:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSF-0006Kt-1y for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSD-00029s-CY for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:46 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-44-9VIBMDrMPmmqcWcPNJtK_A-1; Fri, 10 Apr 2026 15:23:43 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7B7D71956095 for ; Fri, 10 Apr 2026 19:23:42 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3F75D3000C1E; Fri, 10 Apr 2026 19:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849024; 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=YSrakXYMXwFeSDbn9jY/8QGvj0ZPy2rloyVnNF6g3gY=; b=RxlKm8SupcXdKJ+h1NUdoRfSJJVI5fd5CP11Gc8lLnFk7y3UYu51Xtdt3wMQib7Jl5ou6h qxuTyg0WCRUTEyN8gpsYhyO4UkPDGjIWmDEfVOPQzlmL6MdzkAm2huDCVq36mAmg3Dng6x rySux1NsGLTzICXZy8gngBMRSMiSZak= X-MC-Unique: 9VIBMDrMPmmqcWcPNJtK_A-1 X-Mimecast-MFC-AGG-ID: 9VIBMDrMPmmqcWcPNJtK_A_1775849022 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:10 +0400 Subject: [PATCH v2 48/67] ui/vnc: merge vnc_display_init() and vnc_display_open() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-48-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=10141; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=X1RJV0NG/5XqiGMSOYPHs1GAGis6hGBRk8CiPjVZy4w=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0W0IAxvLhYM3Lwf0K28h/xSd/djF/rwalk2 tNw6Itpo5aJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5V29D/9sjoUymNWzccKx4Yj3a/gwuS9B5M/xyPTZFmSQQr2keIJySgW584l+WouXJDyKgamOp7e KK3XsyARZuxSTIFfCLrqy/Pl4W4+t+zZTn43xBUIqT6ORal0LMjSlZPM4UmEKq+9vRnVH2qXCgu aOWct7uIFh4SsMBl/uj2mg3bXDdi5Ek1SkTW5BYGOEkiDWp98TUBmb2Oy6PKu65v/t66d2+gZkS tCiYi7+OsIwx3EyZK2URFTD9WNlrpVR8kMyNAc5fz8SayDjkis8v2h7EBEGh26eCqzCXyQMJ/4a i/DztyAy9McZn6/v0ONPGBfh4OpG6Wc/Hqf1pKKckDEA7nO4QHibGLHw3je8HSF2+/EwJv7nN99 O0Q2zmvMqv5BNECMkc87G2crWvwYbozcKaxxNmMd7sJudoPZLpIS+mx2WsZajIOOzciEbMASdqW oM44uIiXhEQka6a33KSnE0/uEofwH8ngq129ZqsV2mThdUgg+gqS74ljuIAALz5m3V8fnrfCAJn q+KCkQVxkhhpgEme3z1JkF8zuqtll/utZPkc5vZCK2p3Cqj3CrhcMEurY4U5d8GX+5CoMA7QBpe AFpjiIrs1Tp3WomwCnMLD6lMaHd+oRcVPQG38XUg+EGQEYaRxLHsYfLYim8MNmq5W9KIxTcw92i LI2E+QA8iCZp3tA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849132630154100 Combine the two-step vnc_display_init()/vnc_display_open() sequence into a single vnc_display_new() function that returns VncDisplay*. This simplifies the API by making vnc_display_open() an internal detail and will allow further code simplification. vnc_display_new() is moved to vnc.h, since it returns VncDisplay* now. Add vnc_display_free() for consistency, and it will be later used. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 2 -- ui/vnc.h | 3 +++ ui/vnc.c | 75 ++++++++++++++++++++++--------------------------= ---- 3 files changed, 35 insertions(+), 45 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index f9b4665cb90..1794f1a2cf0 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -448,8 +448,6 @@ const char *qemu_display_get_vc(DisplayOptions *opts); void qemu_display_help(void); =20 /* vnc.c */ -bool vnc_display_init(const char *id, Error **errp); -bool vnc_display_open(const char *id, Error **errp); void vnc_display_add_client(const char *id, int csock, bool skipauth); int vnc_display_password(const char *id, const char *password, Error **err= p); int vnc_display_pw_expire(const char *id, time_t expires); diff --git a/ui/vnc.h b/ui/vnc.h index 9a09fcdad8b..de41517be48 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -550,6 +550,9 @@ enum VncFeatures { #define VNC_CLIPBOARD_NOTIFY (1 << 27) #define VNC_CLIPBOARD_PROVIDE (1 << 28) =20 +VncDisplay *vnc_display_new(const char *id, Error **errp); +void vnc_display_free(VncDisplay *vd); + /*************************************************************************= **** * * Internal APIs diff --git a/ui/vnc.c b/ui/vnc.c index 0775417c418..4d5b36a6fa8 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3423,14 +3423,14 @@ static void vmstate_change_handler(void *opaque, bo= ol running, RunState state) update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); } =20 -static void vnc_display_free(VncDisplay *vd); +static bool vnc_display_open(VncDisplay *vd, Error **errp); =20 -bool vnc_display_init(const char *id, Error **errp) +VncDisplay *vnc_display_new(const char *id, Error **errp) { VncDisplay *vd; =20 if (vnc_display_find(id) !=3D NULL) { - return true; + return NULL; } vd =3D g_malloc0(sizeof(*vd)); =20 @@ -3451,7 +3451,7 @@ bool vnc_display_init(const char *id, Error **errp) =20 if (!vd->kbd_layout) { vnc_display_free(vd); - return false; + return NULL; } =20 vd->share_policy =3D VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; @@ -3464,8 +3464,13 @@ bool vnc_display_init(const char *id, Error **errp) vd->vmstate_handler_entry =3D qemu_add_vm_change_state_handler( &vmstate_change_handler, vd); =20 + if (!vnc_display_open(vd, errp)) { + vnc_display_free(vd); + return NULL; + } + QTAILQ_INSERT_TAIL(&vnc_displays, vd, next); - return true; + return vd; } =20 static void vnc_display_close(VncDisplay *vd) @@ -3510,7 +3515,7 @@ static void vnc_display_close(VncDisplay *vd) #endif } =20 -static void vnc_display_free(VncDisplay *vd) +void vnc_display_free(VncDisplay *vd) { if (!vd) { return; @@ -3532,7 +3537,6 @@ static void vnc_display_free(VncDisplay *vd) g_free(vd); } =20 - int vnc_display_password(const char *id, const char *password, Error **err= p) { VncDisplay *vd =3D vnc_display_find(id); @@ -4075,10 +4079,9 @@ bool vnc_display_update(DisplayUpdateOptionsVNC *arg= , Error **errp) return true; } =20 -bool vnc_display_open(const char *id, Error **errp) +static bool vnc_display_open(VncDisplay *vd, Error **errp) { - VncDisplay *vd =3D vnc_display_find(id); - QemuOpts *opts =3D qemu_opts_find(&qemu_vnc_opts, id); + QemuOpts *opts =3D qemu_opts_find(&qemu_vnc_opts, vd->id); g_autoptr(SocketAddressList) saddr_list =3D NULL; g_autoptr(SocketAddressList) wsaddr_list =3D NULL; const char *share, *device_id; @@ -4097,26 +4100,23 @@ bool vnc_display_open(const char *id, Error **errp) assert(vd); assert(opts); =20 - vnc_display_close(vd); - reverse =3D qemu_opt_get_bool(opts, "reverse", false); if (vnc_display_get_addresses(opts, reverse, &saddr_list, &wsaddr_list, errp) < 0) { - goto fail; + return false; } =20 - passwordSecret =3D qemu_opt_get(opts, "password-secret"); if (passwordSecret) { if (qemu_opt_get(opts, "password")) { error_setg(errp, "'password' flag is redundant with 'password-secret= '"); - goto fail; + return false; } vd->password =3D qcrypto_secret_lookup_as_utf8(passwordSecret, errp); if (!vd->password) { - goto fail; + return false; } password =3D true; } else { @@ -4127,7 +4127,7 @@ bool vnc_display_open(const char *id, Error **errp) QCRYPTO_CIPHER_ALGO_DES, QCRYPTO_CIPHER_MODE_ECB)) { error_setg(errp, "Cipher backend does not support DES algorithm"); - goto fail; + return false; } } =20 @@ -4137,7 +4137,7 @@ bool vnc_display_open(const char *id, Error **errp) #ifndef CONFIG_VNC_SASL if (sasl) { error_setg(errp, "VNC SASL auth requires cyrus-sasl support"); - goto fail; + return false; } #endif /* CONFIG_VNC_SASL */ credid =3D qemu_opt_get(opts, "tls-creds"); @@ -4148,7 +4148,7 @@ bool vnc_display_open(const char *id, Error **errp) if (!creds) { error_setg(errp, "No TLS credentials with id '%s'", credid); - goto fail; + return false; } vd->tlscreds =3D (QCryptoTLSCreds *) object_dynamic_cast(creds, @@ -4156,26 +4156,26 @@ bool vnc_display_open(const char *id, Error **errp) if (!vd->tlscreds) { error_setg(errp, "Object with id '%s' is not TLS credentials", credid); - goto fail; + return false; } object_ref(OBJECT(vd->tlscreds)); =20 if (!qcrypto_tls_creds_check_endpoint(vd->tlscreds, QCRYPTO_TLS_CREDS_ENDPOINT_S= ERVER, errp)) { - goto fail; + return false; } } tlsauthz =3D qemu_opt_get(opts, "tls-authz"); if (tlsauthz && !vd->tlscreds) { error_setg(errp, "'tls-authz' provided but TLS is not enabled"); - goto fail; + return false; } =20 saslauthz =3D qemu_opt_get(opts, "sasl-authz"); if (saslauthz && !sasl) { error_setg(errp, "'sasl-authz' provided but SASL auth is not enabl= ed"); - goto fail; + return false; } =20 share =3D qemu_opt_get(opts, "share"); @@ -4188,7 +4188,7 @@ bool vnc_display_open(const char *id, Error **errp) vd->share_policy =3D VNC_SHARE_POLICY_FORCE_SHARED; } else { error_setg(errp, "unknown vnc share=3D option"); - goto fail; + return false; } } else { vd->share_policy =3D VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; @@ -4222,20 +4222,20 @@ bool vnc_display_open(const char *id, Error **errp) if (vnc_display_setup_auth(&vd->auth, &vd->subauth, vd->tlscreds, password, sasl, false, errp) < 0) { - goto fail; + return false; } trace_vnc_auth_init(vd, 0, vd->auth, vd->subauth); =20 if (vnc_display_setup_auth(&vd->ws_auth, &vd->ws_subauth, vd->tlscreds, password, sasl, true, errp) < 0) { - goto fail; + return false; } trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth); =20 #ifdef CONFIG_VNC_SASL if (sasl && !vnc_sasl_server_init(errp)) { - goto fail; + return false; } #endif vd->lock_key_sync =3D lock_key_sync; @@ -4248,7 +4248,7 @@ bool vnc_display_open(const char *id, Error **errp) if (audiodev) { vd->audio_be =3D audio_be_by_name(audiodev, errp); if (!vd->audio_be) { - goto fail; + return false; } } else { vd->audio_be =3D audio_get_default_audio_be(NULL); @@ -4262,7 +4262,7 @@ bool vnc_display_open(const char *id, Error **errp) con =3D qemu_console_lookup_by_device_name(device_id, head, &err); if (err) { error_propagate(errp, err); - goto fail; + return false; } } else { con =3D qemu_console_lookup_default(); @@ -4283,11 +4283,11 @@ bool vnc_display_open(const char *id, Error **errp) =20 if (reverse) { if (vnc_display_connect(vd, saddr_list, wsaddr_list, errp) < 0) { - goto fail; + return false; } } else { if (vnc_display_listen(vd, saddr_list, wsaddr_list, errp) < 0) { - goto fail; + return false; } } =20 @@ -4295,12 +4295,7 @@ bool vnc_display_open(const char *id, Error **errp) vnc_display_print_local_addr(vd); } =20 - /* Success */ return true; - -fail: - vnc_display_close(vd); - return false; } =20 void vnc_display_add_client(const char *id, int csock, bool skipauth) @@ -4356,13 +4351,7 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Erro= r **errp) id =3D vnc_auto_assign_id(opts); } =20 - if (!vnc_display_init(id, errp)) { - return -1; - } - if (!vnc_display_open(id, errp)) { - return -1; - } - return 0; + return vnc_display_new(id, errp) !=3D NULL ? 0 : -1; } =20 static void vnc_register_config(void) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849277; cv=none; d=zohomail.com; s=zohoarc; b=nVWCzPcRALGhQ9BCvMtedSnmg/3di3wzqvq3YiUsKsfunFume13bjhy5R8ecx14GTewH4VtsFOHE//nqGizPh0onsAfCpXULXc25Mw7zfy0oCEFGStK9TQFnVEJzjLe8J/p2p1gEDGTMeO736MyQ1u1o7fCosvW4zSuieHB/ATo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849277; 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=+fQZAClfmrscJEkRBjDcdDVW8Jr0wH1S70Q/Jtmz4tw=; b=MUUIE2RMWU1DiVgISi+vMfumQXNCeJWFEcrxIQTaU/27+ok720QOyS8o4Cu2WYiW21uXrE2sPJqMePZ2XKJGDJckPr+nXbibJWhYNTPWIHsee2cx03LxViBaYR40g923s/Uw/wkeyEQ5bvY4zvxxnsYYeVELm0uigLMMngbMqOc= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849277113736.2944361982821; Fri, 10 Apr 2026 12:27:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSM-0006LT-HQ; Fri, 10 Apr 2026 15:23:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSL-0006LL-AL for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSI-0002AP-Pk for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:53 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-671-2KgFMogFNvW9_lZiRMfKeQ-1; Fri, 10 Apr 2026 15:23:48 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E45901801230 for ; Fri, 10 Apr 2026 19:23:47 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E69713000C16; Fri, 10 Apr 2026 19:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849030; 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=+fQZAClfmrscJEkRBjDcdDVW8Jr0wH1S70Q/Jtmz4tw=; b=RIOsRSvpJwPz7THZzYrqOve+3pMsKph/ZW/lS3NSpdRxB9UYYVr4nossbLnMJ3RoV/WWaS vCCfSq9pWm7Wm/edpWbIxAP27MqrXOMlpv6GBeaLSevCKEoJWz8wW0bnWjCA7Fn6hYwb2+ lgCkIdwD/zWOPEzqKlSC1nNH55DLfXc= X-MC-Unique: 2KgFMogFNvW9_lZiRMfKeQ-1 X-Mimecast-MFC-AGG-ID: 2KgFMogFNvW9_lZiRMfKeQ_1775849028 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:11 +0400 Subject: [PATCH v2 49/67] ui/vnc: add vnc_cleanup() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-49-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2420; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=FdKqULM+Bhumrtdj2UvMtLgqGMnOx74TlvwWAfVSGL8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WnGe6FG+pkXPCLSVxZ77fU+YyjV2pJ7Y5U 58UwlczH2+JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5SNkEACe1n+h6ft/OiRA71V+plZaISbkqDS/lj8/mrF7VDbTQ3feEUt1izDFZumJFRnVRXSvpgN F0mq8raSSE3qe+W2Cclk2eOXTe7cUba7Oa5ylNBldg3Yd3L2GBSorWk4El0+oaTS/z18W6BrPBf a3MgGo0vuUL4jKK/K7wLdFHHqq9UmUoXAi7t0kqdkcYlTgj5GwGaxqjTnwVUaKOWQjYHjrcx3SV 8iA4sLtoTzvWwOFYmxMMPxGX37FTjDnoZJGSHikJe6c1THDxiI3F9foZyzJhgyNwfkEk4k06n6A QRO8mRThICcuxt5/wbMWDpbUNIV9fy199DNxhApB5TUWcBUJyYT8W7e19zP/zhBlryIK4CmHXWU v0jw12o0Wtj3exHNoxEbkp+jNris8n8NUL/sit/hy1QwnszcFBuT4RplrIWjRAObL0g642pQjRF Z/5kmZ3poaUinmaqlQ09uN3kykL6xl8rVveo85rZG706TlaXG2aJ13rT4mabAdD0EuQQnjrKyph xTsVbt3gtUQMj9OueVI99kRCQzP38vSSXzzd7CLIBcIFiJ1vH9z9YtOg/caIpOjYbTPY4muSkhd 1s6xH8ka8PkEd3yGAcl7oogHJZuY1VmSQZPGJxKz2GzCWYgYakVBReLmqJFWzyqf3xvAfY2ebVn y2phPre0z6xUTCA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849277347158500 Add a function to tear down VNC displays, call it when leaving QEMU. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 1 + system/runstate.c | 5 +++++ ui/vnc.c | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h index 1794f1a2cf0..b3aaf3ff12b 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -455,6 +455,7 @@ void vnc_parse(const char *str); int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp); bool vnc_display_reload_certs(const char *id, Error **errp); bool vnc_display_update(DisplayUpdateOptionsVNC *arg, Error **errp); +void vnc_cleanup(void); =20 /* input.c */ int index_from_key(const char *key, size_t key_length); diff --git a/system/runstate.c b/system/runstate.c index 770253b467b..0e1cb3b4e67 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -61,6 +61,8 @@ #include "system/confidential-guest-support.h" #include "system/system.h" #include "system/tpm.h" +#include "ui/console.h" + #include "trace.h" =20 static NotifierList exit_notifiers =3D @@ -1044,5 +1046,8 @@ void qemu_cleanup(int status) monitor_cleanup(); qemu_chr_cleanup(); user_creatable_cleanup(); +#ifdef CONFIG_VNC + vnc_cleanup(); +#endif /* TODO: unref root container, check all devices are ok */ } diff --git a/ui/vnc.c b/ui/vnc.c index 4d5b36a6fa8..c26b581f3ef 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -4354,6 +4354,30 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Erro= r **errp) return vnc_display_new(id, errp) !=3D NULL ? 0 : -1; } =20 +void vnc_cleanup(void) +{ + VncDisplay *vd, *vd_next; + VncState *vs; + + QTAILQ_FOREACH(vd, &vnc_displays, next) { + if (vd->listener) { + qio_net_listener_disconnect(vd->listener); + } + if (vd->wslistener) { + qio_net_listener_disconnect(vd->wslistener); + } + QTAILQ_FOREACH(vs, &vd->clients, next) { + vnc_disconnect_start(vs); + } + } + QTAILQ_FOREACH_SAFE(vd, &vnc_displays, next, vd_next) { + while (!QTAILQ_EMPTY(&vd->clients)) { + main_loop_wait(false); + } + vnc_display_free(vd); + } +} + static void vnc_register_config(void) { qemu_add_opts(&qemu_vnc_opts); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849276; cv=none; d=zohomail.com; s=zohoarc; b=C20ofJTPisBBM1VdLf+WpNo8tndPAE4HAVp//N07T3y2OQltwGnkPHmUpNz1U9J1Gk+prF62dx7J2Se40GS0pc/5HSzjXSmb2ValdzK6Qz/iE6JW4X0dRnicUpg9bEMjYMVVyIgCMSjpFmf983ftfdl9odLBkIy6TQ9UAdc00uM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849276; 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=fNtgm7Dc2sKWUhtRubFcPFp7/J/116trHEswWgG7p+s=; b=OoDGYO8q/tQ1zwu8i2BwpyIyTdnIapWF9D/5+5FVeFNmqvw6YBBKTBgvGqvfA2441XibPiSN+WaVSrOEQZhPjGpK1dDOKlVZrO1hEa6vcJD8S6CVwtXEqHWZy/TySqIqiZ02JCPUzb80y8gHNlVaZzgTvYJTMk2GNkP/r/qY59U= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849276803168.52996755560412; Fri, 10 Apr 2026 12:27:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSR-0006Ve-9x; Fri, 10 Apr 2026 15:23:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSQ-0006Qs-40 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSO-0002CY-Ob for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:23:57 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-235-0olYaZuFMSCsMpQ442sWWQ-1; Fri, 10 Apr 2026 15:23:54 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BEF2F19560A2 for ; Fri, 10 Apr 2026 19:23:53 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A3A461800B7F; Fri, 10 Apr 2026 19:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849036; 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=fNtgm7Dc2sKWUhtRubFcPFp7/J/116trHEswWgG7p+s=; b=FQTtI6x9XeNeLOB0LHP6dRfnXm2yereicsgrZ87JQVQTt4OH6gZsNP04QPLYlsYqCskuHA 2WZdcFMqEUnJ5iF2oRK3WyxaWjpltLPIkSC9k+4+iddMdex68YxJ1wyYVhuOk2nLNzFXIT NfoHwHRVobAcTS0P9TcmOwP2XHhDg80= X-MC-Unique: 0olYaZuFMSCsMpQ442sWWQ-1 X-Mimecast-MFC-AGG-ID: 0olYaZuFMSCsMpQ442sWWQ_1775849033 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:12 +0400 Subject: [PATCH v2 50/67] ui/vnc: report an error for duplicate display id MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-50-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=626; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=mfbePML5bipQlj6KwnAkOKEr3720h6Lm42X86FPcooY=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0W32iHIweWZQB1LArz4q6UCrapUnPG/4czw tBvw3AfInmJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5SI9D/9Oy8WwyMVBAry7QePW90J+1nmgeJuBWvwzel4zJ2Ti9PeKZKa3amVIW3bkkRjbX4bDb4s xeoMyS7aOyg371Vpkg6Apo87whY3WwUzNu3UIJ0YhCnCQ1YLSMWjPlJA8FMFAo/m3sKROLnVB0A E21lPTkmFpqQNVB0bjwNFKa7FlpOk+u/R/Kow/0u1rlwU+Gu7xH8AA07+OndLfDj2Ru4G/DFjVn vty3rtUPu5n6XUeFrrgRMCUTGt7BstLmKPLKW8APPo2/guW9DYFoDt8/PSG7ulVOOFQDwsge/Ua wkHEnTkDYciBgQdktbYJS6aPgMQ8ZIOLGiDMdyHd/uHq+P1gZxyr3EqyIshsKbeO5ihvBafrWGg ny43CKuYekZndVULPKCywMeKtanYqSN+LuLiw3cug30WDniJu8KV4PGezHcRX8gmrMlPxLBL+mK iTK5M4d3L2B6Ukj9Qks7xLAb65uIFXg7wsdLaaN9BMcLHX+hrYrleMeXq79nJDZrZN+xILi7dRD gqtij97pQiigUwTYpPWssMkYEE4oU3f1jY15An7aVu/nDp339Jtincc8jfHE9XL383n32N5ouO+ e46itjTLcysN0RjEJ8zKsVcQZNF0RdZ03TYRRF0jluWBDJ23MK2djcfwSjGncWxQSEOjIt6Us9n w6aaHlcpHT6mVyg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849278756154100 Returning NULL without setting an error is odd. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc.c b/ui/vnc.c index c26b581f3ef..6f9cc3f25a3 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3430,6 +3430,7 @@ VncDisplay *vnc_display_new(const char *id, Error **e= rrp) VncDisplay *vd; =20 if (vnc_display_find(id) !=3D NULL) { + error_setg(errp, "Display '%s' already exists", id); return NULL; } vd =3D g_malloc0(sizeof(*vd)); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849182; cv=none; d=zohomail.com; s=zohoarc; b=ilRt28tPDCbO45JijrGOoDbe7m3WI6H7IEGM7KNYeXdrvCQBg8AQUhw2D3YbbyCo93zF+mfKNY31vASiEkgD0DWkuPoquPFjkTE1jZfUuQ0iyZPfN8wfsDenFnj9ESdc+Ob9fzoYBt5JpC84hLzub/pBEb7V0rfXjdJ9knYJcEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849182; 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=LbD5bApnct5r2F5XxoCnsfV4wmuuaWmgTLO38u520H0=; b=E2EKDceeIoaJUXqc1k34V+8p352lmjMUY78iQUAlC36ui0wJd3vPTT59vZ2qQHC4z5+S6k+vyDBWWzzmI0OgSdOTkquqtc6OC/H57aZLdGTgWraKPGzkGF+ZF6csD2d1ELZxpZKe1OzT5rjsaUfu8jzGvge1L++65on11nXXJ2g= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849182026471.626264085985; Fri, 10 Apr 2026 12:26:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSX-0006a6-CJ; Fri, 10 Apr 2026 15:24:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSV-0006ZT-QA for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSU-0002Eu-Dc for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:03 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-466-Fv05_hy9OEqxnFVwybAWCg-1; Fri, 10 Apr 2026 15:24:00 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 974AC19560A6 for ; Fri, 10 Apr 2026 19:23:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5A06B180049F; Fri, 10 Apr 2026 19:23:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849041; 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=LbD5bApnct5r2F5XxoCnsfV4wmuuaWmgTLO38u520H0=; b=SdkzQGBkayKSl/+IbkdRgVk8G/ZLpgWKiT+U4CW8d5SOF88/arwn/znH55WyeA83HbDoz6 CtN3L0UIMS0CwOJDuON7C/6LYRtgG95TZE/dYlIfBTcPrX8G9yYzV/2kVTvCGbmeeT5gtd vLsgJ2cWGyevhZCgUrVkCK7OdkiMfFk= X-MC-Unique: Fv05_hy9OEqxnFVwybAWCg-1 X-Mimecast-MFC-AGG-ID: Fv05_hy9OEqxnFVwybAWCg_1775849039 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:13 +0400 Subject: [PATCH v2 51/67] ui/vnc: defer listener registration until the console is known MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-51-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1763; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=D0sNYAf7b7syfLNSN9v3FM+l0V9XmMPf8r84aEh9Pq0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0Whx5b0xAqA9vG6lhmn/9pHsODDfRH5jyEU 0tauD5hpfKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5T5dEAC0+nSDBe/NpO+wVW/F2rXuXEruYD0CDfCmrkNc2cZf9VMdZT//3zCr9YxTFX/kyhJ6Am+ aE7MJB5lJzLbVtMTx2Ns9++34xiWCg4P4bd34cNKFuvo88bomyj2b/lFBRkxoNEJSG3vdmhyLRe WzJ1LktgFNt+hlNxrz42U0vmAroBNlTJPy24ecvOFmYE3RkFiR2Oj28WmS/aycWPc7LK+7a6jN4 LAmI4C6VPFnc4PkPokSyTsj/xffMJa9PpUSouVAIuPREPVXECcWp3QxSsQpTERgmYDo9xlFIETB 5+ZQimyhN4BnqFzjrA4MbADNnTEEjhi1NZmshCo0C1+bBt80yg20+W0XlAr+QX+fq5XLtHL8gJH tZHTXUV8uh0GekTbcoRYy+mFTZh89ZIq7aEkfMX5nppFZrq9hFSS7vA3OP3/VxVB1SSMUSGCy6k wllLvw0AfNkNr3t1vKCRQU7n33x3dQPbb1iBUiS3EOmqfW0kV4fkR55pJto1arW4TWimHNoiIrD JzyFeYhndn3jPgNEjzaKcah3sg20jzZOy0URV6KfrLOBGycAlkEENSC7dz3XKclL+Wt0T2gYaJJ Xraw7LMqhjzlohUNEzHD+ix/N4zUOsAWFb+xqIGCND57ZcDwY48MZyDzKUTbtS/NYbV94A0F2lD /MriBDqmKhsn48Q== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849183265154100 Previously, the display change listener was registered early in vnc_display_new() without a console, requiring vnc_display_open() to conditionally unregister and re-register it when the actual console was resolved. Since vnc_display_new() and vnc_display_open() were merged in the previous commit, simply delay the registration and keyboard state initialization to vnc_display_open(), after the console has been looked up. This removes the conditional re-registration and simplifies the code. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 6f9cc3f25a3..747b1c44e36 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3460,8 +3460,6 @@ VncDisplay *vnc_display_new(const char *id, Error **e= rrp) =20 vnc_start_worker_thread(vd); =20 - register_displaychangelistener(&vd->dcl); - vd->kbd =3D qkbd_state_init(vd->dcl.con); vd->vmstate_handler_entry =3D qemu_add_vm_change_state_handler( &vmstate_change_handler, vd); =20 @@ -4269,13 +4267,9 @@ static bool vnc_display_open(VncDisplay *vd, Error *= *errp) con =3D qemu_console_lookup_default(); } =20 - if (con !=3D vd->dcl.con) { - qkbd_state_free(vd->kbd); - unregister_displaychangelistener(&vd->dcl); - vd->dcl.con =3D con; - register_displaychangelistener(&vd->dcl); - vd->kbd =3D qkbd_state_init(vd->dcl.con); - } + vd->dcl.con =3D con; + register_displaychangelistener(&vd->dcl); + vd->kbd =3D qkbd_state_init(vd->dcl.con); qkbd_state_set_delay(vd->kbd, key_delay_ms); =20 if (saddr_list =3D=3D NULL) { --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849192; cv=none; d=zohomail.com; s=zohoarc; b=LIA1kaCDVZDIniAC1T9YwFp+SJZXVjNCtEZfXcuak+yxR7SHX0JSwBPzhLEDY93NYvcBmdaOpPO2ZWfmk81ovcRhqa2PP/RiIP67HaxFnhxW5vovBmbNcwPXqhhplze4K3XUayDbxa2cnGJUBoKtp7fA8T4Z2/8OVqKzvqkgji0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849192; 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=o5EA9qSQCNA47jzrSjzbVaC3/g32Fx5iKVDCU8M/Wzw=; b=QdcdGWpKHsHcYHp/hiX1RsAFGYYJciqfiCeks/DrK+2GWAvRB9ViM/Vj+63EIWY3g6lDL2HKy3C5uJtMrw+uLGnYfwYbGxgdU2PLsSg/+melVdAm8kSUsMfkN1zY5nDq2NjcVDFgH5Hwdu5ndb52IziPJC8pgUuKgZzWJvcdkLs= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17758491923032.876297400127328; Fri, 10 Apr 2026 12:26:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSd-0006gM-UV; Fri, 10 Apr 2026 15:24:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSc-0006aF-53 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSa-0002IX-0o for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:09 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-6tXDd8LzPZSsak-KGNla7w-1; Fri, 10 Apr 2026 15:24:06 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57FA0195608F for ; Fri, 10 Apr 2026 19:24:05 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 324A319560AB; Fri, 10 Apr 2026 19:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849047; 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=o5EA9qSQCNA47jzrSjzbVaC3/g32Fx5iKVDCU8M/Wzw=; b=BeAbsDFBSn95Oa7Ckc0w7FCSfInAd8rZUcn/ydWxWVqJK/z4RxeTX/CQM/sCnlGHm7+V2E dVdx1Va9nEraEHvIUl0vOFPHH/NcTdE5ouiT3wGRQ2UnPJVkbZIwVXRBHu+MousyGYl8Qr epcSalaFOsxSFoazkptwMIuAu+SCZaM= X-MC-Unique: 6tXDd8LzPZSsak-KGNla7w-1 X-Mimecast-MFC-AGG-ID: 6tXDd8LzPZSsak-KGNla7w_1775849045 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:14 +0400 Subject: [PATCH v2 52/67] ui/vnc: expose vnc_disconnect_start() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-52-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1370; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=VgRiT+iClPrrXXrZKR4eliNBjks4fxV4ogsV96pOHUU=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WCLUZEYmMmLgvaJ+Kbro3dICK3oMCxRlof 4U48ZpvyiGJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5eG7EACEpozKLq7w7nWx2xKsy1WHcqogL93ik7w7BdkJCSiGYIWny7mdjNlwmS4uIUSsubb+VMm DO2XcW8e/tJTEqFJOGZvHUM3yFgLn90IeMxZUpbUQ3sPDnaDHDq9XHmmcaK+9bxDQU+PHuXWWYc ztXE7HZM/2+ZhsrpSINoYf3F3/sbDJdSR1186ZecvTOjmthFUwekVt+4ulfF1Gv2bm43KDG4XEJ /ibtTd1UCgZmDn1Gf7PYS1tN7XmhUTy0LJLTjcSNksCUbd5u9t+VoSEg12QZDHBfczSlAiUelnX kcnPnTT9wZK1rI+OWNk2mhhcHYDoC4ivR26DBXZ1TKtniAUkHkD4QRf+vwTDbrRo7qgnWrnXcQr ZTpmAkJ5jJt0mOmad4MMloYDF3Ot/rI8w3+qemKiqgvDc3lp9+oZuz2ejGFga71XRfzXcaqbasL MkIFSuVCRBp5kgWQ2dJwYlhseHiUjMbKammo4NKq89sz7gEQsqOZ/vCODbu++rrOjRLgV5z8MoI Qbahf7DBF337t6JjoEKhzDVUd8R7yBP3hnhNKGuJ6L6XPz9S6sUxyvDWtePLdHp34JfBdzUbiui wSyYstigOra1K8zveUWm5n2W2Ogp2QHGHVTk2qJA6WWB5rKKbVTmar9Fe2ix8nZgdTFxOTKAl1m 6TYVvrO3FnDycdQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849192938158500 This allows VncDisplay users to tear down all clients before freeing the VncDisplay for example. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.h | 1 + ui/vnc.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index de41517be48..794341265b3 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -560,6 +560,7 @@ void vnc_display_free(VncDisplay *vd); *************************************************************************= ****/ =20 /* Event loop functions */ +void vnc_disconnect_start(VncState *vs); gboolean vnc_client_io(QIOChannel *ioc, GIOCondition condition, void *opaque); diff --git a/ui/vnc.c b/ui/vnc.c index 747b1c44e36..6fef80e98c4 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -617,7 +617,6 @@ bool vnc_display_reload_certs(const char *id, Error **e= rrp) */ =20 static int vnc_update_client(VncState *vs, int has_dirty); -static void vnc_disconnect_start(VncState *vs); =20 static void vnc_colordepth(VncState *vs); static void framebuffer_update_request(VncState *vs, int incremental, @@ -1296,7 +1295,7 @@ static void audio_del(VncState *vs) } } =20 -static void vnc_disconnect_start(VncState *vs) +void vnc_disconnect_start(VncState *vs) { if (vs->disconnecting) { return; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849117; cv=none; d=zohomail.com; s=zohoarc; b=DPjA4MW+n3Nin/GZr2OnIwt3owGJ1GuUSmQvdgrzwsTK5pYtHldV1Q6T9uAWFjWGcTUCHJx0mMqJytbMlt8HxIeL8ceQZZUdk1Qrgoa2RpmzurXnPwe8b2JDwPbyxlyQXIj3cvSGBwYDAwQYPiIFGqZSXwPd9u2NHn5K95gLjms= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849117; 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=vpll6YX+O+2Ns3q47yqepmDMW6ivubkbADkky21Sx8Y=; b=Q7q2GDpVEQMhNXuMwWUqrzZpH2Aiee89dNVeQzLIKZwMTgvNRVJjb5aeqCJTGlRFgNcenq7G0/1zBCsSz7sPYCt1xNbzXqhWXrKF1Lw9MOanrShyges7IOWEp4SEfkrwEtvegQ2ZSTHpkj98ctSgpCMULR026WMqQtPEutNcW0M= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849117953362.9133492664952; Fri, 10 Apr 2026 12:25:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSk-0006oa-PI; Fri, 10 Apr 2026 15:24:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSi-0006o5-PM for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSg-0002LX-7k for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:16 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-197-4DV-SAq9OfmPcUsYZt-iFw-1; Fri, 10 Apr 2026 15:24:12 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 740FD19560AA for ; Fri, 10 Apr 2026 19:24:10 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 56E121800357; Fri, 10 Apr 2026 19:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849053; 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=vpll6YX+O+2Ns3q47yqepmDMW6ivubkbADkky21Sx8Y=; b=i2wy4NBFTtw3rOHBMHJSDnjKmhagAXWeBvQKGHzpt/esP2fxZrhqiqF7XtBylqQ0aCT1Pk BV6osB3Fcinfypx2ps1axuoZQtlnyLL/Htmv7f2BMJt1gW24xWJ4gAtXsKilHEqsRwTmqd E4+vrfkrTqJvoE65DRZPDVg1SuBu93k= X-MC-Unique: 4DV-SAq9OfmPcUsYZt-iFw-1 X-Mimecast-MFC-AGG-ID: 4DV-SAq9OfmPcUsYZt-iFw_1775849050 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:15 +0400 Subject: [PATCH v2 53/67] ui/vnc: remove left-over dead code MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-53-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1077; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=CqHLiX8tGa6Hx6kmExwugSms02HGkuRScDrfwgow37M=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WqDRv0gPu6MpPVpnIxCrJsCnGRhCgr5KZj WJDiWUefXKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5cj7D/0WEpZ7YbKdUdieoIzmiphxic55Bb4GtFZXjf35GLXdtjEGW/tkP/q8saTvdb3D6Nik+fi 1nhu5PjY/R2kgasGPTEWw8eOd2tnVr220th6acGdsYMk+O7DQXxiHScZVtyO6yHit805A1REWHt 5/U+E4/WIfDoYBjSQieRqV2aTXM1CUNeilASkySJkn/3j8V45BuldgTF1qQecUgfX5/iKOelTL3 d9A8yNoXLdu5DI9f/I0bOnpwoJZDtz/MVgem0zb2yN/Zw+yrv7U8DNsPiWhjIW8/Wutwlf3LGvo LUxHGGPaF7HqlCVZOpWKm+i8SenXfyTD9KLuSpyGAW7UonlYV7QE5bbmF7fu7hDQt6lX+lfyoRK 6wRP71gh5B+K8rIKR9/2AmPrvscF3DST3u87ls7WOXiZttqyhBdSf42WWFI2m7yAn1pIYb8ZGMF rK9pZCHAlBJQKS9Xse3o3DuBUeeUIrydKdTh3iKQcldIswCjaE93lT1SndzV2jDivC9zmVwhzRV iXzyUmnfHAckbMZt52ORc/GBehJGeolfsUJoyt91h1Cyi9XTPn2UvSqnQAxdHBrGIMpTY7zMX1B dbB/+3ZLhzvly3d+U1fcTAea3w4c4UoP7PGjY+TsB95TphY0+5PebqWIH0vEAYNp6XJZLYtl26R AcgiXY+CLGcHUiQ== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849120384154100 Since commit 5994dcb8d85 ("ui, monitor: remove deprecated VNC ACL option and HMP commands"), this field is no longer used. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.h | 1 - ui/vnc.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index 794341265b3..993ec022e52 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -180,7 +180,6 @@ struct VncDisplay bool non_adaptive; bool power_control; QCryptoTLSCreds *tlscreds; - QAuthZ *tlsauthz; char *tlsauthzid; #ifdef CONFIG_VNC_SASL VncDisplaySASL sasl; diff --git a/ui/vnc.c b/ui/vnc.c index 6fef80e98c4..e7ec1fb7f68 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3493,10 +3493,6 @@ static void vnc_display_close(VncDisplay *vd) object_unref(OBJECT(vd->tlscreds)); vd->tlscreds =3D NULL; } - if (vd->tlsauthz) { - object_unparent(OBJECT(vd->tlsauthz)); - vd->tlsauthz =3D NULL; - } g_free(vd->tlsauthzid); vd->tlsauthzid =3D NULL; if (vd->lock_key_sync) { --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849158; cv=none; d=zohomail.com; s=zohoarc; b=HNxRL6qehTawwL/ZmpzEuLvylEL/vfzvDMa/P+Mb8wy5fJQjcFhdlorZEPUJndh7n5DuzhwdZsOuvODBmneLbader+BZn/Kx6bJdcBL6groGxEainZByLf8f4/Mjv5P38/zZKJkXf9uk5pAQ5Fp/293UKmgI+5Ujnw4FsXnq8Dg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849158; 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=VRac4VsnhUlD+5I0NK4u+UI3esemYH7JrrjW3B6N/Ok=; b=kMQa/3l2K12S5ho/I4Lc7X6UQVW19unCDBhz7Z/S1eDq77NQegrvT0B2cqIsNGG+4YC1KvNFHJuU1VnXGJRJlhe/+czEa2uGm3PKaa0u4hObkigejHrBtU8zfhVOm9YFU9B7kn49bxyHZa5fFcYplhALMg3wHpnkmRCuU0Fdmj0= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584915850880.26754241397146; Fri, 10 Apr 2026 12:25:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHSx-0006sP-Vw; Fri, 10 Apr 2026 15:24:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSv-0006s1-GV for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSo-0002RR-Iv for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:27 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-630-t1MSi0m-OoesXrjvIF383Q-1; Fri, 10 Apr 2026 15:24:18 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 318B9180028A; Fri, 10 Apr 2026 19:24:17 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1F5981801ACE; Fri, 10 Apr 2026 19:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849061; 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=VRac4VsnhUlD+5I0NK4u+UI3esemYH7JrrjW3B6N/Ok=; b=Zt+8YRc6uSYOG7Zr90hhS44+XEfEahrJKwIb8hneEKMOhD9kV534N8dES52q8ZlsuZhna+ nwFvGIKyGESyoTVe+ClLyQoW6hrvwmCMSbzuISTiAIAnLkodroRurAitdp7H3ZczmKI3so x7LiLEUUPc9YtVfSo0eR5XVJaUiJHjM= X-MC-Unique: t1MSi0m-OoesXrjvIF383Q-1 X-Mimecast-MFC-AGG-ID: t1MSi0m-OoesXrjvIF383Q_1775849057 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:16 +0400 Subject: [PATCH v2 54/67] ui/vnc: explicitly link with png MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-54-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=752; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=5EvFrXsyIL9bniRqjisfoYZC0LOuQx9Lg1DZWm9dBh4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WTE+2fLX6zq97fcz3Qo+eDKlae6DqB7+4t chxBnOh3xeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5ZcBD/wJdrsHcK5la6qbsvXOMD6o4RSJvVFICMTsn6HnnhWujdCEqwFhbhc3zllsSW8zxZXbPKE j3XtC2xYJiLRCOuKLq0RQWya1U424vnXzY3aBkwpPPu1fFnp6TitSxnBwXF3Y1DrencAneiLs8Y WbKBSbrucjA8dxjxc/qgMRkQpuIpBGJSyJG0Z/GM6UQM//ERS5IuXcxllyX0feqWIY6CRRe0Q/b gnVynrNw9/Q1f2UFVku0OlNMew7o1Gh1C3Ijskg0Xxz2xAyypWB0rD/1Ciy/pIJ3opRojzQiz6g Dag0Qoxn3xTPpJ6rfV62/xNKWIygJN27Xu6/P9ruKtuVnhGGhVqbuXvEJG/d9cGqXlLJvEBudqu wSg7QxlddXgEtQnJr8RUhaCR8xZ64ctKlm9jmDN6piLx3zt1+ywIvXFDrzYiZZCEK+C8MzEQ6Co ePuS/FyuhVevP47MiCO1s2rxPl4oNnYieSjVe5jiWBAF+e1APzGrwQW8f8wkghyALlysH4Xm1+2 IDPJC3GsmA26zyaAYOtKGY1wbcj3CRFQR4A2Un7EuSdviKBtfNsf7yU0uhetm/eOZiiHrkMak3m L+KO4IqW6SYkXMcg+UzwhRMK3PauPh8lxoerwMg8FT20BHOV467tMDD18zgjD+4hwiRTbIESVEh fYVBcN4GPnwpZEg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849161036154100 The VNC code uses PNG directly. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/meson.build b/ui/meson.build index bae6ea0d2dc..b31ddf96282 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -45,7 +45,7 @@ vnc_ss.add(files( 'vnc-jobs.c', 'vnc-clipboard.c', )) -vnc_ss.add(zlib, jpeg) +vnc_ss.add(zlib, jpeg, png) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) system_ss.add_all(when: [vnc, pixman], if_true: vnc_ss) system_ss.add(when: vnc, if_false: files('vnc-stubs.c')) --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849173; cv=none; d=zohomail.com; s=zohoarc; b=jEz3PvviNuFFAR/txD2KpO47fniqpVGBR0JjJCHDGQGoKBKapizxtGxpAaYaDzL2p+RuSjIHMaWAImkoGoFIpdTtXUxwynuoDfXJOFU52YerHKAEzeCMQurTj/SLNrt+UL+6GbB/1xpAYuLdb58cxNSSbyR2T2n2sBIe9QM3d9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849173; 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=DbWS1U6sGNFtZ0AKwcuYyB+KC1yy2Hf37j/hRn33Qzw=; b=KGudGnYOgUWLyFbmvfGh+rm6TVZfcgeI7iiY8Q+0Y1Ef9y9et0Jvnd3yIz60ceIQe9p03GInhSU1FFOO1GfK4TMmqaq6uBSavhNxe7yvdsQvADGF2IBU31BgpH9swqFBxX094vi/rf1wG2oR/0ujBI+o0b/kMJPhVB4gLQnOmo8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849173974287.60465358473016; Fri, 10 Apr 2026 12:26:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHT5-0006sc-Cu; Fri, 10 Apr 2026 15:24:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHT1-0006sT-71 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHSs-0002TJ-4S for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:31 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-346-7wgy3TLkO4-KnhbUPmoWcg-1; Fri, 10 Apr 2026 15:24:24 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 80D681956054 for ; Fri, 10 Apr 2026 19:24:23 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4FE7C195608E; Fri, 10 Apr 2026 19:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849065; 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=DbWS1U6sGNFtZ0AKwcuYyB+KC1yy2Hf37j/hRn33Qzw=; b=RDKgXH8Zx5ncQSXKLu9OTPTNlK2oANy7cdijQZaHamL5XKcgMPCKszHtdlKE1JMzWez+UM fcG2GkZ+jU036Hhe7L1C6zq0P+XfuNbZfg6+Cc0oAAic9ZZsC5u7kY56T1sNkA640gfSqA boW+tr+69wcXhR+PNHOip04+ncb1I1M= X-MC-Unique: 7wgy3TLkO4-KnhbUPmoWcg-1 X-Mimecast-MFC-AGG-ID: 7wgy3TLkO4-KnhbUPmoWcg_1775849063 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:17 +0400 Subject: [PATCH v2 55/67] ui/vnc: add vnc-system unit, to allow different implementations MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-55-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2652; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=lv2qIJXAuZ9UVUHeJZVKwIcM+k9S1qb2iody8sOCzmk=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WLIXZcC6sj0ZWvuB1ugWOMFJnhVEJU0lUE +MOjyM4BS2JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5S6IEACOMjCLdYq3xK7edzhJeK6RR7MrATZC2d8gcKk/nVJRot4AEegVjV37wom2VlI7A0M6L7g oFYOhl9MoC58GMslrRJdDBMgBu2T9IiYD1x5rHTmHEVGM/9Pe/CI6Cp62Jj++nIJvzYCS1cUnGo 1a+WnNCOKfzgAPnNfPZhiuOIQOVG9HKpwfSR5dkaGvI4jRa8ADWenWbu4o9uBaLwQPg1QSihih4 XJyqAAAdHl2Uc2rtddUACzLIeXIfUkNUz4xOInPWHD60jE6BVAWRZm80F/Qn4lXFSB81oQB4RpQ 8L61vQm6Ezi1FIluqZWoc42wSF+ZGznrEaaQEkXxHgXM4Xu/bOEcxiKC6GFhUIjqW2+yUe9kANb 1UybYeT2b0KZaQXSyKuzdDU4XWGZUA8r5eU3trWkAJzhcC4hnJUZLruZ0Mb+lbwv09fvVs5E2X7 2SgH85pY3///SPxhNfcmQffHUzwQ4WKWneqlze+kjMIleHAl8IMBbWH4/UKZi/GK52aWrF/VCJi VCQG7reehPZBc8Lt/X8AtPSFsN5xEgu80xHMb4xaoQAv05URYxEBQeNm2NFtIk7rk1HkhKDZnxX 9C5WSjzf2PFqaAmNZCRC4s29vGH5zUv5nWI1LuTwrKgmnt4DlcYcKPag54h4OPda97LFFYKS+kT exbslvLGaedmrww== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849175332154100 The qemu-vnc server will want to signal the XVP requests, let it have its own implementation. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.h | 4 ++++ ui/vnc-system.c | 19 +++++++++++++++++++ ui/vnc.c | 4 ++-- ui/meson.build | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index 993ec022e52..7341fb0f25c 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -649,4 +649,8 @@ void vnc_server_cut_text_caps(VncState *vs); void vnc_client_cut_text(VncState *vs, size_t len, uint8_t *text); void vnc_client_cut_text_ext(VncState *vs, int32_t len, uint32_t flags, ui= nt8_t *data); =20 +/* XVP events */ +void vnc_action_shutdown(VncState *vs); +void vnc_action_reset(VncState *vs); + #endif /* QEMU_VNC_H */ diff --git a/ui/vnc-system.c b/ui/vnc-system.c new file mode 100644 index 00000000000..0632885f655 --- /dev/null +++ b/ui/vnc-system.c @@ -0,0 +1,19 @@ +/* + * QEMU VNC display driver + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include "qemu/osdep.h" + +#include "ui/vnc.h" +#include "system/runstate.h" + +void vnc_action_shutdown(VncState *vs) +{ + qemu_system_powerdown_request(); +} + +void vnc_action_reset(VncState *vs) +{ + qemu_system_reset_request(SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET); +} diff --git a/ui/vnc.c b/ui/vnc.c index e7ec1fb7f68..5dd1eb399cc 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2521,13 +2521,13 @@ static int protocol_client_msg(VncState *vs, uint8_= t *data, size_t len) =20 switch (action) { case VNC_XVP_ACTION_SHUTDOWN: - qemu_system_powerdown_request(); + vnc_action_shutdown(vs); break; case VNC_XVP_ACTION_REBOOT: send_xvp_message(vs, VNC_XVP_CODE_FAIL); break; case VNC_XVP_ACTION_RESET: - qemu_system_reset_request(SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_R= ESET); + vnc_action_reset(vs); break; default: send_xvp_message(vs, VNC_XVP_CODE_FAIL); diff --git a/ui/meson.build b/ui/meson.build index b31ddf96282..f959f8972b5 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -48,7 +48,7 @@ vnc_ss.add(files( vnc_ss.add(zlib, jpeg, png) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) system_ss.add_all(when: [vnc, pixman], if_true: vnc_ss) -system_ss.add(when: vnc, if_false: files('vnc-stubs.c')) +system_ss.add(when: vnc, if_true: files('vnc-system.c'), if_false: files('= vnc-stubs.c')) =20 ui_modules =3D {} =20 --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849271; cv=none; d=zohomail.com; s=zohoarc; b=HXGFNMxlzHUzK9qzqK0+pVwEJ1V25sKbiYc4Hrwv6GbGu1TBHTTeckY2+yQ/G8esNSKK4huInpcnLQMOEkrs0FH75r4ZHim+HnpSpsKJlbybM8v5MYwB4h3UZqqldbcM7C0Sl3bgvRMEQYE2LLaN0NZW+jwSPuQ7iKqosJAbfnI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849271; 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=47nHfE6Dd9pBt6quFAl/2E1llNWDswiln4ygrouj+gg=; b=UeIkY/gYHePUHPn4ToiJV8Pb9flTi4QSfx11ZS6knBk5+TfbASMyc7j5yszWU7Znf/8huj61FsbVv34NXfq3zisDoIQfIfx56cwTxKn1WP09hxplGX16Ka48399M64l1IYr9WaM5nFhQDYOq7NafFIgkXc/uWDgxwl13Za9dOL8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849271108287.45831830348425; Fri, 10 Apr 2026 12:27:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTD-0006wa-5e; Fri, 10 Apr 2026 15:24:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHT9-0006uw-BC for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHT3-0002Wq-01 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:41 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-102-_D5yo8MAN4e06JH3MR72uA-1; Fri, 10 Apr 2026 15:24:30 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9154C1956054 for ; Fri, 10 Apr 2026 19:24:29 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3A5EF1800B7F; Fri, 10 Apr 2026 19:24:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849071; 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=47nHfE6Dd9pBt6quFAl/2E1llNWDswiln4ygrouj+gg=; b=ZOoaJZMB9Th8UqsDkQW2qLc/oXA2Pnq0ly2VA0Pyaj/dGbgNVab997JyJHU31WgSYZh5aU L7eW0Z7f9KHtpIIJd7gnbY4LbT/uI//Oy3wlFmBier1GSugvaLqRGZnNSmvb8k3RbbzfKX AD77fyFcNcmoYrftHbXuS/U14/7Zeyo= X-MC-Unique: _D5yo8MAN4e06JH3MR72uA-1 X-Mimecast-MFC-AGG-ID: _D5yo8MAN4e06JH3MR72uA_1775849069 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:18 +0400 Subject: [PATCH v2 56/67] ui/console: remove qemu_console_is_visible() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-56-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=4788; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=bhOtDgVb1DVTenfIM+HhCL9wwiQsu901e9ovryHDGss=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WKugkNcO1CV/g75fF1+WLsZe8xJrL04bPc 3TW1FYBHCKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5ZBqEACBp2I4fJr0Qhn8DKAjRPEF/BAumW7Q4SwO5Tmt8ZEmq2MbsjoiE9QfaVQXnFY80j4MhZi 2ltqmjQPzOnSmywsNqEKaeL3FNu6qtzvc8t1ncQXsTe65zzp5D30632OmBlO+sSPOKT/ml8gj5H K+2UAWim4XG4lVR7hHHfklj3hNN07q9zW1lv6gT6x21wdnWT9v4Zwwi6XsFD5KzAcTuOLbqBKDR sa1mur0jLsL5hnXvzSBqzNKJKundjvECeHXP2Zs3KDJK8ShjiOnXsFiB8ZTNZT7vPBd6RAgGUYY BcJnoyM8XjEpWs2V8d0yAzgvisJ1fmiBN4cKLRsQjzo7qAFWc0kc0OvHD1Wz1XqPwPYDT86Au3G Qv2tSTGq6TCW4pj+q8vkrcJYB6imoZ8F7KV1E9l0eBbIHhgE1ZqDORC3Mb5SftVZq5UBBclATXP seJ572Im2LkYkqwM/Jc7pc5ULChjB4K7NbJJUAJj6ytU81vWVDBp+DMoRIrxN5sQXfCrRHlhr2A IQQEuLWTNATtxdWGyjigoYGBGj83ETKqexgediHspoznTUo5AWbhUuAl4GyrtIA3jQuWKCSQbvd hUQdvW+pDdtUIaQ5Siom2iZt2ukDJJABfKTYFrW+OZLrsAmWrjd5ApAHV5pF3Ml/sJSskdDp89q NH9jYmcKFtw4H3g== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849272624154100 Drop the bookkeeping, we can simply afford an empty "foreach". Notice that dpy_gfx_update_texture() is now called even when there are no listeners. This is more correct, as the texture is not fully refreshed when a listener connects, so it may be outdated/garbaged. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 1 - ui/console-priv.h | 1 - ui/console.c | 29 ----------------------------- 3 files changed, 31 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index b3aaf3ff12b..472c188a727 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -392,7 +392,6 @@ QemuConsole *qemu_console_lookup_by_device(DeviceState = *dev, uint32_t head); QemuConsole *qemu_console_lookup_by_device_name(const char *device_id, uint32_t head, Error **err= p); QEMUCursor *qemu_console_get_cursor(QemuConsole *con); -bool qemu_console_is_visible(QemuConsole *con); bool qemu_console_is_graphic(QemuConsole *con); bool qemu_console_is_fixedsize(QemuConsole *con); bool qemu_console_is_gl_blocked(QemuConsole *con); diff --git a/ui/console-priv.h b/ui/console-priv.h index f8855753e30..4f731b4f9ce 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -16,7 +16,6 @@ struct QemuConsole { DisplayState *ds; DisplaySurface *surface; DisplayScanout scanout; - int dcls; DisplayGLCtx *gl; int gl_block; QEMUTimer *gl_unblock_timer; diff --git a/ui/console.c b/ui/console.c index a9132e09eac..baffdeb22b1 100644 --- a/ui/console.c +++ b/ui/console.c @@ -650,9 +650,6 @@ void register_displaychangelistener(DisplayChangeListen= er *dcl) dcl->ds =3D get_alloc_displaystate(); QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next); gui_setup_refresh(dcl->ds); - if (dcl->con) { - dcl->con->dcls++; - } displaychangelistener_display_console(dcl, &error_fatal); if (QEMU_IS_GRAPHIC_CONSOLE(dcl->con)) { dcl_set_graphic_cursor(dcl, QEMU_GRAPHIC_CONSOLE(dcl->con)); @@ -680,9 +677,6 @@ void unregister_displaychangelistener(DisplayChangeList= ener *dcl) if (!ds) { return; } - if (dcl->con) { - dcl->con->dcls--; - } QLIST_REMOVE(dcl, next); dcl->ds =3D NULL; gui_setup_refresh(ds); @@ -747,9 +741,6 @@ void dpy_gfx_update(QemuConsole *con, int x, int y, int= w, int h) w =3D MIN(w, width - x); h =3D MIN(h, height - y); =20 - if (!qemu_console_is_visible(con)) { - return; - } dpy_gfx_update_texture(con, con->surface, x, y, w, h); QLIST_FOREACH(dcl, &s->listeners, next) { if (con !=3D dcl->con) { @@ -848,9 +839,6 @@ void dpy_text_cursor(QemuConsole *con, int x, int y) DisplayState *s =3D con->ds; DisplayChangeListener *dcl; =20 - if (!qemu_console_is_visible(con)) { - return; - } QLIST_FOREACH(dcl, &s->listeners, next) { if (con !=3D dcl->con) { continue; @@ -866,9 +854,6 @@ void dpy_text_update(QemuConsole *con, int x, int y, in= t w, int h) DisplayState *s =3D con->ds; DisplayChangeListener *dcl; =20 - if (!qemu_console_is_visible(con)) { - return; - } QLIST_FOREACH(dcl, &s->listeners, next) { if (con !=3D dcl->con) { continue; @@ -884,9 +869,6 @@ void dpy_text_resize(QemuConsole *con, int w, int h) DisplayState *s =3D con->ds; DisplayChangeListener *dcl; =20 - if (!qemu_console_is_visible(con)) { - return; - } QLIST_FOREACH(dcl, &s->listeners, next) { if (con !=3D dcl->con) { continue; @@ -906,9 +888,6 @@ void dpy_mouse_set(QemuConsole *c, int x, int y, bool o= n) con->cursor_x =3D x; con->cursor_y =3D y; con->cursor_on =3D on; - if (!qemu_console_is_visible(c)) { - return; - } QLIST_FOREACH(dcl, &s->listeners, next) { if (c !=3D dcl->con) { continue; @@ -927,9 +906,6 @@ void dpy_cursor_define(QemuConsole *c, QEMUCursor *curs= or) =20 cursor_unref(con->cursor); con->cursor =3D cursor_ref(cursor); - if (!qemu_console_is_visible(c)) { - return; - } QLIST_FOREACH(dcl, &s->listeners, next) { if (c !=3D dcl->con) { continue; @@ -1287,11 +1263,6 @@ QEMUCursor *qemu_console_get_cursor(QemuConsole *con) return QEMU_IS_GRAPHIC_CONSOLE(con) ? QEMU_GRAPHIC_CONSOLE(con)->curso= r : NULL; } =20 -bool qemu_console_is_visible(QemuConsole *con) -{ - return con->dcls > 0; -} - bool qemu_console_is_graphic(QemuConsole *con) { return con && QEMU_IS_GRAPHIC_CONSOLE(con); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849261; cv=none; d=zohomail.com; s=zohoarc; b=GsAvl4JINh24bvvtVqAb+3Hw5AeMB9iC78GEWQ3BSOwhabKCUMi3b5w1KaNWbUzsiDiBtrxEBOd+omPDYX7TOTBjpiBSVMJxs1CfRJDnUojwC6awEGOopeTdPCAdEkLvztyC5ZOoLAWZVRXQ1/WKUjjZOdBJfsORh58lJy9pXYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849261; 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=B5gxCmewHIz/X+2RiST7nfGCnkT2jOycpEpFMMmqnGg=; b=E1xwbwCIqeW5bv+Q+jgZGAYSbTVmhl3kpsREBDomU/7IvpfuOwutrcrfUir+IJoI5UX4ZKkbT6SiUbzD0g0PPY8n/21jsbEhSKb3JkybWTYwdvy3BXEyo/5CGAuqDwYeMlB/Vxv9AiF4OoN9/OSQoS+1okywtnzctDMh3uDWgHM= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849261794225.21153763569362; Fri, 10 Apr 2026 12:27:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTH-0006xt-9x; Fri, 10 Apr 2026 15:24:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTF-0006xF-Rw for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHT8-0002bS-U4 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:49 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-dRfPzBuvPjyiAYPFs3ae2g-1; Fri, 10 Apr 2026 15:24:36 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9B60A1800345; Fri, 10 Apr 2026 19:24:35 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 06B1719560AB; Fri, 10 Apr 2026 19:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849077; 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=B5gxCmewHIz/X+2RiST7nfGCnkT2jOycpEpFMMmqnGg=; b=Dm9It/cY1/Q2F5JXPi1YXykYjrqlTrp53qjoFyggldfaV31veSg+fvP+/T272YSKuno+2v W3ncXc85J6R5BIN+uGLhtSVf2Tcrbw/ruUrLTpS0tJlE0SUlAo0bV5LzGG2jqacO7jBn3N SPzYGpusqG4oGaD17wY7+LnR+tYkhZ8= X-MC-Unique: dRfPzBuvPjyiAYPFs3ae2g-1 X-Mimecast-MFC-AGG-ID: dRfPzBuvPjyiAYPFs3ae2g_1775849075 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:19 +0400 Subject: [PATCH v2 57/67] ui/console: simplify registering display/console change listener MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-57-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=17782; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=ulSnzJcpHIdXHpuilMUXK8Bbd7MMg82E7jWmIZIyrLU=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WkaaXwW4H4GJcO7oql/bMufzZ6ErFWLrM5 IHSIUnTswuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5VuZD/9H53ZMVSoxKQ48liVD7gcy2HlRU0k8c+w9JVw2i31V8HEfGK1oLVIhBiIxSxdNuq9Q7lW uWVKh8aPXBejuVbpgwQxD+8b2qOWNN9G7wKgWcv6MxYVtMhanE9Q04KsWEe5pA4MAhi6u+P65Bn 63w0ijcBRIRuzYrwPXdvPO6B1vB2GhCYGeEODhIi10TkoAtRbQQg92y+pTAFZ+Avhijh50nwWAW 1InI/5U+CVeYI2CIwEeKyV+z6IiIKPhSM5+rb+6v1ux6mDK1mIaGU7zUu7QsSY3YGOPUxO2LeVL FV+ZXc4O405YG3WFPJ0SdDUV3jOTmDT3gLonME7wK7CbrYAUDl4ikcucUI/aBkawi9rEh+u65DH YU/rlDXBBF94pGxBzaW+UZxEoHr4xNQkPvgzs+4LVXBbZGEKJZEXCVBMh4VoAsaCXwiCsnBcYv5 memXrhpea/Y1/4/wLZWXh5RCqGETjWakmwU0h406gUslQaztKudpXHYnN82rzaxcbzqvhiqq+5I Sct0w37RLqOwmIpr4xe7N7ChfEMKP4g6MfHgapD2i1MNUl30g9Y7sSZXt7MovNG+eVt+PYCTyIl QKb5VcDlRuP8pO5w0UGzvhJ0M4peoX/cpapNG+nMboLCibesFrITclOFiBiwwY20Ee/CV06Gu4x EsGlJdfGlsU0SjA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849263264158500 Introduce qemu_console_register_listener() which combines setting dcl->con, dcl->ops and calling register_displaychangelistener() into a single call. This removes repetitive boilerplate across all display backends and makes it harder to forget setting one of the fields. Also move the early-return check in unregister_displaychangelistener() before the trace call, so that unregistering a never-registered listener (e.g. on error paths) does not dereference a NULL ops pointer. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 6 ++++-- hw/display/qxl.c | 4 +--- ui/console.c | 11 ++++++++--- ui/curses.c | 9 +++------ ui/dbus-console.c | 6 ++---- ui/dbus-listener.c | 27 ++++++++------------------- ui/egl-headless.c | 4 +--- ui/gtk.c | 10 ++++------ ui/sdl2.c | 8 +++----- ui/spice-display.c | 8 +++----- ui/vnc.c | 11 ++++------- ui/cocoa.m | 13 ++++--------- 12 files changed, 45 insertions(+), 72 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 472c188a727..823d3b819b2 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -305,10 +305,12 @@ struct DisplayGLCtx { =20 DisplayState *init_displaystate(void); =20 -void register_displaychangelistener(DisplayChangeListener *dcl); +void qemu_console_register_listener(QemuConsole *con, + DisplayChangeListener *dcl, + const DisplayChangeListenerOps *ops); void update_displaychangelistener(DisplayChangeListener *dcl, uint64_t interval); -void unregister_displaychangelistener(DisplayChangeListener *dcl); +void qemu_console_unregister_listener(DisplayChangeListener *dcl); =20 bool dpy_ui_info_supported(const QemuConsole *con); const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con); diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 3d4b5635568..02e8c1435be 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -2252,9 +2252,7 @@ static void qxl_realize_primary(PCIDevice *dev, Error= **errp) return; } =20 - qxl->ssd.dcl.ops =3D &display_listener_ops; - qxl->ssd.dcl.con =3D vga->con; - register_displaychangelistener(&qxl->ssd.dcl); + qemu_console_register_listener(vga->con, &qxl->ssd.dcl, &display_liste= ner_ops); } =20 static void qxl_realize_secondary(PCIDevice *dev, Error **errp) diff --git a/ui/console.c b/ui/console.c index baffdeb22b1..3ab987add34 100644 --- a/ui/console.c +++ b/ui/console.c @@ -642,10 +642,15 @@ dcl_set_graphic_cursor(DisplayChangeListener *dcl, Qe= muGraphicConsole *con) } } =20 -void register_displaychangelistener(DisplayChangeListener *dcl) +void qemu_console_register_listener(QemuConsole *con, + DisplayChangeListener *dcl, + const DisplayChangeListenerOps *ops) { assert(!dcl->ds); =20 + dcl->con =3D con; + dcl->ops =3D ops; + trace_displaychangelistener_register(dcl, dcl->ops->dpy_name); dcl->ds =3D get_alloc_displaystate(); QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next); @@ -670,10 +675,10 @@ void update_displaychangelistener(DisplayChangeListen= er *dcl, } } =20 -void unregister_displaychangelistener(DisplayChangeListener *dcl) +void qemu_console_unregister_listener(DisplayChangeListener *dcl) { DisplayState *ds =3D dcl->ds; - trace_displaychangelistener_unregister(dcl, dcl->ops->dpy_name); + trace_displaychangelistener_unregister(dcl, dcl->ops ? dcl->ops->dpy_n= ame : NULL); if (!ds) { return; } diff --git a/ui/curses.c b/ui/curses.c index 78f21d940e3..4e2a0b25955 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -324,9 +324,8 @@ static void curses_refresh(DisplayChangeListener *dcl) if (con) { erase(); wnoutrefresh(stdscr); - unregister_displaychangelistener(dcl); - dcl->con =3D con; - register_displaychangelistener(dcl); + qemu_console_unregister_listener(dcl); + qemu_console_register_listener(con, dcl, dcl->= ops); =20 invalidate =3D 1; } @@ -805,9 +804,7 @@ static void curses_display_init(DisplayState *ds, Displ= ayOptions *opts) curses_winch_init(); =20 dcl =3D g_new0(DisplayChangeListener, 1); - dcl->con =3D qemu_console_lookup_default(); - dcl->ops =3D &dcl_ops; - register_displaychangelistener(dcl); + qemu_console_register_listener(qemu_console_lookup_default(), dcl, &dc= l_ops); =20 invalidate =3D 1; } diff --git a/ui/dbus-console.c b/ui/dbus-console.c index 85e215ef233..249760d82aa 100644 --- a/ui/dbus-console.c +++ b/ui/dbus-console.c @@ -143,7 +143,6 @@ dbus_display_console_init(DBusDisplayConsole *object) DBusDisplayConsole *ddc =3D DBUS_DISPLAY_CONSOLE(object); =20 ddc->listeners =3D g_ptr_array_new_with_free_func(g_object_unref); - ddc->dcl.ops =3D &dbus_console_dcl_ops; } =20 static void @@ -151,7 +150,7 @@ dbus_display_console_dispose(GObject *object) { DBusDisplayConsole *ddc =3D DBUS_DISPLAY_CONSOLE(object); =20 - unregister_displaychangelistener(&ddc->dcl); + qemu_console_unregister_listener(&ddc->dcl); g_clear_object(&ddc->iface_touch); g_clear_object(&ddc->iface_mouse); g_clear_object(&ddc->iface_kbd); @@ -553,7 +552,6 @@ dbus_display_console_new(DBusDisplay *display, QemuCons= ole *con) "g-object-path", path, NULL); ddc->display =3D display; - ddc->dcl.con =3D con; /* handle errors, and skip non graphics? */ qemu_console_fill_device_address( con, device_addr, sizeof(device_addr), NULL); @@ -611,7 +609,7 @@ dbus_display_console_new(DBusDisplay *display, QemuCons= ole *con) slot->tracking_id =3D -1; } =20 - register_displaychangelistener(&ddc->dcl); + qemu_console_register_listener(con, &ddc->dcl, &dbus_console_dcl_ops); ddc->mouse_mode_notifier.notify =3D dbus_mouse_mode_change; qemu_add_mouse_mode_change_notifier(&ddc->mouse_mode_notifier); dbus_mouse_update_is_absolute(ddc); diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 37945236e11..fe58e3ef24d 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -957,7 +957,7 @@ dbus_display_listener_dispose(GObject *object) { DBusDisplayListener *ddl =3D DBUS_DISPLAY_LISTENER(object); =20 - unregister_displaychangelistener(&ddl->dcl); + qemu_console_unregister_listener(&ddl->dcl); g_clear_object(&ddl->conn); g_clear_pointer(&ddl->bus_name, g_free); g_clear_object(&ddl->proxy); @@ -978,28 +978,12 @@ dbus_display_listener_dispose(GObject *object) G_OBJECT_CLASS(dbus_display_listener_parent_class)->dispose(object); } =20 -static void -dbus_display_listener_constructed(GObject *object) -{ - DBusDisplayListener *ddl =3D DBUS_DISPLAY_LISTENER(object); - - ddl->dcl.ops =3D &dbus_dcl_ops; -#ifdef CONFIG_OPENGL - if (display_opengl) { - ddl->dcl.ops =3D &dbus_gl_dcl_ops; - } -#endif - - G_OBJECT_CLASS(dbus_display_listener_parent_class)->constructed(object= ); -} - static void dbus_display_listener_class_init(DBusDisplayListenerClass *klass) { GObjectClass *object_class =3D G_OBJECT_CLASS(klass); =20 object_class->dispose =3D dbus_display_listener_dispose; - object_class->constructed =3D dbus_display_listener_constructed; } =20 static void @@ -1256,6 +1240,7 @@ dbus_display_listener_new(const char *bus_name, GDBusConnection *conn, DBusDisplayConsole *console) { + const DisplayChangeListenerOps *ops =3D &dbus_dcl_ops; DBusDisplayListener *ddl; QemuConsole *con; g_autoptr(GError) err =3D NULL; @@ -1288,8 +1273,12 @@ dbus_display_listener_new(const char *bus_name, =20 con =3D qemu_console_lookup_by_index(dbus_display_console_get_index(co= nsole)); assert(con); - ddl->dcl.con =3D con; - register_displaychangelistener(&ddl->dcl); +#ifdef CONFIG_OPENGL + if (display_opengl) { + ops =3D &dbus_gl_dcl_ops; + } +#endif + qemu_console_register_listener(con, &ddl->dcl, ops); =20 return ddl; } diff --git a/ui/egl-headless.c b/ui/egl-headless.c index 352b30b43fb..4f046c975a9 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -229,13 +229,11 @@ static void egl_headless_init(DisplayState *ds, Displ= ayOptions *opts) } =20 edpy =3D g_new0(egl_dpy, 1); - edpy->dcl.con =3D con; - edpy->dcl.ops =3D &egl_ops; edpy->gls =3D qemu_gl_init_shader(); ctx =3D g_new0(DisplayGLCtx, 1); ctx->ops =3D &eglctx_ops; qemu_console_set_display_gl_ctx(con, ctx); - register_displaychangelistener(&edpy->dcl); + qemu_console_register_listener(con, &edpy->dcl, &egl_ops); } } =20 diff --git a/ui/gtk.c b/ui/gtk.c index 9ebe7e8df0d..3aaa44ff3e2 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2251,6 +2251,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, Vir= tualConsole *vc, QemuConsole *con, int idx, GSList *group, GtkWidget *view_menu) { + const DisplayChangeListenerOps *ops =3D &dcl_ops; bool zoom_to_fit =3D false; int i; =20 @@ -2275,7 +2276,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, Vir= tualConsole *vc, vc->gfx.drawing_area =3D gtk_gl_area_new(); g_signal_connect(vc->gfx.drawing_area, "realize", G_CALLBACK(gl_area_realize), vc); - vc->gfx.dcl.ops =3D &dcl_gl_area_ops; + ops =3D &dcl_gl_area_ops; vc->gfx.dgc.ops =3D &gl_area_ctx_ops; } else { #ifdef CONFIG_X11 @@ -2290,7 +2291,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, Vir= tualConsole *vc, #pragma GCC diagnostic ignored "-Wdeprecated-declarations" gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE); #pragma GCC diagnostic pop - vc->gfx.dcl.ops =3D &dcl_egl_ops; + ops =3D &dcl_egl_ops; vc->gfx.dgc.ops =3D &egl_ctx_ops; vc->gfx.has_dmabuf =3D qemu_egl_has_dmabuf(); #else @@ -2301,7 +2302,6 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, Vir= tualConsole *vc, #endif { vc->gfx.drawing_area =3D gtk_drawing_area_new(); - vc->gfx.dcl.ops =3D &dcl_ops; } =20 =20 @@ -2325,12 +2325,10 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, V= irtualConsole *vc, vc->tab_item, gtk_label_new(vc->label)); =20 vc->gfx.kbd =3D qkbd_state_init(con); - vc->gfx.dcl.con =3D con; - if (display_opengl) { qemu_console_set_display_gl_ctx(con, &vc->gfx.dgc); } - register_displaychangelistener(&vc->gfx.dcl); + qemu_console_register_listener(con, &vc->gfx.dcl, ops); =20 gd_connect_vc_gfx_signals(vc); group =3D gd_vc_menu_init(s, vc, idx, group, view_menu); diff --git a/ui/sdl2.c b/ui/sdl2.c index 30e0042fe29..4f8b05fbd85 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -934,6 +934,7 @@ static void sdl2_display_init(DisplayState *ds, Display= Options *o) sdl2_console =3D g_new0(struct sdl2_console, sdl2_num_outputs); for (i =3D 0; i < sdl2_num_outputs; i++) { QemuConsole *con =3D qemu_console_lookup_by_index(i); + const DisplayChangeListenerOps *ops =3D &dcl_2d_ops; assert(con !=3D NULL); if (!qemu_console_is_graphic(con) && qemu_console_get_index(con) !=3D 0) { @@ -943,13 +944,11 @@ static void sdl2_display_init(DisplayState *ds, Displ= ayOptions *o) sdl2_console[i].opts =3D o; #ifdef CONFIG_OPENGL sdl2_console[i].opengl =3D display_opengl; - sdl2_console[i].dcl.ops =3D display_opengl ? &dcl_gl_ops : &dcl_2d= _ops; sdl2_console[i].dgc.ops =3D display_opengl ? &gl_ctx_ops : NULL; + ops =3D display_opengl ? &dcl_gl_ops : &dcl_2d_ops; #else sdl2_console[i].opengl =3D 0; - sdl2_console[i].dcl.ops =3D &dcl_2d_ops; #endif - sdl2_console[i].dcl.con =3D con; sdl2_console[i].kbd =3D qkbd_state_init(con); #ifdef CONFIG_OPENGL if (display_opengl) { @@ -957,8 +956,7 @@ static void sdl2_display_init(DisplayState *ds, Display= Options *o) sdl2_gl_console_init(&sdl2_console[i]); } #endif - register_displaychangelistener(&sdl2_console[i].dcl); - + qemu_console_register_listener(con, &sdl2_console[i].dcl, ops); #if defined(SDL_VIDEO_DRIVER_WINDOWS) || defined(SDL_VIDEO_DRIVER_X11) if (SDL_GetWindowWMInfo(sdl2_console[i].real_window, &info)) { #if defined(SDL_VIDEO_DRIVER_WINDOWS) diff --git a/ui/spice-display.c b/ui/spice-display.c index 87cc193cdee..56d8140fad8 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1387,13 +1387,13 @@ 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 ""; + const DisplayChangeListenerOps *ops =3D &display_listener_ops; =20 qemu_spice_display_init_common(ssd); =20 - ssd->dcl.ops =3D &display_listener_ops; #ifdef HAVE_SPICE_GL if (spice_opengl) { - ssd->dcl.ops =3D &display_listener_gl_ops; + ops =3D &display_listener_gl_ops; ssd->dgc.ops =3D &gl_ctx_ops; ssd->gl_unblock_bh =3D qemu_bh_new(qemu_spice_gl_unblock_bh, ssd); ssd->gl_unblock_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, @@ -1403,8 +1403,6 @@ static void qemu_spice_display_init_one(QemuConsole *= con) ssd->have_scanout =3D false; } #endif - ssd->dcl.con =3D con; - ssd->qxl.base.sif =3D &dpy_interface.base; qemu_spice_add_display_interface(&ssd->qxl, con); =20 @@ -1422,7 +1420,7 @@ static void qemu_spice_display_init_one(QemuConsole *= con) if (spice_opengl) { qemu_console_set_display_gl_ctx(con, &ssd->dgc); } - register_displaychangelistener(&ssd->dcl); + qemu_console_register_listener(con, &ssd->dcl, ops); } =20 void qemu_spice_display_init(void) diff --git a/ui/vnc.c b/ui/vnc.c index 5dd1eb399cc..21698835084 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1859,10 +1859,9 @@ static void do_key_event(VncState *vs, int down, int= keycode, int sym) qkbd_state_modifier_get(vs->vd->kbd, QKBD_MOD_ALT)) { QemuConsole *con =3D qemu_console_lookup_by_index(qcode - Q_KE= Y_CODE_1); if (con) { - unregister_displaychangelistener(&vs->vd->dcl); + qemu_console_unregister_listener(&vs->vd->dcl); qkbd_state_switch_console(vs->vd->kbd, con); - vs->vd->dcl.con =3D con; - register_displaychangelistener(&vs->vd->dcl); + qemu_console_register_listener(con, &vs->vd->dcl, vs->vd->= dcl.ops); } return; } @@ -3436,7 +3435,6 @@ VncDisplay *vnc_display_new(const char *id, Error **e= rrp) =20 qemu_mutex_init(&vd->mutex); vd->id =3D g_strdup(id); - vd->dcl.ops =3D &dcl_ops; =20 QTAILQ_INIT(&vd->clients); vd->expires =3D TIME_MAX; @@ -3519,7 +3517,7 @@ void vnc_display_free(VncDisplay *vd) =20 vnc_stop_worker_thread(vd); vnc_display_close(vd); - unregister_displaychangelistener(&vd->dcl); + qemu_console_unregister_listener(&vd->dcl); qkbd_state_free(vd->kbd); qemu_del_vm_change_state_handler(vd->vmstate_handler_entry); kbd_layout_free(vd->kbd_layout); @@ -4262,8 +4260,7 @@ static bool vnc_display_open(VncDisplay *vd, Error **= errp) con =3D qemu_console_lookup_default(); } =20 - vd->dcl.con =3D con; - register_displaychangelistener(&vd->dcl); + qemu_console_register_listener(con, &vd->dcl, &dcl_ops); vd->kbd =3D qkbd_state_init(vd->dcl.con); qkbd_state_set_delay(vd->kbd, key_delay_ms); =20 diff --git a/ui/cocoa.m b/ui/cocoa.m index 9093d1e408f..aaf82421589 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -93,9 +93,7 @@ static void cocoa_switch(DisplayChangeListener *dcl, .dpy_mouse_set =3D cocoa_mouse_set, .dpy_cursor_define =3D cocoa_cursor_define, }; -static DisplayChangeListener dcl =3D { - .ops =3D &dcl_ops, -}; +static DisplayChangeListener dcl; static QKbdState *kbd; static int cursor_hide =3D 1; static int left_command_key_enabled =3D 1; @@ -425,8 +423,7 @@ - (void) selectConsoleLocked:(unsigned int)index =20 unregister_displaychangelistener(&dcl); qkbd_state_switch_console(kbd, con); - dcl.con =3D con; - register_displaychangelistener(&dcl); + qemu_console_register_listener(con, &dcl, &dcl_ops); [self notifyMouseModeChange]; [self updateUIInfo]; } @@ -2145,11 +2142,9 @@ static void cocoa_display_init(DisplayState *ds, Dis= playOptions *opts) add_console_menu_entries(); addRemovableDevicesMenuItems(); =20 - dcl.con =3D qemu_console_lookup_default(); + qemu_console_register_listener(qemu_console_lookup_default(), + &dcl, &dcl_ops); kbd =3D qkbd_state_init(dcl.con); - - // register vga output callbacks - register_displaychangelistener(&dcl); qemu_add_mouse_mode_change_notifier(&mouse_mode_change_notifier); [cocoaView notifyMouseModeChange]; [cocoaView updateUIInfo]; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849175; cv=none; d=zohomail.com; s=zohoarc; b=BnEbfmU/zc6tP5/LelbHbx/iZGl1QatNc6k6i938jq1wk2A7dFmSJA/K10jVYg4dA0uBypd0W2qWm0ZFik+QPcJ7sHGOfei6dBbGpTL35nvViSGHbpyoZavD+P/d7iO1iIgEWlqJ8RF3QGwb/SZ0Jc8eDGMiTTWAfUp8PoGSfQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849175; 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=U5h14GGyuaRyjjnzUY142eQktIU//IjoFzILlCF5BBg=; b=FQ8ZF/Q6SpWwW2ZHEBiGqmiSN9+rlhu45IO7C48ZA98Rg7cz1bMYxnmgHsXD7zUrb4SBvQxq9Vr4IrgIJkwLKKyOfWA3jKHTC/ouJW4/QY0wXyqFspmB2Rri+adOw21kKEhjjVoJMxVZrdvArRaWogQguAu0WZuAsyQX2jcQDeE= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849175221272.85925196434175; Fri, 10 Apr 2026 12:26:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTX-0007Hz-4N; Fri, 10 Apr 2026 15:25:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTU-0007D2-3S for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTA-0002e2-Qn for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:24:54 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325--zKVLtBAPVK0i1xO298qXA-1; Fri, 10 Apr 2026 15:24:42 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3188D1956080 for ; Fri, 10 Apr 2026 19:24:41 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AA69D180049F; Fri, 10 Apr 2026 19:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849083; 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=U5h14GGyuaRyjjnzUY142eQktIU//IjoFzILlCF5BBg=; b=UBxoJ15yfFUj6tgYkrU+WllM0E2GmGENh7yx5AXxb4WYOU+dFWV6G8Svt41SQyjREU3hb6 sWhedznZ6Gdaut6X7nm8KRigY00AYvDtBWSeKqGPWAnbBaeu+SJRzVLs6UCApnzkxainOz 4qI5ce1uhjivr0LiLY1LHkhZuFMj198= X-MC-Unique: -zKVLtBAPVK0i1xO298qXA-1 X-Mimecast-MFC-AGG-ID: -zKVLtBAPVK0i1xO298qXA_1775849081 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:20 +0400 Subject: [PATCH v2 58/67] ui/console: add doc comment for qemu_console_{un}register_listener() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-58-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1640; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=o64r7Of9HtLlvuQw/nt9wYCk6CpdYF4iMgj06cV9ySs=; b=kA0DAAoB2ujhCXWWnOUByyZiAGnZTRaiByiISa29IGI5AkFuExfn+DVmrRKLN+3yDQNP4zUMU YkCMwQAAQoAHRYhBIepvZM/h8YG0nb2Ldro4Ql1lpzlBQJp2U0WAAoJENro4Ql1lpzlvGsQAKJp E2LF5AHjtPnnb+lGgpXJq30iaHmFSo2iBAN95sOPiJSERyzhUTh6hxABiLudFZZox8EepOadiXn ieH5cnTCsR7KwoOVIVeQySBottGyzokAGzr66MmbFFL5WfeY6Y+zw8vDfIfqYNemogvvGayBUwf 9ETk/UKwQ0tIGEDwOdK1DF8Z0hBOCJJJuvezyC2dHXlZDMLxbI1TwOAByLCZP3a8SulgDd/xbiC yTl+D0qAbCWM77gxHGVRCBTZuft6Qgs4bE6NwRUlVB+H2j1+X25pwBLTJIjtO8zIvdXVVyofWOf VxUf4s/DgPZx3QXvBS0aPJMoeihIwch5Eta5FT6AxWweXKLvgmPVlOCwyi9FdaXJgPU2DKOt288 fBIujfjSYXCBW9x5mQqJ0XRaYvDmrsxwy63kl2hLq6QQB0NvHWSlRtFKibfFUIBnKOlfBzmxmc6 8chqZBgBzB/kgeay/GYFosC/KLATN7rOkEKseECpGuTat804hPBrIo1RndJDM+vb0lg/RK1Q7Gw p1XtOTygGeDwSTpj2r5+Xc3YOK1XUeEMv35WZnBMSQbI73na8OWz34utW3UmdraYY8tRoO00a86 lv8ctguVKXX2G3zAVuBnkbKSK35SUJSD3ChqdiNfnnZm+sRAo5EPg2wNIHroX8mekbNsKSwB29z DL7/1 X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849176917158500 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ui/console.c b/ui/console.c index 3ab987add34..f96e3cf16fa 100644 --- a/ui/console.c +++ b/ui/console.c @@ -642,6 +642,17 @@ dcl_set_graphic_cursor(DisplayChangeListener *dcl, Qem= uGraphicConsole *con) } } =20 +/* + * qemu_console_register_listener: + * @con: the console to attach the listener to + * @dcl: the display change listener to register + * @ops: the listener operations (callbacks for display updates) + * + * Register a display change listener on a console. The listener + * must not already be registered (i.e. @dcl->ds must be NULL). + * This sets up the listener, adds it to the display state, triggers + * an initial display update, and setup the cursor. + */ void qemu_console_register_listener(QemuConsole *con, DisplayChangeListener *dcl, const DisplayChangeListenerOps *ops) @@ -675,6 +686,15 @@ void update_displaychangelistener(DisplayChangeListene= r *dcl, } } =20 +/* + * qemu_console_unregister_listener: + * @dcl: the display change listener to unregister + * + * Unregister a display change listener, removing it from the + * display state's listener list. If the listener is not currently + * registered (@dcl->ds is NULL), this is a no-op. After unregistering, + * the display refresh timer is recalculated. + */ void qemu_console_unregister_listener(DisplayChangeListener *dcl) { DisplayState *ds =3D dcl->ds; --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849189; cv=none; d=zohomail.com; s=zohoarc; b=BosKk1l1NtCKbsw/IPKph2eywYy20aG1aAAv+GatmbUPJAhfirzWeBgM7tKaK9qA4xfpecawISfVVjp/GLh+z8J+zEt5Q1+wzBKkDKea5ILsDYnBcuXXBeBs12Mzk+MSHuwQroTPxZMLgA3Ea/jFwzvZ5J8JFPcgULme7XU9If8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849189; 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=ahTXwuHJ3Od5hMMGNd/7C8KkYPiPeYMk6TBMZEOyPKA=; b=IKlYxFawvCTApUXpC7UxOwTmgw1lzHdF7XF/oa695V9i3K2rmpygbNI2XROVNlWycq3GfpocxZwM7gs8g8yurizIYJZGXLKOJBc2JF+u90MclJs6vM29eDV0DPwNlU/TfRpXEu0BvuaU45/iOYixPlxp+zOCz+SMSc9TK8+/H/c= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849189759115.81180794333159; Fri, 10 Apr 2026 12:26:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTV-0007FS-Oo; Fri, 10 Apr 2026 15:25:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTU-0007DI-7X for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTH-0002gM-1Z for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:02 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-213--d8fSAlGO7qyPmXRR_9Rwg-1; Fri, 10 Apr 2026 15:24:47 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DC0811956048 for ; Fri, 10 Apr 2026 19:24:46 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5BD943000C16; Fri, 10 Apr 2026 19:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849089; 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=ahTXwuHJ3Od5hMMGNd/7C8KkYPiPeYMk6TBMZEOyPKA=; b=RgNDuCRHQ3DQ4vQs3l8NvMT4qIzOx3DwSTArQFpIPxshkpQiCw5mRkmoS9D5C6zB6flTOb Yp/+Cj7NJItYHS9zMyhPKu0MX2SEog4zjHRAiWod+WveeXL1wdTSU4Xg0s6Z3BPjTPGjh4 62xCKjNlJokNT6PQgFzt1WA61OpQBGw= X-MC-Unique: -d8fSAlGO7qyPmXRR_9Rwg-1 X-Mimecast-MFC-AGG-ID: -d8fSAlGO7qyPmXRR_9Rwg_1775849087 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:21 +0400 Subject: [PATCH v2 59/67] ui/console: return completion status from gfx_update callback MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-59-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=32661; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=f1MZpNWd6L/E8ww/JR0yGJWZTQYcaLX1hJlpqsiNBvw=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0WvUn8mEFvUMP8jBeLFt8sgBpnejipjFyWw fg2MRwezfeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFgAKCRDa6OEJdZac 5Sc7D/90+SraAZdc0hYSERPXEStlEPV9a9jOX+k5C8+XjNGXxoFuNl61QxVH5nPFNzkEQdfePEj la5sji/PQVp9t7cdPUCTYNVBbeQn5H5y9Z8Ynm1cuEbPcjHlfK+APpxWGFErBjDW/r9pUrs6U/5 tXBce4V6Laf0XZ5ooR4NGo0NwgiuEU2bnZ5luTDsIQ4M3eioXyBMPAvTkS9ljQoP2LCIE0/S7x+ dLvPfQlL22Nr1nECwPnLWg0zwwNxLXBOCNn6rK5Qh6mUU5oICbTAXp9SoY7lNpzGYz2aIf/PZFj Vd4FjlpCZVVsiHicTz0TYbUiM0OnzOZzcEFTdTL3pqCmnts3JUQtUuA9N8cTao6eo4YTzijAyJD 2ckJb/c2dM4ymaBkFGRulPD484QQ/2MycTaoD8vszqEuiPvHTHgBaIErAuilyFc6NW/zE6PI+G0 Ba5VdxesSxV3qBKuwa06moTwbCiy/XCubQEw42y8e3zEiT2VixqoRcwZTHK83MMog3gt1PpNpL1 Hvs8WdI6X4voR7UU4p3UNxU9qfYxJmkVCgAGHrbtMBIAxpOX3SScrbWTFpYEQLpr5b78NG8r8Hx yM0fPhhg9R2MTyIOH+ulUAgK5zBz0bIz4e6np/mjHVSXVAZBn11X7ispTOgdJU04QL5QYsH6rq2 C6qEfPhwOK5o3+g== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849190934158500 Replace the two-field design (gfx_update void callback + gfx_update_async flag) with a single bool return value from gfx_update. Returning true means the update completed synchronously and graphic_hw_update_done() should be called by the console layer. Returning false means the update is deferred and the device will call graphic_hw_update_done() itself later (as done by QXL/SPICE and Apple GFX). This simplifies the interface and makes the async contract explicit at each call site rather than relying on a separate struct field. Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/display/qxl.h | 2 +- include/ui/console.h | 9 +++++++-- hw/arm/musicpal.c | 3 ++- hw/display/artist.c | 4 +++- hw/display/bcm2835_fb.c | 7 ++++--- hw/display/bochs-display.c | 6 ++++-- hw/display/cg3.c | 5 +++-- hw/display/dm163.c | 4 +++- hw/display/exynos4210_fimd.c | 6 ++++-- hw/display/g364fb.c | 9 ++++++--- hw/display/jazz_led.c | 6 ++++-- hw/display/macfb.c | 6 ++++-- hw/display/next-fb.c | 4 +++- hw/display/omap_lcdc.c | 14 ++++++++------ hw/display/pl110.c | 5 +++-- hw/display/qxl-render.c | 6 +++--- hw/display/qxl.c | 7 +++---- hw/display/ramfb-standalone.c | 4 +++- hw/display/sm501.c | 8 +++++--- hw/display/ssd0303.c | 10 ++++++---- hw/display/ssd0323.c | 11 ++++++----- hw/display/tcx.c | 6 ++++-- hw/display/vga.c | 4 +++- hw/display/virtio-gpu-base.c | 3 ++- hw/display/virtio-vga.c | 6 +++--- hw/display/vmware_vga.c | 7 ++++--- hw/display/xenfb.c | 6 ++++-- hw/display/xlnx_dp.c | 10 ++++++---- hw/vfio/display.c | 17 ++++++++++------- ui/console.c | 7 +------ hw/display/apple-gfx.m | 10 +++++----- 31 files changed, 127 insertions(+), 85 deletions(-) diff --git a/hw/display/qxl.h b/hw/display/qxl.h index e0a85a5ca49..ad8a9128785 100644 --- a/hw/display/qxl.h +++ b/hw/display/qxl.h @@ -187,7 +187,7 @@ int qxl_log_command(PCIQXLDevice *qxl, const char *ring= , QXLCommandExt *ext); =20 /* qxl-render.c */ void qxl_render_resize(PCIQXLDevice *qxl); -void qxl_render_update(PCIQXLDevice *qxl); +bool qxl_render_update(PCIQXLDevice *qxl); int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext); void qxl_render_update_area_done(PCIQXLDevice *qxl, QXLCookie *cookie); void qxl_render_update_area_bh(void *opaque); diff --git a/include/ui/console.h b/include/ui/console.h index 823d3b819b2..c93ab7d619e 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -363,8 +363,13 @@ enum { typedef struct GraphicHwOps { int (*get_flags)(void *opaque); /* optional, default 0 */ void (*invalidate)(void *opaque); - void (*gfx_update)(void *opaque); - bool gfx_update_async; /* if true, calls graphic_hw_update_done() */ + /* + * Returns true if the update is handled synchronously, false if defer= red + * and graphic_hw_update_done() will be called when ready (to resume w= aiting + * tasks/coroutines). + * Optional. + */ + bool (*gfx_update)(void *opaque); void (*text_update)(void *opaque, uint32_t *text); void (*ui_info)(void *opaque, uint32_t head, QemuUIInfo *info); void (*gl_block)(void *opaque, bool block); diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 250fdb49b6f..913f98b5d8e 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -153,7 +153,7 @@ static inline void set_lcd_pixel32(musicpal_lcd_state *= s, } } =20 -static void lcd_refresh(void *opaque) +static bool lcd_refresh(void *opaque) { musicpal_lcd_state *s =3D opaque; int x, y, col; @@ -172,6 +172,7 @@ static void lcd_refresh(void *opaque) } =20 dpy_gfx_update(s->con, 0, 0, 128*3, 64*3); + return true; } =20 static void lcd_invalidate(void *opaque) diff --git a/hw/display/artist.c b/hw/display/artist.c index 206f77afba1..a07508378c7 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -1311,7 +1311,7 @@ static void artist_draw_line(void *opaque, uint8_t *d= , const uint8_t *src, } } =20 -static void artist_update_display(void *opaque) +static bool artist_update_display(void *opaque) { ARTISTState *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -1326,6 +1326,8 @@ static void artist_update_display(void *opaque) if (first >=3D 0) { dpy_gfx_update(s->con, 0, first, s->width, last - first + 1); } + + return true; } =20 static void artist_invalidate(void *opaque) diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c index 75d7c0f8499..83c4c03c7ca 100644 --- a/hw/display/bcm2835_fb.c +++ b/hw/display/bcm2835_fb.c @@ -150,7 +150,7 @@ static bool fb_use_offsets(BCM2835FBConfig *config) config->yres_virtual > config->yres; } =20 -static void fb_update_display(void *opaque) +static bool fb_update_display(void *opaque) { BCM2835FBState *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -161,7 +161,7 @@ static void fb_update_display(void *opaque) uint32_t xoff =3D 0, yoff =3D 0; =20 if (s->lock || !s->config.xres) { - return; + return true; } =20 src_width =3D bcm2835_fb_get_pitch(&s->config); @@ -174,7 +174,7 @@ static void fb_update_display(void *opaque) =20 switch (surface_bits_per_pixel(surface)) { case 0: - return; + return true; case 8: break; case 15: @@ -212,6 +212,7 @@ static void fb_update_display(void *opaque) } =20 s->invalidate =3D false; + return true; } =20 void bcm2835_fb_validate_config(BCM2835FBConfig *config) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 5fb6b733cb5..8ef9b76cf85 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -198,7 +198,7 @@ static int bochs_display_get_mode(BochsDisplayState *s, return 0; } =20 -static void bochs_display_update(void *opaque) +static bool bochs_display_update(void *opaque) { BochsDisplayState *s =3D opaque; DirtyBitmapSnapshot *snap =3D NULL; @@ -212,7 +212,7 @@ static void bochs_display_update(void *opaque) ret =3D bochs_display_get_mode(s, &mode); if (ret < 0) { /* no (valid) video mode */ - return; + return true; } =20 if (memcmp(&s->mode, &mode, sizeof(mode)) !=3D 0) { @@ -255,6 +255,8 @@ static void bochs_display_update(void *opaque) =20 g_free(snap); } + + return true; } =20 static const GraphicHwOps bochs_display_gfx_ops =3D { diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 0a413fbb7ec..963bb3427a6 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -85,7 +85,7 @@ struct CG3State { uint8_t dac_index, dac_state; }; =20 -static void cg3_update_display(void *opaque) +static bool cg3_update_display(void *opaque) { CG3State *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -98,7 +98,7 @@ static void cg3_update_display(void *opaque) DirtyBitmapSnapshot *snap =3D NULL; =20 if (surface_bits_per_pixel(surface) !=3D 32) { - return; + return true; } width =3D s->width; height =3D s->height; @@ -154,6 +154,7 @@ static void cg3_update_display(void *opaque) qemu_irq_raise(s->irq); } g_free(snap); + return true; } =20 static void cg3_invalidate_display(void *opaque) diff --git a/hw/display/dm163.c b/hw/display/dm163.c index 4feae912945..9ea62cb4f76 100644 --- a/hw/display/dm163.c +++ b/hw/display/dm163.c @@ -285,7 +285,7 @@ static uint32_t *update_display_of_row(DM163State *s, u= int32_t *dest, return dest; } =20 -static void dm163_update_display(void *opaque) +static bool dm163_update_display(void *opaque) { DM163State *s =3D (DM163State *)opaque; DisplaySurface *surface =3D qemu_console_surface(s->console); @@ -300,6 +300,8 @@ static void dm163_update_display(void *opaque) } dest =3D update_display_of_row(s, dest, row); } + + return true; } =20 static const GraphicHwOps dm163_ops =3D { diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 2d8fa7ee944..a91f04aaf79 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1270,7 +1270,7 @@ static void exynos4210_update_resolution(Exynos4210fi= mdState *s) } } =20 -static void exynos4210_fimd_update(void *opaque) +static bool exynos4210_fimd_update(void *opaque) { Exynos4210fimdState *s =3D (Exynos4210fimdState *)opaque; DisplaySurface *surface; @@ -1287,7 +1287,7 @@ static void exynos4210_fimd_update(void *opaque) =20 if (!s || !s->console || !s->enabled || surface_bits_per_pixel(qemu_console_surface(s->console)) =3D=3D 0)= { - return; + return true; } =20 global_width =3D (s->vidtcon[2] & FIMD_VIDTCON2_SIZE_MASK) + 1; @@ -1348,6 +1348,8 @@ static void exynos4210_fimd_update(void *opaque) exynos4210_fimd_enable(s, false); } exynos4210_fimd_update_irq(s); + + return true; } =20 static void exynos4210_fimd_reset(DeviceState *d) diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c index 50952e9934b..bd15f6f0acc 100644 --- a/hw/display/g364fb.c +++ b/hw/display/g364fb.c @@ -238,15 +238,16 @@ static void g364fb_draw_blank(G364State *s) s->blanked =3D 1; } =20 -static void g364fb_update_display(void *opaque) +static bool g364fb_update_display(void *opaque) { G364State *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); =20 qemu_flush_coalesced_mmio_buffer(); =20 - if (s->width =3D=3D 0 || s->height =3D=3D 0) - return; + if (s->width =3D=3D 0 || s->height =3D=3D 0) { + return true; + } =20 if (s->width !=3D surface_width(surface) || s->height !=3D surface_height(surface)) { @@ -262,6 +263,8 @@ static void g364fb_update_display(void *opaque) } =20 qemu_irq_raise(s->irq); + + return true; } =20 static inline void g364fb_invalidate_display(void *opaque) diff --git a/hw/display/jazz_led.c b/hw/display/jazz_led.c index d5783982950..ee9758a94b5 100644 --- a/hw/display/jazz_led.c +++ b/hw/display/jazz_led.c @@ -144,7 +144,7 @@ static void draw_vertical_line(DisplaySurface *ds, } } =20 -static void jazz_led_update_display(void *opaque) +static bool jazz_led_update_display(void *opaque) { LedState *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -186,7 +186,7 @@ static void jazz_led_update_display(void *opaque) color_led =3D rgb_to_pixel32(0x00, 0xff, 0x00); break; default: - return; + return true; } =20 /* display segments */ @@ -218,6 +218,8 @@ static void jazz_led_update_display(void *opaque) =20 s->state =3D REDRAW_NONE; dpy_gfx_update_full(s->con); + + return true; } =20 static void jazz_led_invalidate_display(void *opaque) diff --git a/hw/display/macfb.c b/hw/display/macfb.c index b8115c2be13..848c3c282bd 100644 --- a/hw/display/macfb.c +++ b/hw/display/macfb.c @@ -454,7 +454,7 @@ static gchar *macfb_mode_list(void) } =20 =20 -static void macfb_update_display(void *opaque) +static bool macfb_update_display(void *opaque) { MacfbState *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -462,7 +462,7 @@ static void macfb_update_display(void *opaque) qemu_flush_coalesced_mmio_buffer(); =20 if (s->width =3D=3D 0 || s->height =3D=3D 0) { - return; + return true; } =20 if (s->width !=3D surface_width(surface) || @@ -471,6 +471,8 @@ static void macfb_update_display(void *opaque) } =20 macfb_draw_graphic(s); + + return true; } =20 static void macfb_update_irq(MacfbState *s) diff --git a/hw/display/next-fb.c b/hw/display/next-fb.c index 3d97702fce5..e758b223ef7 100644 --- a/hw/display/next-fb.c +++ b/hw/display/next-fb.c @@ -67,7 +67,7 @@ static void nextfb_draw_line(void *opaque, uint8_t *d, co= nst uint8_t *s, } } =20 -static void nextfb_update(void *opaque) +static bool nextfb_update(void *opaque) { NeXTFbState *s =3D NEXTFB(opaque); int dest_width =3D 4; @@ -90,6 +90,8 @@ static void nextfb_update(void *opaque) s, &first, &last); =20 dpy_gfx_update(s->con, 0, 0, s->cols, s->rows); + + return true; } =20 static void nextfb_invalidate(void *opaque) diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c index c41c65bb2e0..1e8385ebffb 100644 --- a/hw/display/omap_lcdc.c +++ b/hw/display/omap_lcdc.c @@ -197,7 +197,7 @@ static void draw_line16_32(void *opaque, uint8_t *d, co= nst uint8_t *s, } while (-- width !=3D 0); } =20 -static void omap_update_display(void *opaque) +static bool omap_update_display(void *opaque) { struct omap_lcd_panel_s *omap_lcd =3D opaque; DisplaySurface *surface; @@ -207,12 +207,12 @@ static void omap_update_display(void *opaque) hwaddr frame_base; =20 if (!omap_lcd || omap_lcd->plm =3D=3D 1 || !omap_lcd->enable) { - return; + return true; } =20 surface =3D qemu_console_surface(omap_lcd->con); if (!surface_bits_per_pixel(surface)) { - return; + return true; } =20 frame_offset =3D 0; @@ -256,7 +256,7 @@ static void omap_update_display(void *opaque) =20 default: /* Unsupported at the moment. */ - return; + return true; } =20 /* Resolution */ @@ -278,7 +278,7 @@ static void omap_update_display(void *opaque) omap_lcd->sync_error =3D 1; omap_lcd_interrupts(omap_lcd); omap_lcd->enable =3D 0; - return; + return true; } =20 /* Content */ @@ -291,7 +291,7 @@ static void omap_update_display(void *opaque) omap_lcd->dma->current_frame ^=3D 1; =20 if (!surface_bits_per_pixel(surface)) { - return; + return true; } =20 first =3D 0; @@ -323,6 +323,8 @@ static void omap_update_display(void *opaque) dpy_gfx_update(omap_lcd->con, 0, first, width, last - first + 1); } omap_lcd->invalidate =3D 0; + + return true; } =20 static void omap_invalidate_display(void *opaque) { diff --git a/hw/display/pl110.c b/hw/display/pl110.c index 4cd62a98757..e134ac28eb6 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -210,7 +210,7 @@ static int pl110_enabled(PL110State *s) return (s->cr & PL110_CR_EN) && (s->cr & PL110_CR_PWR); } =20 -static void pl110_update_display(void *opaque) +static bool pl110_update_display(void *opaque) { PL110State *s =3D (PL110State *)opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -221,7 +221,7 @@ static void pl110_update_display(void *opaque) int last; =20 if (!pl110_enabled(s)) { - return; + return true; } =20 if (s->cr & PL110_CR_BGR) @@ -306,6 +306,7 @@ static void pl110_update_display(void *opaque) dpy_gfx_update(s->con, 0, first, s->cols, last - first + 1); } s->invalidate =3D 0; + return true; } =20 static void pl110_invalidate_display(void * opaque) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index c6a9ac1da10..5b4f8842011 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -173,7 +173,7 @@ end: * callbacks are called by spice_server thread, deferring to bh called fro= m the * io thread. */ -void qxl_render_update(PCIQXLDevice *qxl) +bool qxl_render_update(PCIQXLDevice *qxl) { QXLCookie *cookie; =20 @@ -183,8 +183,7 @@ void qxl_render_update(PCIQXLDevice *qxl) qxl->mode =3D=3D QXL_MODE_UNDEFINED) { qxl_render_update_area_unlocked(qxl); qemu_mutex_unlock(&qxl->ssd.lock); - graphic_hw_update_done(qxl->ssd.dcl.con); - return; + return true; } =20 qxl->guest_primary.commands =3D 0; @@ -195,6 +194,7 @@ void qxl_render_update(PCIQXLDevice *qxl) qxl_set_rect_to_surface(qxl, &cookie->u.render.area); qxl_spice_update_area(qxl, 0, &cookie->u.render.area, NULL, 0, 1 /* clear_dirty_region */, QXL_ASYNC, cookie= ); + return false; } =20 void qxl_render_update_area_bh(void *opaque) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 02e8c1435be..6c3a9b1e879 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -122,7 +122,7 @@ static void qxl_reset_memslots(PCIQXLDevice *d); static void qxl_reset_surfaces(PCIQXLDevice *d); static void qxl_ring_set_dirty(PCIQXLDevice *qxl); =20 -static void qxl_hw_update(void *opaque); +static bool qxl_hw_update(void *opaque); =20 void qxl_set_guest_bug(PCIQXLDevice *qxl, const char *msg, ...) { @@ -1144,7 +1144,6 @@ static const QXLInterface qxl_interface =3D { =20 static const GraphicHwOps qxl_ops =3D { .gfx_update =3D qxl_hw_update, - .gfx_update_async =3D true, }; =20 static void qxl_enter_vga_mode(PCIQXLDevice *d) @@ -1928,11 +1927,11 @@ static void qxl_send_events(PCIQXLDevice *d, uint32= _t events) =20 /* graphics console */ =20 -static void qxl_hw_update(void *opaque) +static bool qxl_hw_update(void *opaque) { PCIQXLDevice *qxl =3D opaque; =20 - qxl_render_update(qxl); + return qxl_render_update(qxl); } =20 static void qxl_dirty_one_surface(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c index f1958be32ad..27f0ba19f90 100644 --- a/hw/display/ramfb-standalone.c +++ b/hw/display/ramfb-standalone.c @@ -20,7 +20,7 @@ struct RAMFBStandaloneState { bool use_legacy_x86_rom; }; =20 -static void display_update_wrapper(void *dev) +static bool display_update_wrapper(void *dev) { RAMFBStandaloneState *ramfb =3D RAMFB(dev); =20 @@ -29,6 +29,8 @@ static void display_update_wrapper(void *dev) } else { ramfb_display_update(ramfb->con, ramfb->state); } + + return true; } =20 static const GraphicHwOps wrapper_ops =3D { diff --git a/hw/display/sm501.c b/hw/display/sm501.c index a07aa9886f9..a3993ceba29 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1716,7 +1716,7 @@ static void draw_hwc_line_32(uint8_t *d, const uint8_= t *s, int width, } } =20 -static void sm501_update_display(void *opaque) +static bool sm501_update_display(void *opaque) { SM501State *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -1740,7 +1740,7 @@ static void sm501_update_display(void *opaque) =20 if (!((crt ? s->dc_crt_control : s->dc_panel_control) & SM501_DC_CRT_CONTROL_ENABLE)) { - return; + return true; } =20 palette =3D (uint32_t *)(crt ? &s->dc_palette[SM501_DC_CRT_PALETTE - @@ -1761,7 +1761,7 @@ static void sm501_update_display(void *opaque) default: qemu_log_mask(LOG_GUEST_ERROR, "sm501: update display" "invalid control register value.\n"); - return; + return true; } =20 /* set up to draw hardware cursor */ @@ -1833,6 +1833,8 @@ static void sm501_update_display(void *opaque) if (y_start >=3D 0) { dpy_gfx_update(s->con, 0, y_start, width, y - y_start); } + + return true; } =20 static const GraphicHwOps sm501_ops =3D { diff --git a/hw/display/ssd0303.c b/hw/display/ssd0303.c index 87781438cd5..229856cc427 100644 --- a/hw/display/ssd0303.c +++ b/hw/display/ssd0303.c @@ -203,7 +203,7 @@ static int ssd0303_event(I2CSlave *i2c, enum i2c_event = event) return 0; } =20 -static void ssd0303_update_display(void *opaque) +static bool ssd0303_update_display(void *opaque) { ssd0303_state *s =3D (ssd0303_state *)opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -218,11 +218,11 @@ static void ssd0303_update_display(void *opaque) uint8_t mask; =20 if (!s->redraw) - return; + return true; =20 switch (surface_bits_per_pixel(surface)) { case 0: - return; + return true; case 15: dest_width =3D 2; break; @@ -237,7 +237,7 @@ static void ssd0303_update_display(void *opaque) break; default: BADF("Bad color depth\n"); - return; + return true; } dest_width *=3D MAGNIFY; memset(colortab, 0xff, dest_width); @@ -269,6 +269,8 @@ static void ssd0303_update_display(void *opaque) } s->redraw =3D 0; dpy_gfx_update(s->con, 0, 0, 96 * MAGNIFY, 16 * MAGNIFY); + + return true; } =20 static void ssd0303_invalidate_display(void * opaque) diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c index af5ff4fecdc..67db16086c8 100644 --- a/hw/display/ssd0323.c +++ b/hw/display/ssd0323.c @@ -181,7 +181,7 @@ static uint32_t ssd0323_transfer(SSIPeripheral *dev, ui= nt32_t data) return 0; } =20 -static void ssd0323_update_display(void *opaque) +static bool ssd0323_update_display(void *opaque) { ssd0323_state *s =3D (ssd0323_state *)opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -197,11 +197,11 @@ static void ssd0323_update_display(void *opaque) int dest_width; =20 if (!s->redraw) - return; + return true; =20 switch (surface_bits_per_pixel(surface)) { case 0: - return; + return true; case 15: dest_width =3D 2; break; @@ -216,7 +216,7 @@ static void ssd0323_update_display(void *opaque) break; default: BADF("Bad color depth\n"); - return; + return true; } p =3D colortab; for (i =3D 0; i < 16; i++) { @@ -240,7 +240,7 @@ static void ssd0323_update_display(void *opaque) break; default: BADF("Bad color depth\n"); - return; + return true; } p +=3D dest_width; } @@ -271,6 +271,7 @@ static void ssd0323_update_display(void *opaque) } s->redraw =3D 0; dpy_gfx_update(s->con, 0, 0, 128 * MAGNIFY, 64 * MAGNIFY); + return true; } =20 static void ssd0323_invalidate_display(void * opaque) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index ea92a48400c..cedbf5c7acd 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -209,7 +209,7 @@ static inline void tcx24_draw_line32(TCXState *s1, uint= 8_t *d, /* Fixed line length 1024 allows us to do nice tricks not possible on VGA... */ =20 -static void tcx_update_display(void *opaque) +static bool tcx_update_display(void *opaque) { TCXState *ts =3D opaque; DisplaySurface *surface =3D qemu_console_surface(ts->con); @@ -257,9 +257,10 @@ static void tcx_update_display(void *opaque) ts->width, y - y_start); } g_free(snap); + return true; } =20 -static void tcx24_update_display(void *opaque) +static bool tcx24_update_display(void *opaque) { TCXState *ts =3D opaque; DisplaySurface *surface =3D qemu_console_surface(ts->con); @@ -312,6 +313,7 @@ static void tcx24_update_display(void *opaque) ts->width, y - y_start); } g_free(snap); + return true; } =20 static void tcx_invalidate_display(void *opaque) diff --git a/hw/display/vga.c b/hw/display/vga.c index 36cfc59a74e..409c02272a3 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1783,7 +1783,7 @@ static void vga_draw_blank(VGACommonState *s, int ful= l_update) #define GMODE_GRAPH 1 #define GMODE_BLANK 2 =20 -static void vga_update_display(void *opaque) +static bool vga_update_display(void *opaque) { VGACommonState *s =3D opaque; DisplaySurface *surface =3D qemu_console_surface(s->con); @@ -1818,6 +1818,8 @@ static void vga_update_display(void *opaque) break; } } + + return true; } =20 /* force a full display refresh */ diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index 7b107509510..bdc24492850 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -83,8 +83,9 @@ static void virtio_gpu_invalidate_display(void *opaque) { } =20 -static void virtio_gpu_update_display(void *opaque) +static bool virtio_gpu_update_display(void *opaque) { + return true; } =20 static void virtio_gpu_text_update(void *opaque, uint32_t *chardata) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index 02fb36b31fc..efd4858f3d0 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -19,15 +19,15 @@ static void virtio_vga_base_invalidate_display(void *op= aque) } } =20 -static void virtio_vga_base_update_display(void *opaque) +static bool virtio_vga_base_update_display(void *opaque) { VirtIOVGABase *vvga =3D opaque; VirtIOGPUBase *g =3D vvga->vgpu; =20 if (g->enable) { - g->hw_ops->gfx_update(g); + return g->hw_ops->gfx_update(g); } else { - vvga->vga.hw_ops->gfx_update(&vvga->vga); + return vvga->vga.hw_ops->gfx_update(&vvga->vga); } } =20 diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 1e154e7f99e..39606d80be1 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1135,14 +1135,13 @@ static inline void vmsvga_check_size(struct vmsvga_= state_s *s) } } =20 -static void vmsvga_update_display(void *opaque) +static bool vmsvga_update_display(void *opaque) { struct vmsvga_state_s *s =3D opaque; =20 if (!s->enable || !s->config) { /* in standard vga mode */ - s->vga.hw_ops->gfx_update(&s->vga); - return; + return s->vga.hw_ops->gfx_update(&s->vga); } =20 vmsvga_check_size(s); @@ -1154,6 +1153,8 @@ static void vmsvga_update_display(void *opaque) s->invalidated =3D 0; dpy_gfx_update_full(s->vga.con); } + + return true; } =20 static void vmsvga_reset(DeviceState *dev) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index ba886a940ee..2e431e27be6 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -709,14 +709,14 @@ static void xenfb_send_refresh_period(struct XenFB *x= enfb, int period) * Our screen might be inactive. When asked for * an update we know it is active. */ -static void xenfb_update(void *opaque) +static bool xenfb_update(void *opaque) { struct XenFB *xenfb =3D opaque; DisplaySurface *surface; int i; =20 if (xenfb->c.xendev.be_state !=3D XenbusStateConnected) - return; + return true; =20 if (!xenfb->feature_update) { /* we don't get update notifications, thus use the @@ -770,6 +770,8 @@ static void xenfb_update(void *opaque) } xenfb->up_count =3D 0; xenfb->up_fullscreen =3D 0; + + return true; } =20 static void xenfb_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info) diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 7d037b46a35..50e6ef10984 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -1252,12 +1252,12 @@ static inline void xlnx_dp_blend_surface(XlnxDPStat= e *s) surface_height(s->g_plane.surface)); } =20 -static void xlnx_dp_update_display(void *opaque) +static bool xlnx_dp_update_display(void *opaque) { XlnxDPState *s =3D XLNX_DP(opaque); =20 if ((s->core_registers[DP_TRANSMITTER_ENABLE] & 0x01) =3D=3D 0) { - return; + return true; } =20 xlnx_dpdma_trigger_vsync_irq(s->dpdma); @@ -1272,14 +1272,14 @@ static void xlnx_dp_update_display(void *opaque) */ s->core_registers[DP_INT_STATUS] |=3D (1 << 21); xlnx_dp_update_irq(s); - return; + return true; } =20 if (xlnx_dp_global_alpha_enabled(s)) { if (!xlnx_dpdma_start_operation(s->dpdma, 0, false)) { s->core_registers[DP_INT_STATUS] |=3D (1 << 21); xlnx_dp_update_irq(s); - return; + return true; } xlnx_dp_blend_surface(s); } @@ -1288,6 +1288,8 @@ static void xlnx_dp_update_display(void *opaque) * XXX: We might want to update only what changed. */ dpy_gfx_update_full(s->console); + + return true; } =20 static const GraphicHwOps xlnx_dp_gfx_ops =3D { diff --git a/hw/vfio/display.c b/hw/vfio/display.c index 5a42a6f7a29..4a9a58036e3 100644 --- a/hw/vfio/display.c +++ b/hw/vfio/display.c @@ -285,7 +285,7 @@ static void vfio_display_free_dmabufs(VFIOPCIDevice *vd= ev) } } =20 -static void vfio_display_dmabuf_update(void *opaque) +static bool vfio_display_dmabuf_update(void *opaque) { VFIOPCIDevice *vdev =3D opaque; VFIODisplay *dpy =3D vdev->dpy; @@ -298,7 +298,7 @@ static void vfio_display_dmabuf_update(void *opaque) if (dpy->ramfb) { ramfb_display_update(dpy->con, dpy->ramfb); } - return; + return true; } =20 width =3D qemu_dmabuf_get_width(primary->buf); @@ -340,6 +340,8 @@ static void vfio_display_dmabuf_update(void *opaque) if (free_bufs) { vfio_display_free_dmabufs(vdev); } + + return true; } =20 static int vfio_display_get_flags(void *opaque) @@ -399,7 +401,7 @@ void vfio_display_reset(VFIOPCIDevice *vdev) dpy_gfx_update_full(vdev->dpy->con); } =20 -static void vfio_display_region_update(void *opaque) +static bool vfio_display_region_update(void *opaque) { VFIOPCIDevice *vdev =3D opaque; VFIODisplay *dpy =3D vdev->dpy; @@ -414,18 +416,18 @@ static void vfio_display_region_update(void *opaque) if (ret < 0) { error_report("ioctl VFIO_DEVICE_QUERY_GFX_PLANE: %s", strerror(errno)); - return; + return true; } if (!plane.drm_format || !plane.size) { if (dpy->ramfb) { ramfb_display_update(dpy->con, dpy->ramfb); dpy->region.surface =3D NULL; } - return; + return true; } format =3D qemu_drm_format_to_pixman(plane.drm_format); if (!format) { - return; + return true; } =20 if (dpy->region.buffer.size && @@ -476,11 +478,12 @@ static void vfio_display_region_update(void *opaque) dpy_gfx_update(dpy->con, 0, 0, surface_width(dpy->region.surface), surface_height(dpy->region.surface)); - return; + return true; =20 err: vfio_region_exit(&dpy->region.buffer); vfio_region_finalize(&dpy->region.buffer); + return true; } =20 static const GraphicHwOps vfio_display_region_ops =3D { diff --git a/ui/console.c b/ui/console.c index f96e3cf16fa..6e073cacca0 100644 --- a/ui/console.c +++ b/ui/console.c @@ -138,15 +138,10 @@ void graphic_hw_update_done(QemuConsole *con) =20 void graphic_hw_update(QemuConsole *con) { - bool async =3D false; if (!con) { return; } - if (con->hw_ops->gfx_update) { - con->hw_ops->gfx_update(con->hw); - async =3D con->hw_ops->gfx_update_async; - } - if (!async) { + if (!con->hw_ops->gfx_update || con->hw_ops->gfx_update(con->hw)) { graphic_hw_update_done(con); } } diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index e0a765fcb1f..77d80fb7cef 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -330,25 +330,25 @@ static void apple_gfx_render_frame_completed_bh(void = *opaque) } } =20 -static void apple_gfx_fb_update_display(void *opaque) +static bool apple_gfx_fb_update_display(void *opaque) { AppleGFXState *s =3D opaque; + bool done =3D true; =20 assert(bql_locked()); if (s->new_frame_ready) { dpy_gfx_update_full(s->con); s->new_frame_ready =3D false; - graphic_hw_update_done(s->con); } else if (s->pending_frames > 0) { s->gfx_update_requested =3D true; - } else { - graphic_hw_update_done(s->con); + done =3D false; } + + return done; } =20 static const GraphicHwOps apple_gfx_fb_ops =3D { .gfx_update =3D apple_gfx_fb_update_display, - .gfx_update_async =3D true, }; =20 /* ------ Mouse cursor and display mode setting ------ */ --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849223; cv=none; d=zohomail.com; s=zohoarc; b=lRlogJ6pj1NiE3MCGAFeRR5MPnp1fo/nqU0jWPHIzbiMM1Lcduid0Eh7qjOKXwnV/vUXBUVsaJpzd4PNrPFzwP1A9g5+jRyY2tbdGR6SO8kwtsFWuAUoY1u9Lg6Um7INF5IPAQTkf0bGddj8wXx1AI+v2a1/4+Bh8hPPInZX6Lg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849223; 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=aQkA2DSqZlPisb8lLgT74xUeCra9Q1sPuB1khMGY49Q=; b=VQan4o/uLdRV8FA4BosSN/1DbNWc8ZJmYoPPCIQiR9XlfJ+oPDMCalimpKNvoHV1UTNxILJhNfpwE/Kh9+VXUuaxxFSOpGlvk2t4S4nMgJdka1lzhd+ACd4QhNX9BqP8z1ecT4EJrmrD++O0Nu9Z0gFCPlMzq1SK3hQxY6Iv+BA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849223087254.40273386080628; Fri, 10 Apr 2026 12:27:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTr-0007Zc-G3; Fri, 10 Apr 2026 15:25:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTa-0007P9-Tc for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTT-0002jI-53 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:10 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-363-imkVm4RcNXSfn3P3B7tRZw-1; Fri, 10 Apr 2026 15:24:54 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C449F195608F for ; Fri, 10 Apr 2026 19:24:53 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 51F8F18002A6; Fri, 10 Apr 2026 19:24:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849097; 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=aQkA2DSqZlPisb8lLgT74xUeCra9Q1sPuB1khMGY49Q=; b=QIKTFA8PNr9mM5MvpI9r6K7GYr5vF5MhNvXvuK8bh1SBtYRTL84gr/aY7axdEB91Iq6itg YRPREy+4IBm0chvZrvCnFUu6rSrdpiDvfKR0uDoAg92ZT/EMhIM2dRhlvoWrW7hwgLvp6j Rm2eg0c+2DuC/x6bZLBvgvD3cmem1Do= X-MC-Unique: imkVm4RcNXSfn3P3B7tRZw-1 X-Mimecast-MFC-AGG-ID: imkVm4RcNXSfn3P3B7tRZw_1775849093 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:22 +0400 Subject: [PATCH v2 60/67] ui/console: rename public API to use consistent qemu_console_ prefix MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-60-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=111649; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=P9VRIk2Z+wW2zb09YoDP6fxWYaYrsi2xMuPQKG6mhv8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XqvCu0LCqIKVsIOPjszAuu/74wwTphj3rf 9QVD+jcMWuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5WQaEACMtV3sS6qICmgWz6d+PbDlIGDSzlzRpnNQWJj4L+HD8aQzh/DgyhqhK1jwxZjeQ9dE3oz QWzy9klrWOk3LjAKzikktJEoubSIzNNmWALNHl+g9nnT99YnXaWQ8ueCq5VrzxlAWzRxZtHCNqT DThmHso1auO8irnTzWuFv7FeqjBGL83YFLZZtuyZRObsVLNWwCIVzqb0kerASk8CgecV5nYevuS WFm0L9mjid+/H1l0ax/wELbMobOaMJWdwCISJjDL5IbkBYVR1GA5jvbVTszwzqBmLywWdOlNiqJ ksIMtCAYx4Rc3lAo6eliYZMCSUieJfQnjHmd8R20KSG2A/VTU7LTw7NeiKl6r9ieunqQnZ4604D jsq9qvOnAapyTU05xAFeyZWM0+nrW2GMdVzA5yzc6JYK3TO1/xegp5pziBnLHnEtHnAiPcb0Ryn K4AD349Cvxb6QJ34feHsrO32qYAApSeV02pQDmoWaJNxI5Afsd6Sohz2z3R+XzG53LJrUm5EJ5n 16mGRQB3uMWoyXfbBf8dg8Gwz5i+LfUKMRfAUqOYs8XtOGC0njV7viPG9Nu1phM/O9Jlw7taK61 /p+jCV8hWd1wAbfEAaMMaafGss1PTSQsVH93xES7qypDEMR7bM+z3AI4k9qPuOQjGvMBOCiUedN hwBRrcgIswgcG5w== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849226019154100 Rename the display and graphic console public functions to follow a consistent qemu_console_ (or qemu_graphic_console_) naming convention. The previous API used a mix of prefixes: dpy_, graphic_hw_, graphic_console_, console_has_, and update_displaychangelistener(). Unify them under a common qemu_console_ namespace for better discoverability and consistency. The main renames are: - dpy_gfx_*() / dpy_text_*() / dpy_gl_*() =E2=86=92 qemu_console_*() - dpy_{get,set}_ui_info() =E2=86=92 qemu_console_{get,set}_ui_info() - graphic_hw_*() =E2=86=92 qemu_console_hw_*() - graphic_console_*() =E2=86=92 qemu_graphic_console_*() - console_has_gl() =E2=86=92 qemu_console_has_gl() - update_displaychangelistener() =E2=86=92 qemu_console_listener_set_refres= h() No functional changes. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 108 +++++++++++++++--------------- hw/arm/musicpal.c | 4 +- hw/display/artist.c | 4 +- hw/display/ati.c | 16 ++--- hw/display/bcm2835_fb.c | 5 +- hw/display/bochs-display.c | 14 ++-- hw/display/cg3.c | 6 +- hw/display/cirrus_vga.c | 8 +-- hw/display/cirrus_vga_isa.c | 2 +- hw/display/dm163.c | 6 +- hw/display/exynos4210_fimd.c | 4 +- hw/display/g364fb.c | 10 +-- hw/display/jazz_led.c | 8 +-- hw/display/macfb.c | 6 +- hw/display/next-fb.c | 4 +- hw/display/omap_lcdc.c | 4 +- hw/display/pl110.c | 4 +- hw/display/qxl-render.c | 12 ++-- hw/display/qxl.c | 14 ++-- hw/display/ramfb-standalone.c | 2 +- hw/display/ramfb.c | 4 +- hw/display/sm501.c | 6 +- hw/display/ssd0303.c | 4 +- hw/display/ssd0323.c | 5 +- hw/display/tcx.c | 16 ++--- hw/display/vga-isa.c | 2 +- hw/display/vga-mmio.c | 2 +- hw/display/vga-pci.c | 6 +- hw/display/vga.c | 40 ++++++----- hw/display/vhost-user-gpu.c | 22 +++--- hw/display/virtio-gpu-base.c | 2 +- hw/display/virtio-gpu-rutabaga.c | 10 +-- hw/display/virtio-gpu-udmabuf.c | 4 +- hw/display/virtio-gpu-virgl.c | 20 +++--- hw/display/virtio-gpu.c | 26 ++++---- hw/display/virtio-vga.c | 2 +- hw/display/vmware_vga.c | 12 ++-- hw/display/xenfb.c | 6 +- hw/display/xlnx_dp.c | 10 +-- hw/vfio/display.c | 32 ++++----- ui/console-vc.c | 12 ++-- ui/console.c | 140 +++++++++++++++++++----------------= ---- ui/curses.c | 8 +-- ui/dbus-console.c | 4 +- ui/dbus-listener.c | 10 +-- ui/egl-headless.c | 4 +- ui/gtk-egl.c | 6 +- ui/gtk-gl-area.c | 6 +- ui/gtk.c | 18 ++--- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- ui/sdl2.c | 6 +- ui/spice-display.c | 16 ++--- ui/vnc.c | 22 +++--- hw/display/apple-gfx.m | 16 ++--- ui/cocoa.m | 10 +-- 56 files changed, 372 insertions(+), 382 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index c93ab7d619e..5566d1f65f9 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -308,49 +308,49 @@ DisplayState *init_displaystate(void); void qemu_console_register_listener(QemuConsole *con, DisplayChangeListener *dcl, const DisplayChangeListenerOps *ops); -void update_displaychangelistener(DisplayChangeListener *dcl, - uint64_t interval); +void qemu_console_listener_set_refresh(DisplayChangeListener *dcl, + uint64_t interval); void qemu_console_unregister_listener(DisplayChangeListener *dcl); =20 -bool dpy_ui_info_supported(const QemuConsole *con); -const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con); -int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info, bool delay); - -void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h); -void dpy_gfx_update_full(QemuConsole *con); -void dpy_gfx_replace_surface(QemuConsole *con, - DisplaySurface *surface); -void dpy_text_cursor(QemuConsole *con, int x, int y); -void dpy_text_update(QemuConsole *con, int x, int y, int w, int h); -void dpy_text_resize(QemuConsole *con, int w, int h); -void dpy_mouse_set(QemuConsole *con, int x, int y, bool on); -void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor); -bool dpy_gfx_check_format(QemuConsole *con, - pixman_format_code_t format); - -void dpy_gl_scanout_disable(QemuConsole *con); -void dpy_gl_scanout_texture(QemuConsole *con, - uint32_t backing_id, bool backing_y_0_top, - uint32_t backing_width, uint32_t backing_heigh= t, - uint32_t x, uint32_t y, uint32_t w, uint32_t h, - void *d3d_tex2d); -void dpy_gl_scanout_dmabuf(QemuConsole *con, - QemuDmaBuf *dmabuf); -void dpy_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBuf *dmabuf, - bool have_hot, uint32_t hot_x, uint32_t hot_y); -void dpy_gl_cursor_position(QemuConsole *con, - uint32_t pos_x, uint32_t pos_y); -void dpy_gl_release_dmabuf(QemuConsole *con, - QemuDmaBuf *dmabuf); -void dpy_gl_update(QemuConsole *con, - uint32_t x, uint32_t y, uint32_t w, uint32_t h); - -QEMUGLContext dpy_gl_ctx_create(QemuConsole *con, - QEMUGLParams *params); -void dpy_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx); -int dpy_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx); - -bool console_has_gl(QemuConsole *con); +bool qemu_console_ui_info_supported(const QemuConsole *con); +const QemuUIInfo *qemu_console_get_ui_info(const QemuConsole *con); +int qemu_console_set_ui_info(QemuConsole *con, QemuUIInfo *info, bool dela= y); + +void qemu_console_update(QemuConsole *con, int x, int y, int w, int h); +void qemu_console_update_full(QemuConsole *con); +void qemu_console_set_surface(QemuConsole *con, + DisplaySurface *surface); +void qemu_console_text_set_cursor(QemuConsole *con, int x, int y); +void qemu_console_text_update(QemuConsole *con, int x, int y, int w, int h= ); +void qemu_console_text_resize(QemuConsole *con, int w, int h); +void qemu_console_set_mouse(QemuConsole *con, int x, int y, bool on); +void qemu_console_set_cursor(QemuConsole *con, QEMUCursor *cursor); +bool qemu_console_check_format(QemuConsole *con, + pixman_format_code_t format); + +void qemu_console_gl_scanout_disable(QemuConsole *con); +void qemu_console_gl_scanout_texture(QemuConsole *con, + uint32_t backing_id, bool backing_y_0= _top, + uint32_t backing_width, uint32_t back= ing_height, + uint32_t x, uint32_t y, uint32_t w, u= int32_t h, + void *d3d_tex2d); +void qemu_console_gl_scanout_dmabuf(QemuConsole *con, + QemuDmaBuf *dmabuf); +void qemu_console_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBuf *dmabuf, + bool have_hot, uint32_t hot_x, uint32_t= hot_y); +void qemu_console_gl_cursor_position(QemuConsole *con, + uint32_t pos_x, uint32_t pos_y); +void qemu_console_gl_release_dmabuf(QemuConsole *con, + QemuDmaBuf *dmabuf); +void qemu_console_gl_update(QemuConsole *con, + uint32_t x, uint32_t y, uint32_t w, uint32_t h= ); + +QEMUGLContext qemu_console_gl_ctx_create(QemuConsole *con, + QEMUGLParams *params); +void qemu_console_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx); +int qemu_console_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx); + +bool qemu_console_has_gl(QemuConsole *con); =20 enum { GRAPHIC_FLAGS_NONE =3D 0, @@ -375,19 +375,19 @@ typedef struct GraphicHwOps { void (*gl_block)(void *opaque, bool block); } GraphicHwOps; =20 -QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head, - const GraphicHwOps *ops, - void *opaque); -void graphic_console_set_hwops(QemuConsole *con, - const GraphicHwOps *hw_ops, - void *opaque); -void graphic_console_close(QemuConsole *con); - -void graphic_hw_update(QemuConsole *con); -void graphic_hw_update_done(QemuConsole *con); -void graphic_hw_invalidate(QemuConsole *con); -void graphic_hw_text_update(QemuConsole *con, uint32_t *chardata); -void graphic_hw_gl_block(QemuConsole *con, bool block); +QemuConsole *qemu_graphic_console_create(DeviceState *dev, uint32_t head, + const GraphicHwOps *ops, + void *opaque); +void qemu_graphic_console_set_hwops(QemuConsole *con, + const GraphicHwOps *hw_ops, + void *opaque); +void qemu_graphic_console_close(QemuConsole *con); + +void qemu_console_hw_update(QemuConsole *con); +void qemu_console_hw_update_done(QemuConsole *con); +void qemu_console_hw_invalidate(QemuConsole *con); +void qemu_console_hw_text_update(QemuConsole *con, uint32_t *chardata); +void qemu_console_hw_gl_block(QemuConsole *con, bool block); =20 void qemu_console_early_init(void); =20 diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 913f98b5d8e..2f43d774dbe 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -171,7 +171,7 @@ static bool lcd_refresh(void *opaque) } } =20 - dpy_gfx_update(s->con, 0, 0, 128*3, 64*3); + qemu_console_update(s->con, 0, 0, 128*3, 64*3); return true; } =20 @@ -254,7 +254,7 @@ static const GraphicHwOps musicpal_gfx_ops =3D { static void musicpal_lcd_realize(DeviceState *dev, Error **errp) { musicpal_lcd_state *s =3D MUSICPAL_LCD(dev); - s->con =3D graphic_console_init(dev, 0, &musicpal_gfx_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &musicpal_gfx_ops, s); qemu_console_resize(s->con, 128 * 3, 64 * 3); } =20 diff --git a/hw/display/artist.c b/hw/display/artist.c index a07508378c7..288d466ec64 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -1324,7 +1324,7 @@ static bool artist_update_display(void *opaque) artist_draw_cursor(s); =20 if (first >=3D 0) { - dpy_gfx_update(s->con, 0, first, s->width, last - first + 1); + qemu_console_update(s->con, 0, first, s->width, last - first + 1); } =20 return true; @@ -1424,7 +1424,7 @@ static void artist_realizefn(DeviceState *dev, Error = **errp) s->misc_video |=3D 0x0A000000; s->misc_ctrl |=3D 0x00800000; =20 - s->con =3D graphic_console_init(dev, 0, &artist_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &artist_ops, s); qemu_console_resize(s->con, s->width, s->height); } =20 diff --git a/hw/display/ati.c b/hw/display/ati.c index 88a5bbbf07a..882ffc1bcf9 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -161,7 +161,7 @@ static void ati_cursor_define(ATIVGAState *s) } cursor_set_mono(s->cursor, s->regs.cur_color1, s->regs.cur_color0, (uint8_t *)&data[64], 1, (uint8_t *)&data[0]); - dpy_cursor_define(s->vga.con, s->cursor); + qemu_console_set_cursor(s->vga.con, s->cursor); } =20 /* Alternatively support guest rendered hardware cursor */ @@ -624,9 +624,9 @@ static void ati_mm_write(void *opaque, hwaddr addr, if (s->regs.crtc_gen_cntl & CRTC2_CUR_EN) { ati_cursor_define(s); } - dpy_mouse_set(s->vga.con, s->regs.cur_hv_pos >> 16, - s->regs.cur_hv_pos & 0xffff, - (s->regs.crtc_gen_cntl & CRTC2_CUR_EN) !=3D = 0); + qemu_console_set_mouse(s->vga.con, s->regs.cur_hv_pos >> 1= 6, + s->regs.cur_hv_pos & 0xffff, + (s->regs.crtc_gen_cntl & CRTC2_CUR_= EN) !=3D 0); } } if ((val & (CRTC2_EXT_DISP_EN | CRTC2_EN)) !=3D @@ -778,8 +778,8 @@ static void ati_mm_write(void *opaque, hwaddr addr, } if (!s->cursor_guest_mode && (s->regs.crtc_gen_cntl & CRTC2_CUR_EN) && !(t & BIT(31))) { - dpy_mouse_set(s->vga.con, s->regs.cur_hv_pos >> 16, - s->regs.cur_hv_pos & 0xffff, true); + qemu_console_set_mouse(s->vga.con, s->regs.cur_hv_pos >> 16, + s->regs.cur_hv_pos & 0xffff, true); } break; } @@ -1092,7 +1092,7 @@ static void ati_vga_realize(PCIDevice *dev, Error **e= rrp) } vga_init(vga, OBJECT(s), pci_address_space(dev), pci_address_space_io(dev), true); - vga->con =3D graphic_console_init(DEVICE(s), 0, s->vga.hw_ops, vga); + vga->con =3D qemu_graphic_console_create(DEVICE(s), 0, s->vga.hw_ops, = vga); if (s->cursor_guest_mode) { vga->cursor_invalidate =3D ati_cursor_invalidate; vga->cursor_draw_line =3D ati_cursor_draw_line; @@ -1165,7 +1165,7 @@ static void ati_vga_exit(PCIDevice *dev) ATIVGAState *s =3D ATI_VGA(dev); =20 timer_del(&s->vblank_timer); - graphic_console_close(s->vga.con); + qemu_graphic_console_close(s->vga.con); } =20 static const Property ati_vga_properties[] =3D { diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c index 83c4c03c7ca..bd58f625fcd 100644 --- a/hw/display/bcm2835_fb.c +++ b/hw/display/bcm2835_fb.c @@ -207,8 +207,7 @@ static bool fb_update_display(void *opaque) draw_line_src16, s, &first, &last); =20 if (first >=3D 0) { - dpy_gfx_update(s->con, 0, first, s->config.xres, - last - first + 1); + qemu_console_update(s->con, 0, first, s->config.xres, last - first= + 1); } =20 s->invalidate =3D false; @@ -427,7 +426,7 @@ static void bcm2835_fb_realize(DeviceState *dev, Error = **errp) =20 bcm2835_fb_reset(dev); =20 - s->con =3D graphic_console_init(dev, 0, &vgafb_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &vgafb_ops, s); qemu_console_resize(s->con, s->config.xres, s->config.yres); } =20 diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 8ef9b76cf85..64e669429c4 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -224,12 +224,12 @@ static bool bochs_display_update(void *opaque) mode.format, mode.stride, ptr + mode.offset); - dpy_gfx_replace_surface(s->con, ds); + qemu_console_set_surface(s->con, ds); full_update =3D true; } =20 if (full_update) { - dpy_gfx_update_full(s->con); + qemu_console_update_full(s->con); } else { snap =3D memory_region_snapshot_and_clear_dirty(&s->vram, mode.offset, mode.si= ze, @@ -243,14 +243,12 @@ static bool bochs_display_update(void *opaque) ys =3D y; } if (!dirty && ys >=3D 0) { - dpy_gfx_update(s->con, 0, ys, - mode.width, y - ys); + qemu_console_update(s->con, 0, ys, mode.width, y - ys); ys =3D -1; } } if (ys >=3D 0) { - dpy_gfx_update(s->con, 0, ys, - mode.width, y - ys); + qemu_console_update(s->con, 0, ys, mode.width, y - ys); } =20 g_free(snap); @@ -279,7 +277,7 @@ static void bochs_display_realize(PCIDevice *dev, Error= **errp) } s->vgamem =3D pow2ceil(s->vgamem); =20 - s->con =3D graphic_console_init(DEVICE(dev), 0, &bochs_display_gfx_ops= , s); + s->con =3D qemu_graphic_console_create(DEVICE(dev), 0, &bochs_display_= gfx_ops, s); =20 memory_region_init_ram(&s->vram, obj, "bochs-display-vram", s->vgamem, &error_fatal); @@ -344,7 +342,7 @@ static void bochs_display_exit(PCIDevice *dev) { BochsDisplayState *s =3D BOCHS_DISPLAY(dev); =20 - graphic_console_close(s->con); + qemu_graphic_console_close(s->con); } =20 static const Property bochs_display_properties[] =3D { diff --git a/hw/display/cg3.c b/hw/display/cg3.c index 963bb3427a6..f9dda1549dd 100644 --- a/hw/display/cg3.c +++ b/hw/display/cg3.c @@ -137,7 +137,7 @@ static bool cg3_update_display(void *opaque) } } else { if (y_start >=3D 0) { - dpy_gfx_update(s->con, 0, y_start, width, y - y_start); + qemu_console_update(s->con, 0, y_start, width, y - y_start= ); y_start =3D -1; } pix +=3D width; @@ -146,7 +146,7 @@ static bool cg3_update_display(void *opaque) } s->full_update =3D 0; if (y_start >=3D 0) { - dpy_gfx_update(s->con, 0, y_start, width, y - y_start); + qemu_console_update(s->con, 0, y_start, width, y - y_start); } /* vsync interrupt? */ if (s->regs[0] & CG3_CR_ENABLE_INTS) { @@ -311,7 +311,7 @@ static void cg3_realizefn(DeviceState *dev, Error **err= p) =20 sysbus_init_irq(sbd, &s->irq); =20 - s->con =3D graphic_console_init(dev, 0, &cg3_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &cg3_ops, s); qemu_console_resize(s->con, s->width, s->height); } =20 diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 48be3c8a932..0a8c74e1374 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -779,9 +779,9 @@ static int cirrus_do_copy(CirrusVGAState *s, int dst, i= nt src, int w, int h) s->cirrus_blt_width, s->cirrus_blt_height); =20 if (notify) { - dpy_gfx_update(s->vga.con, dx, dy, - s->cirrus_blt_width / depth, - s->cirrus_blt_height); + qemu_console_update(s->vga.con, dx, dy, + s->cirrus_blt_width / depth, + s->cirrus_blt_height); } =20 /* we don't have to notify the display that this portion has @@ -2964,7 +2964,7 @@ static void pci_cirrus_vga_realize(PCIDevice *dev, Er= ror **errp) } cirrus_init_common(s, OBJECT(dev), device_id, 1, pci_address_space(dev= ), pci_address_space_io(dev)); - s->vga.con =3D graphic_console_init(DEVICE(dev), 0, s->vga.hw_ops, &s-= >vga); + s->vga.con =3D qemu_graphic_console_create(DEVICE(dev), 0, s->vga.hw_o= ps, &s->vga); =20 /* setup PCI */ memory_region_init(&s->pci_bar, OBJECT(dev), "cirrus-pci-bar0", 0x2000= 000); diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c index 76034a88605..b8052d1d8ed 100644 --- a/hw/display/cirrus_vga_isa.c +++ b/hw/display/cirrus_vga_isa.c @@ -62,7 +62,7 @@ static void isa_cirrus_vga_realizefn(DeviceState *dev, Er= ror **errp) cirrus_init_common(&d->cirrus_vga, OBJECT(dev), CIRRUS_ID_CLGD5430, 0, isa_address_space(isadev), isa_address_space_io(isadev)); - s->con =3D graphic_console_init(dev, 0, s->hw_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, s->hw_ops, s); rom_add_vga(VGABIOS_CIRRUS_FILENAME); /* XXX ISA-LFB support */ /* FIXME not qdev yet */ diff --git a/hw/display/dm163.c b/hw/display/dm163.c index 9ea62cb4f76..afade0b98c3 100644 --- a/hw/display/dm163.c +++ b/hw/display/dm163.c @@ -277,8 +277,8 @@ static uint32_t *update_display_of_row(DM163State *s, u= int32_t *dest, } } =20 - dpy_gfx_update(s->console, 0, LED_SQUARE_SIZE * row, - RGB_MATRIX_NUM_COLS * LED_SQUARE_SIZE, LED_SQUARE_SIZE= ); + qemu_console_update(s->console, 0, LED_SQUARE_SIZE * row, + RGB_MATRIX_NUM_COLS * LED_SQUARE_SIZE, LED_SQUARE_= SIZE); s->redraw &=3D ~(1 << row); trace_dm163_redraw(s->redraw); =20 @@ -322,7 +322,7 @@ static void dm163_realize(DeviceState *dev, Error **err= p) qdev_init_gpio_in(dev, dm163_en_b_gpio_handler, 1); qdev_init_gpio_out_named(dev, &s->sout, "sout", 1); =20 - s->console =3D graphic_console_init(dev, 0, &dm163_ops, s); + s->console =3D qemu_graphic_console_create(dev, 0, &dm163_ops, s); qemu_console_resize(s->console, RGB_MATRIX_NUM_COLS * LED_SQUARE_SIZE, RGB_MATRIX_NUM_ROWS * LED_SQUARE_SIZE); } diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index a91f04aaf79..5133623ee2e 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1340,7 +1340,7 @@ static bool exynos4210_fimd_update(void *opaque) fimd_copy_line_toqemu(global_width, s->ifb + global_width * li= ne * RGBA_SIZE, d + global_width * line * bpp); } - dpy_gfx_update_full(s->console); + qemu_console_update_full(s->console); } s->invalidate =3D false; s->vidintcon[1] |=3D FIMD_VIDINT_INTFRMPEND; @@ -1964,7 +1964,7 @@ static void exynos4210_fimd_realize(DeviceState *dev,= Error **errp) return; } =20 - s->console =3D graphic_console_init(dev, 0, &exynos4210_fimd_ops, s); + s->console =3D qemu_graphic_console_create(dev, 0, &exynos4210_fimd_op= s, s); } =20 static void exynos4210_fimd_class_init(ObjectClass *klass, const void *dat= a) diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c index bd15f6f0acc..af54f1f9005 100644 --- a/hw/display/g364fb.c +++ b/hw/display/g364fb.c @@ -191,8 +191,8 @@ static void g364fb_draw_graphic8(G364State *s) } else { int dy; if (xmax || ymax) { - dpy_gfx_update(s->con, xmin, ymin, - xmax - xmin + 1, ymax - ymin + 1); + qemu_console_update(s->con, xmin, ymin, + xmax - xmin + 1, ymax - ymin + 1); xmin =3D s->width; xmax =3D 0; ymin =3D s->height; @@ -211,7 +211,7 @@ static void g364fb_draw_graphic8(G364State *s) =20 done: if (xmax || ymax) { - dpy_gfx_update(s->con, xmin, ymin, xmax - xmin + 1, ymax - ymin + = 1); + qemu_console_update(s->con, xmin, ymin, xmax - xmin + 1, ymax - ym= in + 1); } g_free(snap); } @@ -234,7 +234,7 @@ static void g364fb_draw_blank(G364State *s) d +=3D surface_stride(surface); } =20 - dpy_gfx_update_full(s->con); + qemu_console_update_full(s->con); s->blanked =3D 1; } =20 @@ -478,7 +478,7 @@ static const GraphicHwOps g364fb_ops =3D { =20 static void g364fb_init(DeviceState *dev, G364State *s) { - s->con =3D graphic_console_init(dev, 0, &g364fb_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &g364fb_ops, s); =20 memory_region_init_io(&s->mem_ctrl, OBJECT(dev), &g364fb_ctrl_ops, s, "ctrl", 0x180000); diff --git a/hw/display/jazz_led.c b/hw/display/jazz_led.c index ee9758a94b5..84fe1058406 100644 --- a/hw/display/jazz_led.c +++ b/hw/display/jazz_led.c @@ -217,7 +217,7 @@ static bool jazz_led_update_display(void *opaque) } =20 s->state =3D REDRAW_NONE; - dpy_gfx_update_full(s->con); + qemu_console_update_full(s->con); =20 return true; } @@ -233,7 +233,7 @@ static void jazz_led_text_update(void *opaque, uint32_t= *chardata) LedState *s =3D opaque; char buf[3]; =20 - dpy_text_cursor(s->con, -1, -1); + qemu_console_text_set_cursor(s->con, -1, -1); qemu_console_resize(s->con, 2, 1); =20 /* TODO: draw the segments */ @@ -243,7 +243,7 @@ static void jazz_led_text_update(void *opaque, uint32_t= *chardata) *chardata++ =3D ATTR2CHTYPE(buf[1], QEMU_COLOR_BLUE, QEMU_COLOR_BLACK, 1); =20 - dpy_text_update(s->con, 0, 0, 2, 1); + qemu_console_text_update(s->con, 0, 0, 2, 1); } =20 static int jazz_led_post_load(void *opaque, int version_id) @@ -284,7 +284,7 @@ static void jazz_led_realize(DeviceState *dev, Error **= errp) { LedState *s =3D JAZZ_LED(dev); =20 - s->con =3D graphic_console_init(dev, 0, &jazz_led_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &jazz_led_ops, s); } =20 static void jazz_led_reset(DeviceState *d) diff --git a/hw/display/macfb.c b/hw/display/macfb.c index 848c3c282bd..f40a7ed9f52 100644 --- a/hw/display/macfb.c +++ b/hw/display/macfb.c @@ -320,14 +320,14 @@ static void macfb_draw_graphic(MacfbState *s) } } else { if (ymin >=3D 0) { - dpy_gfx_update(s->con, 0, ymin, s->width, y - ymin); + qemu_console_update(s->con, 0, ymin, s->width, y - ymin); ymin =3D -1; } } } =20 if (ymin >=3D 0) { - dpy_gfx_update(s->con, 0, ymin, s->width, y - ymin); + qemu_console_update(s->con, 0, ymin, s->width, y - ymin); } =20 g_free(snap); @@ -671,7 +671,7 @@ static bool macfb_common_realize(DeviceState *dev, Macf= bState *s, Error **errp) s->regs[DAFB_MODE_CTRL1 >> 2] =3D s->mode->mode_ctrl1; s->regs[DAFB_MODE_CTRL2 >> 2] =3D s->mode->mode_ctrl2; =20 - s->con =3D graphic_console_init(dev, 0, &macfb_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &macfb_ops, s); surface =3D qemu_console_surface(s->con); =20 if (surface_bits_per_pixel(surface) !=3D 32) { diff --git a/hw/display/next-fb.c b/hw/display/next-fb.c index e758b223ef7..fa2e0d0da80 100644 --- a/hw/display/next-fb.c +++ b/hw/display/next-fb.c @@ -89,7 +89,7 @@ static bool nextfb_update(void *opaque) src_width, dest_width, 0, 1, nextfb_draw_li= ne, s, &first, &last); =20 - dpy_gfx_update(s->con, 0, 0, s->cols, s->rows); + qemu_console_update(s->con, 0, 0, s->cols, s->rows); =20 return true; } @@ -117,7 +117,7 @@ static void nextfb_realize(DeviceState *dev, Error **er= rp) s->cols =3D 1120; s->rows =3D 832; =20 - s->con =3D graphic_console_init(dev, 0, &nextfb_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &nextfb_ops, s); qemu_console_resize(s->con, s->cols, s->rows); } =20 diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c index 1e8385ebffb..2a8d5ffdd57 100644 --- a/hw/display/omap_lcdc.c +++ b/hw/display/omap_lcdc.c @@ -320,7 +320,7 @@ static bool omap_update_display(void *opaque) &first, &last); =20 if (first >=3D 0) { - dpy_gfx_update(omap_lcd->con, 0, first, width, last - first + 1); + qemu_console_update(omap_lcd->con, 0, first, width, last - first += 1); } omap_lcd->invalidate =3D 0; =20 @@ -504,7 +504,7 @@ struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *s= ysmem, memory_region_init_io(&s->iomem, NULL, &omap_lcdc_ops, s, "omap.lcdc",= 0x100); memory_region_add_subregion(sysmem, base, &s->iomem); =20 - s->con =3D graphic_console_init(NULL, 0, &omap_ops, s); + s->con =3D qemu_graphic_console_create(NULL, 0, &omap_ops, s); =20 return s; } diff --git a/hw/display/pl110.c b/hw/display/pl110.c index e134ac28eb6..4a93cf4cda9 100644 --- a/hw/display/pl110.c +++ b/hw/display/pl110.c @@ -303,7 +303,7 @@ static bool pl110_update_display(void *opaque) &first, &last); =20 if (first >=3D 0) { - dpy_gfx_update(s->con, 0, first, s->cols, last - first + 1); + qemu_console_update(s->con, 0, first, s->cols, last - first + 1); } s->invalidate =3D 0; return true; @@ -557,7 +557,7 @@ static void pl110_realize(DeviceState *dev, Error **err= p) s->vblank_timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, pl110_vblank_interrupt, s); qdev_init_gpio_in(dev, pl110_mux_ctrl_set, 1); - s->con =3D graphic_console_init(dev, 0, &pl110_gfx_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &pl110_gfx_ops, s); } =20 static void pl110_init(Object *obj) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index 5b4f8842011..7b692d5a854 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -135,7 +135,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDevic= e *qxl) (width, height); } - dpy_gfx_replace_surface(vga->con, surface); + qemu_console_set_surface(vga->con, surface); } =20 if (!qxl->guest_primary.data) { @@ -154,16 +154,16 @@ static void qxl_render_update_area_unlocked(PCIQXLDev= ice *qxl) continue; } qxl_blit(qxl, qxl->dirty+i); - dpy_gfx_update(vga->con, - qxl->dirty[i].left, qxl->dirty[i].top, - qxl->dirty[i].right - qxl->dirty[i].left, - qxl->dirty[i].bottom - qxl->dirty[i].top); + qemu_console_update(vga->con, + qxl->dirty[i].left, qxl->dirty[i].top, + qxl->dirty[i].right - qxl->dirty[i].left, + qxl->dirty[i].bottom - qxl->dirty[i].top); } qxl->num_dirty_rects =3D 0; =20 end: if (qxl->render_update_cookie_num =3D=3D 0) { - graphic_hw_update_done(qxl->ssd.dcl.con); + qemu_console_hw_update_done(qxl->ssd.dcl.con); } } =20 diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 6c3a9b1e879..c4da51e4f4c 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1153,13 +1153,13 @@ static void qxl_enter_vga_mode(PCIQXLDevice *d) } trace_qxl_enter_vga_mode(d->id); spice_qxl_driver_unload(&d->ssd.qxl); - graphic_console_set_hwops(d->ssd.dcl.con, d->vga.hw_ops, &d->vga); - update_displaychangelistener(&d->ssd.dcl, GUI_REFRESH_INTERVAL_DEFAULT= ); + qemu_graphic_console_set_hwops(d->ssd.dcl.con, d->vga.hw_ops, &d->vga); + qemu_console_listener_set_refresh(&d->ssd.dcl, GUI_REFRESH_INTERVAL_DE= FAULT); qemu_spice_create_host_primary(&d->ssd); d->mode =3D QXL_MODE_VGA; qemu_spice_display_switch(&d->ssd, d->ssd.ds); vga_dirty_log_start(&d->vga); - graphic_hw_update(d->vga.con); + qemu_console_hw_update(d->vga.con); } =20 static void qxl_exit_vga_mode(PCIQXLDevice *d) @@ -1168,8 +1168,8 @@ static void qxl_exit_vga_mode(PCIQXLDevice *d) return; } trace_qxl_exit_vga_mode(d->id); - graphic_console_set_hwops(d->ssd.dcl.con, &qxl_ops, d); - update_displaychangelistener(&d->ssd.dcl, GUI_REFRESH_INTERVAL_IDLE); + qemu_graphic_console_set_hwops(d->ssd.dcl.con, &qxl_ops, d); + qemu_console_listener_set_refresh(&d->ssd.dcl, GUI_REFRESH_INTERVAL_ID= LE); vga_dirty_log_stop(&d->vga); qxl_destroy_primary(d, QXL_SYNC); } @@ -2237,7 +2237,7 @@ static void qxl_realize_primary(PCIDevice *dev, Error= **errp) portio_list_add(&qxl->vga_port_list, pci_address_space_io(dev), 0x3b0); qxl->have_vga =3D true; =20 - vga->con =3D graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); + vga->con =3D qemu_graphic_console_create(DEVICE(dev), 0, &qxl_ops, qxl= ); qxl->id =3D qemu_console_get_index(vga->con); /* =3D=3D channel_id */ if (qxl->id !=3D 0) { error_setg(errp, "primary qxl-vga device must be console 0 " @@ -2262,7 +2262,7 @@ static void qxl_realize_secondary(PCIDevice *dev, Err= or **errp) memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram", qxl->vga.vram_size, &error_fatal); qxl->vga.vram_ptr =3D memory_region_get_ram_ptr(&qxl->vga.vram); - qxl->vga.con =3D graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); + qxl->vga.con =3D qemu_graphic_console_create(DEVICE(dev), 0, &qxl_ops,= qxl); qxl->ssd.dcl.con =3D qxl->vga.con; qxl->id =3D qemu_console_get_index(qxl->vga.con); /* =3D=3D channel_id= */ =20 diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c index 27f0ba19f90..8e8ba37514a 100644 --- a/hw/display/ramfb-standalone.c +++ b/hw/display/ramfb-standalone.c @@ -41,7 +41,7 @@ static void ramfb_realizefn(DeviceState *dev, Error **err= p) { RAMFBStandaloneState *ramfb =3D RAMFB(dev); =20 - ramfb->con =3D graphic_console_init(dev, 0, &wrapper_ops, dev); + ramfb->con =3D qemu_graphic_console_create(dev, 0, &wrapper_ops, dev); ramfb->state =3D ramfb_setup(ramfb->use_legacy_x86_rom, errp); } =20 diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index 50c25706a52..7a88f934e11 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -111,12 +111,12 @@ void ramfb_display_update(QemuConsole *con, RAMFBStat= e *s) } =20 if (s->ds) { - dpy_gfx_replace_surface(con, s->ds); + qemu_console_set_surface(con, s->ds); s->ds =3D NULL; } =20 /* simple full screen update */ - dpy_gfx_update_full(con); + qemu_console_update_full(con); } =20 static int ramfb_post_load(void *opaque, int version_id) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index a3993ceba29..af870048372 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1822,7 +1822,7 @@ static bool sm501_update_display(void *opaque) } else { if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(s->con, 0, y_start, width, y - y_start); + qemu_console_update(s->con, 0, y_start, width, y - y_start= ); y_start =3D -1; } } @@ -1831,7 +1831,7 @@ static bool sm501_update_display(void *opaque) =20 /* complete flush to display */ if (y_start >=3D 0) { - dpy_gfx_update(s->con, 0, y_start, width, y - y_start); + qemu_console_update(s->con, 0, y_start, width, y - y_start); } =20 return true; @@ -1936,7 +1936,7 @@ static void sm501_init(SM501State *s, DeviceState *de= v, &s->twoD_engine_region); =20 /* create qemu graphic console */ - s->con =3D graphic_console_init(dev, 0, &sm501_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &sm501_ops, s); } =20 static const VMStateDescription vmstate_sm501_state =3D { diff --git a/hw/display/ssd0303.c b/hw/display/ssd0303.c index 229856cc427..4e3dede33f1 100644 --- a/hw/display/ssd0303.c +++ b/hw/display/ssd0303.c @@ -268,7 +268,7 @@ static bool ssd0303_update_display(void *opaque) } } s->redraw =3D 0; - dpy_gfx_update(s->con, 0, 0, 96 * MAGNIFY, 16 * MAGNIFY); + qemu_console_update(s->con, 0, 0, 96 * MAGNIFY, 16 * MAGNIFY); =20 return true; } @@ -309,7 +309,7 @@ static void ssd0303_realize(DeviceState *dev, Error **e= rrp) { ssd0303_state *s =3D SSD0303(dev); =20 - s->con =3D graphic_console_init(dev, 0, &ssd0303_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &ssd0303_ops, s); qemu_console_resize(s->con, 96 * MAGNIFY, 16 * MAGNIFY); } =20 diff --git a/hw/display/ssd0323.c b/hw/display/ssd0323.c index 67db16086c8..9309d4d10c4 100644 --- a/hw/display/ssd0323.c +++ b/hw/display/ssd0323.c @@ -270,7 +270,8 @@ static bool ssd0323_update_display(void *opaque) } } s->redraw =3D 0; - dpy_gfx_update(s->con, 0, 0, 128 * MAGNIFY, 64 * MAGNIFY); + qemu_console_update(s->con, 0, 0, 128 * MAGNIFY, 64 * MAGNIFY); + return true; } =20 @@ -356,7 +357,7 @@ static void ssd0323_realize(SSIPeripheral *d, Error **e= rrp) =20 s->col_end =3D 63; s->row_end =3D 79; - s->con =3D graphic_console_init(dev, 0, &ssd0323_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &ssd0323_ops, s); qemu_console_resize(s->con, 128 * MAGNIFY, 64 * MAGNIFY); =20 qdev_init_gpio_in(dev, ssd0323_cd, 1); diff --git a/hw/display/tcx.c b/hw/display/tcx.c index cedbf5c7acd..2c33a9c4a32 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -243,8 +243,7 @@ static bool tcx_update_display(void *opaque) } else { if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(ts->con, 0, y_start, - ts->width, y - y_start); + qemu_console_update(ts->con, 0, y_start, ts->width, y - y_= start); y_start =3D -1; } } @@ -253,8 +252,7 @@ static bool tcx_update_display(void *opaque) } if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(ts->con, 0, y_start, - ts->width, y - y_start); + qemu_console_update(ts->con, 0, y_start, ts->width, y - y_start); } g_free(snap); return true; @@ -297,8 +295,7 @@ static bool tcx24_update_display(void *opaque) } else { if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(ts->con, 0, y_start, - ts->width, y - y_start); + qemu_console_update(ts->con, 0, y_start, ts->width, y - y_= start); y_start =3D -1; } } @@ -309,8 +306,7 @@ static bool tcx24_update_display(void *opaque) } if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(ts->con, 0, y_start, - ts->width, y - y_start); + qemu_console_update(ts->con, 0, y_start, ts->width, y - y_start); } g_free(snap); return true; @@ -864,9 +860,9 @@ static void tcx_realize(DeviceState *dev, Error **errp) sysbus_init_irq(sbd, &s->irq); =20 if (s->depth =3D=3D 8) { - s->con =3D graphic_console_init(dev, 0, &tcx_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &tcx_ops, s); } else { - s->con =3D graphic_console_init(dev, 0, &tcx24_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &tcx24_ops, s); } s->thcmisc =3D 0; =20 diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index 5f55c884a1b..2cccb0ef12e 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -79,7 +79,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **e= rrp) 0x000a0000, vga_io_memory, 1); memory_region_set_coalescing(vga_io_memory); - s->con =3D graphic_console_init(dev, 0, s->hw_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, s->hw_ops, s); =20 memory_region_add_subregion(isa_address_space(isadev), VBE_DISPI_LFB_PHYSICAL_ADDRESS, diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c index 1a9608d865f..3cd64951c09 100644 --- a/hw/display/vga-mmio.c +++ b/hw/display/vga-mmio.c @@ -108,7 +108,7 @@ static void vga_mmio_realizefn(DeviceState *dev, Error = **errp) } =20 sysbus_init_mmio(sbd, &s->vga.vram); - s->vga.con =3D graphic_console_init(dev, 0, s->vga.hw_ops, &s->vga); + s->vga.con =3D qemu_graphic_console_create(dev, 0, s->vga.hw_ops, &s->= vga); } =20 static const Property vga_mmio_properties[] =3D { diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index 4e68dd57a17..d089847bdae 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -247,7 +247,7 @@ static void pci_std_vga_realize(PCIDevice *dev, Error *= *errp) vga_init(s, OBJECT(dev), pci_address_space(dev), pci_address_space_io(= dev), true); =20 - s->con =3D graphic_console_init(DEVICE(dev), 0, s->hw_ops, s); + s->con =3D qemu_graphic_console_create(DEVICE(dev), 0, s->hw_ops, s); =20 /* XXX: VGA_RAM_SIZE must be a power of two */ pci_register_bar(&d->dev, 0, PCI_BASE_ADDRESS_MEM_PREFETCH, &s->vram); @@ -282,7 +282,7 @@ static void pci_secondary_vga_realize(PCIDevice *dev, E= rror **errp) if (!vga_common_init(s, OBJECT(dev), errp)) { return; } - s->con =3D graphic_console_init(DEVICE(dev), 0, s->hw_ops, s); + s->con =3D qemu_graphic_console_create(DEVICE(dev), 0, s->hw_ops, s); =20 /* mmio bar */ memory_region_init_io(&d->mmio, OBJECT(dev), &unassigned_io_ops, NULL, @@ -306,7 +306,7 @@ static void pci_secondary_vga_exit(PCIDevice *dev) PCIVGAState *d =3D PCI_VGA(dev); VGACommonState *s =3D &d->vga; =20 - graphic_console_close(s->con); + qemu_graphic_console_close(s->con); memory_region_del_subregion(&d->mmio, &d->mrs[0]); memory_region_del_subregion(&d->mmio, &d->mrs[1]); if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) { diff --git a/hw/display/vga.c b/hw/display/vga.c index 409c02272a3..3f456b96608 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1246,7 +1246,7 @@ static void vga_draw_text(VGACommonState *s, int full= _update) s->last_scr_height =3D height * cheight; qemu_console_resize(s->con, s->last_scr_width, s->last_scr_height); surface =3D qemu_console_surface(s->con); - dpy_text_resize(s->con, width, height); + qemu_console_text_resize(s->con, width, height); s->last_depth =3D 0; s->last_width =3D width; s->last_height =3D height; @@ -1365,8 +1365,8 @@ static void vga_draw_text(VGACommonState *s, int full= _update) ch_attr_ptr++; } if (cx_max !=3D -1) { - dpy_gfx_update(s->con, cx_min * cw, cy * cheight, - (cx_max - cx_min + 1) * cw, cheight); + qemu_console_update(s->con, cx_min * cw, cy * cheight, + (cx_max - cx_min + 1) * cw, cheight); } dest +=3D linesize * cheight; line1 =3D line + cheight; @@ -1610,7 +1610,7 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) */ format =3D qemu_default_pixman_format(depth, !byteswap); if (format) { - allocate_surface =3D !dpy_gfx_check_format(s->con, format) + allocate_surface =3D !qemu_console_check_format(s->con, format) || s->force_shadow || force_shadow; } else { allocate_surface =3D true; @@ -1647,7 +1647,7 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) surface =3D qemu_create_displaysurface_from(disp_width, height, format, s->params.line_offset, s->vram_ptr + (s->params.start_addr * 4)); - dpy_gfx_replace_surface(s->con, surface); + qemu_console_set_surface(s->con, surface); } else { qemu_console_resize(s->con, disp_width, height); surface =3D qemu_console_surface(s->con); @@ -1720,8 +1720,7 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) } else { if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(s->con, 0, y_start, - disp_width, y - y_start); + qemu_console_update(s->con, 0, y_start, disp_width, y - y_= start); y_start =3D -1; } } @@ -1745,8 +1744,7 @@ static void vga_draw_graphic(VGACommonState *s, int f= ull_update) } if (y_start >=3D 0) { /* flush to display */ - dpy_gfx_update(s->con, 0, y_start, - disp_width, y - y_start); + qemu_console_update(s->con, 0, y_start, disp_width, y - y_start); } g_free(snap); memset(s->invalidated_y_table, 0, sizeof(s->invalidated_y_table)); @@ -1767,7 +1765,7 @@ static void vga_draw_blank(VGACommonState *s, int ful= l_update) /* unshare buffer, otherwise the blanking corrupts vga vram */ surface =3D qemu_create_displaysurface(s->last_scr_width, s->last_scr_height); - dpy_gfx_replace_surface(s->con, surface); + qemu_console_set_surface(s->con, surface); } =20 w =3D s->last_scr_width * surface_bytes_per_pixel(surface); @@ -1776,7 +1774,7 @@ static void vga_draw_blank(VGACommonState *s, int ful= l_update) memset(d, 0, w); d +=3D surface_stride(surface); } - dpy_gfx_update_full(s->con); + qemu_console_update_full(s->con); } =20 #define GMODE_TEXT 0 @@ -1967,7 +1965,7 @@ static void vga_update_text(void *opaque, uint32_t *c= hardata) s->last_scr_width =3D width * cw; s->last_scr_height =3D height * cheight; qemu_console_resize(s->con, s->last_scr_width, s->last_scr_hei= ght); - dpy_text_resize(s->con, width, height); + qemu_console_text_resize(s->con, width, height); s->last_depth =3D 0; s->last_width =3D width; s->last_height =3D height; @@ -1992,11 +1990,11 @@ static void vga_update_text(void *opaque, uint32_t = *chardata) s->cr[VGA_CRTC_CURSOR_END] !=3D s->cursor_end || full_update) { cursor_visible =3D !(s->cr[VGA_CRTC_CURSOR_START] & 0x20); if (cursor_visible && cursor_offset < size && cursor_offset >= =3D 0) - dpy_text_cursor(s->con, - TEXTMODE_X(cursor_offset), - TEXTMODE_Y(cursor_offset)); + qemu_console_text_set_cursor(s->con, + TEXTMODE_X(cursor_offset), + TEXTMODE_Y(cursor_offset)); else - dpy_text_cursor(s->con, -1, -1); + qemu_console_text_set_cursor(s->con, -1, -1); s->cursor_offset =3D cursor_offset; s->cursor_start =3D s->cr[VGA_CRTC_CURSOR_START]; s->cursor_end =3D s->cr[VGA_CRTC_CURSOR_END]; @@ -2009,7 +2007,7 @@ static void vga_update_text(void *opaque, uint32_t *c= hardata) for (i =3D 0; i < size; src ++, dst ++, i ++) *dst =3D VMEM2CHTYPE(le32_to_cpu(*src)); =20 - dpy_text_update(s->con, 0, 0, width, height); + qemu_console_text_update(s->con, 0, 0, width, height); } else { c_max =3D 0; =20 @@ -2032,7 +2030,7 @@ static void vga_update_text(void *opaque, uint32_t *c= hardata) =20 if (c_min <=3D c_max) { i =3D TEXTMODE_Y(c_min); - dpy_text_update(s->con, 0, i, width, TEXTMODE_Y(c_max) - i= + 1); + qemu_console_text_update(s->con, 0, i, width, TEXTMODE_Y(c= _max) - i + 1); } } =20 @@ -2057,8 +2055,8 @@ static void vga_update_text(void *opaque, uint32_t *c= hardata) /* Display a message */ s->last_width =3D 60; s->last_height =3D height =3D 3; - dpy_text_cursor(s->con, -1, -1); - dpy_text_resize(s->con, s->last_width, height); + qemu_console_text_set_cursor(s->con, -1, -1); + qemu_console_text_resize(s->con, s->last_width, height); =20 for (dst =3D chardata, i =3D 0; i < s->last_width * height; i ++) *dst++ =3D ' '; @@ -2070,7 +2068,7 @@ static void vga_update_text(void *opaque, uint32_t *c= hardata) *dst++ =3D ATTR2CHTYPE(msg_buffer[i], QEMU_COLOR_BLUE, QEMU_COLOR_BLACK, 1); =20 - dpy_text_update(s->con, 0, 0, s->last_width, height); + qemu_console_text_update(s->con, 0, 0, s->last_width, height); } =20 static uint64_t vga_mem_read(void *opaque, hwaddr addr, diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 3f6fb7a8033..6e5e6540a46 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -142,11 +142,11 @@ vhost_user_gpu_handle_cursor(VhostUserGPU *g, VhostUs= erGpuMsg *msg) memcpy(s->current_cursor->data, up->data, 64 * 64 * sizeof(uint32_t)); =20 - dpy_cursor_define(s->con, s->current_cursor); + qemu_console_set_cursor(s->con, s->current_cursor); } =20 - dpy_mouse_set(s->con, pos->x, pos->y, - msg->request !=3D VHOST_USER_GPU_CURSOR_POS_HIDE); + qemu_console_set_mouse(s->con, pos->x, pos->y, + msg->request !=3D VHOST_USER_GPU_CURSOR_POS_HID= E); } =20 static void @@ -238,7 +238,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUse= rGpuMsg *msg) con =3D s->con; =20 if (m->width =3D=3D 0) { - dpy_gfx_replace_surface(con, NULL); + qemu_console_set_surface(con, NULL); } else { s->ds =3D qemu_create_displaysurface(m->width, m->height); /* replace surface on next update */ @@ -269,12 +269,12 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostU= serGpuMsg *msg) =20 if (dmabuf) { qemu_dmabuf_close(dmabuf); - dpy_gl_release_dmabuf(con, dmabuf); + qemu_console_gl_release_dmabuf(con, dmabuf); g_clear_pointer(&dmabuf, qemu_dmabuf_free); } =20 if (fd =3D=3D -1) { - dpy_gl_scanout_disable(con); + qemu_console_gl_scanout_disable(con); g->dmabuf[m->scanout_id] =3D NULL; break; } @@ -291,7 +291,7 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUse= rGpuMsg *msg) &fd, 1, false, m->fd_flags & VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP); =20 - dpy_gl_scanout_dmabuf(con, dmabuf); + qemu_console_gl_scanout_dmabuf(con, dmabuf); g->dmabuf[m->scanout_id] =3D dmabuf; break; } @@ -306,13 +306,13 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostU= serGpuMsg *msg) } =20 con =3D g->parent_obj.scanout[m->scanout_id].con; - if (!console_has_gl(con)) { + if (!qemu_console_has_gl(con)) { error_report("console doesn't support GL!"); vhost_user_gpu_unblock(g); break; } g->backend_blocked =3D true; - dpy_gl_update(con, m->x, m->y, m->width, m->height); + qemu_console_gl_update(con, m->x, m->y, m->width, m->height); break; } #ifdef CONFIG_PIXMAN @@ -337,9 +337,9 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUse= rGpuMsg *msg) =20 pixman_image_unref(image); if (qemu_console_surface(con) !=3D s->ds) { - dpy_gfx_replace_surface(con, s->ds); + qemu_console_set_surface(con, s->ds); } else { - dpy_gfx_update(con, m->x, m->y, m->width, m->height); + qemu_console_update(con, m->x, m->y, m->width, m->height); } break; } diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index bdc24492850..a68b1848295 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -253,7 +253,7 @@ virtio_gpu_base_device_realize(DeviceState *qdev, g->hw_ops =3D &virtio_gpu_ops; for (i =3D 0; i < g->conf.max_outputs; i++) { g->scanout[i].con =3D - graphic_console_init(DEVICE(g), i, &virtio_gpu_ops, g); + qemu_graphic_console_create(DEVICE(g), i, &virtio_gpu_ops, g); } =20 return true; diff --git a/hw/display/virtio-gpu-rutabaga.c b/hw/display/virtio-gpu-rutab= aga.c index ebb6c783fb0..6ff12639012 100644 --- a/hw/display/virtio-gpu-rutabaga.c +++ b/hw/display/virtio-gpu-rutabaga.c @@ -282,7 +282,7 @@ rutabaga_cmd_resource_flush(VirtIOGPU *g, struct virtio= _gpu_ctrl_command *cmd) rf.resource_id, &transfer, &transfer_iovec); CHECK(!result, cmd); - dpy_gfx_update_full(scanout->con); + qemu_console_update_full(scanout->con); } =20 static void @@ -306,8 +306,8 @@ rutabaga_cmd_set_scanout(VirtIOGPU *g, struct virtio_gp= u_ctrl_command *cmd) scanout =3D &vb->scanout[ss.scanout_id]; =20 if (ss.resource_id =3D=3D 0) { - dpy_gfx_replace_surface(scanout->con, NULL); - dpy_gl_scanout_disable(scanout->con); + qemu_console_set_surface(scanout->con, NULL); + qemu_console_gl_scanout_disable(scanout->con); return; } =20 @@ -331,8 +331,8 @@ rutabaga_cmd_set_scanout(VirtIOGPU *g, struct virtio_gp= u_ctrl_command *cmd) =20 /* realloc the surface ptr */ scanout->ds =3D qemu_create_displaysurface_pixman(res->image); - dpy_gfx_replace_surface(scanout->con, NULL); - dpy_gfx_replace_surface(scanout->con, scanout->ds); + qemu_console_set_surface(scanout->con, NULL); + qemu_console_set_surface(scanout->con, scanout->ds); res->scanout_bitmask =3D ss.scanout_id; } =20 diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabu= f.c index 74b6a7766af..d5ac1cfca0e 100644 --- a/hw/display/virtio-gpu-udmabuf.c +++ b/hw/display/virtio-gpu-udmabuf.c @@ -156,7 +156,7 @@ static void virtio_gpu_free_dmabuf(VirtIOGPU *g, VGPUDM= ABuf *dmabuf) struct virtio_gpu_scanout *scanout; =20 scanout =3D &g->parent_obj.scanout[dmabuf->scanout_id]; - dpy_gl_release_dmabuf(scanout->con, dmabuf->buf); + qemu_console_gl_release_dmabuf(scanout->con, dmabuf->buf); g_clear_pointer(&dmabuf->buf, qemu_dmabuf_free); QTAILQ_REMOVE(&g->dmabuf.bufs, dmabuf, next); g_free(dmabuf); @@ -232,7 +232,7 @@ int virtio_gpu_update_dmabuf(VirtIOGPU *g, height =3D qemu_dmabuf_get_height(new_primary->buf); g->dmabuf.primary[scanout_id] =3D new_primary; qemu_console_resize(scanout->con, width, height); - dpy_gl_scanout_dmabuf(scanout->con, new_primary->buf); + qemu_console_gl_scanout_dmabuf(scanout->con, new_primary->buf); =20 if (old_primary) { virtio_gpu_free_dmabuf(g, old_primary); diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index b7a2d160ddd..f8437616779 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -521,7 +521,7 @@ static void virtio_gpu_rect_update(VirtIOGPU *g, int id= x, int x, int y, return; } =20 - dpy_gl_update(g->parent_obj.scanout[idx].con, x, y, width, height); + qemu_console_gl_update(g->parent_obj.scanout[idx].con, x, y, width, he= ight); } =20 static void virgl_cmd_resource_flush(VirtIOGPU *g, @@ -584,16 +584,15 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g, qemu_console_resize(g->parent_obj.scanout[ss.scanout_id].con, ss.r.width, ss.r.height); virgl_renderer_force_ctx_0(); - dpy_gl_scanout_texture( + qemu_console_gl_scanout_texture( g->parent_obj.scanout[ss.scanout_id].con, info.tex_id, info.flags & VIRTIO_GPU_RESOURCE_FLAG_Y_0_TOP, info.width, info.height, ss.r.x, ss.r.y, ss.r.width, ss.r.height, d3d_tex2d); } else { - dpy_gfx_replace_surface( - g->parent_obj.scanout[ss.scanout_id].con, NULL); - dpy_gl_scanout_disable(g->parent_obj.scanout[ss.scanout_id].con); + qemu_console_set_surface(g->parent_obj.scanout[ss.scanout_id].con,= NULL); + qemu_console_gl_scanout_disable(g->parent_obj.scanout[ss.scanout_i= d].con); } g->parent_obj.scanout[ss.scanout_id].resource_id =3D ss.resource_id; } @@ -1315,7 +1314,7 @@ virgl_create_context(void *opaque, int scanout_idx, qparams.major_ver =3D params->major_ver; qparams.minor_ver =3D params->minor_ver; =20 - ctx =3D dpy_gl_ctx_create(g->parent_obj.scanout[scanout_idx].con, &qpa= rams); + ctx =3D qemu_console_gl_ctx_create(g->parent_obj.scanout[scanout_idx].= con, &qparams); return (virgl_renderer_gl_context)ctx; } =20 @@ -1324,7 +1323,7 @@ static void virgl_destroy_context(void *opaque, virgl= _renderer_gl_context ctx) VirtIOGPU *g =3D opaque; QEMUGLContext qctx =3D (QEMUGLContext)ctx; =20 - dpy_gl_ctx_destroy(g->parent_obj.scanout[0].con, qctx); + qemu_console_gl_ctx_destroy(g->parent_obj.scanout[0].con, qctx); } =20 static int virgl_make_context_current(void *opaque, int scanout_idx, @@ -1333,8 +1332,7 @@ static int virgl_make_context_current(void *opaque, i= nt scanout_idx, VirtIOGPU *g =3D opaque; QEMUGLContext qctx =3D (QEMUGLContext)ctx; =20 - return dpy_gl_ctx_make_current(g->parent_obj.scanout[scanout_idx].con, - qctx); + return qemu_console_gl_ctx_make_current(g->parent_obj.scanout[scanout_= idx].con, qctx); } =20 static struct virgl_renderer_callbacks virtio_gpu_3d_cbs =3D { @@ -1399,8 +1397,8 @@ void virtio_gpu_virgl_reset_scanout(VirtIOGPU *g) int i; =20 for (i =3D 0; i < g->parent_obj.conf.max_outputs; i++) { - dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL); - dpy_gl_scanout_disable(g->parent_obj.scanout[i].con); + qemu_console_set_surface(g->parent_obj.scanout[i].con, NULL); + qemu_console_gl_scanout_disable(g->parent_obj.scanout[i].con); } } =20 diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index b998ce8324d..aad45e6fc0f 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -103,14 +103,14 @@ static void update_cursor(VirtIOGPU *g, struct virtio= _gpu_update_cursor *cursor) if (cursor->resource_id > 0) { vgc->update_cursor_data(g, s, cursor->resource_id); } - dpy_cursor_define(s->con, s->current_cursor); + qemu_console_set_cursor(s->con, s->current_cursor); =20 s->cursor =3D *cursor; } else { s->cursor.pos.x =3D cursor->pos.x; s->cursor.pos.y =3D cursor->pos.y; } - dpy_mouse_set(s->con, cursor->pos.x, cursor->pos.y, cursor->resource_i= d); + qemu_console_set_mouse(s->con, cursor->pos.x, cursor->pos.y, cursor->r= esource_id); } =20 struct virtio_gpu_simple_resource * @@ -390,7 +390,7 @@ void virtio_gpu_disable_scanout(VirtIOGPU *g, int scano= ut_id) res->scanout_bitmask &=3D ~(1 << scanout_id); } =20 - dpy_gfx_replace_surface(scanout->con, NULL); + qemu_console_set_surface(scanout->con, NULL); scanout->resource_id =3D 0; scanout->ds =3D NULL; scanout->width =3D 0; @@ -531,8 +531,8 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, rf.r.y + rf.r.height >=3D scanout->y) { within_bounds =3D true; =20 - if (console_has_gl(scanout->con)) { - dpy_gl_update(scanout->con, 0, 0, scanout->width, + if (qemu_console_has_gl(scanout->con)) { + qemu_console_gl_update(scanout->con, 0, 0, scanout->wi= dth, scanout->height); update_submitted =3D true; } @@ -582,8 +582,8 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, /* work out the area we need to update for each console */ if (qemu_rect_intersect(&flush_rect, &rect, &rect)) { qemu_rect_translate(&rect, -scanout->x, -scanout->y); - dpy_gfx_update(g->parent_obj.scanout[i].con, - rect.x, rect.y, rect.width, rect.height); + qemu_console_update(g->parent_obj.scanout[i].con, + rect.x, rect.y, rect.width, rect.height); } } } @@ -649,7 +649,7 @@ static bool virtio_gpu_do_set_scanout(VirtIOGPU *g, g->parent_obj.enable =3D 1; =20 if (res->blob) { - if (console_has_gl(scanout->con)) { + if (qemu_console_has_gl(scanout->con)) { if (!virtio_gpu_update_dmabuf(g, scanout_id, res, fb, r)) { virtio_gpu_update_scanout(g, scanout_id, res, fb, r); } else { @@ -665,7 +665,7 @@ static bool virtio_gpu_do_set_scanout(VirtIOGPU *g, } =20 /* create a surface for this scanout */ - if ((res->blob && !console_has_gl(scanout->con)) || + if ((res->blob && !qemu_console_has_gl(scanout->con)) || !scanout->ds || surface_data(scanout->ds) !=3D data + fb->offset || scanout->width !=3D r->width || @@ -686,7 +686,7 @@ static bool virtio_gpu_do_set_scanout(VirtIOGPU *g, qemu_displaysurface_set_share_handle(scanout->ds, res->share_handl= e, fb->offset); =20 pixman_image_unref(rect); - dpy_gfx_replace_surface(g->parent_obj.scanout[scanout_id].con, + qemu_console_set_surface(g->parent_obj.scanout[scanout_id].con, scanout->ds); } =20 @@ -1483,10 +1483,10 @@ static int virtio_gpu_post_load(void *opaque, int v= ersion_id) } scanout->ds =3D qemu_create_displaysurface_pixman(res->image); qemu_displaysurface_set_share_handle(scanout->ds, res->share_h= andle, 0); - dpy_gfx_replace_surface(scanout->con, scanout->ds); + qemu_console_set_surface(scanout->con, scanout->ds); } =20 - dpy_gfx_update_full(scanout->con); + qemu_console_update_full(scanout->con); if (scanout->cursor.resource_id) { update_cursor(g, &scanout->cursor); } @@ -1602,7 +1602,7 @@ static void virtio_gpu_reset_bh(void *opaque) } =20 for (i =3D 0; i < g->parent_obj.conf.max_outputs; i++) { - dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL); + qemu_console_set_surface(g->parent_obj.scanout[i].con, NULL); } =20 g->reset_finished =3D true; diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index efd4858f3d0..2ae649c91ae 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -172,7 +172,7 @@ static void virtio_vga_base_realize(VirtIOPCIProxy *vpc= i_dev, Error **errp) vvga->vga_mrs, true, false); =20 vga->con =3D g->scanout[0].con; - graphic_console_set_hwops(vga->con, &virtio_vga_base_ops, vvga); + qemu_graphic_console_set_hwops(vga->con, &virtio_vga_base_ops, vvga); =20 for (i =3D 0; i < g->conf.max_outputs; i++) { object_property_set_link(OBJECT(g->scanout[i].con), "device", diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 39606d80be1..f8906776b16 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -378,7 +378,7 @@ static inline void vmsvga_update_rect(struct vmsvga_sta= te_s *s, for (line =3D h; line > 0; line--, src +=3D bypl, dst +=3D bypl) { memcpy(dst, src, width); } - dpy_gfx_update(s->vga.con, x, y, w, h); + qemu_console_update(s->vga.con, x, y, w, h); } =20 static inline void vmsvga_update_rect_flush(struct vmsvga_state_s *s) @@ -554,7 +554,7 @@ static inline void vmsvga_cursor_define(struct vmsvga_s= tate_s *s, qc =3D cursor_builtin_left_ptr(); } =20 - dpy_cursor_define(s->vga.con, qc); + qemu_console_set_cursor(s->vga.con, qc); cursor_unref(qc); } #endif @@ -1082,7 +1082,7 @@ static void vmsvga_value_write(void *opaque, uint32_t= address, uint32_t value) s->cursor.on &=3D (value !=3D SVGA_CURSOR_ON_HIDE); #ifdef HW_MOUSE_ACCEL if (value <=3D SVGA_CURSOR_ON_SHOW) { - dpy_mouse_set(s->vga.con, s->cursor.x, s->cursor.y, s->cursor.= on); + qemu_console_set_mouse(s->vga.con, s->cursor.x, s->cursor.y, s= ->cursor.on); } #endif break; @@ -1130,7 +1130,7 @@ static inline void vmsvga_check_size(struct vmsvga_st= ate_s *s) surface =3D qemu_create_displaysurface_from(s->new_width, s->new_h= eight, format, stride, s->vga.vram_ptr); - dpy_gfx_replace_surface(s->vga.con, surface); + qemu_console_set_surface(s->vga.con, surface); s->invalidated =3D 1; } } @@ -1151,7 +1151,7 @@ static bool vmsvga_update_display(void *opaque) =20 if (s->invalidated) { s->invalidated =3D 0; - dpy_gfx_update_full(s->vga.con); + qemu_console_update_full(s->vga.con); } =20 return true; @@ -1254,7 +1254,7 @@ static void vmsvga_init(DeviceState *dev, struct vmsv= ga_state_s *s, s->scratch_size =3D SVGA_SCRATCH_SIZE; s->scratch =3D g_malloc(s->scratch_size * 4); =20 - s->vga.con =3D graphic_console_init(dev, 0, &vmsvga_ops, s); + s->vga.con =3D qemu_graphic_console_create(dev, 0, &vmsvga_ops, s); =20 s->fifo_size =3D SVGA_FIFO_SIZE; memory_region_init_ram(&s->fifo_ram, NULL, "vmsvga.fifo", s->fifo_size, diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 2e431e27be6..8e9953bda43 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -657,7 +657,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x= , int y, int w, int h) xen_pv_printf(&xenfb->c.xendev, 0, "%s: oops: convert %d -> %d bpp= ?\n", __func__, xenfb->depth, bpp); =20 - dpy_gfx_update(xenfb->con, x, y, w, h); + qemu_console_update(xenfb->con, x, y, w, h); } =20 #ifdef XENFB_TYPE_REFRESH_PERIOD @@ -743,7 +743,7 @@ static bool xenfb_update(void *opaque) surface =3D qemu_create_displaysurface(xenfb->width, xenfb->he= ight); break; } - dpy_gfx_replace_surface(xenfb->con, surface); + qemu_console_set_surface(xenfb->con, surface); xen_pv_printf(&xenfb->c.xendev, 1, "update: resizing: %dx%d @ %d bpp%s\n", xenfb->width, xenfb->height, xenfb->depth, @@ -903,7 +903,7 @@ static int fb_initialise(struct XenLegacyDevice *xendev) if (rc !=3D 0) return rc; =20 - fb->con =3D graphic_console_init(NULL, 0, &xenfb_ops, fb); + fb->con =3D qemu_graphic_console_create(NULL, 0, &xenfb_ops, fb); =20 if (xenstore_read_fe_int(xendev, "feature-update", &fb->feature_update= ) =3D=3D -1) fb->feature_update =3D 0; diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 50e6ef10984..2486d9e5825 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -605,7 +605,7 @@ static void xlnx_dp_recreate_surface(XlnxDPState *s) =20 if ((width !=3D 0) && (height !=3D 0)) { /* - * As dpy_gfx_replace_surface calls qemu_free_displaysurface on the + * As qemu_console_replace_surface calls qemu_free_displaysurface = on the * surface we need to be careful and don't free the surface associ= ated * to the console or double free will happen. */ @@ -631,10 +631,10 @@ static void xlnx_dp_recreate_surface(XlnxDPState *s) height, s->g_plane.for= mat, 0, NULL); - dpy_gfx_replace_surface(s->console, s->bout_plane.surface); + qemu_console_set_surface(s->console, s->bout_plane.surface); } else { s->bout_plane.surface =3D NULL; - dpy_gfx_replace_surface(s->console, s->g_plane.surface); + qemu_console_set_surface(s->console, s->g_plane.surface); } =20 xlnx_dpdma_set_host_data_location(s->dpdma, DP_GRAPHIC_DMA_CHANNEL, @@ -1287,7 +1287,7 @@ static bool xlnx_dp_update_display(void *opaque) /* * XXX: We might want to update only what changed. */ - dpy_gfx_update_full(s->console); + qemu_console_update_full(s->console); =20 return true; } @@ -1387,7 +1387,7 @@ static void xlnx_dp_realize(DeviceState *dev, Error *= *errp) qdev_realize(DEVICE(s->edid), BUS(aux_get_i2c_bus(s->aux_bus)), &error_fatal); =20 - s->console =3D graphic_console_init(dev, 0, &xlnx_dp_gfx_ops, s); + s->console =3D qemu_graphic_console_create(dev, 0, &xlnx_dp_gfx_ops, s= ); surface =3D qemu_console_surface(s->console); xlnx_dpdma_set_host_data_location(s->dpdma, DP_GRAPHIC_DMA_CHANNEL, surface_data(surface)); diff --git a/hw/vfio/display.c b/hw/vfio/display.c index 4a9a58036e3..8f91e83da88 100644 --- a/hw/vfio/display.c +++ b/hw/vfio/display.c @@ -264,7 +264,7 @@ static void vfio_display_free_one_dmabuf(VFIODisplay *d= py, VFIODMABuf *dmabuf) QTAILQ_REMOVE(&dpy->dmabuf.bufs, dmabuf, next); =20 qemu_dmabuf_close(dmabuf->buf); - dpy_gl_release_dmabuf(dpy->con, dmabuf->buf); + qemu_console_gl_release_dmabuf(dpy->con, dmabuf->buf); g_clear_pointer(&dmabuf->buf, qemu_dmabuf_free); g_free(dmabuf); } @@ -307,7 +307,7 @@ static bool vfio_display_dmabuf_update(void *opaque) if (dpy->dmabuf.primary !=3D primary) { dpy->dmabuf.primary =3D primary; qemu_console_resize(dpy->con, width, height); - dpy_gl_scanout_dmabuf(dpy->con, primary->buf); + qemu_console_gl_scanout_dmabuf(dpy->con, primary->buf); free_bufs =3D true; } =20 @@ -321,21 +321,21 @@ static bool vfio_display_dmabuf_update(void *opaque) if (cursor && (new_cursor || cursor->hot_updates)) { bool have_hot =3D (cursor->hot_x !=3D 0xffffffff && cursor->hot_y !=3D 0xffffffff); - dpy_gl_cursor_dmabuf(dpy->con, cursor->buf, have_hot, - cursor->hot_x, cursor->hot_y); + qemu_console_gl_cursor_dmabuf(dpy->con, cursor->buf, have_hot, + cursor->hot_x, cursor->hot_y); cursor->hot_updates =3D 0; } else if (!cursor && new_cursor) { - dpy_gl_cursor_dmabuf(dpy->con, NULL, false, 0, 0); + qemu_console_gl_cursor_dmabuf(dpy->con, NULL, false, 0, 0); } =20 if (cursor && cursor->pos_updates) { - dpy_gl_cursor_position(dpy->con, + qemu_console_gl_cursor_position(dpy->con, cursor->pos_x, cursor->pos_y); cursor->pos_updates =3D 0; } =20 - dpy_gl_update(dpy->con, 0, 0, width, height); + qemu_console_gl_update(dpy->con, 0, 0, width, height); =20 if (free_bufs) { vfio_display_free_dmabufs(vdev); @@ -363,7 +363,7 @@ static bool vfio_display_dmabuf_init(VFIOPCIDevice *vde= v, Error **errp) } =20 vdev->dpy =3D g_new0(VFIODisplay, 1); - vdev->dpy->con =3D graphic_console_init(DEVICE(vdev), 0, + vdev->dpy->con =3D qemu_graphic_console_create(DEVICE(vdev), 0, &vfio_display_dmabuf_ops, vdev); if (vdev->enable_ramfb) { @@ -396,9 +396,9 @@ void vfio_display_reset(VFIOPCIDevice *vdev) return; } =20 - dpy_gl_scanout_disable(vdev->dpy->con); + qemu_console_gl_scanout_disable(vdev->dpy->con); vfio_display_dmabuf_exit(vdev->dpy); - dpy_gfx_update_full(vdev->dpy->con); + qemu_console_update_full(vdev->dpy->con); } =20 static bool vfio_display_region_update(void *opaque) @@ -471,13 +471,13 @@ static bool vfio_display_region_update(void *opaque) dpy->region.surface =3D qemu_create_displaysurface_from (plane.width, plane.height, format, plane.stride, dpy->region.buffer.mmaps[0].mmap); - dpy_gfx_replace_surface(dpy->con, dpy->region.surface); + qemu_console_set_surface(dpy->con, dpy->region.surface); } =20 /* full screen update */ - dpy_gfx_update(dpy->con, 0, 0, - surface_width(dpy->region.surface), - surface_height(dpy->region.surface)); + qemu_console_update(dpy->con, 0, 0, + surface_width(dpy->region.surface), + surface_height(dpy->region.surface)); return true; =20 err: @@ -493,7 +493,7 @@ static const GraphicHwOps vfio_display_region_ops =3D { static bool vfio_display_region_init(VFIOPCIDevice *vdev, Error **errp) { vdev->dpy =3D g_new0(VFIODisplay, 1); - vdev->dpy->con =3D graphic_console_init(DEVICE(vdev), 0, + vdev->dpy->con =3D qemu_graphic_console_create(DEVICE(vdev), 0, &vfio_display_region_ops, vdev); if (vdev->enable_ramfb) { @@ -553,7 +553,7 @@ void vfio_display_finalize(VFIOPCIDevice *vdev) return; } =20 - graphic_console_close(vdev->dpy->con); + qemu_graphic_console_close(vdev->dpy->con); vfio_display_dmabuf_exit(vdev->dpy); vfio_display_region_exit(vdev->dpy); vfio_display_edid_exit(vdev->dpy); diff --git a/ui/console-vc.c b/ui/console-vc.c index 6e8f2552e41..ec7106b169a 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -86,15 +86,15 @@ static void text_console_update(void *opaque, uint32_t = *chardata) s->vt.cells[src].t_attrib.bgcol, s->vt.cells[src].t_attrib.bold); } - dpy_text_update(QEMU_CONSOLE(s), s->vt.text_x[0], s->vt.text_y[0], - s->vt.text_x[1] - s->vt.text_x[0], i - s->vt.text_= y[0]); + qemu_console_text_update(QEMU_CONSOLE(s), s->vt.text_x[0], s->vt.t= ext_y[0], + s->vt.text_x[1] - s->vt.text_x[0], i - s-= >vt.text_y[0]); s->vt.text_x[0] =3D s->vt.width; s->vt.text_y[0] =3D s->vt.height; s->vt.text_x[1] =3D 0; s->vt.text_y[1] =3D 0; } if (s->vt.cursor_invalidate) { - dpy_text_cursor(QEMU_CONSOLE(s), s->vt.x, s->vt.y); + qemu_console_text_set_cursor(QEMU_CONSOLE(s), s->vt.x, s->vt.y); s->vt.cursor_invalidate =3D 0; } } @@ -182,14 +182,14 @@ static void vc_chr_set_echo(Chardev *chr, bool echo) =20 void qemu_text_console_update_size(QemuTextConsole *c) { - dpy_text_resize(QEMU_CONSOLE(c), c->vt.width, c->vt.height); + qemu_console_text_resize(QEMU_CONSOLE(c), c->vt.width, c->vt.height); } =20 static void text_console_image_update(QemuVT100 *vt, int x, int y, int wid= th, int height) { QemuTextConsole *console =3D container_of(vt, QemuTextConsole, vt); =20 - dpy_gfx_update(QEMU_CONSOLE(console), x, y, width, height); + qemu_console_update(QEMU_CONSOLE(console), x, y, width, height); } =20 static void text_console_out_flush(QemuVT100 *vt) @@ -228,7 +228,7 @@ static bool vc_chr_open(Chardev *chr, ChardevBackend *b= ackend, Error **errp) s =3D QEMU_TEXT_CONSOLE(object_new(TYPE_QEMU_FIXED_TEXT_CONSOLE)); } =20 - dpy_gfx_replace_surface(QEMU_CONSOLE(s), qemu_create_displaysurface(wi= dth, height)); + qemu_console_set_surface(QEMU_CONSOLE(s), qemu_create_displaysurface(w= idth, height)); vt100_init(&s->vt, QEMU_CONSOLE(s)->surface->image, text_console_image_update, text_console_out_flush); diff --git a/ui/console.c b/ui/console.c index 6e073cacca0..344bf308b0c 100644 --- a/ui/console.c +++ b/ui/console.c @@ -129,26 +129,26 @@ static void gui_setup_refresh(DisplayState *ds) } } =20 -void graphic_hw_update_done(QemuConsole *con) +void qemu_console_hw_update_done(QemuConsole *con) { if (con) { qemu_co_enter_all(&con->dump_queue, NULL); } } =20 -void graphic_hw_update(QemuConsole *con) +void qemu_console_hw_update(QemuConsole *con) { if (!con) { return; } if (!con->hw_ops->gfx_update || con->hw_ops->gfx_update(con->hw)) { - graphic_hw_update_done(con); + qemu_console_hw_update_done(con); } } =20 -static void graphic_hw_update_bh(void *con) +static void console_hw_update_bh(void *con) { - graphic_hw_update(con); + qemu_console_hw_update(con); } =20 void qemu_console_co_wait_update(QemuConsole *con) @@ -156,18 +156,18 @@ void qemu_console_co_wait_update(QemuConsole *con) if (qemu_co_queue_empty(&con->dump_queue)) { /* Defer the update, it will restart the pending coroutines */ aio_bh_schedule_oneshot(qemu_get_aio_context(), - graphic_hw_update_bh, con); + console_hw_update_bh, con); } qemu_co_queue_wait(&con->dump_queue, NULL); =20 } =20 -static void graphic_hw_gl_unblock_timer(void *opaque) +static void console_hw_gl_unblock_timer(void *opaque) { warn_report("console: no gl-unblock within one second"); } =20 -void graphic_hw_gl_block(QemuConsole *con, bool block) +void qemu_console_hw_gl_block(QemuConsole *con, bool block) { uint64_t timeout; assert(con !=3D NULL); @@ -205,14 +205,14 @@ void qemu_console_set_window_id(QemuConsole *con, int= window_id) con->window_id =3D window_id; } =20 -void graphic_hw_invalidate(QemuConsole *con) +void qemu_console_hw_invalidate(QemuConsole *con) { if (con && con->hw_ops->invalidate) { con->hw_ops->invalidate(con->hw); } } =20 -void graphic_hw_text_update(QemuConsole *con, uint32_t *chardata) +void qemu_console_hw_text_update(QemuConsole *con, uint32_t *chardata) { if (con && con->hw_ops->text_update) { con->hw_ops->text_update(con->hw, chardata); @@ -502,7 +502,7 @@ qemu_graphic_console_init(Object *obj) { } =20 -bool console_has_gl(QemuConsole *con) +bool qemu_console_has_gl(QemuConsole *con) { return con->gl !=3D NULL; } @@ -527,7 +527,7 @@ static bool console_compatible_with(QemuConsole *con, =20 flags =3D con->hw_ops->get_flags ? con->hw_ops->get_flags(con->hw) : 0; =20 - if (console_has_gl(con) && + if (qemu_console_has_gl(con) && !con->gl->ops->dpy_gl_ctx_is_compatible_dcl(con->gl, dcl)) { error_setg(errp, "Display %s is incompatible with the GL context", dcl->ops->dpy_name); @@ -535,7 +535,7 @@ static bool console_compatible_with(QemuConsole *con, } =20 if (flags & GRAPHIC_FLAGS_GL && - !console_has_gl(con)) { + !qemu_console_has_gl(con)) { error_setg(errp, "The console requires a GL context."); return false; =20 @@ -670,8 +670,8 @@ void qemu_console_register_listener(QemuConsole *con, vt100_update_cursor(); } =20 -void update_displaychangelistener(DisplayChangeListener *dcl, - uint64_t interval) +void qemu_console_listener_set_refresh(DisplayChangeListener *dcl, + uint64_t interval) { DisplayState *ds =3D dcl->ds; =20 @@ -710,7 +710,7 @@ static void dpy_set_ui_info_timer(void *opaque) con->hw_ops->ui_info(con->hw, head, &con->ui_info); } =20 -bool dpy_ui_info_supported(const QemuConsole *con) +bool qemu_console_ui_info_supported(const QemuConsole *con) { if (con =3D=3D NULL) { return false; @@ -719,16 +719,16 @@ bool dpy_ui_info_supported(const QemuConsole *con) return con->hw_ops->ui_info !=3D NULL; } =20 -const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con) +const QemuUIInfo *qemu_console_get_ui_info(const QemuConsole *con) { - assert(dpy_ui_info_supported(con)); + assert(qemu_console_ui_info_supported(con)); =20 return &con->ui_info; } =20 -int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info, bool delay) +int qemu_console_set_ui_info(QemuConsole *con, QemuUIInfo *info, bool dela= y) { - if (!dpy_ui_info_supported(con)) { + if (!qemu_console_ui_info_supported(con)) { return -1; } if (memcmp(&con->ui_info, info, sizeof(con->ui_info)) =3D=3D 0) { @@ -747,7 +747,7 @@ int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info,= bool delay) return 0; } =20 -void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h) +void qemu_console_update(QemuConsole *con, int x, int y, int w, int h) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -772,15 +772,15 @@ void dpy_gfx_update(QemuConsole *con, int x, int y, i= nt w, int h) } } =20 -void dpy_gfx_update_full(QemuConsole *con) +void qemu_console_update_full(QemuConsole *con) { int w =3D qemu_console_get_width(con, 0); int h =3D qemu_console_get_height(con, 0); =20 - dpy_gfx_update(con, 0, 0, w, h); + qemu_console_update(con, 0, 0, w, h); } =20 -void dpy_gfx_replace_surface(QemuConsole *con, +void qemu_console_set_surface(QemuConsole *con, DisplaySurface *surface) { static const char placeholder_msg[] =3D "Display output is not active.= "; @@ -818,8 +818,8 @@ void dpy_gfx_replace_surface(QemuConsole *con, qemu_free_displaysurface(old_surface); } =20 -bool dpy_gfx_check_format(QemuConsole *con, - pixman_format_code_t format) +bool qemu_console_check_format(QemuConsole *con, + pixman_format_code_t format) { DisplayChangeListener *dcl; DisplayState *s =3D con->ds; @@ -854,7 +854,7 @@ static void dpy_refresh(DisplayState *s) } } =20 -void dpy_text_cursor(QemuConsole *con, int x, int y) +void qemu_console_text_set_cursor(QemuConsole *con, int x, int y) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -869,7 +869,7 @@ void dpy_text_cursor(QemuConsole *con, int x, int y) } } =20 -void dpy_text_update(QemuConsole *con, int x, int y, int w, int h) +void qemu_console_text_update(QemuConsole *con, int x, int y, int w, int h) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -884,7 +884,7 @@ void dpy_text_update(QemuConsole *con, int x, int y, in= t w, int h) } } =20 -void dpy_text_resize(QemuConsole *con, int w, int h) +void qemu_console_text_resize(QemuConsole *con, int w, int h) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -899,7 +899,7 @@ void dpy_text_resize(QemuConsole *con, int w, int h) } } =20 -void dpy_mouse_set(QemuConsole *c, int x, int y, bool on) +void qemu_console_set_mouse(QemuConsole *c, int x, int y, bool on) { QemuGraphicConsole *con =3D QEMU_GRAPHIC_CONSOLE(c); DisplayState *s =3D c->ds; @@ -918,7 +918,7 @@ void dpy_mouse_set(QemuConsole *c, int x, int y, bool o= n) } } =20 -void dpy_cursor_define(QemuConsole *c, QEMUCursor *cursor) +void qemu_console_set_cursor(QemuConsole *c, QEMUCursor *cursor) { QemuGraphicConsole *con =3D QEMU_GRAPHIC_CONSOLE(c); DisplayState *s =3D c->ds; @@ -936,26 +936,26 @@ void dpy_cursor_define(QemuConsole *c, QEMUCursor *cu= rsor) } } =20 -QEMUGLContext dpy_gl_ctx_create(QemuConsole *con, - struct QEMUGLParams *qparams) +QEMUGLContext qemu_console_gl_ctx_create(QemuConsole *con, + QEMUGLParams *qparams) { assert(con->gl); return con->gl->ops->dpy_gl_ctx_create(con->gl, qparams); } =20 -void dpy_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx) +void qemu_console_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx) { assert(con->gl); con->gl->ops->dpy_gl_ctx_destroy(con->gl, ctx); } =20 -int dpy_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx) +int qemu_console_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx) { assert(con->gl); return con->gl->ops->dpy_gl_ctx_make_current(con->gl, ctx); } =20 -void dpy_gl_scanout_disable(QemuConsole *con) +void qemu_console_gl_scanout_disable(QemuConsole *con) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -973,14 +973,14 @@ void dpy_gl_scanout_disable(QemuConsole *con) } } =20 -void dpy_gl_scanout_texture(QemuConsole *con, - uint32_t backing_id, - bool backing_y_0_top, - uint32_t backing_width, - uint32_t backing_height, - uint32_t x, uint32_t y, - uint32_t width, uint32_t height, - void *d3d_tex2d) +void qemu_console_gl_scanout_texture(QemuConsole *con, + uint32_t backing_id, + bool backing_y_0_top, + uint32_t backing_width, + uint32_t backing_height, + uint32_t x, uint32_t y, + uint32_t width, uint32_t height, + void *d3d_tex2d) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -1004,8 +1004,8 @@ void dpy_gl_scanout_texture(QemuConsole *con, } } =20 -void dpy_gl_scanout_dmabuf(QemuConsole *con, - QemuDmaBuf *dmabuf) +void qemu_console_gl_scanout_dmabuf(QemuConsole *con, + QemuDmaBuf *dmabuf) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -1022,8 +1022,8 @@ void dpy_gl_scanout_dmabuf(QemuConsole *con, } } =20 -void dpy_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBuf *dmabuf, - bool have_hot, uint32_t hot_x, uint32_t hot_y) +void qemu_console_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBuf *dmabuf, + bool have_hot, uint32_t hot_x, uint32_t= hot_y) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -1039,8 +1039,8 @@ void dpy_gl_cursor_dmabuf(QemuConsole *con, QemuDmaBu= f *dmabuf, } } =20 -void dpy_gl_cursor_position(QemuConsole *con, - uint32_t pos_x, uint32_t pos_y) +void qemu_console_gl_cursor_position(QemuConsole *con, + uint32_t pos_x, uint32_t pos_y) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -1055,8 +1055,8 @@ void dpy_gl_cursor_position(QemuConsole *con, } } =20 -void dpy_gl_release_dmabuf(QemuConsole *con, - QemuDmaBuf *dmabuf) +void qemu_console_gl_release_dmabuf(QemuConsole *con, + QemuDmaBuf *dmabuf) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; @@ -1071,15 +1071,15 @@ void dpy_gl_release_dmabuf(QemuConsole *con, } } =20 -void dpy_gl_update(QemuConsole *con, - uint32_t x, uint32_t y, uint32_t w, uint32_t h) +void qemu_console_gl_update(QemuConsole *con, + uint32_t x, uint32_t y, uint32_t w, uint32_t h) { DisplayState *s =3D con->ds; DisplayChangeListener *dcl; =20 assert(con->gl); =20 - graphic_hw_gl_block(con, true); + qemu_console_hw_gl_block(con, true); QLIST_FOREACH(dcl, &s->listeners, next) { if (con !=3D dcl->con) { continue; @@ -1088,7 +1088,7 @@ void dpy_gl_update(QemuConsole *con, dcl->ops->dpy_gl_update(dcl, x, y, w, h); } } - graphic_hw_gl_block(con, false); + qemu_console_hw_gl_block(con, false); } =20 /***********************************************************/ @@ -1125,17 +1125,17 @@ DisplayState *init_displaystate(void) return display_state; } =20 -void graphic_console_set_hwops(QemuConsole *con, - const GraphicHwOps *hw_ops, - void *opaque) +void qemu_graphic_console_set_hwops(QemuConsole *con, + const GraphicHwOps *hw_ops, + void *opaque) { con->hw_ops =3D hw_ops; con->hw =3D opaque; } =20 -QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head, - const GraphicHwOps *hw_ops, - void *opaque) +QemuConsole *qemu_graphic_console_create(DeviceState *dev, uint32_t head, + const GraphicHwOps *hw_ops, + void *opaque) { static const char noinit[] =3D "Guest has not initialized the display (yet)."; @@ -1154,16 +1154,16 @@ QemuConsole *graphic_console_init(DeviceState *dev,= uint32_t head, s =3D (QemuConsole *)object_new(TYPE_QEMU_GRAPHIC_CONSOLE); } QEMU_GRAPHIC_CONSOLE(s)->head =3D head; - graphic_console_set_hwops(s, hw_ops, opaque); + qemu_graphic_console_set_hwops(s, hw_ops, opaque); if (dev) { object_property_set_link(OBJECT(s), "device", OBJECT(dev), &error_abort); } =20 surface =3D qemu_create_placeholder_surface(width, height, noinit); - dpy_gfx_replace_surface(s, surface); + qemu_console_set_surface(s, surface); s->gl_unblock_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, - graphic_hw_gl_unblock_timer, s); + console_hw_gl_unblock_timer, s); return s; } =20 @@ -1171,7 +1171,7 @@ static const GraphicHwOps unused_ops =3D { /* no callbacks */ }; =20 -void graphic_console_close(QemuConsole *con) +void qemu_graphic_console_close(QemuConsole *con) { static const char unplugged[] =3D "Guest display has been unplugged"; @@ -1181,13 +1181,13 @@ void graphic_console_close(QemuConsole *con) =20 trace_console_gfx_close(con->index); object_property_set_link(OBJECT(con), "device", NULL, &error_abort); - graphic_console_set_hwops(con, &unused_ops, NULL); + qemu_graphic_console_set_hwops(con, &unused_ops, NULL); =20 if (con->gl) { - dpy_gl_scanout_disable(con); + qemu_console_gl_scanout_disable(con); } surface =3D qemu_create_placeholder_surface(width, height, unplugged); - dpy_gfx_replace_surface(con, surface); + qemu_console_set_surface(con, surface); } =20 QemuConsole *qemu_console_lookup_default(void) @@ -1373,7 +1373,7 @@ void qemu_console_resize(QemuConsole *s, int width, i= nt height) } =20 surface =3D qemu_create_displaysurface(width, height); - dpy_gfx_replace_surface(s, surface); + qemu_console_set_surface(s, surface); } =20 DisplaySurface *qemu_console_surface(QemuConsole *console) diff --git a/ui/curses.c b/ui/curses.c index 4e2a0b25955..f8d4542768b 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -1,8 +1,8 @@ /* * QEMU curses/ncurses display driver - *=20 + * * Copyright (c) 2005 Andrzej Zaborowski - *=20 + * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal * in the Software without restriction, including without limitation the r= ights @@ -275,11 +275,11 @@ static void curses_refresh(DisplayChangeListener *dcl) clear(); refresh(); curses_calc_pad(); - graphic_hw_invalidate(dcl->con); + qemu_console_hw_invalidate(dcl->con); invalidate =3D 0; } =20 - graphic_hw_text_update(dcl->con, screen); + qemu_console_hw_text_update(dcl->con, screen); =20 while (1) { /* while there are any pending key strokes to process */ diff --git a/ui/dbus-console.c b/ui/dbus-console.c index 249760d82aa..88f58e88efb 100644 --- a/ui/dbus-console.c +++ b/ui/dbus-console.c @@ -200,7 +200,7 @@ dbus_console_set_ui_info(DBusDisplayConsole *ddc, .height =3D arg_height, }; =20 - if (!dpy_ui_info_supported(ddc->dcl.con)) { + if (!qemu_console_ui_info_supported(ddc->dcl.con)) { g_dbus_method_invocation_return_error(invocation, DBUS_DISPLAY_ERROR, DBUS_DISPLAY_ERROR_UNSUPPORT= ED, @@ -208,7 +208,7 @@ dbus_console_set_ui_info(DBusDisplayConsole *ddc, return DBUS_METHOD_INVOCATION_HANDLED; } =20 - dpy_set_ui_info(ddc->dcl.con, &info, false); + qemu_console_set_ui_info(ddc->dcl.con, &info, false); qemu_dbus_display1_console_complete_set_uiinfo(ddc->iface, invocation); return DBUS_METHOD_INVOCATION_HANDLED; } diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index fe58e3ef24d..40287d1c687 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -241,7 +241,7 @@ static void dbus_update_gl_cb(GObject *source_object, } #endif =20 - graphic_hw_gl_block(ddl->dcl.con, false); + qemu_console_hw_gl_block(ddl->dcl.con, false); g_object_unref(ddl); } #endif @@ -257,7 +257,7 @@ static void dbus_call_update_gl(DisplayChangeListener *= dcl, =20 glFlush(); #ifdef CONFIG_GBM - graphic_hw_gl_block(ddl->dcl.con, true); + qemu_console_hw_gl_block(ddl->dcl.con, true); qemu_dbus_display1_listener_call_update_dmabuf(ddl->proxy, x, y, w, h, G_DBUS_CALL_FLAGS_NONE, @@ -276,7 +276,7 @@ static void dbus_call_update_gl(DisplayChangeListener *= dcl, Error *err =3D NULL; assert(ddl->d3d_texture); =20 - graphic_hw_gl_block(ddl->dcl.con, true); + qemu_console_hw_gl_block(ddl->dcl.con, true); if (!d3d_texture2d_release0(ddl->d3d_texture, &err)) { error_report_err(err); return; @@ -711,7 +711,7 @@ static void dbus_gl_refresh(DisplayChangeListener *dcl) { DBusDisplayListener *ddl =3D container_of(dcl, DBusDisplayListener, dc= l); =20 - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); =20 if (!ddl->ds || qemu_console_is_gl_blocked(ddl->dcl.con)) { return; @@ -740,7 +740,7 @@ static void dbus_gl_refresh(DisplayChangeListener *dcl) =20 static void dbus_refresh(DisplayChangeListener *dcl) { - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); } =20 #ifdef CONFIG_OPENGL diff --git a/ui/egl-headless.c b/ui/egl-headless.c index 4f046c975a9..878bfebb40c 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -23,7 +23,7 @@ typedef struct egl_dpy { =20 static void egl_refresh(DisplayChangeListener *dcl) { - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); } =20 static void egl_gfx_update(DisplayChangeListener *dcl, @@ -161,7 +161,7 @@ static void egl_scanout_flush(DisplayChangeListener *dc= l, } =20 egl_fb_read(edpy->ds, &edpy->blit_fb); - dpy_gfx_update(edpy->dcl.con, x, y, w, h); + qemu_console_update(edpy->dcl.con, x, y, w, h); } =20 static const DisplayChangeListenerOps egl_ops =3D { diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index fa8fe8970c1..7c5c9b2428c 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -108,7 +108,7 @@ void gd_egl_draw(VirtualConsole *vc) qemu_set_fd_handler(fence_fd, gd_hw_gl_flushed, NULL, vc); return; } - graphic_hw_gl_block(vc->gfx.dcl.con, false); + qemu_console_hw_gl_block(vc->gfx.dcl.con, false); } #endif } else { @@ -176,7 +176,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl) return; } =20 - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); =20 if (vc->gfx.glupdates) { vc->gfx.glupdates =3D 0; @@ -405,7 +405,7 @@ void gd_egl_flush(DisplayChangeListener *dcl, =20 if (vc->gfx.guest_fb.dmabuf && !qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) { - graphic_hw_gl_block(vc->gfx.dcl.con, true); + qemu_console_hw_gl_block(vc->gfx.dcl.con, true); qemu_dmabuf_set_draw_submitted(vc->gfx.guest_fb.dmabuf, true); gtk_egl_set_scanout_mode(vc, true); gtk_widget_queue_draw_area(area, x, y, w, h); diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index ce49000d3f1..23806b9d01b 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -131,7 +131,7 @@ void gd_gl_area_draw(VirtualConsole *vc) qemu_set_fd_handler(fence_fd, gd_hw_gl_flushed, NULL, vc); return; } - graphic_hw_gl_block(vc->gfx.dcl.con, false); + qemu_console_hw_gl_block(vc->gfx.dcl.con, false); } #endif } else { @@ -195,7 +195,7 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl) } } =20 - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); =20 if (vc->gfx.glupdates) { vc->gfx.glupdates =3D 0; @@ -347,7 +347,7 @@ void gd_gl_area_scanout_flush(DisplayChangeListener *dc= l, =20 if (vc->gfx.guest_fb.dmabuf && !qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) { - graphic_hw_gl_block(vc->gfx.dcl.con, true); + qemu_console_hw_gl_block(vc->gfx.dcl.con, true); qemu_dmabuf_set_draw_submitted(vc->gfx.guest_fb.dmabuf, true); gtk_gl_area_set_scanout_mode(vc, true); } diff --git a/ui/gtk.c b/ui/gtk.c index 3aaa44ff3e2..bcb67db7ee7 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -436,7 +436,7 @@ static void gd_update(DisplayChangeListener *dcl, =20 static void gd_refresh(DisplayChangeListener *dcl) { - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); } =20 static GdkDevice *gd_get_pointer(GdkDisplay *dpy) @@ -602,7 +602,7 @@ void gd_hw_gl_flushed(void *vcon) qemu_set_fd_handler(fence_fd, NULL, NULL, NULL); close(fence_fd); qemu_dmabuf_set_fence_fd(dmabuf, -1); - graphic_hw_gl_block(vc->gfx.dcl.con, false); + qemu_console_hw_gl_block(vc->gfx.dcl.con, false); } } =20 @@ -729,27 +729,27 @@ static void gd_set_ui_refresh_rate(VirtualConsole *vc= , int refresh_rate) { QemuUIInfo info; =20 - if (!dpy_ui_info_supported(vc->gfx.dcl.con)) { + if (!qemu_console_ui_info_supported(vc->gfx.dcl.con)) { return; } =20 - info =3D *dpy_get_ui_info(vc->gfx.dcl.con); + info =3D *qemu_console_get_ui_info(vc->gfx.dcl.con); info.refresh_rate =3D refresh_rate; - dpy_set_ui_info(vc->gfx.dcl.con, &info, true); + qemu_console_set_ui_info(vc->gfx.dcl.con, &info, true); } =20 static void gd_set_ui_size(VirtualConsole *vc, gint width, gint height) { QemuUIInfo info; =20 - if (!dpy_ui_info_supported(vc->gfx.dcl.con)) { + if (!qemu_console_ui_info_supported(vc->gfx.dcl.con)) { return; } =20 - info =3D *dpy_get_ui_info(vc->gfx.dcl.con); + info =3D *qemu_console_get_ui_info(vc->gfx.dcl.con); info.width =3D width; info.height =3D height; - dpy_set_ui_info(vc->gfx.dcl.con, &info, true); + qemu_console_set_ui_info(vc->gfx.dcl.con, &info, true); } =20 #if defined(CONFIG_OPENGL) @@ -2333,7 +2333,7 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, Vir= tualConsole *vc, gd_connect_vc_gfx_signals(vc); group =3D gd_vc_menu_init(s, vc, idx, group, view_menu); =20 - if (dpy_ui_info_supported(vc->gfx.dcl.con)) { + if (qemu_console_ui_info_supported(vc->gfx.dcl.con)) { zoom_to_fit =3D true; } if (s->opts->u.gtk.has_zoom_to_fit) { diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c index 73052383c2e..68a3aff7151 100644 --- a/ui/sdl2-2d.c +++ b/ui/sdl2-2d.c @@ -129,7 +129,7 @@ void sdl2_2d_refresh(DisplayChangeListener *dcl) struct sdl2_console *scon =3D container_of(dcl, struct sdl2_console, d= cl); =20 assert(!scon->opengl); - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); sdl2_poll_events(scon); } =20 diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index bb066cdd885..1547ad2f6f8 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -115,7 +115,7 @@ void sdl2_gl_refresh(DisplayChangeListener *dcl) =20 assert(scon->opengl); =20 - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); if (scon->updates && scon->real_window) { scon->updates =3D 0; sdl2_gl_render_surface(scon); diff --git a/ui/sdl2.c b/ui/sdl2.c index 4f8b05fbd85..0f93a2fec84 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -604,7 +604,7 @@ static void handle_windowevent(SDL_Event *ev) .width =3D ev->window.data1, .height =3D ev->window.data2, }; - dpy_set_ui_info(scon->dcl.con, &info, true); + qemu_console_set_ui_info(scon->dcl.con, &info, true); } sdl2_redraw(scon); break; @@ -632,10 +632,10 @@ static void handle_windowevent(SDL_Event *ev) } break; case SDL_WINDOWEVENT_RESTORED: - update_displaychangelistener(&scon->dcl, GUI_REFRESH_INTERVAL_DEFA= ULT); + qemu_console_listener_set_refresh(&scon->dcl, GUI_REFRESH_INTERVAL= _DEFAULT); break; case SDL_WINDOWEVENT_MINIMIZED: - update_displaychangelistener(&scon->dcl, 500); + qemu_console_listener_set_refresh(&scon->dcl, 500); break; case SDL_WINDOWEVENT_CLOSE: if (qemu_console_is_graphic(scon->dcl.con)) { diff --git a/ui/spice-display.c b/ui/spice-display.c index 56d8140fad8..e3716127203 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -468,7 +468,7 @@ void qemu_spice_cursor_refresh_bh(void *opaque) assert(ssd->dcl.con); cursor_ref(c); qemu_mutex_unlock(&ssd->lock); - dpy_cursor_define(ssd->dcl.con, c); + qemu_console_set_cursor(ssd->dcl.con, c); qemu_mutex_lock(&ssd->lock); cursor_unref(c); } @@ -481,7 +481,7 @@ void qemu_spice_cursor_refresh_bh(void *opaque) ssd->mouse_x =3D -1; ssd->mouse_y =3D -1; qemu_mutex_unlock(&ssd->lock); - dpy_mouse_set(ssd->dcl.con, x, y, true); + qemu_console_set_mouse(ssd->dcl.con, x, y, true); } else { qemu_mutex_unlock(&ssd->lock); } @@ -489,7 +489,7 @@ void qemu_spice_cursor_refresh_bh(void *opaque) =20 void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd) { - graphic_hw_update(ssd->dcl.con); + qemu_console_hw_update(ssd->dcl.con); =20 WITH_QEMU_LOCK_GUARD(&ssd->lock) { if (QTAILQ_EMPTY(&ssd->updates) && ssd->ds) { @@ -668,7 +668,7 @@ static int interface_client_monitors_config(QXLInstance= *sin, QemuUIInfo info; int head; =20 - if (!dpy_ui_info_supported(ssd->dcl.con)) { + if (!qemu_console_ui_info_supported(ssd->dcl.con)) { return 0; /* =3D=3D not supported by guest */ } =20 @@ -676,7 +676,7 @@ static int interface_client_monitors_config(QXLInstance= *sin, return 1; } =20 - info =3D *dpy_get_ui_info(ssd->dcl.con); + info =3D *qemu_console_get_ui_info(ssd->dcl.con); =20 head =3D qemu_console_get_index(ssd->dcl.con); if (mc->num_of_monitors > head) { @@ -690,7 +690,7 @@ static int interface_client_monitors_config(QXLInstance= *sin, } =20 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); - dpy_set_ui_info(ssd->dcl.con, &info, false); + qemu_console_set_ui_info(ssd->dcl.con, &info, false); return 1; } =20 @@ -817,7 +817,7 @@ static void qemu_spice_gl_block(SimpleSpiceDisplay *ssd= , bool block) } else { timer_del(ssd->gl_unblock_timer); } - graphic_hw_gl_block(ssd->dcl.con, block); + qemu_console_hw_gl_block(ssd->dcl.con, block); } =20 static void qemu_spice_gl_unblock_bh(void *opaque) @@ -861,7 +861,7 @@ static void spice_gl_refresh(DisplayChangeListener *dcl) return; } =20 - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); if (ssd->gl_updates && ssd->have_surface) { qemu_spice_gl_block(ssd, true); glFlush(); diff --git a/ui/vnc.c b/ui/vnc.c index 21698835084..e1fba53ee57 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2324,8 +2324,8 @@ static void set_pixel_format(VncState *vs, int bits_p= er_pixel, =20 set_pixel_conversion(vs); =20 - graphic_hw_invalidate(vs->vd->dcl.con); - graphic_hw_update(vs->vd->dcl.con); + qemu_console_hw_invalidate(vs->vd->dcl.con); + qemu_console_hw_update(vs->vd->dcl.con); } =20 static void pixel_format_message (VncState *vs) { @@ -2383,7 +2383,7 @@ static int protocol_client_msg(VncState *vs, uint8_t = *data, size_t len) VncDisplay *vd =3D vs->vd; =20 if (data[0] > 3) { - update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); + qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_B= ASE); } =20 switch (data[0]) { @@ -2637,9 +2637,9 @@ static int protocol_client_msg(VncState *vs, uint8_t = *data, size_t len) h =3D read_u16(data, 4); =20 trace_vnc_msg_client_set_desktop_size(vs, vs->ioc, w, h, screens); - if (dpy_ui_info_supported(vs->vd->dcl.con)) { + if (qemu_console_ui_info_supported(vs->vd->dcl.con)) { QemuUIInfo info =3D { .width =3D w, .height =3D h }; - dpy_set_ui_info(vs->vd->dcl.con, &info, false); + qemu_console_set_ui_info(vs->vd->dcl.con, &info, false); vnc_desktop_resize_ext(vs, 4 /* Request forwarded */); } else { vnc_desktop_resize_ext(vs, 3 /* Invalid screen layout */); @@ -3241,14 +3241,14 @@ static void vnc_refresh(DisplayChangeListener *dcl) int has_dirty, rects =3D 0; =20 if (QTAILQ_EMPTY(&vd->clients)) { - update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_MAX); + qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_M= AX); return; } =20 - graphic_hw_update(vd->dcl.con); + qemu_console_hw_update(vd->dcl.con); =20 if (vnc_trylock_display(vd)) { - update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); + qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_B= ASE); return; } =20 @@ -3322,7 +3322,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSoc= ket *sioc, sioc, websocket, vs->auth, vs->subauth); =20 VNC_DEBUG("New client on socket %p\n", vs->sioc); - update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); + qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); qio_channel_set_blocking(vs->ioc, false, &error_abort); g_clear_handle_id(&vs->ioc_tag, g_source_remove); if (websocket) { @@ -3362,7 +3362,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSoc= ket *sioc, vnc_update_server_surface(vd); } =20 - graphic_hw_update(vd->dcl.con); + qemu_console_hw_update(vd->dcl.con); =20 if (!vs->websocket) { vnc_start_protocol(vs); @@ -3418,7 +3418,7 @@ static void vmstate_change_handler(void *opaque, bool= running, RunState state) if (state !=3D RUN_STATE_RUNNING) { return; } - update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); + qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); } =20 static bool vnc_display_open(VncDisplay *vd, Error **errp); diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 77d80fb7cef..be0061b9db2 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -317,8 +317,8 @@ static void apple_gfx_render_frame_completed_bh(void *o= paque) copy_mtl_texture_to_surface_mem(s->texture, surface_data(s->su= rface)); if (s->gfx_update_requested) { s->gfx_update_requested =3D false; - dpy_gfx_update_full(s->con); - graphic_hw_update_done(s->con); + qemu_console_update_full(s->con); + qemu_console_hw_update_done(s->con); s->new_frame_ready =3D false; } else { s->new_frame_ready =3D true; @@ -337,7 +337,7 @@ static bool apple_gfx_fb_update_display(void *opaque) =20 assert(bql_locked()); if (s->new_frame_ready) { - dpy_gfx_update_full(s->con); + qemu_console_update_full(s->con); s->new_frame_ready =3D false; } else if (s->pending_frames > 0) { s->gfx_update_requested =3D true; @@ -380,14 +380,14 @@ static void set_mode(AppleGFXState *s, uint32_t width= , uint32_t height) (s->texture.storageMode =3D=3D MTLStorageModeManaged); } =20 - dpy_gfx_replace_surface(s->con, s->surface); + qemu_console_set_surface(s->con, s->surface); } =20 static void update_cursor(AppleGFXState *s) { assert(bql_locked()); - dpy_mouse_set(s->con, s->pgdisp.cursorPosition.x, - s->pgdisp.cursorPosition.y, qatomic_read(&s->cursor_show= )); + qemu_console_set_mouse(s->con, s->pgdisp.cursorPosition.x, + s->pgdisp.cursorPosition.y, qatomic_read(&s->cu= rsor_show)); } =20 static void update_cursor_bh(void *opaque) @@ -443,7 +443,7 @@ static void set_cursor_glyph(void *opaque) } px_data +=3D padding_bytes_per_row; } - dpy_cursor_define(s->con, s->cursor); + qemu_console_set_cursor(s->con, s->cursor); update_cursor(s); } [glyph release]; @@ -792,7 +792,7 @@ bool apple_gfx_common_realize(AppleGFXState *s, DeviceS= tate *dev, apple_gfx_create_display_mode_array(display_modes, num_display_mod= es); [mode_array release]; =20 - s->con =3D graphic_console_init(dev, 0, &apple_gfx_fb_ops, s); + s->con =3D qemu_graphic_console_create(dev, 0, &apple_gfx_fb_ops, s); return true; } =20 diff --git a/ui/cocoa.m b/ui/cocoa.m index aaf82421589..98394cdc507 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -421,7 +421,7 @@ - (void) selectConsoleLocked:(unsigned int)index return; } =20 - unregister_displaychangelistener(&dcl); + qemu_console_unregister_listener(&dcl); qkbd_state_switch_console(kbd, con); qemu_console_register_listener(con, &dcl, &dcl_ops); [self notifyMouseModeChange]; @@ -669,8 +669,8 @@ - (void) updateUIInfoLocked CVTime period =3D CVDisplayLinkGetNominalOutputVideoRefreshPer= iod(displayLink); CVDisplayLinkRelease(displayLink); if (!(period.flags & kCVTimeIsIndefinite)) { - update_displaychangelistener(&dcl, - 1000 * period.timeValue / per= iod.timeScale); + qemu_console_listener_set_refresh(&dcl, + 1000 * period.timeValue = / period.timeScale); info.refresh_rate =3D (int64_t)1000 * period.timeScale / p= eriod.timeValue; } } @@ -688,7 +688,7 @@ - (void) updateUIInfoLocked info.width =3D frameSize.width * [[self window] backingScaleFactor]; info.height =3D frameSize.height * [[self window] backingScaleFactor]; =20 - dpy_set_ui_info(dcl.con, &info, TRUE); + qemu_console_set_ui_info(dcl.con, &info, TRUE); } =20 #pragma clang diagnostic pop @@ -2056,7 +2056,7 @@ static void cocoa_refresh(DisplayChangeListener *dcl) NSAutoreleasePool * pool =3D [[NSAutoreleasePool alloc] init]; =20 COCOA_DEBUG("qemu_cocoa: cocoa_refresh\n"); - graphic_hw_update(dcl->con); + qemu_console_hw_update(dcl->con); =20 if (cbchangecount !=3D [[NSPasteboard generalPasteboard] changeCount])= { qemu_clipboard_info_unref(cbinfo); --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849262; cv=none; d=zohomail.com; s=zohoarc; b=GKtdvMPa0UTIDH/qT7RCeKxO1cXeMsMVZabEvIBdIYTwpk9e92uln5zCbWfqv1RjHB2ykKnmppMYeTZc9uVLq+9NlaiyOy07/HiT8gGmuFwCd7IH63RNVREDA+KuARVpBe8xgktVQIwvhedAB1FJ8UUpFR8nm+lqUoTm11iib8M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849262; 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=V8Kmb9hMdDfZvIwjrajmdDx/fPyIjOHyNIBxjOd4ZLI=; b=jVEjJNaNJIvXPRoWkDeB1fngO5ue26v15QpJQG92xW5JJL2+XQ8syOxhRs+pIJ6/UJS/kWqP8CFubz9L77tRziezaOLocOoxlp65lhm6KuZ+FyFnso9n7FI0W8FLTIw80gzUBtDQwbSBJuIZ9oihBsnhE/Y5XXxsM3AaLyY6Hxo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849262078693.5976373958343; Fri, 10 Apr 2026 12:27:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTu-0007lt-CW; Fri, 10 Apr 2026 15:25:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTe-0007SM-Gl for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTU-0002ko-5i for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:11 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-581-ZxC_VHCkNGWNLo1W7-RLXQ-1; Fri, 10 Apr 2026 15:25:00 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D308519560AF; Fri, 10 Apr 2026 19:24:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 84B36195608E; Fri, 10 Apr 2026 19:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849102; 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=V8Kmb9hMdDfZvIwjrajmdDx/fPyIjOHyNIBxjOd4ZLI=; b=cA8WlCSgUVl64gDRLFOGlfbPe6W3T7c2vwUNbDQTuNQInQEcY8yb+vFFV5k+d3hkegFkci vBjOqyiaal5bzO56UwP15+eLqlGu70SCo5GgMuDwtyE38UQUOSqyttJ7tKlPNv5hOwl/CN bM7/NDXvfkMPxtUWx2Bz3s3x4hOXaes= X-MC-Unique: ZxC_VHCkNGWNLo1W7-RLXQ-1 X-Mimecast-MFC-AGG-ID: ZxC_VHCkNGWNLo1W7-RLXQ_1775849099 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:23 +0400 Subject: [PATCH v2 61/67] ui/console: move console_handle_touch_event() to input MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-61-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=9221; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=689gCTcA3cL/UQbDpjNhlr4RASF6v9cOEQL32KHP834=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XkcIryQX8g+qHkJPqbffhSD/jlVaay0MjE eZ7ZQeVlpeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5X1jD/0WZRSWLmkpZ6hej+chrFt+yD4NL5k5ToCo56CrOjVxpWit+KmduGXkikF6JZfpkmcbdlm ggSM+P9Bl4va1c9NeIK1af3MI0i/Odk0MvadNnF8h6scN4PJXpf4uspQrZKABeBgwn5tXSsAdQ/ k7Y+P+xvn87OI6iph8R6XhoVWzqxhDRuIyE2U6QzCXN+aH7/AfWJd5uRpMrXySLXb8P0HY2DgJT Nhysnh1YwwVlXEnN8BtNqQGdWm3xJfmoerMVnFm0PdGsvt/bJ3/YuDpaACDadUma/6bwOHEzQHS uiXTW9HWQb0wO2a6hYSMIqMsQTh6bbEAfg89imonc8jzxWz7nyMcNNMoIFu4PiLitPRapwryIa0 vXmTChZ5pRo2raepGHoIbeVynrQYFp0DXbtmpAnxHx0fvzVphqIqK31k0d0zcqx/WDrQ0mFQ4Ze Plxi8jDUt2fFIkkmr4ff9XLUkYt/EOaiC2ry4eYNyDvF5zEhwolSC6tIRyj4kOiTjrPQL/qLqnl bq5QxugRy1oIB5UbU0swrvxB0h0PmrOc+p8HHlXcevym5pRXVVt33kRvUkpt4ANGPat6iSqrX+T XPVSvR07uhoao9Y26ZmGvYGqaGQtryjN1XrbjRrwJG+A+cprsjPtJ9nSOI7hO9oKTGm6YQ1aiBB D4wqBEqhMVCozIg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849263370158500 The function uses input.c functions to provide a simpler abstraction for touch events. Let's move it from the already overloaded console.c, and to avoid some unnecessary dependency from console.c on input.c. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/ui/console.h | 14 ----------- include/ui/input.h | 15 ++++++++++++ ui/console.c | 65 ------------------------------------------------= ---- ui/dbus-console.c | 6 ++--- ui/gtk.c | 8 +++---- ui/input.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 6 files changed, 87 insertions(+), 86 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 5566d1f65f9..89a93230bb0 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -111,20 +111,6 @@ void qemu_text_console_put_keysym(QemuTextConsole *s, = int keysym); bool qemu_text_console_put_qcode(QemuTextConsole *s, int qcode, bool ctrl); void qemu_text_console_put_string(QemuTextConsole *s, const char *str, int= len); =20 -/* Touch devices */ -typedef struct touch_slot { - int x; - int y; - int tracking_id; -} touch_slot; - -void console_handle_touch_event(QemuConsole *con, - struct touch_slot touch_slots[INPUT_EVENT_= SLOTS_MAX], - uint64_t num_slot, - int width, int height, - double x, double y, - InputMultiTouchType type, - Error **errp); /* consoles */ =20 struct QemuConsoleClass { diff --git a/include/ui/input.h b/include/ui/input.h index 8f9aac562ed..52c164bde57 100644 --- a/include/ui/input.h +++ b/include/ui/input.h @@ -70,6 +70,21 @@ void qemu_input_queue_mtt_abs(QemuConsole *src, InputAxi= s axis, int value, int min_in, int max_in, int slot, int tracking_id); =20 +/* Touch devices */ +typedef struct touch_slot { + int x; + int y; + int tracking_id; +} touch_slot; + +void qemu_input_touch_event(QemuConsole *con, + struct touch_slot touch_slots[INPUT_EVENT_SLOT= S_MAX], + uint64_t num_slot, + int width, int height, + double x, double y, + InputMultiTouchType type, + Error **errp); + void qemu_input_check_mode_change(void); void qemu_add_mouse_mode_change_notifier(Notifier *notify); void qemu_remove_mouse_mode_change_notifier(Notifier *notify); diff --git a/ui/console.c b/ui/console.c index 344bf308b0c..405dd1bb5b8 100644 --- a/ui/console.c +++ b/ui/console.c @@ -550,71 +550,6 @@ static bool console_compatible_with(QemuConsole *con, return true; } =20 -void console_handle_touch_event(QemuConsole *con, - struct touch_slot touch_slots[INPUT_EVENT_= SLOTS_MAX], - uint64_t num_slot, - int width, int height, - double x, double y, - InputMultiTouchType type, - Error **errp) -{ - struct touch_slot *slot; - bool needs_sync =3D false; - int update; - int i; - - if (num_slot >=3D INPUT_EVENT_SLOTS_MAX) { - error_setg(errp, - "Unexpected touch slot number: % " PRId64" >=3D %d", - num_slot, INPUT_EVENT_SLOTS_MAX); - return; - } - - slot =3D &touch_slots[num_slot]; - slot->x =3D x; - slot->y =3D y; - - if (type =3D=3D INPUT_MULTI_TOUCH_TYPE_BEGIN) { - slot->tracking_id =3D num_slot; - } - - for (i =3D 0; i < INPUT_EVENT_SLOTS_MAX; ++i) { - if (i =3D=3D num_slot) { - update =3D type; - } else { - update =3D INPUT_MULTI_TOUCH_TYPE_UPDATE; - } - - slot =3D &touch_slots[i]; - - if (slot->tracking_id =3D=3D -1) { - continue; - } - - if (update =3D=3D INPUT_MULTI_TOUCH_TYPE_END) { - slot->tracking_id =3D -1; - qemu_input_queue_mtt(con, update, i, slot->tracking_id); - needs_sync =3D true; - } else { - qemu_input_queue_mtt(con, update, i, slot->tracking_id); - qemu_input_queue_btn(con, INPUT_BUTTON_TOUCH, true); - qemu_input_queue_mtt_abs(con, - INPUT_AXIS_X, (int) slot->x, - 0, width, - i, slot->tracking_id); - qemu_input_queue_mtt_abs(con, - INPUT_AXIS_Y, (int) slot->y, - 0, height, - i, slot->tracking_id); - needs_sync =3D true; - } - } - - if (needs_sync) { - qemu_input_event_sync(); - } -} - void qemu_console_set_display_gl_ctx(QemuConsole *con, DisplayGLCtx *gl) { /* display has opengl support */ diff --git a/ui/dbus-console.c b/ui/dbus-console.c index 88f58e88efb..b8e5c57b148 100644 --- a/ui/dbus-console.c +++ b/ui/dbus-console.c @@ -423,9 +423,9 @@ dbus_touch_send_event(DBusDisplayConsole *ddc, width =3D qemu_console_get_width(ddc->dcl.con, 0); height =3D qemu_console_get_height(ddc->dcl.con, 0); =20 - console_handle_touch_event(ddc->dcl.con, touch_slots, - num_slot, width, height, - x, y, kind, &error); + qemu_input_touch_event(ddc->dcl.con, touch_slots, + num_slot, width, height, + x, y, kind, &error); if (error !=3D NULL) { g_dbus_method_invocation_return_error( invocation, DBUS_DISPLAY_ERROR, diff --git a/ui/gtk.c b/ui/gtk.c index bcb67db7ee7..3b84224d8e8 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1201,10 +1201,10 @@ static gboolean gd_touch_event(GtkWidget *widget, G= dkEventTouch *touch, return FALSE; } =20 - console_handle_touch_event(vc->gfx.dcl.con, touch_slots, - num_slot, surface_width(vc->gfx.ds), - surface_height(vc->gfx.ds), touch->x, - touch->y, type, &err); + qemu_input_touch_event(vc->gfx.dcl.con, touch_slots, + num_slot, surface_width(vc->gfx.ds), + surface_height(vc->gfx.ds), touch->x, + touch->y, type, &err); if (err) { warn_report_err(err); } diff --git a/ui/input.c b/ui/input.c index 147e69c1c3c..57e7817878a 100644 --- a/ui/input.c +++ b/ui/input.c @@ -609,3 +609,68 @@ bool qemu_mouse_set(int index, Error **errp) notifier_list_notify(&mouse_mode_notifiers, NULL); return true; } + +void qemu_input_touch_event(QemuConsole *con, + struct touch_slot touch_slots[INPUT_EVENT_SLOT= S_MAX], + uint64_t num_slot, + int width, int height, + double x, double y, + InputMultiTouchType type, + Error **errp) +{ + struct touch_slot *slot; + bool needs_sync =3D false; + int update; + int i; + + if (num_slot >=3D INPUT_EVENT_SLOTS_MAX) { + error_setg(errp, + "Unexpected touch slot number: % " PRId64" >=3D %d", + num_slot, INPUT_EVENT_SLOTS_MAX); + return; + } + + slot =3D &touch_slots[num_slot]; + slot->x =3D x; + slot->y =3D y; + + if (type =3D=3D INPUT_MULTI_TOUCH_TYPE_BEGIN) { + slot->tracking_id =3D num_slot; + } + + for (i =3D 0; i < INPUT_EVENT_SLOTS_MAX; ++i) { + if (i =3D=3D num_slot) { + update =3D type; + } else { + update =3D INPUT_MULTI_TOUCH_TYPE_UPDATE; + } + + slot =3D &touch_slots[i]; + + if (slot->tracking_id =3D=3D -1) { + continue; + } + + if (update =3D=3D INPUT_MULTI_TOUCH_TYPE_END) { + slot->tracking_id =3D -1; + qemu_input_queue_mtt(con, update, i, slot->tracking_id); + needs_sync =3D true; + } else { + qemu_input_queue_mtt(con, update, i, slot->tracking_id); + qemu_input_queue_btn(con, INPUT_BUTTON_TOUCH, true); + qemu_input_queue_mtt_abs(con, + INPUT_AXIS_X, (int) slot->x, + 0, width, + i, slot->tracking_id); + qemu_input_queue_mtt_abs(con, + INPUT_AXIS_Y, (int) slot->y, + 0, height, + i, slot->tracking_id); + needs_sync =3D true; + } + } + + if (needs_sync) { + qemu_input_event_sync(); + } +} --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849240; cv=none; d=zohomail.com; s=zohoarc; b=cDQuEf5ISaJijQJGcyQLU7qVUAQDxTodMIqBXI1eX/ckIZy3IguZUWOuirGJosbAknD5ce7qanlW3qm55gVEquoYKeVWCdyW/tH/ie0/dumu4aaA7Fqb1uMIOiWQkquD7MJx4tfQn6AuKFgO6mV90QmEI37oaanYV0Hq/AcT20w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849240; 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=F3YYGoYh+6KX4BI0Ot/SLLZ0EfYgab3RAz12Uxtp1v8=; b=NdQU8+4VWWahxLa44Wshbk1ECzksaNCJFlMzF/IZReyz2tQld/uaEHRZVc+WIqo4umlmx+2wUYo5AqMUwMrl2CjH003nLrBggubigEmanvgpGrBPWCTOCN1vPd35/McW8XwcQYqM1ItJhUzsJqQvhgVuwREWopaPV6IjGlKzoLk= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849240008381.27801733791455; Fri, 10 Apr 2026 12:27:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTs-0007gC-Mi; Fri, 10 Apr 2026 15:25:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTf-0007TS-Un for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTZ-00030R-KM for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:15 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-673-mmAlhwesMRWr3VTyoiz81A-1; Fri, 10 Apr 2026 15:25:07 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8D9911956054 for ; Fri, 10 Apr 2026 19:25:06 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 17D7419560AB; Fri, 10 Apr 2026 19:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849108; 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=F3YYGoYh+6KX4BI0Ot/SLLZ0EfYgab3RAz12Uxtp1v8=; b=D76cRPi/l9TkQI+rkDo1fLNGwEiNnp8tkxbqXYZQRg9iEr3FZ5MGtRtvJssyJicfdvTndm bJBTQ0ZXBadsbSKXkNMnt3RmeXaj6AhhLGb6sGETJHXr0dN/6elkkGJU+7HvC2/gQ5mgCM 093zI4Aq7ZTWdejZCP3YCQurLVBpIhU= X-MC-Unique: mmAlhwesMRWr3VTyoiz81A-1 X-Mimecast-MFC-AGG-ID: mmAlhwesMRWr3VTyoiz81A_1775849106 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:24 +0400 Subject: [PATCH v2 62/67] ui/vnc: replace VNC_DEBUG with trace-events MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-62-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=22270; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=1Nsl0avG4c5z+Cz4TpuhxbkjUb+9QEOegkjJXmx4B/k=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XCijyepSr+56y9rEhHdbC+FwQ+Wy+pXYF1 c17B9k55vSJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5YE+D/oDRMuxTRWy2Ma1QiS1WM5vl4S6VuFKuQnHyxWxcvTgTL9RbAXumXxiCoiERRpTzpFG5VO N4vGsCguioJ2CLUqQ4WG67iKPevL7xN7OSnE40Ax//mjN8Otk1PgJgN4xoc839T5GHIcFuZY1zB Du14YWLrTXkJFUXj0xuSPnwgTIMb2Q8ZVpVy6NkRJYscNhRl7XdKLnl+TpHFAZYjg8GLPRe1zcn ei+d+b09kspTsApYVSzCnBM72dTg8zPPLlX9TJGUkcSqfsSnBWL6tD9r2c5ylCexVdbTfuH9w82 Df8k8cvRdGZqc1saM4ZUR22WPoI85DOcpMA04kSr6SFwsmpvzWqDrDaKa/cVQ3qFCdVgUMxQbkv 979W7vBwPY6CzUVCvoubNsDl7yVbtmKZnlJEMldJ9iFi1oET+Y59rV9m/qP0GefQ4jF+t6WVS03 8ceb3V4Be0ALT0svQghmLrYtpbPPP+MdTlaYPMhdUezKRjStV1EYU5ctHT8PgWh+UU/0JqkgaDs l5zlmn6PnY2gNsCEvfCBbMnM2dMyO8rAF1ZeG2+iPNxLYZNNnEw0ycmfNZ15iuO6CqSDhE+Xg8e dMT1IvD4NQboSKxI+CYmZaG3utMUbHjPVvcBr3qSIdzC9IW4pSFssaHKw9R2E2CyyywR1qoBQad fOSUz32qraEdiYw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849241186158500 Replace #ifdef printf() with run-time trace events. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc.h | 8 ------ ui/vnc-auth-sasl.c | 13 ++++----- ui/vnc-enc-tight.c | 4 +-- ui/vnc-enc-zlib.c | 4 +-- ui/vnc-ws.c | 10 +++---- ui/vnc.c | 83 ++++++++++++++++++++------------------------------= ---- ui/trace-events | 29 ++++++++++++++++++- 7 files changed, 73 insertions(+), 78 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index 7341fb0f25c..0324e5a98bc 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -46,14 +46,6 @@ #include "vnc-enc-zrle.h" #include "ui/kbd-state.h" =20 -// #define _VNC_DEBUG 1 - -#ifdef _VNC_DEBUG -#define VNC_DEBUG(fmt, ...) do { fprintf(stderr, fmt, ## __VA_ARGS__); } w= hile (0) -#else -#define VNC_DEBUG(fmt, ...) do { } while (0) -#endif - /*************************************************************************= **** * * Core data structures diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c index 3f4cfc471d5..9964b969ac2 100644 --- a/ui/vnc-auth-sasl.c +++ b/ui/vnc-auth-sasl.c @@ -73,10 +73,10 @@ size_t vnc_client_write_sasl(VncState *vs) { size_t ret; =20 - VNC_DEBUG("Write SASL: Pending output %p size %zd offset %zd " - "Encoded: %p size %d offset %d\n", - vs->output.buffer, vs->output.capacity, vs->output.offset, - vs->sasl.encoded, vs->sasl.encodedLength, vs->sasl.encodedOf= fset); + trace_vnc_sasl_write_pending(vs, vs->output.buffer, vs->output.capacit= y, + vs->output.offset, vs->sasl.encoded, + vs->sasl.encodedLength, + vs->sasl.encodedOffset); =20 if (!vs->sasl.encoded) { int err; @@ -157,8 +157,7 @@ size_t vnc_client_read_sasl(VncState *vs) =20 if (err !=3D SASL_OK) return vnc_client_io_error(vs, -1, NULL); - VNC_DEBUG("Read SASL Encoded %p size %ld Decoded %p size %d\n", - encoded, ret, decoded, decodedLen); + trace_vnc_sasl_read_decoded(vs, encoded, ret, decoded, decodedLen); buffer_reserve(&vs->input, decodedLen); buffer_append(&vs->input, decoded, decodedLen); return decodedLen; @@ -717,5 +716,3 @@ void start_auth_sasl(VncState *vs) error_free(local_err); vnc_client_error(vs); } - - diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 9dfe6ae5a24..ca671427018 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -46,6 +46,7 @@ #include "vnc.h" #include "vnc-enc-tight.h" #include "vnc-palette.h" +#include "trace.h" =20 /* Compression level stuff. The following array contains various encoder parameters for each of 10 compression levels (0..9). @@ -795,8 +796,7 @@ static int tight_init_stream(VncState *vs, VncTight *ti= ght, int stream_id, if (zstream->opaque =3D=3D NULL) { int err; =20 - VNC_DEBUG("VNC: TIGHT: initializing zlib stream %d\n", stream_id); - VNC_DEBUG("VNC: TIGHT: opaque =3D %p | vs =3D %p\n", zstream->opaq= ue, vs); + trace_vnc_tight_zlib_init(vs, stream_id, zstream->opaque); zstream->zalloc =3D vnc_zlib_zalloc; zstream->zfree =3D vnc_zlib_zfree; =20 diff --git a/ui/vnc-enc-zlib.c b/ui/vnc-enc-zlib.c index a6d287118aa..657b47ceb2b 100644 --- a/ui/vnc-enc-zlib.c +++ b/ui/vnc-enc-zlib.c @@ -26,6 +26,7 @@ =20 #include "qemu/osdep.h" #include "vnc.h" +#include "trace.h" =20 #define ZALLOC_ALIGNMENT 16 =20 @@ -71,8 +72,7 @@ static int vnc_zlib_stop(VncState *vs, VncWorker *worker) if (zstream->opaque !=3D vs) { int err; =20 - VNC_DEBUG("VNC: initializing zlib stream\n"); - VNC_DEBUG("VNC: opaque =3D %p | vs =3D %p\n", zstream->opaque, vs); + trace_vnc_zlib_init(vs, zstream->opaque); zstream->zalloc =3D vnc_zlib_zalloc; zstream->zfree =3D vnc_zlib_zfree; =20 diff --git a/ui/vnc-ws.c b/ui/vnc-ws.c index 9e3503d93d8..b7d4de41431 100644 --- a/ui/vnc-ws.c +++ b/ui/vnc-ws.c @@ -32,11 +32,11 @@ static void vncws_tls_handshake_done(QIOTask *task, Error *err =3D NULL; =20 if (qio_task_propagate_error(task, &err)) { - VNC_DEBUG("Handshake failed %s\n", error_get_pretty(err)); + trace_vnc_ws_tls_handshake_fail(vs, error_get_pretty(err)); vnc_client_error(vs); error_free(err); } else { - VNC_DEBUG("TLS handshake complete, starting websocket handshake\n"= ); + trace_vnc_ws_tls_handshake_complete(vs); if (vs->ioc_tag) { g_source_remove(vs->ioc_tag); } @@ -71,7 +71,7 @@ gboolean vncws_tls_handshake_io(QIOChannel *ioc G_GNUC_UN= USED, vs->vd->tlsauthzid, &err); if (!tls) { - VNC_DEBUG("Failed to setup TLS %s\n", error_get_pretty(err)); + trace_vnc_ws_tls_setup_fail(vs, error_get_pretty(err)); error_free(err); vnc_client_error(vs); return TRUE; @@ -101,11 +101,11 @@ static void vncws_handshake_done(QIOTask *task, Error *err =3D NULL; =20 if (qio_task_propagate_error(task, &err)) { - VNC_DEBUG("Websock handshake failed %s\n", error_get_pretty(err)); + trace_vnc_ws_handshake_fail(vs, error_get_pretty(err)); vnc_client_error(vs); error_free(err); } else { - VNC_DEBUG("Websock handshake complete, starting VNC protocol\n"); + trace_vnc_ws_handshake_complete(vs); vnc_start_protocol(vs); if (vs->ioc_tag) { g_source_remove(vs->ioc_tag); diff --git a/ui/vnc.c b/ui/vnc.c index e1fba53ee57..12a2b10b418 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -75,17 +75,7 @@ static void vnc_disconnect_finish(VncState *vs); =20 static void vnc_set_share_mode(VncState *vs, VncShareMode mode) { -#ifdef _VNC_DEBUG - static const char *mn[] =3D { - [0] =3D "undefined", - [VNC_SHARE_MODE_CONNECTING] =3D "connecting", - [VNC_SHARE_MODE_SHARED] =3D "shared", - [VNC_SHARE_MODE_EXCLUSIVE] =3D "exclusive", - [VNC_SHARE_MODE_DISCONNECTED] =3D "disconnected", - }; - fprintf(stderr, "%s/%p: %s -> %s\n", __func__, - vs->ioc, mn[vs->share_mode], mn[mode]); -#endif + trace_vnc_set_share_mode(vs, vs->ioc, vs->share_mode, mode); =20 switch (vs->share_mode) { case VNC_SHARE_MODE_CONNECTING: @@ -185,8 +175,9 @@ static void vnc_init_basic_info_from_remote_addr(QIOCha= nnelSocket *ioc, qapi_free_SocketAddress(addr); } =20 -static const char *vnc_auth_name(VncDisplay *vd) { - switch (vd->auth) { +static const char *vnc_auth_name(int auth, int subauth) +{ + switch (auth) { case VNC_AUTH_INVALID: return "invalid"; case VNC_AUTH_NONE: @@ -204,7 +195,7 @@ static const char *vnc_auth_name(VncDisplay *vd) { case VNC_AUTH_TLS: return "tls"; case VNC_AUTH_VENCRYPT: - switch (vd->subauth) { + switch (subauth) { case VNC_AUTH_VENCRYPT_PLAIN: return "vencrypt+plain"; case VNC_AUTH_VENCRYPT_TLSNONE: @@ -244,7 +235,7 @@ static VncServerInfo *vnc_server_info_get(VncDisplay *v= d) info =3D g_malloc0(sizeof(*info)); vnc_init_basic_info_from_server_addr(qio_net_listener_sioc(vd->listene= r, 0), qapi_VncServerInfo_base(info), &e= rr); - info->auth =3D g_strdup(vnc_auth_name(vd)); + info->auth =3D g_strdup(vnc_auth_name(vd->auth, vd->subauth)); if (err) { qapi_free_VncServerInfo(info); info =3D NULL; @@ -421,7 +412,7 @@ VncInfo *qmp_query_vnc(Error **errp) =20 info->has_family =3D true; =20 - info->auth =3D g_strdup(vnc_auth_name(vd)); + info->auth =3D g_strdup(vnc_auth_name(vd->auth, vd->subauth)); } =20 qapi_free_SocketAddress(addr); @@ -1382,7 +1373,7 @@ size_t vnc_client_io_error(VncState *vs, ssize_t ret,= Error *err) =20 void vnc_client_error(VncState *vs) { - VNC_DEBUG("Closing down client sock: protocol error\n"); + trace_vnc_client_protocol_error(vs); vnc_disconnect_start(vs); } =20 @@ -1407,7 +1398,7 @@ size_t vnc_client_write_buf(VncState *vs, const uint8= _t *data, size_t datalen) Error *err =3D NULL; ssize_t ret; ret =3D qio_channel_write(vs->ioc, (const char *)data, datalen, &err); - VNC_DEBUG("Wrote wire %p %zd -> %ld\n", data, datalen, ret); + trace_vnc_client_write_wire(vs, data, datalen, ret); return vnc_client_io_error(vs, ret, err); } =20 @@ -1428,9 +1419,9 @@ static size_t vnc_client_write_plain(VncState *vs) size_t ret; =20 #ifdef CONFIG_VNC_SASL - VNC_DEBUG("Write Plain: Pending output %p size %zd offset %zd. Wait SS= F %d\n", - vs->output.buffer, vs->output.capacity, vs->output.offset, - vs->sasl.waitWriteSSF); + trace_vnc_client_write_plain(vs, vs->output.buffer, + vs->output.capacity, vs->output.offset, + vs->sasl.waitWriteSSF); =20 if (vs->sasl.conn && vs->sasl.runSSF && @@ -1531,7 +1522,7 @@ size_t vnc_client_read_buf(VncState *vs, uint8_t *dat= a, size_t datalen) ssize_t ret; Error *err =3D NULL; ret =3D qio_channel_read(vs->ioc, (char *)data, datalen, &err); - VNC_DEBUG("Read wire %p %zd -> %ld\n", data, datalen, ret); + trace_vnc_client_read_wire(vs, data, datalen, ret); return vnc_client_io_error(vs, ret, err); } =20 @@ -1548,8 +1539,8 @@ size_t vnc_client_read_buf(VncState *vs, uint8_t *dat= a, size_t datalen) static size_t vnc_client_read_plain(VncState *vs) { size_t ret; - VNC_DEBUG("Read plain %p size %zd offset %zd\n", - vs->input.buffer, vs->input.capacity, vs->input.offset); + trace_vnc_client_read_plain(vs, vs->input.buffer, + vs->input.capacity, vs->input.offset); buffer_reserve(&vs->input, 4096); ret =3D vnc_client_read_buf(vs, buffer_end(&vs->input), 4096); if (!ret) @@ -2212,7 +2203,7 @@ static void set_encodings(VncState *vs, int32_t *enco= dings, size_t n_encodings) } break; default: - VNC_DEBUG("Unknown encoding: %d (0x%.8x): %d\n", i, enc, enc); + trace_vnc_client_unknown_encoding(vs, i, enc); break; } } @@ -2580,14 +2571,13 @@ static int protocol_client_msg(VncState *vs, uint8_= t *data, size_t len) case 4: vs->as.fmt =3D AUDIO_FORMAT_U32; break; case 5: vs->as.fmt =3D AUDIO_FORMAT_S32; break; default: - VNC_DEBUG("Invalid audio format %d\n", read_u8(data, 4= )); + trace_vnc_client_invalid_audio_format(vs, read_u8(data= , 4)); vnc_client_error(vs); break; } vs->as.nchannels =3D read_u8(data, 5); if (vs->as.nchannels !=3D 1 && vs->as.nchannels !=3D 2) { - VNC_DEBUG("Invalid audio channel count %d\n", - read_u8(data, 5)); + trace_vnc_client_invalid_audio_channels(vs, read_u8(da= ta, 5)); vnc_client_error(vs); break; } @@ -2597,7 +2587,7 @@ static int protocol_client_msg(VncState *vs, uint8_t = *data, size_t len) * protects calculations involving 'vs->as.freq' later. */ if (freq > 48000) { - VNC_DEBUG("Invalid audio frequency %u > 48000", freq); + trace_vnc_client_invalid_audio_freq(vs, freq); vnc_client_error(vs); break; } @@ -2606,14 +2596,14 @@ static int protocol_client_msg(VncState *vs, uint8_= t *data, size_t len) vs, vs->ioc, vs->as.fmt, vs->as.nchannels, vs->as.freq= ); break; default: - VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 2)); + trace_vnc_client_invalid_audio_msg(vs, read_u8(data, 2)); vnc_client_error(vs); break; } break; =20 default: - VNC_DEBUG("Msg: %d\n", read_u16(data, 0)); + trace_vnc_client_unknown_qemu_msg(vs, read_u16(data, 0)); vnc_client_error(vs); break; } @@ -2648,7 +2638,7 @@ static int protocol_client_msg(VncState *vs, uint8_t = *data, size_t len) break; } default: - VNC_DEBUG("Msg: %d\n", data[0]); + trace_vnc_client_unknown_msg(vs, data[0]); vnc_client_error(vs); break; } @@ -2928,18 +2918,18 @@ static int protocol_version(VncState *vs, uint8_t *= version, size_t len) local[12] =3D 0; =20 if (sscanf(local, "RFB %03d.%03d\n", &vs->major, &vs->minor) !=3D 2) { - VNC_DEBUG("Malformed protocol version %s\n", local); + trace_vnc_client_protocol_version_malformed(vs, local); vnc_client_error(vs); return 0; } - VNC_DEBUG("Client request protocol version %d.%d\n", vs->major, vs->mi= nor); + trace_vnc_client_protocol_version(vs, vs->major, vs->minor); if (vs->major !=3D 3 || (vs->minor !=3D 3 && vs->minor !=3D 4 && vs->minor !=3D 5 && vs->minor !=3D 7 && vs->minor !=3D 8)) { - VNC_DEBUG("Unsupported client version\n"); + trace_vnc_client_protocol_version_unsupported(vs); vnc_write_u32(vs, VNC_AUTH_INVALID); vnc_flush(vs); vnc_client_error(vs); @@ -2959,7 +2949,7 @@ static int protocol_version(VncState *vs, uint8_t *ve= rsion, size_t len) trace_vnc_auth_pass(vs, vs->auth); start_client_init(vs); } else if (vs->auth =3D=3D VNC_AUTH_VNC) { - VNC_DEBUG("Tell client VNC auth\n"); + trace_vnc_client_auth_method(vs, vs->auth); vnc_write_u32(vs, vs->auth); vnc_flush(vs); start_auth_vnc(vs); @@ -3318,10 +3308,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSo= cket *sioc, vs->subauth =3D vd->subauth; } } - VNC_DEBUG("Client sioc=3D%p ws=3D%d auth=3D%d subauth=3D%d\n", - sioc, websocket, vs->auth, vs->subauth); - - VNC_DEBUG("New client on socket %p\n", vs->sioc); + trace_vnc_client_setup(vs, sioc, websocket, vs->auth, vs->subauth); qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); qio_channel_set_blocking(vs->ioc, false, &error_abort); g_clear_handle_id(&vs->ioc_tag, g_source_remove); @@ -3722,13 +3709,10 @@ vnc_display_setup_auth(int *auth, */ if (websocket || !tlscreds) { if (password) { - VNC_DEBUG("Initializing VNC server with password auth\n"); *auth =3D VNC_AUTH_VNC; } else if (sasl) { - VNC_DEBUG("Initializing VNC server with SASL auth\n"); *auth =3D VNC_AUTH_SASL; } else { - VNC_DEBUG("Initializing VNC server with no auth\n"); *auth =3D VNC_AUTH_NONE; } *subauth =3D VNC_AUTH_INVALID; @@ -3747,27 +3731,20 @@ vnc_display_setup_auth(int *auth, *auth =3D VNC_AUTH_VENCRYPT; if (password) { if (is_x509) { - VNC_DEBUG("Initializing VNC server with x509 password auth= \n"); *subauth =3D VNC_AUTH_VENCRYPT_X509VNC; } else { - VNC_DEBUG("Initializing VNC server with TLS password auth\= n"); *subauth =3D VNC_AUTH_VENCRYPT_TLSVNC; } - } else if (sasl) { if (is_x509) { - VNC_DEBUG("Initializing VNC server with x509 SASL auth\n"); *subauth =3D VNC_AUTH_VENCRYPT_X509SASL; } else { - VNC_DEBUG("Initializing VNC server with TLS SASL auth\n"); *subauth =3D VNC_AUTH_VENCRYPT_TLSSASL; } } else { if (is_x509) { - VNC_DEBUG("Initializing VNC server with x509 no auth\n"); *subauth =3D VNC_AUTH_VENCRYPT_X509NONE; } else { - VNC_DEBUG("Initializing VNC server with TLS no auth\n"); *subauth =3D VNC_AUTH_VENCRYPT_TLSNONE; } } @@ -4216,14 +4193,16 @@ static bool vnc_display_open(VncDisplay *vd, Error = **errp) sasl, false, errp) < 0) { return false; } - trace_vnc_auth_init(vd, 0, vd->auth, vd->subauth); + trace_vnc_auth_init(vd, 0, vd->auth, vd->subauth, + vnc_auth_name(vd->auth, vd->subauth)); =20 if (vnc_display_setup_auth(&vd->ws_auth, &vd->ws_subauth, vd->tlscreds, password, sasl, true, errp) < 0) { return false; } - trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth); + trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth, + vnc_auth_name(vd->ws_auth, vd->ws_subauth)); =20 #ifdef CONFIG_VNC_SASL if (sasl && !vnc_sasl_server_init(errp)) { diff --git a/ui/trace-events b/ui/trace-events index 3eba9ca3a82..c1ea56874ee 100644 --- a/ui/trace-events +++ b/ui/trace-events @@ -83,7 +83,7 @@ vnc_job_discard_rect(void *state, void *job, int x, int y= , int w, int h) "VNC jo vnc_job_clamp_rect(void *state, void *job, int x, int y, int w, int h) "VN= C job clamp rect state=3D%p job=3D%p offset=3D%d,%d size=3D%dx%d" vnc_job_clamped_rect(void *state, void *job, int x, int y, int w, int h) "= VNC job clamp rect state=3D%p job=3D%p offset=3D%d,%d size=3D%dx%d" vnc_job_nrects(void *state, void *job, int nrects) "VNC job state=3D%p job= =3D%p nrects=3D%d" -vnc_auth_init(void *display, int websock, int auth, int subauth) "VNC auth= init state=3D%p websock=3D%d auth=3D%d subauth=3D%d" +vnc_auth_init(void *display, int websock, int auth, int subauth, const cha= r *name) "VNC auth init state=3D%p websock=3D%d auth=3D%d subauth=3D%d name= =3D%s" vnc_auth_start(void *state, int method) "VNC client auth start state=3D%p = method=3D%d" vnc_auth_pass(void *state, int method) "VNC client auth passed state=3D%p = method=3D%d" vnc_auth_fail(void *state, int method, const char *message, const char *re= ason) "VNC client auth failed state=3D%p method=3D%d message=3D%s reason=3D= %s" @@ -97,6 +97,33 @@ vnc_auth_sasl_step(void *state, const void *clientdata, = size_t clientlen, const vnc_auth_sasl_ssf(void *state, int ssf) "VNC client auth SASL SSF state=3D= %p size=3D%d" vnc_auth_sasl_username(void *state, const char *name) "VNC client auth SAS= L user state=3D%p name=3D%s" vnc_auth_sasl_acl(void *state, int allow) "VNC client auth SASL ACL state= =3D%p allow=3D%d" +vnc_set_share_mode(void *state, void *ioc, int old_mode, int new_mode) "VN= C set share mode state=3D%p ioc=3D%p old=3D%d new=3D%d" +vnc_client_protocol_error(void *state) "VNC client protocol error state=3D= %p" +vnc_client_write_wire(void *state, const void *data, size_t datalen, ssize= _t ret) "VNC client write wire state=3D%p data=3D%p len=3D%zu ret=3D%zd" +vnc_client_write_plain(void *state, const void *buffer, size_t capacity, s= ize_t offset, int wait_ssf) "VNC client write plain state=3D%p buffer=3D%p = capacity=3D%zu offset=3D%zu wait_ssf=3D%d" +vnc_client_read_wire(void *state, const void *data, size_t datalen, ssize_= t ret) "VNC client read wire state=3D%p data=3D%p len=3D%zu ret=3D%zd" +vnc_client_read_plain(void *state, const void *buffer, size_t capacity, si= ze_t offset) "VNC client read plain state=3D%p buffer=3D%p capacity=3D%zu o= ffset=3D%zu" +vnc_client_unknown_encoding(void *state, int index, int encoding) "VNC cli= ent unknown encoding state=3D%p index=3D%d encoding=3D0x%x" +vnc_client_invalid_audio_format(void *state, int fmt) "VNC client invalid = audio format state=3D%p fmt=3D%d" +vnc_client_invalid_audio_channels(void *state, int channels) "VNC client i= nvalid audio channel count state=3D%p channels=3D%d" +vnc_client_invalid_audio_freq(void *state, unsigned int freq) "VNC client = invalid audio frequency state=3D%p freq=3D%u" +vnc_client_invalid_audio_msg(void *state, int msg) "VNC client invalid aud= io message state=3D%p msg=3D%d" +vnc_client_unknown_qemu_msg(void *state, int msg) "VNC client unknown QEMU= msg state=3D%p msg=3D%d" +vnc_client_unknown_msg(void *state, int msg) "VNC client unknown msg state= =3D%p msg=3D%d" +vnc_client_protocol_version(void *state, int major, int minor) "VNC client= protocol version state=3D%p version=3D%d.%d" +vnc_client_protocol_version_malformed(void *state, const char *version) "V= NC client malformed protocol version state=3D%p version=3D%s" +vnc_client_protocol_version_unsupported(void *state) "VNC client unsupport= ed protocol version state=3D%p" +vnc_client_auth_method(void *state, int auth) "VNC client auth method stat= e=3D%p auth=3D%d" +vnc_client_setup(void *state, void *ioc, int websocket, int auth, int suba= uth) "VNC client setup state=3D%p ioc=3D%p websocket=3D%d auth=3D%d subauth= =3D%d" +vnc_ws_tls_handshake_fail(void *state, const char *msg) "VNC WS TLS handsh= ake failed state=3D%p msg=3D%s" +vnc_ws_tls_handshake_complete(void *state) "VNC WS TLS handshake complete = state=3D%p" +vnc_ws_tls_setup_fail(void *state, const char *msg) "VNC WS TLS setup fail= ed state=3D%p msg=3D%s" +vnc_ws_handshake_fail(void *state, const char *msg) "VNC WS handshake fail= ed state=3D%p msg=3D%s" +vnc_ws_handshake_complete(void *state) "VNC WS handshake complete state=3D= %p" +vnc_sasl_write_pending(void *state, const void *buffer, size_t capacity, s= ize_t offset, const void *encoded, int encoded_len, int encoded_offset) "VN= C SASL write pending state=3D%p buffer=3D%p capacity=3D%zu offset=3D%zu enc= oded=3D%p encoded_len=3D%d encoded_offset=3D%d" +vnc_sasl_read_decoded(void *state, const void *encoded, size_t encoded_len= , const void *decoded, unsigned int decoded_len) "VNC SASL read decoded sta= te=3D%p encoded=3D%p encoded_len=3D%zu decoded=3D%p decoded_len=3D%u" +vnc_zlib_init(void *state, const void *opaque) "VNC zlib init state=3D%p o= paque=3D%p" +vnc_tight_zlib_init(void *state, int stream_id, const void *opaque) "VNC t= ight zlib init state=3D%p stream=3D%d opaque=3D%p" =20 =20 # input.c --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849315; cv=none; d=zohomail.com; s=zohoarc; b=K6riLrhfOkZGVySkN7FJSIr46fOPEC6O9HcitxsCQXjj+1ohaN1W19ei6Zk3ZqDfDqb0dTVMCi1Rxj7WhTbzQKL+g4dWAScgrCtR1uYurp6C2Pe9HMO1QKRYyaqYNPh7MrTZA0x8A1J0tTSVuTC76XiAFlj19KxZpBa2TDryA6w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849315; 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=Gi6lAlNnlbIZcDiuiqDaVlawki8cAOl1cfYmhR6nZ90=; b=Z+UvLmlvD1uOOtbGUV/CTEXKHQ+Dje0QBJPvZ9lpnsh5MALu9g7vM0sTuHEE+lNUncPyXOAHoWfACCMYlnKviTuDWHDnHAgBNuObavCTMDwwJfibW0tHV7YIbNdJyqtvCQ2QOBsir4bhBsEPsL4gawNnbIIqg+kXpoDEp2PC5sM= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849315302427.1323917685586; Fri, 10 Apr 2026 12:28:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTt-0007jr-B0; Fri, 10 Apr 2026 15:25:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTk-0007VY-Ja for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTh-000349-JY for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:19 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-168-pSlA6PRhNdi2f6zGO4edNQ-1; Fri, 10 Apr 2026 15:25:13 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 589491956094; Fri, 10 Apr 2026 19:25:12 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D68E61800357; Fri, 10 Apr 2026 19:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849116; 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=Gi6lAlNnlbIZcDiuiqDaVlawki8cAOl1cfYmhR6nZ90=; b=FFZILIJ+QTYxjK0RjiyS3nh6FlJRcZmUi2FdTjeT9k7qMFQQG8Cu0AcotfyjzWeTwMgjZj mpJi72W+/R8X4xDHd9tJ1hMfM2FikCY4736ntD6tfLtGZagvOk+EE7C7jyKLxJXOszLzwY YF4hGnIjaS+A0l+m9ypSvwRSMknkXFQ= X-MC-Unique: pSlA6PRhNdi2f6zGO4edNQ-1 X-Mimecast-MFC-AGG-ID: pSlA6PRhNdi2f6zGO4edNQ_1775849112 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:25 +0400 Subject: [PATCH v2 63/67] ui: extract common sources into a static library MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-63-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=4428; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=rWym6d5xAr+8hbLq1UtEkGuKDuN4vQzF9UwSMIl3IIU=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XcTzAeaVVckiudqsLO94pYGgLHT7ElSkMU sGsRjZMKPmJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5ffHD/wKpNb4WTsLXGqXHg/Uy67+7gXKbur/rAY9XANpG+JTW184qxeMT1zLOE4vknNU/NWQJIJ P05TMxtxbs32Y19rDdl1sEhSdheaTi8s83o36HpBaziuAYwHl1XPo/+vXcI+JeWShV/p6b3sunm gy6B1m8OHfkUi/9zUIDAhzzGNj9TlkWeJJL5/on78jCVzhGrcTiqA5yeGMp/5xZa9BemIcniKJ0 QSb08lEVHfo5CDktIODASgC0dYNXJHqHHkELTPCGXWxKUvDppvBLoLXJHDDZro5B/+XZvFAthGZ eul5sDQXBUsbfQWRqjzN3aePMAcHWmbG3OEktuq8yg3jrpSWakC2sAu0mdLRDNQOmykj2XAPlLp svAk4iXDMeMzMeJJERfWdGfPwIvdZQ7gdootnVbVXv7QMppNwCeEL8xdhNVNUzOHVQGZ82J20Mb eu0hCAg9avOD1zE+JhJb1Yv9gmNTYXt8/2f+VTADn2CvHSRFOyPKHe3FYe/IV4aOYLbicIBTvmq kXshxO0DnPLUUeZg2CxPHvov1h48mrCLDH0pko6cDQSdb14UaaYg45BZQc9mFkTSHtj37mgAfcD wZe3ngBFlaB13sHshzqV+uWi4MpPuEQYtUnuHX2yjXpE6KCSAgWejRomDbeR8bax8OtDFUSjCu4 vsqNS03yA3Gt97g== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849315555158500 Move clipboard, cursor, display-surface, input-keymap, kbd-state, keymaps, vt100, and qemu-pixman into a separate static library 'qemuui'. This allows these common UI sources to be linked by targets outside of the system emulator build, such as standalone VNC or D-Bus display binaries. keymaps generation has to be moved earlier, so that header dependency are resolved first. The library objects are re-exported via a dependency so existing system_ss consumers are unaffected. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/meson.build | 103 ++++++++++++++++++++++++++++++-----------------------= ---- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/ui/meson.build b/ui/meson.build index f959f8972b5..c3f4d03eaf8 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -1,25 +1,67 @@ -system_ss.add(pixman) +keymaps =3D [ + ['atset1', 'qcode'], + ['linux', 'qcode'], + ['qcode', 'atset1'], + ['qcode', 'atset2'], + ['qcode', 'atset3'], + ['qcode', 'linux'], + ['qcode', 'qnum'], + ['qcode', 'sun'], + ['qnum', 'qcode'], + ['usb', 'qcode'], + ['win32', 'qcode'], + ['x11', 'qcode'], + ['xorgevdev', 'qcode'], + ['xorgkbd', 'qcode'], + ['xorgxquartz', 'qcode'], + ['xorgxwin', 'qcode'], + ['osx', 'qcode'], +] + +if have_system or xkbcommon.found() + keycodemapdb_proj =3D subproject('keycodemapdb', required: true) + foreach e : keymaps + output =3D 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1]) + genh +=3D custom_target(output, + output: output, + capture: true, + input: keycodemapdb_proj.get_variable('keymaps_csv'), + command: [python, keycodemapdb_proj.get_variable('keymap= _gen').full_path(), + 'code-map', '--lang', 'glib2', + '--varname', 'qemu_input_map_@0@_to_@1@'.forma= t(e[0], e[1]), + '@INPUT0@', e[0], e[1]]) + endforeach +endif + +libui_sources =3D files( + 'clipboard.c', + 'console.c', + 'cursor.c', + 'dmabuf.c', + 'display-surface.c', + 'input-keymap.c', + 'kbd-state.c', + 'keymaps.c', + 'qemu-pixman.c', + 'vgafont.c', + ) +if pixman.found() + libui_sources +=3D files('cp437.c', 'vt100.c') +endif +libui =3D static_library('qemuui', libui_sources + genh, + dependencies: [pixman], + build_by_default: false) +ui =3D declare_dependency(objects: libui.extract_all_objects(recursive: fa= lse), dependencies: [pixman]) system_ss.add(png) system_ss.add(files( - 'clipboard.c', - 'console.c', - 'cp437.c', - 'cursor.c', - 'display-surface.c', - 'dmabuf.c', - 'input-keymap.c', 'input-legacy.c', 'input-barrier.c', 'input.c', - 'kbd-state.c', - 'keymaps.c', - 'qemu-pixman.c', 'ui-hmp-cmds.c', 'ui-qmp-cmds.c', 'util.c', - 'vgafont.c', - 'vt100.c', )) +system_ss.add(ui) system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false: file= s('console-vc-stubs.c')) if dbus_display system_ss.add(files('dbus-module.c')) @@ -151,41 +193,6 @@ if spice.found() endif endif =20 -keymaps =3D [ - ['atset1', 'qcode'], - ['linux', 'qcode'], - ['qcode', 'atset1'], - ['qcode', 'atset2'], - ['qcode', 'atset3'], - ['qcode', 'linux'], - ['qcode', 'qnum'], - ['qcode', 'sun'], - ['qnum', 'qcode'], - ['usb', 'qcode'], - ['win32', 'qcode'], - ['x11', 'qcode'], - ['xorgevdev', 'qcode'], - ['xorgkbd', 'qcode'], - ['xorgxquartz', 'qcode'], - ['xorgxwin', 'qcode'], - ['osx', 'qcode'], -] - -if have_system or xkbcommon.found() - keycodemapdb_proj =3D subproject('keycodemapdb', required: true) - foreach e : keymaps - output =3D 'input-keymap-@0@-to-@1@.c.inc'.format(e[0], e[1]) - genh +=3D custom_target(output, - output: output, - capture: true, - input: keycodemapdb_proj.get_variable('keymaps_csv'), - command: [python, keycodemapdb_proj.get_variable('keymap= _gen').full_path(), - 'code-map', '--lang', 'glib2', - '--varname', 'qemu_input_map_@0@_to_@1@'.forma= t(e[0], e[1]), - '@INPUT0@', e[0], e[1]]) - endforeach -endif - subdir('shader') =20 if have_system --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849238; cv=none; d=zohomail.com; s=zohoarc; b=naYDcR0Ye5m2OjjVhi+3XvXgDhD0pC3fzKoIgGqpE6KLgAWkNOKoVOa//rXpRzTWCmzpLtnKbqlacEuq2nUm6sO31yzQcmAUJg/pw00JoIyYhKTXAONpgBIeorZBRjBcmJTtcFa7viNJkzNlNreBHlESRlVPacF32zb02n+Gggk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849238; 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=O4VieNyitoZM6vdnySp+EAtZC0C03hqFOmVIR3JD8Rw=; b=SJZWz3mW0mYPajaYm4G3tYWS3jg7PMb7Vcy45Er7j6GHYa7vlTtSUBJH3eM2NjypWGxkoIQWbBwzmyul8Vk+bugj8T2d9QpazGBxcop/5/Ek4rXABQv8Q/99HAXMBfaiS07yhaDRfKy7ST9GTKb2fs0uRVnjpU+f9tFxVztuPCY= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584923865020.573926070081257; Fri, 10 Apr 2026 12:27:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTx-0007vy-6j; Fri, 10 Apr 2026 15:25:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTv-0007qA-Gg for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTr-00037T-ID for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:31 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-115-XPDv3GFoNcOJlRkOUbDSbQ-1; Fri, 10 Apr 2026 15:25:19 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 563EE1956061; Fri, 10 Apr 2026 19:25:18 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C03DF180049F; Fri, 10 Apr 2026 19:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849122; 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=O4VieNyitoZM6vdnySp+EAtZC0C03hqFOmVIR3JD8Rw=; b=cSm2Q/+4VlQKfNKb2HSJvK1h1jMjWXxm/w/Q/7CVd4Q0t4mjbxMXfpp5W0P63qvqfQYiZt Yf4l3rSFT8T9ToxDYPd74THgsN4rtxiqwRMyoVp4bsarRWzZQvQV4qtU2+PXUWoFU8+NLJ Fo/zua4puRyP5+0ktrMXoW//kjyJvn4= X-MC-Unique: XPDv3GFoNcOJlRkOUbDSbQ-1 X-Mimecast-MFC-AGG-ID: XPDv3GFoNcOJlRkOUbDSbQ_1775849118 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:26 +0400 Subject: [PATCH v2 64/67] tests: rename the dbus-daemon helper script MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-64-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1301; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=LH4JWYWHaNyhEr5pqXX3nN+pvRwn2yT8dc9n8/gsAp4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XWWdspLuY/TJz6CKPFIbtEQyK7G70UJjyS Cej4vGf86qJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5atnD/9MADWDaqtslJwF+1E6winsuIFS8JUml4hwU9T+Pi1wXbKGSLTID/Wxf1sLnFk57rV+BQ+ N6a6K0OB1kKsmU04Jax07vi+Hzt4gZcUfSCcZm0x23cuEdmv8VujOIrFlqWK/WXGpAvfeUlxFLQ mel6dWspVIOUmohjZw8ZVA2X5W6rOJoHRGfI5iBcBmGpLfXpqWfSb8X/VsYep/jhd0+KITItbwb c9prdr2tRrlDxAc6TEZ+q7+/Epaf0mM1Rdv3JRroYkb522m8rGwWZcoiqKKYs1RIi58I5egeR2o P/m0WdBtmF6yo7w8/zCai0TiRC9R2L3oM6IWSU223zKnqYKygeP1dUNIX9DPPJ2NwRJATzB419A 0L2BNOdkBklojz/MlXFlJXknGJW0OSmG435HnQRo+5Plxln7p81mBR0eU4eO4vpBn3YdCTwuTM0 Fok1ZjP5Pf5pZnxWgMWP5Zk5Qiehz+NQ6vgSR35CFLW2Uxx9BV2FEosifU+I+mwyVum3Ws70Qmi zljgreUFdcKFJN+1p8nCYxbcHPKW++i8905rX1SezyDCcbgbbBD6itNsqhKIVujEEO55m0t2esN VY37biwobjRbmHUFD01bYJhLzwlxF7QVH9/ig8+/GklXSwL5htOQ3ZpMArzULmx04i9dIli3M0m 0YAvlGAFsM1dftA== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849240151154100 The following patches are going to use it for qemu-vnc. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/{dbus-vmstate-daemon.sh =3D> dbus-daemon.sh} | 0 tests/qtest/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dbus-vmstate-daemon.sh b/tests/dbus-daemon.sh similarity index 100% rename from tests/dbus-vmstate-daemon.sh rename to tests/dbus-daemon.sh diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index be4fa627b5f..b735f55fc40 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -435,7 +435,7 @@ foreach dir : target_dirs qtest_env.set('QTEST_QEMU_IMG', './qemu-img') test_deps +=3D [qemu_img] endif - qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() / 'tests= /dbus-vmstate-daemon.sh') + qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() / 'tests= /dbus-daemon.sh') qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base) if have_tools and have_vhost_user_blk_server qtest_env.set('QTEST_QEMU_STORAGE_DAEMON_BINARY', './storage-daemon/qe= mu-storage-daemon') --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849242; cv=none; d=zohomail.com; s=zohoarc; b=cg6O6J6t1zuJolWFUrI45QB6gSp8R0+6h90ixgOPtwkNZnRmz1l2hlFMC4pi4tCB3zzyXSLxhnIdY6K3CzBOC8jEL3ll9RdjZ0qH+NSBwcD5tK+LQGkscRLHWVSTr1BhFjkuIjqOkpsLxGDh77FcSTclVr01MJM4eih5BS1GfqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849242; 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=sgwc+N0yjaNA5essMR4duloCYDqsIlwU6/zTCk4Cxuk=; b=j2Y7H/KMcTNjaXVbwtXFPqAK4VWHrcfPpP70z8J6AcT8fhWRgBymRmu/+SqTMJmT5F7CJ30rTb7/Ssxjlz8sQ73yFJaaimep1JVGtmDd8IXmZzF+3LTGNwdjX55y2MAOwvS7iz4b8/ynpuIKYGZt0jCnZK7GuoBJnmLRbNqqc2Y= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775849242840408.88214567026296; Fri, 10 Apr 2026 12:27:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHTx-0007vw-6E; Fri, 10 Apr 2026 15:25:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTv-0007pT-75 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTr-00038I-Kc for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:30 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-CB5_MAHfPsWKajYmJxYsEg-1; Fri, 10 Apr 2026 15:25:24 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 17D8F180057A for ; Fri, 10 Apr 2026 19:25:24 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AD0471801ACB; Fri, 10 Apr 2026 19:25:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849126; 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=sgwc+N0yjaNA5essMR4duloCYDqsIlwU6/zTCk4Cxuk=; b=OCJYgabYGIXQAXWU4uOOTtSU9Lxfs1U8VG4oRRv5yeWGvmcyggnq8PHi9y1RwKdaaierip y35xYUJGuRiIkfvNr0Nugff8P21RjBXtByE5UmBJknIuoIQ3Gklil3hrtHL4bLvDPQdBaX BrapeSR/VDYqtfq1d8umBkTlTDnFN5Q= X-MC-Unique: CB5_MAHfPsWKajYmJxYsEg-1 X-Mimecast-MFC-AGG-ID: CB5_MAHfPsWKajYmJxYsEg_1775849124 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:27 +0400 Subject: [PATCH v2 65/67] tests/qtest: fix dbus-vmstate-test compilation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-65-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=2534; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=AOLvl3KfosfDJbEbxdB9wrP2jcATXQDS62ur3cuRiFY=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XOSWttPnZQT2G7JRBB9lZ0dMbBcwCka+fo AqEINRhr+eJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5TUtD/0R4M3EpT/7pPTt7mfMtQEn9SEVFjJOpU3PV012RyX2F/lZ2dwnH/vtVuoXCJAWqw5Qj1g /eXoH9qMcfoThWtN+opV/1wrfV9jSiq16U06rRa3lWHannLXOeWdNQ4Ut/QkFSEH9tBsGyMmkTp r2dp66OFO6X+RIpfMiQQOnzNk/lDe+L/m5WhDT8Ix1z9bESTGU3MAn1/gWk+y8a+7pzc+UelQHi 49QoW+NyWQhYYJxwvgooSlsulx9xOjaaefBlcZvm+9iEdOlejrPotoQ/YVBYHQ5WImXnFvLCd9G j8VZhRDngkUvdwNpDA20FBSSDdlKd7fONedr5EuHtFFe9NjAZIDsgO8klPQr6tO2UKCHccVHAL3 IDH3POuarpwiYcvP/svRfaIpbDcaqt4fE2zCRDWt2Il5QTt/GRiqTjbPJ2zWFSTfFa2hC01E/cJ rZT4UghZbgIO4pRbFx9dkJH4XaAJhpCkR1xVcQyOkRkaTdwuUVFvKs57/PpBg/X5tPDzlIen/s7 3WRprfQ/JH8RuyYQ7s7O6rE6Dxsr2rcuJJ+9Y+/Sn/BSoUeRkEyNBPTNV5YoipvvhX1jxfk7HSd dJ3sihPbPN4Mv1M48y55CKnOAftq4Qc4u/1gc38pQM9RAgXWkhlusQOiyObU+2Uc6j9K7zdKRVi NWZNkF3l4DbTeLg== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849243180158500 The test is still disabled, and trying to compile it will fail now. Fix it, and remove the G_TEST_DBUS_DAEMON setting, since it is passed by meson test. Fwiw, the test passes here. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/dbus-vmstate-test.c | 11 ++--------- tests/qtest/meson.build | 3 ++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tests/qtest/dbus-vmstate-test.c b/tests/qtest/dbus-vmstate-tes= t.c index 0a82cc9f935..5c80bb303b6 100644 --- a/tests/qtest/dbus-vmstate-test.c +++ b/tests/qtest/dbus-vmstate-test.c @@ -3,7 +3,7 @@ #include #include "libqtest.h" #include "dbus-vmstate1.h" -#include "migration-helpers.h" +#include "migration/migration-qmp.h" =20 static char *workdir; =20 @@ -230,7 +230,7 @@ test_dbus_vmstate(Test *test) thread =3D g_thread_new("dbus-vmstate-thread", dbus_vmstate_thread, lo= op); =20 migrate_incoming_qmp(dst_qemu, uri, NULL, "{}"); - migrate_qmp(src_qemu, uri, "{}"); + migrate_qmp(src_qemu, dst_qemu, uri, NULL, "{}"); test->src_qemu =3D src_qemu; if (test->migrate_fail) { wait_for_migration_fail(src_qemu, true); @@ -343,15 +343,8 @@ int main(int argc, char **argv) { GError *err =3D NULL; - g_autofree char *dbus_daemon =3D NULL; int ret; =20 - dbus_daemon =3D g_build_filename(G_STRINGIFY(SRCDIR), - "tests", - "dbus-vmstate-daemon.sh", - NULL); - g_setenv("G_TEST_DBUS_DAEMON", dbus_daemon, true); - g_test_init(&argc, &argv, NULL); =20 workdir =3D g_dir_make_tmp("dbus-vmstate-test-XXXXXX", &err); diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index b735f55fc40..5f8cff172c8 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -130,7 +130,8 @@ if dbus_daemon.found() and gdbus_codegen.found() input: meson.project_source_root() / 'back= ends/dbus-vmstate1.xml', command: [gdbus_codegen, '@INPUT@', '--interface-prefix', 'org.qemu', - '--generate-c-code', '@BASENAME@= ']).to_list() + '--generate-c-code', '@BASENAME@= ', + '--output-directory', meson.curr= ent_build_dir()]).to_list() else dbus_vmstate1 =3D [] endif --=20 2.53.0 From nobody Sat Apr 11 12:33:28 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775849208; cv=none; d=zohomail.com; s=zohoarc; b=kYQ9h/b1jv6yS3Gw6GI9S4sgZ2ENfdbNM1F4eIq7n/iP+DsSQLm2gRWt4xsocC10jDDT5Y94QLBMmy335GeHEUyftHPZhtWqPUDmvmDSmhwaVC93bNPPDneCU1cXkvTO6HZJYHglugMOPgm4WwxcHb/awODVya0wLDThIRb0w1c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775849208; 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=zuQTehlxbQZEf/T4EFVs6VfrOKOLIxuCqrhgYf6F91s=; b=kNaH8GqLVjQSSZwJvhOXAJ26eBvrBMp+ohtex5zjrb8kbEV6vUyMxSsyyE0oI0kUCCMj6utMvyMz1LlxhhlWxin1E0DyBgFvoQJjfUvHBBaOGf93icMWjo6y1S/xzdd+BKdsvPnlEx53Ryrz4clIWSxI4JdAsJWe0uRQR7mHD6I= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177584920880784.84689540243664; Fri, 10 Apr 2026 12:26:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wBHU2-0008NS-3f; Fri, 10 Apr 2026 15:25:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHU0-0008Hz-H6 for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wBHTy-0003DO-3K for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:36 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-54Tf9sr-N5m4vcaqw9TSNw-1; Fri, 10 Apr 2026 15:25:31 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 384F419560B2 for ; Fri, 10 Apr 2026 19:25:30 +0000 (UTC) Received: from localhost (unknown [10.44.22.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2405E19560AB; Fri, 10 Apr 2026 19:25:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775849133; 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=zuQTehlxbQZEf/T4EFVs6VfrOKOLIxuCqrhgYf6F91s=; b=BhBYccp48J6TM2clgItYs2cVTLiezFSmpfD0sb/bRxp1yAvN7LULGTvngezC9GBhKR7TaH 9agzYXsDDCFkxbDOws2tNDcaALvZL6jk5A/hYBm9dFAz6jGeKDBMxsBaMbVIOSZ1Hbtyki JYs79kd1pJO/mORA3UELcF8cU+UBgAk= X-MC-Unique: 54Tf9sr-N5m4vcaqw9TSNw-1 X-Mimecast-MFC-AGG-ID: 54Tf9sr-N5m4vcaqw9TSNw_1775849130 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Fri, 10 Apr 2026 23:19:28 +0400 Subject: [PATCH v2 66/67] tests/qtest: drop DBUS_VMSTATE_TEST_TMPDIR MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260410-qemu-vnc-v2-66-231416f76dc3@redhat.com> References: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> In-Reply-To: <20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Developer-Signature: v=1; a=openpgp-sha256; l=1247; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=NFWE5HoAsedukDnbwcUMEd/HneFj5c5ptOyyObXNxms=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XG3d0SM/5zItq2j4OPE2HUu460v5mtfdhk YBwMb0MyKyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac 5YCkEACF6CSid73Wn5KQESRz+6Eg2T1SHZku5WuKKb8gjTibGNyLsmWP8A596HH30qmaxjdPuaT Le5QvO2HyFD42e+9fyWEghKB/VtiQK6FfBaswnGfIxHdb2XJmDNwGQRtYS8b13IyzIblxyCMVBW U0mvk1KYA7Ukg/LZtuD/TXzxrAz8vVqBT7BFsjd5l8Z9hU00sGiqZEV6s/mFzg4Z7P6zSI+3oi0 NGj2Ohk6yJGFGzi1PurHHKZa9RgvzsT/XValazIZaUpLN3S+zEP3SIfmtBUl7P4+I/6roadvLQu K1n1kIcPk7FIInWv/dnIOmhC+uxr350t0dRYZawN+9cX90m5wqYzAfxeUiGupOC3znw9QqlDqKV B+Ozxm0M1+B4vArvn4d0ln2mjBWHVTh+tnyhAy9zEK2CSFLqWaGEVFcQOY/8rwNKpl74elDQFwM j/oI3XHtuq8GSuVsp8b4bHhsRfNlDcrM5McunC20JaKk7jtLDOLhKYTA9gDRv390ehDsbi4AFvW oprRlgVLsRuqWXnum7R27A/ehSjWuCQNICUzFQbkTCU8hc9Ocox/fVzqXuhcrehxdB87oeShd8D TNiAvF0NSMRi2TVI2vi2VHoXd519P3cU+rVBPS5+zD5pSRe3o6cAEFQfOHPf0oVQS1fsUe7L/dp wbeX8MNZFuSI8qw== X-Developer-Key: i=marcandre.lureau@redhat.com; a=openpgp; fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1775849209044158500 It can rely on the location of the temporary configuration instead. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/qtest/dbus-vmstate-test.c | 2 -- tests/dbus-daemon.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qtest/dbus-vmstate-test.c b/tests/qtest/dbus-vmstate-tes= t.c index 5c80bb303b6..1812d0fb70a 100644 --- a/tests/qtest/dbus-vmstate-test.c +++ b/tests/qtest/dbus-vmstate-test.c @@ -353,8 +353,6 @@ main(int argc, char **argv) exit(1); } =20 - g_setenv("DBUS_VMSTATE_TEST_TMPDIR", workdir, true); - qtest_add_func("/dbus-vmstate/without-list", test_dbus_vmstate_without_list); qtest_add_func("/dbus-vmstate/with-list", diff --git a/tests/dbus-daemon.sh b/tests/dbus-daemon.sh index 474e2501548..c4a50c73774 100755 --- a/tests/dbus-daemon.sh +++ b/tests/dbus-daemon.sh @@ -26,7 +26,7 @@ write_config() cat > "$CONF" < session - unix:tmpdir=3D$DBUS_VMSTATE_TEST_TMPDIR + unix:tmpdir=3D$(dirname "$CONF") =20 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/qemu-vnc/trace-events b/tools/qemu-vnc/trace-events new file mode 100644 index 00000000000..f2d66a80986 --- /dev/null +++ b/tools/qemu-vnc/trace-events @@ -0,0 +1,20 @@ +qemu_vnc_audio_out_fini(uint64_t id) "id=3D%" PRIu64 +qemu_vnc_audio_out_init(uint64_t id, uint32_t freq, uint8_t channels, uint= 8_t bits) "id=3D%" PRIu64 " freq=3D%u ch=3D%u bits=3D%u" +qemu_vnc_audio_out_set_enabled(uint64_t id, bool enabled) "id=3D%" PRIu64 = " enabled=3D%d" +qemu_vnc_audio_out_write(uint64_t id, size_t size) "id=3D%" PRIu64 " size= =3D%zu" +qemu_vnc_chardev_connected(const char *name) "name=3D%s" +qemu_vnc_clipboard_grab(int selection, uint32_t serial) "selection=3D%d se= rial=3D%u" +qemu_vnc_clipboard_release(int selection) "selection=3D%d" +qemu_vnc_clipboard_request(int selection) "selection=3D%d" +qemu_vnc_client_not_found(const char *host, const char *service) "host=3D%= s service=3D%s" +qemu_vnc_console_io_error(const char *name) "name=3D%s" +qemu_vnc_cursor_define(int width, int height, int hot_x, int hot_y) "w=3D%= d h=3D%d hot=3D%d,%d" +qemu_vnc_input_abs(uint32_t x, uint32_t y) "x=3D%u y=3D%u" +qemu_vnc_input_btn(int button, bool press) "button=3D%d press=3D%d" +qemu_vnc_input_rel(int dx, int dy) "dx=3D%d dy=3D%d" +qemu_vnc_key_event(int qcode, bool down) "qcode=3D%d down=3D%d" +qemu_vnc_owner_vanished(const char *name) "peer=3D%s" +qemu_vnc_scanout(uint32_t width, uint32_t height, uint32_t stride, uint32_= t format) "w=3D%u h=3D%u stride=3D%u fmt=3D0x%x" +qemu_vnc_scanout_map(uint32_t width, uint32_t height, uint32_t stride, uin= t32_t format, uint32_t offset) "w=3D%u h=3D%u stride=3D%u fmt=3D0x%x offset= =3D%u" +qemu_vnc_update(int x, int y, int w, int h, uint32_t stride, uint32_t form= at) "x=3D%d y=3D%d w=3D%d h=3D%d stride=3D%u fmt=3D0x%x" +qemu_vnc_update_map(uint32_t x, uint32_t y, uint32_t w, uint32_t h) "x=3D%= u y=3D%u w=3D%u h=3D%u" --=20 2.53.0