From nobody Tue Apr 7 01:06:58 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=1773737483; cv=none; d=zohomail.com; s=zohoarc; b=TSWr1iUX4wgg197PGtmeDh2tDR6GcUCjUsrRgDILW+LHhONqhBbhQIbAapNM0Pz63Nco4oCFgU5ThXd10talCoHoS5jxk1nnEX/TookQ/Hn8tRto1756Uh2b21swduiISxXFsCvQqv9em160aENKcWafM1pz7eVdus42xq1uB70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737483; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=aGTjgtHL5muRT74itdDRSEurgAYGEKElfvAsD0TqRGo=; b=ndd1hTV24L1yavrzO+jeb1LtkPdObmhmbHQ+GouwKngAR/ybbg6rbYwIfQcpCFOG+YodVYfYqhQthTX75bTLaqlo5XPUNmXSw9scd2RFyHIVQSHvyX6Siz8sLBzs9ZdqzaRjYDMvDVU45w6wQlbO7WAO7ExPQIX3snPvEepwjvM= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737483084579.7526562371938; Tue, 17 Mar 2026 01:51:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q8p-0005XW-Hj; Tue, 17 Mar 2026 04:51:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q8a-0005VL-KF for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:50:55 -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 1w2Q8Z-0002dS-3e for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:50:52 -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-479-pcPOBXkCN_6rbDG4-mm0Fw-1; Tue, 17 Mar 2026 04:50:48 -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 C8D391955F6A for ; Tue, 17 Mar 2026 08:50:47 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BB1B41800361 for ; Tue, 17 Mar 2026 08:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aGTjgtHL5muRT74itdDRSEurgAYGEKElfvAsD0TqRGo=; b=TNpHvxu3ypNyWA9EPno/uDJnXRNVZHDI+TYlnEmrTlx+KChqzLbLpZic6yW0/inlRt4Lm8 ZmkHKByLHPnRXsSfoqySkZVeOucaa0NjbFBMowCwpYvzyr8cU3W6Hggm1WCqoLMfwWdJ+x QQJcgmuz9lRDI+nJHPb3yIEjgnyIORY= X-MC-Unique: pcPOBXkCN_6rbDG4-mm0Fw-1 X-Mimecast-MFC-AGG-ID: pcPOBXkCN_6rbDG4-mm0Fw_1773737447 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:15 +0400 Subject: [PATCH 01/60] ui/vnc-jobs: fix VncRectEntry leak on job cleanup MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-1-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2171; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=RLlcTNCdLyyu+aN9n+BJ1vQwoIRnZWh7ApczLnywLF0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXZJ3D0hoPuJ3ln2WZo2Fl/+PuO+vJKhx3ot PpSHvjoCsWJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2QAKCRDa6OEJdZac 5afAD/9fdHym8fTFD89znrza2+JPB/Z+bByMb5yFTYQdsL0ha9sYZrBBkwA1Fx2u/CUhMuQ1VO7 j1naWzJsQdxfpupiT0iJKmdNlkxX1fBtj7GPb/9fSC46T6l/641JTYVX88M+uJAV42MC4YjRCD+ uDcJu4CjdSidUYXTbe0Xv8fR1GqQITRVuPO1edhmc/eHJzq5ygcv/YkhyJffYKjpPp3mvxmm5+Q EUNt0G/pQJCQbpiVetp01gjDXwvq7D1lmFqeL2NrXCYyJfsmY+qAavoLi1uwJ/a8PGFGD8JlyEI fgQoJAoKhqCPxjuPDbLlYDKz2GYVK40ilWh1Y/aa62byx60PKz5kQw6GWagUiSYo8cmaY71DlRW EfKfolVZMff1V65YSbV4a4Fd/9+pIxb3cYrF2x47uFVb3GsDEhTuPnJdKRB5xmXw3y36MfO7v1H rdGmi+gbV4xLgj0owjOoxtKvHOwtj/kvW75NpaXNEkzjEoazcR94JaOlsjIWUetHv3bkcDDDhc2 bL+9CKaQU/2Zhwwb49kCb8dOcQskA7j2tCp/NkiSqdUWQMI3Mqv/CX2pzQJxQMGyFkQ09jCaEV3 bn+vzV2ruDGxERxqLzwRdQSrBIE2hxrqM1fjfeC2xqpMinmpxZAVXJlAYmWM5lUXfUSR0maumCO /33YvkQWKlAYzIA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737485471154100 When a VncJob is freed, its associated VncRectEntry list must also be freed. Previously, vnc_job_push() and the disconnected path in vnc_worker_thread_loop() called g_free(job) directly, leaking all VncRectEntry allocations. Introduce vnc_job_free() which iterates and frees the rectangle entries before freeing the job itself, and use it in both paths. Also add QLIST_REMOVE() in the worker loop before g_free(entry), so that entries processed during normal operation are properly unlinked. Without this, vnc_job_free() would iterate dangling pointers to already-freed entries, causing use-after-free. Fixes: bd023f953e5e ("vnc: threaded VNC server") Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/vnc-jobs.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index b296d19e089..ca625da6d05 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -107,11 +107,25 @@ int vnc_job_add_rect(VncJob *job, int x, int y, int w= , int h) return 1; } =20 +static void vnc_job_free(VncJob *job) +{ + VncRectEntry *entry, *tmp; + + if (!job) { + return; + } + QLIST_FOREACH_SAFE(entry, &job->rectangles, next, tmp) { + /* no need for QLIST_REMOVE(entry, next) */ + g_free(entry); + } + g_free(job); +} + void vnc_job_push(VncJob *job) { vnc_lock_queue(queue); if (queue->exit || QLIST_EMPTY(&job->rectangles)) { - g_free(job); + vnc_job_free(job); } else { QTAILQ_INSERT_TAIL(&queue->jobs, job, next); qemu_cond_broadcast(&queue->cond); @@ -296,6 +310,7 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) n_rectangles +=3D n; } } + QLIST_REMOVE(entry, next); g_free(entry); } trace_vnc_job_nrects(&vs, job, n_rectangles); @@ -324,7 +339,7 @@ disconnected: QTAILQ_REMOVE(&queue->jobs, job, next); vnc_unlock_queue(queue); qemu_cond_broadcast(&queue->cond); - g_free(job); + vnc_job_free(job); vs.magic =3D 0; return 0; } --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737494; cv=none; d=zohomail.com; s=zohoarc; b=HlWO3ILN9ziiAwAzD/K+T09REuw92ITWlXENCOdU3KFDUyHJVrt9cDLp6UQYW7SS56L7mJLXBfQlU6ziiiOFc+t+IMxRDVMCQzElzvKNYJYKgUcjsW6sVdSuVbiDldyhkjRt6P3JLKLJFW9ihrYYJAXChBAevJzoctvq26G1pBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737494; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=lCfogonzVWuqUsCZibtn9CrGck935VlJnTOvoIoLaI4=; b=A+dK37mfI+cEX0Zi6tK7Vi8OLuMCwxPFLGxSVQl+5Ept3wTDoU8Pm+eAUN6I841DVk9FDNaQXVW/fy62lDp6xBWAiga8cwS8xT3aEeTxd3KcV5Yk+OUyaYCpPqJr78KAORsgkxvofbB65as+YYiUvp3uH4gWTLAm6X4UGeKfzas= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737494167476.8004577273423; Tue, 17 Mar 2026 01:51:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q8v-0005cS-Rd; Tue, 17 Mar 2026 04:51:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q8g-0005WP-Pc for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:01 -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 1w2Q8f-0002ec-6x for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:50:58 -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-185-aZgkQtFAOyWwTKRetsuWqw-1; Tue, 17 Mar 2026 04:50:54 -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 C55EF19560B4 for ; Tue, 17 Mar 2026 08:50:53 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8CCA63000223 for ; Tue, 17 Mar 2026 08:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lCfogonzVWuqUsCZibtn9CrGck935VlJnTOvoIoLaI4=; b=Gy2KfrI1MUoU/8yMicdbXBvnQD7hKBsNJ3GGZedgqbhEpeFQrmH4Z6BUQExh7XAp0/ABUZ YoWfnY79i9h3+H4PYp3SVjiszuvG+19Fa5TKB3LIQIJIa+OG8EpgqrGw30CXlbtlsM8qOx DNWdrTkIpCuCwMyZ1i3GN9bUpGyFxPk= X-MC-Unique: aZgkQtFAOyWwTKRetsuWqw-1 X-Mimecast-MFC-AGG-ID: aZgkQtFAOyWwTKRetsuWqw_1773737453 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:16 +0400 Subject: [PATCH 02/60] ui/vnc-jobs: clear source tag MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-2-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3974; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=z9xlIu2VqM0UcsaG7dgBxxV0J2Tcq9TvqcBIeQ44UFo=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXZAN5pfJZfFFS5gMN9Nym9pzLS5zVhnklRL 3qCQ0NyA4iJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2QAKCRDa6OEJdZac 5Q3ID/99oAAR2K8vkDXe05VGhj1D6Lfz4UzWmjKZT3QDTEny6b9WRn+e+w6eQhYIxK3Q9iAO3oN 188IoHdt9QhEIe7klMy/YhjJLfwJq6g10QSlj2YBS8GfAt7ZrbBzBabbdPCeHssC+ZVjZxR08H7 UD+YSiZRmgIQKsRdeuj0KmvYa/GHFGCi7sUSLevCzq5oOLwPbFpLCTVnUpUyATUoVpG0fnMDi5l o4yUq2UMLe1tDZXSehiAoP3qiht7NY+jEEWdzR3SBiLlgNmKn6JbwrqwcYBUjKAV3yKlLWlfpNO c1FN15rWGVmDasAeU9k2TFpVv4CkPLP6ErnL6SQE5DsMxcO5a8cG3IOid41VJY1Nb+b2W149wzv W7lvECDg7uHy5bcXJsq0gEf/RlqaNkBCHDwrHwKS0FBXYgUsv8GVQqXcOD9IMhr1Z5dXMCiDY46 OruWFgF2klzKfW0aVGL081/zkt2M3qC+3vFIEIPdZXbAGoijFAFvRVqrHIozAsMx79YA0kb8Qtr NN511fKwL9SH+GznIud+hgA5J1drMCE04jLI/Hy7ydRqZoW9owCqRJ5uDAo4/x8gNkvus+2XyMW jq5n5Sx6ko/RMrmWRZZHA3KI6Qa0/DtN5bvxar6iSsCrdlc4mLmgKPfYX2i2jyUWDUWbEI5inYV E40Dz4IFuZ0WpnA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737495581158500 Avoid potentially removing a dangling source & simplify code. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/vnc-jobs.c | 4 +--- ui/vnc.c | 31 +++++++------------------------ 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index ca625da6d05..ec90ae6d5fc 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -162,9 +162,7 @@ void vnc_jobs_consume_buffer(VncState *vs) vnc_lock_output(vs); if (vs->jobs_buffer.offset) { if (vs->ioc !=3D NULL && buffer_empty(&vs->output)) { - if (vs->ioc_tag) { - g_source_remove(vs->ioc_tag); - } + g_clear_handle_id(&vs->ioc_tag, g_source_remove); if (vs->disconnecting =3D=3D FALSE) { vs->ioc_tag =3D qio_channel_add_watch( vs->ioc, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_OUT, diff --git a/ui/vnc.c b/ui/vnc.c index 952976e9649..ccc73bd7aa4 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1301,10 +1301,7 @@ static void vnc_disconnect_start(VncState *vs) } trace_vnc_client_disconnect_start(vs, vs->ioc); vnc_set_share_mode(vs, VNC_SHARE_MODE_DISCONNECTED); - if (vs->ioc_tag) { - g_source_remove(vs->ioc_tag); - vs->ioc_tag =3D 0; - } + g_clear_handle_id(&vs->ioc_tag, g_source_remove); qio_channel_close(vs->ioc, NULL); vs->disconnecting =3D TRUE; } @@ -1462,9 +1459,7 @@ static size_t vnc_client_write_plain(VncState *vs) } =20 if (vs->output.offset =3D=3D 0) { - if (vs->ioc_tag) { - g_source_remove(vs->ioc_tag); - } + g_clear_handle_id(&vs->ioc_tag, g_source_remove); vs->ioc_tag =3D qio_channel_add_watch( vs->ioc, G_IO_IN | G_IO_HUP | G_IO_ERR, vnc_client_io, vs, NULL); @@ -1500,9 +1495,7 @@ static void vnc_client_write(VncState *vs) if (vs->output.offset) { vnc_client_write_locked(vs); } else if (vs->ioc !=3D NULL) { - if (vs->ioc_tag) { - g_source_remove(vs->ioc_tag); - } + g_clear_handle_id(&vs->ioc_tag, g_source_remove); vs->ioc_tag =3D qio_channel_add_watch( vs->ioc, G_IO_IN | G_IO_HUP | G_IO_ERR, vnc_client_io, vs, NULL); @@ -1638,10 +1631,7 @@ gboolean vnc_client_io(QIOChannel *ioc G_GNUC_UNUSED, } =20 if (vs->disconnecting) { - if (vs->ioc_tag !=3D 0) { - g_source_remove(vs->ioc_tag); - } - vs->ioc_tag =3D 0; + g_clear_handle_id(&vs->ioc_tag, g_source_remove); } return TRUE; } @@ -1684,9 +1674,7 @@ void vnc_write(VncState *vs, const void *data, size_t= len) buffer_reserve(&vs->output, len); =20 if (vs->ioc !=3D NULL && buffer_empty(&vs->output)) { - if (vs->ioc_tag) { - g_source_remove(vs->ioc_tag); - } + g_clear_handle_id(&vs->ioc_tag, g_source_remove); vs->ioc_tag =3D qio_channel_add_watch( vs->ioc, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_OUT, vnc_client_io, vs, NULL); @@ -1734,10 +1722,7 @@ void vnc_flush(VncState *vs) vnc_client_write_locked(vs); } if (vs->disconnecting) { - if (vs->ioc_tag !=3D 0) { - g_source_remove(vs->ioc_tag); - } - vs->ioc_tag =3D 0; + g_clear_handle_id(&vs->ioc_tag, g_source_remove); } vnc_unlock_output(vs); } @@ -3342,9 +3327,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSoc= ket *sioc, VNC_DEBUG("New client on socket %p\n", vs->sioc); update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE); qio_channel_set_blocking(vs->ioc, false, &error_abort); - if (vs->ioc_tag) { - g_source_remove(vs->ioc_tag); - } + g_clear_handle_id(&vs->ioc_tag, g_source_remove); if (websocket) { vs->websocket =3D 1; if (vd->tlscreds) { --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737508; cv=none; d=zohomail.com; s=zohoarc; b=EWl94a8HEf/ve9pHN8q3k7CSbvY23Fa1vYKQy3dq5Edt7Xu0K5JYOFEDzk5lFs9GAYqiAC7XjG8tyZurgN1fOXuSSbwKR/hIp6C1anNZjrRgoS67a0wXiHcj6CtDmh1b2Dx0YyirrlxfvcYFpCIy1ur3zwMaCCOlvsMofm/QAzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737508; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=VyWuFR66FdcxTDSAYxstFIq6Xs0/vGMx54Hcusmh2ak=; b=cwhS92NrQ+rSz95zmTvsEupBiKVul4heJ0QlRki5l3p2ypFQQLQre+b0n3djRhH0j7sIrwQ4NkBS3fDONOH/GrIKwS4HnpgMTxtQTtUBaGD/NmicC8IH0ZaeHoBpyvq3ED5xgkuWx3HGlGvX8WWK+fWO00YjcRkTsmdIcVMsuM8= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737508747260.53987015389055; Tue, 17 Mar 2026 01:51:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q99-0005hT-G5; Tue, 17 Mar 2026 04:51:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q8o-0005Xa-GR for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:07 -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 1w2Q8l-0002fn-KO for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:04 -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-680-ncDgKbgcO86X6wrLXs9ZFg-1; Tue, 17 Mar 2026 04:51: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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 918A6195609E for ; Tue, 17 Mar 2026 08:50:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 847F2180075E for ; Tue, 17 Mar 2026 08:50:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VyWuFR66FdcxTDSAYxstFIq6Xs0/vGMx54Hcusmh2ak=; b=YCWZlKljThvTETemHN3+BRFfVojQ3zm2hbqDZ11BHnc+D6hAbaURRRSXw5kd0X5FQcUn+V dZHjv3huruHUVw7KwEnP9ZY2CU+0sCZJwgxtjjDVocOjW/fNIPAxDLO0E4b7nTXn78dyP5 wnVwyOY6p2wDOk2RPT2PMwz/YQ2w7Co= X-MC-Unique: ncDgKbgcO86X6wrLXs9ZFg-1 X-Mimecast-MFC-AGG-ID: ncDgKbgcO86X6wrLXs9ZFg_1773737459 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:17 +0400 Subject: [PATCH 03/60] 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: <20260317-qemu-vnc-v1-3-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=592; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=xRixSj8RZS1G5LmAMuX1LV8L9/rZyOWsE0ndlrOHExo=; b=kA0DAAoB2ujhCXWWnOUByyZiAGm5FdqjGseOH+Td505SITToILfsXUjYQAN/EIv/Afr4Hj0xH okCMwQAAQoAHRYhBIepvZM/h8YG0nb2Ldro4Ql1lpzlBQJpuRXaAAoJENro4Ql1lpzljGIP/0me 5PVNlKXeS5VuVDpbTMQtBxe3N+VbmAGRTZJo7x3LsEEIn4ZbtuRpP2wnoAOJyTjDnYjsVX4lkz2 D3Pa2veMc5UpSW293jaImmdULHwWGGu8rjfoFvH6RNeG2wspt0pfPEaQsDA35ufx+XgMHaqksYu knG7J6izgW+99383bv0Ty1wI560GyUXt67W99cZGy1jZeegiY4mymH3Yj4AA6a0aocBF+/5RYJ4 UZAUNhBAobcnpFJrw/rikgHhvNmP5mSP3ZP37YGw97NinmtgCKQD7oqv1/uxwFcXlqwISn5XAG0 p5E8rokEJ8NoYofDiS3B3VbY4zWGT0ap/+3AyoOhRVFy9ySfxPe24JYj7AzCO5KUUctYQ1lynI1 vdp+LXdxCmaxGDXHXBb3OpBPb8An2No5L6xoqq22J6z5BGDZ5hv1Fp7jgc5PqTJOlz7o9cShap2 8Qjfi4uahkow73vTXNsIO3Fko+x6Q4dDMs078r8pLeuvvZmN14yJ84d+Csb9X/LvRqKw+MfAg6j hh7wMX3nmo+Z0jp30riFYaN58NxYlr0QMsVkobgBa8vK6DZOGu19FDO5/gqwhyevFiaPECjJGsW hletzcxOei4h52Y9uFuVMKoWOlb9eP02pebDhgmrrjlROVyOwceRqi/euGH1umgSOSgEi/bKM1Y bRaBx 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737511842154100 vnc_async_encoding_end() does buffer_free() next. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737531; cv=none; d=zohomail.com; s=zohoarc; b=k8/HhJGwsm2My0XtIkXWxvlwKEtouxRQ1mVUOjHAb9hoLSzXWjAvF31aglRugihCwTNg9wJ8oSCipDCJ1GM3NWpOca2v2dQXuuPsKoJha1WqYNbmwa9vGsjJYP8yHEikCLCmjKdJQCoUlQfisJH2capd04LeBZJIVEanlnxNa/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737531; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=b1TdznvfNo/kLR4VJ2BTsWYY5GiN7ppg+wGeY50m1ko=; b=cGrVyS3/VjLflbxwo4j1bbK2jnny38q77cJ6cubazy0S6yg6F34AJtmV5HrUKYvl9AY6meanLUQ/27aY2Psbms+xe7GgO8Vyj9Qv9yGXjXzX11jfYIgUwv4OxHeMFsjeroNURXfxKqA9RzNa4rb4vutTMdWI0eD6vX1hoRRWbBg= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737531960790.5495144276168; Tue, 17 Mar 2026 01:52:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q9i-0005q5-P0; Tue, 17 Mar 2026 04:52:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q8w-0005eL-0v for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:14 -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 1w2Q8t-0002gY-O4 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:13 -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-97-cJlvGoeFOt698YnLvwtXHQ-1; Tue, 17 Mar 2026 04:51:05 -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 117D319560A1 for ; Tue, 17 Mar 2026 08:51:05 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 07D2C1800107 for ; Tue, 17 Mar 2026 08:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b1TdznvfNo/kLR4VJ2BTsWYY5GiN7ppg+wGeY50m1ko=; b=cVLorUcZS2WwSNsbDrZRqZyPLgsG1bNnKAIOPr1G/dzRPweCVnzTEkBB5NR0jAIglMJb3k NI8l/O9uK7CVEBjuvHFz9hG0hmDEd+UfwxsxqARFM9uRtD6v+w7wWt+0nsr5Nv0vnAs0Ys Hn5WAibPJbyl9Tnt2KTOSZEKjQxT0PI= X-MC-Unique: cJlvGoeFOt698YnLvwtXHQ-1 X-Mimecast-MFC-AGG-ID: cJlvGoeFOt698YnLvwtXHQ_1773737465 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:18 +0400 Subject: [PATCH 04/60] 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: <20260317-qemu-vnc-v1-4-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1100; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=j4U6dEjJpDeqnxOtsFHIu/TPbBPNsN4KR/RfvB51MEM=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaxQauwEZJjMtxnCzxzZPR9z7YAD2W+s5j7 odo7ABm9IuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5VW5EACVRtgWpW8GkB2VnJp+ZtVPH0ZeWooSs7X6yJv8TtlZ8JjvQH2A7NPR6Gp1uSqC6eDeqXI NEveb1JycOkkss09nhwq5OfigSua7Y++0xFn12oJ5NLnVhO4B3Gc6yL9y/4T7WyqrFisPqc5DCv ooUTDDq257n7AuC/0E8kjpPJOUS1tDDDunsV+QQeVeXUfEkfPUCFIhQbQKu5rPh2W1Li3bftwhD 9fGjBRA4+MwMZ5i7Nw1v/+6nKwWfIsiR45BVSqOOzzRIHLZVfp64Zzwq5btha8FbC1PzrcZON7L oEGaM2LOU2I7TGveNs1DEYUkr3hqhaz6V8b1YFipnJXSaTa10mDRyyKwya0PbRisL5HF0v4+RdR 2zxP2tRcWIyQUXS1OZwS2SHxSpHlDmL25lgKJYzTJzNyydSdNchwnSY9rLHFLTdya8dHVIBiSzf wM9Ox0NtG2phJAjcJ3kV7Hmqpci9VT1KNnG0UDlp8CQGMIO0gG+AXpllw6NN7/A93j8oViOVqYi XLsAJuoxXmxLMRwp9n4vZk9et9OyN9vRJuRpPrDskcYtx/4J7yg1RrTv2xfNX0TOzjGBpfNgMcI 3FOvex7YVUPXxl8ACnPGPnFiKH50PRGu4DtwRaEgfttI7qAyfCMrf9IF/FbIVnKb9UBIpdEVmmz 5ksuZgr6tSNyCcQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737534341154100 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737578; cv=none; d=zohomail.com; s=zohoarc; b=VeHPtMbnRBytt6nIzIHkaTb8TN3PvKtXqf5dbX7zfbJFapm3FIErsKG+FA+1bUo3inVkwrb0ezX/os+15M3BbdaZ6OBUazwKSJQ0m43iuaMHmspuj1c+8DDXUfEXZRT/7FQoP9P3Lw7XBEm6FKLgBu2xnESYv+w3MT2vs7xwoD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737578; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=DVU+u9znA0LmB6+lQGjatBWdik3RAB5u2zSQZx8LHaI=; b=QT0wqhfra/C33dYEVtjaBN6StyaxdgLQf1rhNgqJD6sMhPcJmSnnoHCDE5MBxmBEJE3F06yBxYFtChlTXImZtXd2LN8+ldc9Kk063kofWNy0n5KlUlzIgg30KlHveZ2IflZ3yg2FZOTq7xFHbnMlnfii6FgLd/QeV7g2BlX+zzU= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737578223684.2458475262724; Tue, 17 Mar 2026 01:52:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q9A-0005hn-1p; Tue, 17 Mar 2026 04:51:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q8x-0005gh-TJ for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51: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 1w2Q8v-0002h2-Km for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:14 -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-499-AGIP-ia0PMi3YfdG7UiJeg-1; Tue, 17 Mar 2026 04:51:11 -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 3073D195609D for ; Tue, 17 Mar 2026 08:51:10 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2F5231955F19 for ; Tue, 17 Mar 2026 08:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DVU+u9znA0LmB6+lQGjatBWdik3RAB5u2zSQZx8LHaI=; b=UVyLgh8188r/Twlo0S6hGGo8ns2iOyfY3KCSIhuy9jTl8cHfDPSLQbk8nfju3N4UM316Rt YyxG/bpYcRy8HWnqDQWP8QzwqObvUkiO7b6+KPVhh4Ii+HdCGXUvD7Ib5XdlybDe3qu9tg n9dVachvrNnBCfQeiO/n3lPmhyJP5i0= X-MC-Unique: AGIP-ia0PMi3YfdG7UiJeg-1 X-Mimecast-MFC-AGG-ID: AGIP-ia0PMi3YfdG7UiJeg_1773737470 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:19 +0400 Subject: [PATCH 05/60] 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: <20260317-qemu-vnc-v1-5-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=630; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=kCY0fa1LuCzGT8SKN6LbHbaCvZ4fFL136UFG+eXA7r0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXamQfsY2AtgeVY0rzVTqI9gQ/L+DAZyKmc9 qsrjadgOSCJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5SBQEACFoMsUDeT21EwN7HL0Pf2YnEA9z388OlXAffC9eNFEYQD3PsUiWZnUmkeBDdJsBKIe+cr cvZfpHwL0T+toWwpoSDZPcIktd9tJHP+VIhaqPSDAvpNlnnTzAsJ3yyOjzkyAjMajbbjq9ZipJJ gN3bjBD4mQk5uNaVwyzdFIia9Ui+PbgQbk4T0fhwPZd1ZgxipZ/LK8e+DQYSybW4u/pWBp57/nb yRHQR6k+VcckxdhY/fmGpW9Q+BlEPRUqYfoqurqCOapII+CLXm6LesPkeaH+UGJvnBTsUgUv8Xv d54U7VB9oymBYAutZQr4kW2S/Xi7zcYycmZ681Q7G/iMfakQW++RkrymBSwqoKNw5svNoweW6Ss Y6dtHg5Os7eMjIeW+730QaHzIQ9Pm9Cun9+ifd0NWDLZJWV/Jf4up/DebYPIo3v1UMhzOIV8R0G Dry2HxGxkLSUZw47DN0FeJ/ZjAveqVtSGjZ0z8bwRMz0XTuYJGXMaBo425Ylgh5lph3nPRCzzft vHhqM2Vtr14sZa8+Kv1bluy1NnfrsKcfSMQpEeUZCylYQ+mRgnQsVy0vcX/qHlcaKPDv8/ul8gd i1Ecf2dQ0E6V3tQMQmgrl9ormG9brbpaOZRTALCap6WDr9yXO7ZVVGvR7qmH1WDcfLR9MK0ekqZ W/qBE6m3tecS57w== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737579623158500 The only caller, vnc_jobs_join() cannot take vs =3D=3D NULL argument, or it would later crash. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737612; cv=none; d=zohomail.com; s=zohoarc; b=Q4PsJFFnk9ocNA+gUhomWHyzWvQCy4stH6QNoafch2l/VRCVF08QQsOdVpKsjXApTEBr2rINDq+/rfJany47cYABMBXVcLrjHa2yduV/OHcUB6q7DyvuA/WTyJxKZSMJfe9s/EvGAVCo6wddK/z5p4fjclrYgPWLHwOBbshJuR0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737612; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=IznevMGLIaneohaIKvUB/NRYjF0fgbDeE2RC1EgEH1Y=; b=BoZ7f7iGI4EitKqBFU1sPzGCFiIPbnizE8Dx/hrUv8Bbirr9sq0ZM6+TYX8kgqD6Srzn/m49BULU49ISoD1cESRHJ6jjsIdIZoUfO8sOgyjzzYGzNZRwLias2mp8DkoTSGruryVrLqQl6TrLgfq1LiPWe8w3sl66CEdHrsoT6xE= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737612124483.7351759120145; Tue, 17 Mar 2026 01:53:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q9N-0005kJ-1A; Tue, 17 Mar 2026 04:51:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q92-0005hQ-CB for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:21 -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 1w2Q90-0002iA-Ju for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:20 -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-370-XUymlAh0PKqfMh1d9aOTYQ-1; Tue, 17 Mar 2026 04:51:16 -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 C11D31954B1C for ; Tue, 17 Mar 2026 08:51:15 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A6B831800361 for ; Tue, 17 Mar 2026 08:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IznevMGLIaneohaIKvUB/NRYjF0fgbDeE2RC1EgEH1Y=; b=C6scSYvAEHYuzuaRugFNVQbv+UlovtLU243F4w1zMIPFND+Qs/mYx7l2qbyrLigC4oVXpV WZpD7N2wqst807aX58fLr+fZmhdelMzKKzxfOpo+x5BjneuMf/daXJMY9buvhb4DjwhPQp aqz72xIQw2xvKgj0qTgophLdhe7fO/8= X-MC-Unique: XUymlAh0PKqfMh1d9aOTYQ-1 X-Mimecast-MFC-AGG-ID: XUymlAh0PKqfMh1d9aOTYQ_1773737475 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:20 +0400 Subject: [PATCH 06/60] 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: <20260317-qemu-vnc-v1-6-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1535; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Sed8g/S/JYt3qFw7QsNdZYnYZihK/1Nkqd9W0dWtzhc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXa2ye8cITSUdcbDk2tdyscnG1KLeZRnPYgt mI3ooDQnsyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5cGrD/45cryL7fkmxs5pV3DkoQVtY4VljlIx0zmLKpKGUQudFfXo3k8TFdoJ+1PkWo8XPdhyPbp VfFuOpGOHQZlxowK3QmB0RBVur4bZEwLtVKGFFdT/ysfcnKu63S7c7g4RZrvtrvclUE4u8sMao2 jJDXZirgUQdjoc8/J/H5/tF2mwB5tee8M2QB/Izs7JJjSz79NoOkkqdczLwmXnuof5BR6HXkFAa fhAhdHr9qoj9mZgs/z5tLt1Gw0QdeuNUOMjQL91KrjndNvJRhE/qcB8XvN9/4iGpZjQK4OqqIqX MMPD5T/nyNFtNiOX/dN/IQCjOq5uJ328OHYcXMfvCYI1lbZ1h7obp4TYOZBbZdCrvqPGAtZ9slT 7ReNAZvIKqzrNC1DvqKhlH7xmsk06FqQoI0aZhFWR2+6JKmVpAviNDRFEhVZ/xe/Nyg50QHLUc/ C823CTZmi9eEfSAojMb0dH/S33g0BQfkYK3HBOmNJuU2iRgJAafLgdvCPfz6ebljNiRCLoG+7p5 mXqKJOPZ3ffL5Qo7OCtmP5uLms01YbGahoZoe8xWFawJngCg+9SSLgSQkzaRUF/H9J0gCjmeAh/ +awKedRkEOaMDqRhzBeHdTx8SBGL3m6N6Q67yR8rj+n5kRTZh5LT+p4IrhdFbLjKpWPmFPksZ5J Gq+9/aThCfSQ7YQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737613340154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737572; cv=none; d=zohomail.com; s=zohoarc; b=FkVArh+rn/LqEhtQ1zSXvCbsKtPWyIMyu6ElXa2IH7/mJ3Cz1rejNN8YX2q8X2SOmIuTMXB6j301QQcs4IRZVrT0J2W+XsA0noXT4ksYCLbAVmOU60ZyAtgvs5PaIbqwFZVv9/WeXQybkeIEOqd8c12MKGyaktzX2+j/BRq//AM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737572; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=FmSu/mBBvG8RYBpITrfSgIbnurHMURYY1Gp/CJZrAO0=; b=DrpUL6H0ijxxYW2OwgT0VKgb4HQ9Jnon1xfKAUZfK5/y1deAzc84Pq/ooMlPT602/fXHowvkCmspAC95od6USBAaGsEJHeZ+W3fnXgsTV6bbv9hS17uL7QFsp9x//gLdGBqSZZJI2qHfoh3U3xTOrZsKhbfL6+c7QSwbB288Jso= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737572623855.4909920717248; Tue, 17 Mar 2026 01:52:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q9o-000624-7x; Tue, 17 Mar 2026 04:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q97-0005jW-Ku for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:27 -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 1w2Q96-0002jC-4D for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:25 -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-147-96YkNTr-OAKp16NqyT2V8w-1; Tue, 17 Mar 2026 04:51:22 -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 333D119560A2 for ; Tue, 17 Mar 2026 08:51:21 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 242A21955F19 for ; Tue, 17 Mar 2026 08:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FmSu/mBBvG8RYBpITrfSgIbnurHMURYY1Gp/CJZrAO0=; b=AMwBUq29jpivTrrrLz6ouB0BpBvcxEgqyI5IZ0IuvFqSUDNTsSzppUChITtXzX2IjCH1n8 oEKVyK8l4KoAz2QtK1uqSD8TOwKnL/o1uOgZwFp3VLhJSLDk8uIliruaUAZOC6rk84EEVN wOH72725mfNYWvc2Z2pZoPCDKomNCiU= X-MC-Unique: 96YkNTr-OAKp16NqyT2V8w-1 X-Mimecast-MFC-AGG-ID: 96YkNTr-OAKp16NqyT2V8w_1773737481 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:21 +0400 Subject: [PATCH 07/60] 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: <20260317-qemu-vnc-v1-7-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1199; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=o1X6AJPHMwJoGa7BBbTMNCzMXVWGkhZyR/VMSqHsBhc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaerZkxCJW6LjD55trFjwGYXvvo279rmrrb n7B51Frf72JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5XvvEACTqdg9mVgyBlqZFb5xqnNQ8GboXo60xA01MYneWP9OoBJ33XHCbaJQebJXfwvPOd82rHS dTlL7hiONRShZQTzgoB1gbFAwwg29k8ewWjgPS6DRgHlXAY8t7S6jl8C4Xg6+UhZZoHO0/d+XAv 8ptd1v6TUTL7yr/4+QUI9nPRNqvxZiAgNfCf6k5oFJ25a6DtTr/mXL0wZT6GLe7+uvACT81KNoT WSsEv8zhVd16Ot4RhJh9yobM032jGB4THpWix3lI0mnHNZqf81Q2GLLqOfX6M6RaXfXPaeb5q+5 /HsGrjYoVwGD1lV6DFn9LQ7aulMpo7g78hXDwrIiKUK8UkItLmyJ/7M+pwSjKHLLg4GQAt9s2AL uGWNCbK/58mY3asswzk9WVa8V6kYWygW7q7eO4u9lKHWuDo6qlgKdcOFFuUb8TynajFWaGKKDLJ veMwqhJZ0SLKBr0TRL5WlkVyXp8XUtOemQk8lviCxUgbk1JMYD7RBtsSXcGAx8/07TNxDZ1Kzh2 zCHkoXBHICiFZ0kCQ20RttEZ6OoMKi990YuL7TM7FqxrnKDdppnv5BqztJwVDbGn5nW7chTyWKO RhdE3kx9/ikmvg0Z+HYJpm8k710E6dNr2OTfAjh57dfrpYZWupLFM5zS/qs17L7uz/Lc6t00FMM r3mPBwncVZ+uKgQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737573612158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737553; cv=none; d=zohomail.com; s=zohoarc; b=Hlpx+dlFlfQ1cm9Lhj/XBQLUm0kw4hz5ImokXwjAeLjLRVyiDMnVIHx9X3WgDkqG6jSrxYx3TqKos06DrWf4pv7i8FUoVCzBZYA2RN5YvOjjVOgumtBHu0IAzfEEaOVnHIKnGEs8Fgoq/822EN+i8YihYjKBF8gYqUxNNlEwaY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737553; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=GiXAJmp3K+uqffJudDLR5G/KuISSy+BLtS5bv+MaCbQ=; b=gP/TxTyGJ4Rc3fXXaYOO99ySNIilllLubz+lrbmlfJjwCX0HPO+09kY2/vFIJ5qitRiMdVKBDh9sA4mPfXeHe9KZZeorBnOG3xqbzElIla27gXMk/WmgLxgFOWxld/54Pz1YTyLot1Up+1M5o8fBOn3DMx7TQoxwjuIiFgOKJdw= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737553665257.65795896059853; Tue, 17 Mar 2026 01:52:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q9w-0006Jh-Ew; Tue, 17 Mar 2026 04:52:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9D-0005kR-5H for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:36 -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 1w2Q9B-0002jc-Lx for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:30 -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-313-JWkRHH3DO_GFighqonUqOA-1; Tue, 17 Mar 2026 04:51:27 -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 65815195608B for ; Tue, 17 Mar 2026 08:51:26 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6C4B01800107 for ; Tue, 17 Mar 2026 08:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GiXAJmp3K+uqffJudDLR5G/KuISSy+BLtS5bv+MaCbQ=; b=WjrtWbEzd+jr6dROCR5bvKH68zIJvMIcXUlf6d3MVTgp7gEmU2XSkvRQ36NtSjE7/LbwbV Y9Cy0mR0TmuwmzM48STdACio3sDk5CGpjtJq7eI2lK9yjYHtDtX5igmKju3gOGyewqzhST ixOPwGzBfEhMXx0LCOLkiX0trxI0z6I= X-MC-Unique: JWkRHH3DO_GFighqonUqOA-1 X-Mimecast-MFC-AGG-ID: JWkRHH3DO_GFighqonUqOA_1773737486 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:22 +0400 Subject: [PATCH 08/60] ui/vnc-jobs: narrow taking the lock when pushing empty jobs MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-8-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=765; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=1GiMfRYvH2dTxsOggAmtQugVHNETWCW7xXWDOfihhNs=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaulgDo7cS17JhnRdURAIZOSNFeZREcGsee QB17E3Hs5GJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5UqRD/96zOLFZV2v+tPV+nNnZ3M6knU790b+i7f5GLAFSIYGhkuaispU5+qIGiQypq7stSCYL2K 7QvMWM0FRkhs5/DVcnLr0kTPV7r8BJOwHCTgnDWdo0I+02xU67lfyR7BQzSo3MBodsAd+QjsAX1 Bydp+k2rSRSmhD5G/DBozXJVC1Hzg8n0IW96L535/4qn49RzMoAo4+4UEUaregA1P/KsSK72dy6 pKd4lSGreSGCtYxJtHGCgMGYMYYhifOiclDKQUElGnIf4Iz6IEt+jnYtaw1W8ECYnfOMe4qeWZH pRxdOj5W/ZQW143p5iHpm08XrDzjMnmra0/T0wC1J037HulRns7S539/Ih27wLNU6WAE0vrq4tM JGaZwxwTOlcomqeYzsy3SYyegk9TkrwXEs9iQn9F4flDw3133zdBdpsHjj/OuP1WCghbi6mCbbK xcLwzTn6sMZ20fXlWKEHbCijnOnSoX9a/nhcx6Eko2lEp5/W2bFYkVleZuy2sOYy0Bd902alEsR 6AJNv+6Fm+XZEueqm6KvV1RKZ3iSiJr9yfSmNnICkAuEjsE6NNeLRfkTjD73ShUjshmozykXJmb Rcckn0Gz6sQN6jGoE/CwXaBf+TgXEio7KMEqHXHXNzLh+tQmKsEBMc0JUIEvP1++3qX3mbNiy+h TA82Aule99VVFpQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737554474154100 Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/vnc-jobs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index 28a4738f1ec..ae925171fae 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -122,14 +122,14 @@ static void vnc_job_free(VncJob *job) =20 void vnc_job_push(VncJob *job) { - vnc_lock_queue(queue); 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 Tue Apr 7 01:06:58 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=1773737542; cv=none; d=zohomail.com; s=zohoarc; b=g6n31h6iX8qNCyJyJnLPthzFrp7r9Z8gcA3hQLPDUTOAO6l8s4bfHKs0cfCGaChB9QSbAbSeD/O/j6R4wrTZWBt1Kdk6Kt9uFyyDsHlhqcqgNesx+VVe0PZRYSD/z0saAzkVVLWfdNqJEVcBUVO/mHdLhkr0tzX4ySDwC58iZpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737542; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=UgGMqWRoNgYqfadnrZRN+egBryZS2leBtfp1A62h7kc=; b=cNvHEs6X/Z68B1sEpbAtrHCOk0YJBRKUWOsbNawKZOqlF8z6BUaegcyuAzwHp2voiCE4esKN2YvPH8b6yFn2BugK4FopPSsl5wGq3prMhNHiQ46/ivsfPYvq940qyoI3MXHAhHaYyYLBLRa/MeK4by1FzFEDfL1yehewVGJDuXk= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737542132520.4930501264384; Tue, 17 Mar 2026 01:52:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2Q9w-0006Jk-ET; Tue, 17 Mar 2026 04:52:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9J-0005mS-IT for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:42 -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 1w2Q9H-0002kK-Fe for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:37 -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-55-dyvESVB6Mv2-RaNqlsln4g-1; Tue, 17 Mar 2026 04:51: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 3EE4E18005B0 for ; Tue, 17 Mar 2026 08:51:32 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 22DB8180075B for ; Tue, 17 Mar 2026 08:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UgGMqWRoNgYqfadnrZRN+egBryZS2leBtfp1A62h7kc=; b=GQUenXLzCKXZ9Emg50oFIj8yIQ6LSlPXMyKh79esBWiCneF0ciTZwrjnDkmRfBeM66b+YP XHJX222Wb1A9jxTo5xDiYQXS6McSKAfEFHNavUtap7jnCA3jD/JUXYS8isI7QjYic40IdT dS06yu3fbsmWakUHBCM5sUE7vsmik40= X-MC-Unique: dyvESVB6Mv2-RaNqlsln4g-1 X-Mimecast-MFC-AGG-ID: dyvESVB6Mv2-RaNqlsln4g_1773737492 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:23 +0400 Subject: [PATCH 09/60] 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: <20260317-qemu-vnc-v1-9-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=726; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=b1rg64rVjg+JyQU94K34Xh3zXu/+C7TtUel6eexqkFA=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXasXDRbk3PAiMHTFDMytATM3KJio/YfZWM2 wJvO2VzcVyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5arjD/9o1Ca9oO63aAUpA9MRqZeLmBLW/dyxzMuBv2L4ZaIxLu2EeMUWEV0rcRPS6SsAkcajdE4 hXNmUvYwxfIoFzzJWQVUikY1Zq9URNlvMHwA9E8kTUwZbUNG0r90N9jJArFd4aSF4FnR7X4T4HV FTxvPmdgQW67Rh28cMty3tpB4ZujJpmQrbbKZRgcQvbBDQVoPzzfZdBYdFGg85UPc633V4+KiTl JZxFIVrqkjeTS4RLr9ZY1sFSYiqiQ40ki2A26PQYtg8MdT9VpDNJl/LofReELXhuWJSFsqimONi iK1i6FwcQIKrD2uvVcL26vHtgk68zw4gbDr8FwcOc4NfhDUdF02GdqqmsH6MzIGgOkIXxC9J74v ly44LSGic30sAOM/N8ipUKbJLF+FugfxRn8nxpm7dJM1onAUDI2VjFLmLZbLB+W6sfeYk/RIK35 mOj/fIQWwph7zEFxLTdlyXobiFvF6+XonizkcHKZ3k3Vc0RnYCjKiNWu3Gr6r4D1UvBojQvjW8r 7Z50+8TFiE/AacxXP2DeeI6/llFN/BFWxU89Rl6c5JbLtq6GwJMuO5OKUYHJQUeU7Szqlbdr3uU yE7I1ZNcmOghnzBZ0WcfWPfhYz580udvIGngYNUONP+dAAG6cvRbs/AJjf3cnuNKCJr6pkU2Y3p w2noAWgBuj+aKjw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737544299154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/vnc-jobs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c index ae925171fae..0523e52cbd2 100644 --- a/ui/vnc-jobs.c +++ b/ui/vnc-jobs.c @@ -349,8 +349,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 Tue Apr 7 01:06:58 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=1773737587; cv=none; d=zohomail.com; s=zohoarc; b=ibFtFvPnc+OEnCX5Q9TM5dW8NTFoMxShOiH0EX3zuLEd8IWH5e2h/K6OcMC3kzj666yiq/i2N1eaprY5xYw2rIVyAVEBqK3Jkh1CbtD7CJIPXV6cn4RYOIeS/CToBdXH8RipumtJM+hl/a6JbbaQhpEg+wOqP1ylvAruFen7p6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737587; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ULKC/GyOqhO9BitzpnZ4orgYTBW0IIWBoIGM1x15EWU=; b=HjYc6cboHFtyofHQo5WlI7aZXIMCC+aI4zewed4UlTNZtXyq7pHyZ25l37VxgtSy2XIzEhVlNkQcmQXRGpjfam4NDvgSHMu0gpaRPEUa+Jsxl1w2oPksrvmh3NwhoBYVlSqoPy3Mf+45gdbxPfAp31Tmti1QcMFTf7zA89LEWFM= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737587416152.1715813403564; Tue, 17 Mar 2026 01:53:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QAS-0006pQ-Cd; Tue, 17 Mar 2026 04:52:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9Q-0005nM-1H for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51: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 1w2Q9N-0002ku-QC for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:42 -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-156-pgRGtbn4O42leeWyAvH-xA-1; Tue, 17 Mar 2026 04:51:38 -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 A9C08195605E for ; Tue, 17 Mar 2026 08:51:37 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 91F9519560AB for ; Tue, 17 Mar 2026 08:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ULKC/GyOqhO9BitzpnZ4orgYTBW0IIWBoIGM1x15EWU=; b=Duui/yHCwzl3zoqDCFLrcwoA4A1qc5fg5r+kXz2d9Kq2ZrBerfNAJqXhAZLcM2L0zJnSuy eP2cRwSDQBGfxcIcSS0agFhhJnanJ8xnTYRJ+QHLJkTbiIMGrJ6I8LCVnJqQsXnQrBkBeh +mxPQGB14RU43Y0NlcgmG+lzrgOaL8E= X-MC-Unique: pgRGtbn4O42leeWyAvH-xA-1 X-Mimecast-MFC-AGG-ID: pgRGtbn4O42leeWyAvH-xA_1773737497 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:24 +0400 Subject: [PATCH 10/60] 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: <20260317-qemu-vnc-v1-10-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=916; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=VebFzA6zCZ8jkFSjyM/gHzN3UDC+mBf8iDhH+bXfkmg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXa6QDNgIaWXjDZad7c3VqGktw1WJjc4+HDN xE3t/ESUBuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5eemD/9GIIRhLMbnYIZaDCrhZGH8cCaXzdjDW+bbTgoYmaLBIkjGZbgaZAVM85vPOVHrR7CRc02 EGoRkx1phP754krSFqWQ51jiat6mgKp0AwaeZx5fpd1GAkS566iXUZ33i0D+qJu25a54ILvKPq2 MfoioXE0+n9IY51EHUQexy1LyT1nmPZYqTc5qGRy/9lkvo2SF+UYxsQUdt4Llpu2GTGjp8+NWEe 1WdW1Wp54ZI8CiTSLWXGBWtzkgKixmO6lNwO2oI5Mm4p4TTcTPVuTcNMLvt9I8QS4hkMtPUMiWp 22x26KuUAWW4mGEpMZ0k+aVFMsG/J9fVS19XRthB7MV24DN9tS4rBs5XODoEp2FVHnIEvf0HGU9 Tp21P6UFbElB+ytxdR9WY/O6CSlwfNn9f2JqbP0zYLA7CduyijSuv99IsnbokDcyFV8jj/kE567 Sn8sr1Ez+HB7YlBoAgMRSVWFS/8KlAzT5laJmMYO+dQlm93JFQMihYJWKlvOOVdJPQyw7ygOy1T jSaNH62XxAeo8GoEKn8rFamEhUtnl1Vc8R5BlrvhqkaRBqrEyR3y8KnI4HIAi5Rj8MReDyICdRg kZUFvpz3xvQtqaOV1tp6U8bKAQHbBYQkKycwI/YxTQCh6KM3uxe5HO1vyKwGq8hkjpYL45gsy3p jfvU4P5gIVzDvLA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737589023154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737593; cv=none; d=zohomail.com; s=zohoarc; b=WlxpB70BiPvAaD3tERSvehn6H3s+FAegxUD0m4d+vK6V4BAOKsuqnpDlUDVM5qgUURXB385Ke44erelBQEIp7d8FkcijusQxOA/wXUi26ht8KMhpiyyergHs6lwJMFnMMQyNN+SVtLNFkLN9nKW3GosseVzXUWwFfZIS9el45aI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737593; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=/2nlFTMQQz0ip7CVNpg2N3GKvI04txIlkiQjPGS9l4U=; b=c/lZzHruc2rDWOowIPNFax5zxer1B9nhinGCMW2wQA0dEdiZSAUO1ltA3bOcXkcPufqNLHw5gwdONP+WnnQhRVQIIGv+GHEtjtXDP4nK9XSyBY50Gtpm5P8OpmqQfZP/gGArWJ5J6MDP9r23QIMTciroqJDLYVjn56CBcUEpQ4g= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737593083954.3898225047566; Tue, 17 Mar 2026 01:53:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QA8-0006Vi-S6; Tue, 17 Mar 2026 04:52:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9V-0005pH-9V for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51: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 1w2Q9S-0002wP-OF for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51: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-593-FkjTaWMSOXuKrgkEiCVMJg-1; Tue, 17 Mar 2026 04:51:44 -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 B004C19560A1 for ; Tue, 17 Mar 2026 08:51:43 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 560713000223 for ; Tue, 17 Mar 2026 08:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/2nlFTMQQz0ip7CVNpg2N3GKvI04txIlkiQjPGS9l4U=; b=Fjr65b5Qe78R0FLNBvzKy9BqPAclUmzsm+OfrRd4nr+/zbBj3to4zPFdWtfgllJXsXatUB ffgz25BkDYWMyAD8Jiwppruz1YrwFedUb5sIS6nr1Sq5p16317IKH5/xTobu88zQlNpD4z +f2Aryyfqj3gO0qDUpxE6xHN9LJoWQ0= X-MC-Unique: FkjTaWMSOXuKrgkEiCVMJg-1 X-Mimecast-MFC-AGG-ID: FkjTaWMSOXuKrgkEiCVMJg_1773737503 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:25 +0400 Subject: [PATCH 11/60] 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: <20260317-qemu-vnc-v1-11-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=16427; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=n8ZReNrLQ3bGqHH8M0a5ti/59PsLSnU6BmB3/gxPkkY=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXai0tdxu6ViBM+k3BCiKtVNrQyqUu+Mxodv K1I6HnysFWJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5RHFD/9Owp5RaMacHzj6galOwxJHfq5WD55eKuiI2disPXoXJipUN3liEd+DlXyxcDbnxpCcDvN QOpfFghlYxButwV+lVFnHH5EVne+miqJ00gxOPRawF5NfjHkd/UGCjRmh9F9dyY6H1n2eQm2WLi iJH/Rd2fGWhdNqZv/7CGJJJgfvL2pMh6nbCzxgqY6hwzAbxN2cynP6+FW+cifMZ4+G36HWkw4fM XO1VLGE71daCKLIiMz9ZQIMuK6Qs8iF8g/u1+sRL4OUbsBqgrxVZrKrXYBq9oxgTEECHn9+zoJH uSHgW0q8j1di1cQQfMfxLK8k49iXhPmDun23gtBvGxn7pWvQwEyyaTuHJhwATm57ZMmJ8UZbEEa UNmwmyCtA+Zrihr2kiiRGDjv9/Txw5RNwE1XaFOOEiJjU/bZyPSqR2JZPSSwLnodv4VzvhJ7uiN veYsCmH5h054TyRp6slMYyVITVlUABhzcl5APPbBUH95lrJmYwn61cCcWDgAVYIJSFQkMi/JWsk 0S/l8zBHu8XuxNCyTeePE9XMr5+CaB1xk7x2IGxNHzpnMG2252eH9zBcO3/GK56kN+QDjeOtWIN jLdBQ3DC7+nqBuyF5UKI1NREQ7d4hU3UnuR2sqNjOMKGSsNm8Mv4aDj7J+mJ5Ca1qa33toNq/HQ zf3p/oJetGcFv1g== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737595080154100 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 proper 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 '?'. Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/cp437.h | 13 ++++ ui/console-vc.c | 62 +++++++++++++++++ ui/cp437.c | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ ui/meson.build | 2 +- 4 files changed, 281 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..7bbd65dea27 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,47 @@ 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 UTF8_ACCEPT 0 +#define UTF8_REJECT 12 + +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, +}; + +static uint32_t utf8_decode(uint32_t *state, uint32_t *codep, uint32_t byt= e) +{ + uint32_t type =3D utf8d[byte]; + + *codep =3D (*state !=3D 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 +805,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 (utf8_decode(&vc->utf8_state, &vc->utf8_codepoint, ch))= { + case UTF8_ACCEPT: + vc_put_one(vc, unicode_to_cp437(vc->utf8_codepoint)); + break; + case UTF8_REJECT: + /* Reset state so the decoder can resync */ + vc->utf8_state =3D UTF8_ACCEPT; + break; + default: + /* Need more bytes */ + break; + } + break; + } + /* ASCII byte: abort any pending UTF-8 sequence */ + vc->utf8_state =3D 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 Tue Apr 7 01:06:58 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=1773737605; cv=none; d=zohomail.com; s=zohoarc; b=H5N3HjxiZBBels5JJJhzcAWhPXlqAlniWK18p59mdXtL2us6bxWGFSiIZ/TGI3DVvRlyFJU88g+xh7eli15pZpcgyPiQD11aEOas4vTM+/Yrots/xo/Pr7qnoBe5Z1mZCM5stKjBhp7mOQc2qc8TOdoQHM3Y4jqT8W/HCznTbqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737605; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=ktQKPvUEkRhNvH7YblXNHrNMBIa+G6h1E8k2vkvue1c=; b=lDqXtBRMYSAqS3P4OJE4o+iHBG87AqQ0fZNRAI7QTbEG1ChUo1tmpBza6dm7gZzk7roCqZt5+pFyLc43ZYY/1pyN6yWTzqxH3DMY1jEtjkQeVq/1OYpbjaSgBecYxQKYmFcuWZqhOvnVMl4Uvgk/RKKG2FdR1ax4b9HsNns6SUI= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737604996723.0926400511344; Tue, 17 Mar 2026 01:53:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QAq-0007Ba-Pd; Tue, 17 Mar 2026 04:53:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9a-0005q8-UW for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51:58 -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 1w2Q9Y-00033n-Rm for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:51: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-126-mQBgW8A2NZucFq7FbK_w3w-1; Tue, 17 Mar 2026 04:51:50 -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 3C20F195609F for ; Tue, 17 Mar 2026 08:51:49 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 421A819560AB for ; Tue, 17 Mar 2026 08:51:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ktQKPvUEkRhNvH7YblXNHrNMBIa+G6h1E8k2vkvue1c=; b=HLe+QVvQwX9CgB7zUD92rlrJPsDiFrDsZbkAK8LcdxITnepCgWzSOJ27XvMv2ludUVin97 s4jZQw753Zewm1Q1FAm1V+xu0fauTcUlWmsJuud8hHyGe9Bp/kbBv76AQycpv7RgqOR3IU rFLZJIB3MILHtYa/MDem1bJRV0++Px8= X-MC-Unique: mQBgW8A2NZucFq7FbK_w3w-1 X-Mimecast-MFC-AGG-ID: mQBgW8A2NZucFq7FbK_w3w_1773737509 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:26 +0400 Subject: [PATCH 12/60] 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: <20260317-qemu-vnc-v1-12-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2045; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=f/b+Vqp3tW85Fl5OGNgo2S0lc795EiiBKc5ilwNVUQ4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXa2q0aMN3gjFKxSCMunvPRkI6bSKaDQQb5L KxQFhOwC+mJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5VQKD/96ytkx6sHIS3nh/TnogVSIOVzpAPJ4jFPWrkJRlLCjknA0aNnS8SIldyqFTRG+qyB2CJQ qxw3NqiGmoy36ceRcDzu2jSWhhYI59DTGnYlFC4+Os7V1RVHU1N/yTuZJZgc3LiMDT/0ZUbR0pE twHRwTto/pmUrwIpTpZMItKF+08G/GVnCUGQk3z+c5Fp6SdIp1rEmrYLT2SXRYMnP/Rp2EfJLD8 2GHMuKUOw3buMlFeM7YkP8cRfx4WOGefA/VcxuiKWPFPbcKkxUfTYktO1qy5nQGIPY9IgljEacG HNnHTXlYM6qx/mUhF9LZRJVNmgml+/n+enxklWK3FsnNvC/7+TSI8EY3JUOhDv5GTMNF+hjd9KW pYfULwmPUENEeo7AWOHvh/aKU4UEJxTxat9OezR8j19x48aA0E/sPlaHGQTYVJCkDvE4Ozzvz86 ggLxx4Bu9yznaB2xd+VHNkKqTV4k8AoI0yLetbQFX18Eu++CUO2ay6HA0CDyTzQ6oe1H1jXUkoa CYXe6zSYM/c1tC/1fZyGycpzWkMDw6ckW/v8MNhlva2ceiY1UJjEh3WrlzSAZvNKyuX5A3zHmOA /0zVRun0H3b9IS5iPE/Lpe/G6ijnWn9DtHYrkT2lP0dGcjGY6dNTE8p+xxvO9LFKt47R7wSsrAX foSpkwdxQI+iz7Q== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737607273154100 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 7bbd65dea27..5eca9a5c004 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 { @@ -869,6 +870,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; @@ -1027,6 +1032,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 Tue Apr 7 01:06:58 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=1773737811; cv=none; d=zohomail.com; s=zohoarc; b=aNrweP/BTxuJhdrUt9xG2vS508TIsHv162QL13MtsIA5aV1STZU/3ZJpNmprObiLMlLyAGb10oZna9iKJQyw8EMTVZOO7YoM+29EFCayMOEk1hWHyDgUtXAP+ApqNM13CciZoxr4I5Cd2IF4XmAzlcRNqPvDmVGyYsfJpkbnD3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737811; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=P8Fl8K5xVMIV8fIvOk6PNvwuiOGbIFsEtx62dX/yczg=; b=kKYwkgdsa6mucZnNL3Wp3zyQgftXhdJHL95IFysKsFM5X3Z7KJ1r8M5tSXLrJzCHqm46Vq8jDqMtH7zsg7uuMWsHzz9PN+0XzFs8HJIedcJpKJJRnMpTzBJIGh4n95ZduU3+CadFCiqnvX9T4hW21RVq3J/l7YQztErdCd8ZYQk= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737811433972.7330118846596; Tue, 17 Mar 2026 01:56:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QAZ-0006zG-1W; Tue, 17 Mar 2026 04:53:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9h-0005xY-FN for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:02 -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 1w2Q9e-00034V-9U for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:00 -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-401-Dk-KjQS-PCS5zxOD-tlrnA-1; Tue, 17 Mar 2026 04:51:55 -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 61DCC195609D for ; Tue, 17 Mar 2026 08:51:54 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 68B5D30002DA for ; Tue, 17 Mar 2026 08:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P8Fl8K5xVMIV8fIvOk6PNvwuiOGbIFsEtx62dX/yczg=; b=ZOsBNSqCsTRMa6whN8XZCS5gDc/lOdnbu/6RGRYJOmZBbLVgYbv58t/ZnJFYeN7wJw41PS 7F8Gre2/9YlzKaWlIj9kBvMMv6sfZcggAhQBiqPQifFUQDplZmo2zd9VX6WdUXMmo2N7V5 YlF3kPG5KYb5E8IBO90QUt3/zlq+TLY= X-MC-Unique: Dk-KjQS-PCS5zxOD-tlrnA-1 X-Mimecast-MFC-AGG-ID: Dk-KjQS-PCS5zxOD-tlrnA_1773737514 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:27 +0400 Subject: [PATCH 13/60] 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: <20260317-qemu-vnc-v1-13-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=902; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Vr8prgUCfsOV0973iCYtnG03OIVCNzvWtGLvSrI4LLk=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXamMWTuvpBaP05ztPSm92ZkBiQ/D5N2oFGO 8d0XsntFdyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5djLD/4ufRxVBY6RbikVjsIh5TgpfQR5mFhGLFjD1FG7lW6ms+blHuY7LBBru5A3ocXM9uKXEtq /oeoGBxUW6SQCNYmX4/OV9l3tllyKlO5X+FxAMJukA8xbO3kyrjBTdDsi5NYCfHYBPGIkiOxMei lD6fEUOttfltj+GBgDC1ALJ6de7ngWw+PYWf5Zcuud3/tYSBdcSSKraDgCAcCnw2nmp9CCSwkZU ScuztmOnCSuXDGaeguTc3io2WFRBFhjBdmulSIov21MYh+yrCKtQRGddLSUEDZ5fJGL04h2fJqF Y9aU1VGUORdWpi+bd1lBXxGmM7iLmHct8DhVmffX21kdl/1hS/eOk4C5BeXYLNSbURfPktjoqcn 1KagstcDNl3i0McFRR6vuyYYvh3TB5o6tVM3xVSclmPlts2HR+qNhbhaa3CMjjREV06EcW/1Q7T 8Fv8cI9CWmcnhUqaxofy5VrGAiLiIcR07XJ1INfuSe7TBiMIKhpcJSxSf0tBfxqSTsIizcJSKK3 +4/9vu0dZl3gC9ZeimfgB6Ql1N6e3rGAfvqCXLSIhCtHzV1mwE7DrjjU/ZWVCpT5k83vFkknRej yTsHmSEuJoaT7bP3fBZdTWPQqELc9jI46CkY8JU0uIt7svRTeiIRaYVBYmokcI74dczKGrkr33j wquqzgtDl9EWo3Q== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737812333154100 14 is shift-out 15 is shift-in Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 5eca9a5c004..fae8c8ce768 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -847,10 +847,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 Tue Apr 7 01:06:58 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=1773737593; cv=none; d=zohomail.com; s=zohoarc; b=OcCjoUghWn1G3DKJQandHdkyoJHwq0mEhi51oPjjbVFX7i4t+AFNSxpRZesu1kn5a27vf5o68l/Xdzj+Cijss3sZgMB9q2WzzW0kI+BR1CZbDK8kgsNCElMT7/+iP94NWBCixuDaM6NPMoaxltvDGqX13RbuRtBvHYTSHCk7bNQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737593; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=CHXaSTlr6OopZ6q8tVkZpr/+QMAPux8zE6l0jYafjwc=; b=a/WtPoZl60n2w5IY+jaz43BftWJwFoVXu9FfR6eaLY3WZ3j8/YVuM9jxyteQ9sKVWOjoHbvQIbkvA1otOus+qdLoqJP8BY91BsEs0Eq2+jsNwka4FOK47XxeMXYuIMGY5uZsev6lh2VUtx9FwPhni8RKmo5BPakgxWKVtV/pVxc= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737593647810.5991678705356; Tue, 17 Mar 2026 01:53:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QA3-0006Uu-Nb; Tue, 17 Mar 2026 04:52:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9m-00062n-Ej for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:07 -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 1w2Q9j-00034u-89 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:04 -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-350-UKdvDuSpNzygtRGciMGi3g-1; Tue, 17 Mar 2026 04:52:00 -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 C5AD7180044D for ; Tue, 17 Mar 2026 08:51:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AE8A53000223 for ; Tue, 17 Mar 2026 08:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CHXaSTlr6OopZ6q8tVkZpr/+QMAPux8zE6l0jYafjwc=; b=AFmyho7pC3+YyLa94+pJq+depef3Y1JISnroJJV29YBLotlMGvl2xRBA6GhW4g3WS8Deki 0eZ+VgO9Xa3qLBNoQnFTT5oNlK3yqqTUll+OPappqYnWlxVMcJXNbMN4d8k5KJ+SkVgL39 Y7g9tnRT7TYDWw17KFjXPxR14Pmm/Zo= X-MC-Unique: UKdvDuSpNzygtRGciMGi3g-1 X-Mimecast-MFC-AGG-ID: UKdvDuSpNzygtRGciMGi3g_1773737519 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:28 +0400 Subject: [PATCH 14/60] 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: <20260317-qemu-vnc-v1-14-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=6876; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=YxjOfv94BJ53XDTI8nUK2hUtaRBGQSYrvOi2lcxJD/E=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaHUMGhEup9w/1gnfSITPYMjk+X8Eo7hQDd UB8DDoTufyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5VGMD/90sRV6iX3B4IoJ7KuVpAUgbg90uI6Wwj7zSQHlRzzDZxt/JHyTG6q/fnXBq9mqU+gmww0 7ndILnbm/LegaLxUC4qG4rLG5iesdTQKFVzS+rTMyeSjyJsC8Dg8Jb5J+MRnOa49z/iNS8sLfNH 4eNbui+JIilROQVb9WWEysgeEQWWjhWBC1coy8sbQhL/gX8XAmCrF4Ux3DhuMtHiR6bBGEBpB4L TpdBeUxKGTRIORT5C+iVyCkP+yIV3flBj6WSGWI9pz+3uPjOEx2XTynxUfbftH6K4HKJi09xrl8 f5RFkOxujaYouucAeJiqax/xtZHIkXR/FGPWulHgJnI0ZeGTkdIP1TL1X0C3i2aX8BLij3cAgnZ 89NDS4X3+w46nh7+315udvCUTzU3ky/TUsTJkfU6YUnWKmZyRo2D2QoqKH34lBLsQgc3niYIa7e tCBi+7fMor5XjGBRXbGi/gh3E/fVaoqPNTR18sNEVZQ7Hyzoq87ZePxDTDyTxQwWbAYBCyOPg6Q JtTCUumWcn/hvbIzgK2ZRjWBTYrYhox7MRTW9nE0EzDJAIYqq3ZasS4tMEO+LWo7eaWrUf67xd6 KBMrOTkZ/u7RYss1o+XsyKOpvwGEfrkquvHx++IOyJAPG3vFKCu2zXeu5CTcszLZa3vM1S1ynR9 WmxmQcr9QzD5QqQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737595071154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 3677a9d334d..4896e9e0e04 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 fae8c8ce768..e83a0b04e3f 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, @@ -1115,9 +1117,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 Tue Apr 7 01:06:58 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=1773737645; cv=none; d=zohomail.com; s=zohoarc; b=ZaOW+r7ygoJ/rM5+UnN69QYw/8eUZcCdOIaIrZB9OrsV6dxBziEwROUZiAupSO0sVDn8yEAZiRMS8BRnCXMnSi4reCfi295RqvI+T4P0VN8xD4MYlFswoC5+CNPOmGTXtZC5D1NJWiOoHGG3V3vwtRaFdopIfvqnfeX3oUEvixg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737645; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=0mwFqxq0JX7/6dC/VcZ7+FFfCgrd1MnVl6PPRsnkg4w=; b=O7fvg8Nudrfjwwquc9AtskMZE2L3GAFvEtM9C1ZhxWv13dou5KnpL03GW35aS8wXGO2FQYXtyMAjshMkCppowbI7p5Et8Gfvn41aQkTsmRPzIWZUIRrFax4i7AwJM5dNSdx08uvjCQajxpgmoiCHH18WLAJt30Mi4QfdWgW+4Ko= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737645621921.7590321170735; Tue, 17 Mar 2026 01:54:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QAQ-0006oJ-0H; Tue, 17 Mar 2026 04:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9t-0006Iv-Fd for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:14 -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 1w2Q9q-000369-3d for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:12 -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-632-d1_VKgmJPcmQu3tu1XEMFQ-1; Tue, 17 Mar 2026 04:52: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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 60DA9195609E for ; Tue, 17 Mar 2026 08:52:06 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7E2E430002DA for ; Tue, 17 Mar 2026 08:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0mwFqxq0JX7/6dC/VcZ7+FFfCgrd1MnVl6PPRsnkg4w=; b=HOERUDGvxVIYD1DWr1g6r4O2t3PhaYxdjS7SEB10QPzxVa90ztGfKMg7otSXvqK/rzM9iD Yfrm4iY/kDurwxwceNAOLth0s8/ivjHK5mWTVMSCktmryCzko9jA0a5IuA0LEERs20e/7R guPRg0ohH2IRlXFptZVMPQbU8dQwFe4= X-MC-Unique: d1_VKgmJPcmQu3tu1XEMFQ-1 X-Mimecast-MFC-AGG-ID: d1_VKgmJPcmQu3tu1XEMFQ_1773737526 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:29 +0400 Subject: [PATCH 15/60] ui/console-vc: introduce QemuVT100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-15-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=26525; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=2mywc0fxiG7ETDbxolXVw6dLaR6CMEUA7+x2JF445So=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaYHkioHPrBq/OdW71ozE8DwewtHngt9hkE 5uP0rhRYDGJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5fY0EACnjASdnCXxH/SCiaGUERJv3REsm4RqJis/rl4S+GkIcVgeL+feW5VYQp0fqi+sZLLIhS/ QYVs8WrqYvea539YuXHPUVUnSSqeCAiZ/gbsxpf4Bzqblbn2nsXG1oUEw/Ds6BxV/hC6uLhwIkx PVQJ9GrMEI40GDJUaL3W+95o0Kb0t0sYiL615DLTTbfJfVLYvSCe9wmntv28pIfoPJGlFCPJrnu HaqNK8SCYgSM39vYrJF5k/7dQ9m/MZN5aAF5MBJGyJdu+SQxHvVNSGJIAK8CsN8KK4TtdEfKmyL HcPXzBGecoiPGf1YAU2JuIMQSPvtjhAl/p0bK4gosFp70lZ2NXuL7nv7FzauKg+5Q80x/ylDb/7 vNV7Zty1zLA97H85P2bGS1te7x0sX9N8I9a0tcaj1/DvbElc7Ttg4l80CwSODuW9F+T9NAQc5/F fum/A6Nr8tJwffm1SBGgWeC6ufqPVcZJWU6NFgvwpJQr+iwPk/UVZXI8ZNnApKADtPlyUz8Tz97 lWHD/P5FjP/OfOz17eaBnNI562RUKKJrLUJW+RltpmY9uUm6tI/KZDaBy51lwIaahBM4ZIUZCof syCUsjiE01bAR1YiR+3uOQ5/Q51PI6gh6wjo+bjcA6pYV/63uWsXt5R6MxonIwObI+F6/QIkcSs 6Y2l1J+IbNd/l5A== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737666746158500 Start moving VT100 emulation specific code in a different structure. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 381 ++++++++++++++++++++++++++++------------------------= ---- 1 file changed, 192 insertions(+), 189 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index e83a0b04e3f..41436a38eb5 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; + +typedef struct QemuTextConsole { + QemuConsole parent; =20 + QemuVT100 vt; Chardev *chr; /* fifo for key pressed */ Fifo8 out_fifo; @@ -186,34 +189,34 @@ static void invalidate_xy(QemuTextConsole *s, int x, = int y) 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 (s->vt.update_x0 > x * FONT_WIDTH) + s->vt.update_x0 =3D x * FONT_WIDTH; + if (s->vt.update_y0 > y * FONT_HEIGHT) + s->vt.update_y0 =3D y * FONT_HEIGHT; + if (s->vt.update_x1 < (x + 1) * FONT_WIDTH) + s->vt.update_x1 =3D (x + 1) * FONT_WIDTH; + if (s->vt.update_y1 < (y + 1) * FONT_HEIGHT) + s->vt.update_y1 =3D (y + 1) * FONT_HEIGHT; } =20 static void console_show_cursor(QemuTextConsole *s, int show) { TextCell *c; int y, y1; - int x =3D s->x; + int x =3D s->vt.x; =20 - s->cursor_invalidate =3D 1; + s->vt.cursor_invalidate =3D 1; =20 - if (x >=3D s->width) { - x =3D s->width - 1; + if (x >=3D s->vt.width) { + x =3D s->vt.width - 1; } - y1 =3D (s->y_base + s->y) % s->total_height; - y =3D y1 - s->y_displayed; + y1 =3D (s->vt.y_base + s->vt.y) % s->vt.total_height; + y =3D y1 - s->vt.y_displayed; if (y < 0) { - y +=3D s->total_height; + y +=3D s->vt.total_height; } - if (y < s->height) { - c =3D &s->cells[y1 * s->width + x]; + if (y < s->vt.height) { + c =3D &s->vt.cells[y1 * s->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 */ @@ -232,23 +235,23 @@ static void console_refresh(QemuTextConsole *s) 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; + s->vt.text_x[0] =3D 0; + s->vt.text_y[0] =3D 0; + s->vt.text_x[1] =3D s->vt.width - 1; + s->vt.text_y[1] =3D s->vt.height - 1; + s->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 s->vt.y_displayed; + for (y =3D 0; y < s->vt.height; y++) { + c =3D s->vt.cells + y1 * s->vt.width; + for (x =3D 0; x < s->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 s->vt.total_height) { y1 =3D 0; } } @@ -263,24 +266,24 @@ static void console_scroll(QemuTextConsole *s, int yd= elta) =20 if (ydelta > 0) { for(i =3D 0; i < ydelta; i++) { - if (s->y_displayed =3D=3D s->y_base) + if (s->vt.y_displayed =3D=3D s->vt.y_base) break; - if (++s->y_displayed =3D=3D s->total_height) - s->y_displayed =3D 0; + if (++s->vt.y_displayed =3D=3D s->vt.total_height) + s->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 s->vt.backscroll_height; + if (i > s->vt.total_height - s->vt.height) + i =3D s->vt.total_height - s->vt.height; + y1 =3D s->vt.y_base - i; if (y1 < 0) - y1 +=3D s->total_height; + y1 +=3D s->vt.total_height; for(i =3D 0; i < ydelta; i++) { - if (s->y_displayed =3D=3D y1) + if (s->vt.y_displayed =3D=3D y1) break; - if (--s->y_displayed < 0) - s->y_displayed =3D s->total_height - 1; + if (--s->vt.y_displayed < 0) + s->vt.y_displayed =3D s->vt.total_height - 1; } } console_refresh(s); @@ -338,13 +341,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 (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 (s->echo) { + if (s->vt.echo) { qemu_chr_write(s->chr, buf, q - buf, true); } num_free =3D fifo8_num_free(&s->out_fifo); @@ -359,27 +362,27 @@ static void text_console_update(void *opaque, console= _ch_t *chardata) QemuTextConsole *s =3D QEMU_TEXT_CONSOLE(opaque); 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 (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(s->cells[src].ch, - s->cells[src].t_attrib.fgcol, - s->cells[src].t_attrib.bgcol, - s->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), 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), 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 (s->cursor_invalidate) { - dpy_text_cursor(QEMU_CONSOLE(s), s->x, s->y); - s->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 @@ -393,33 +396,33 @@ 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) @@ -428,41 +431,41 @@ static void vc_put_lf(VCChardev *vc) TextCell *c; int x, y1; =20 - s->y++; - if (s->y >=3D s->height) { - s->y =3D s->height - 1; + s->vt.y++; + if (s->vt.y >=3D s->vt.height) { + s->vt.y =3D s->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 (s->vt.y_displayed =3D=3D s->vt.y_base) { + if (++s->vt.y_displayed =3D=3D s->vt.total_height) + s->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 (++s->vt.y_base =3D=3D s->vt.total_height) + s->vt.y_base =3D 0; + if (s->vt.backscroll_height < s->vt.total_height) + s->vt.backscroll_height++; + y1 =3D (s->vt.y_base + s->vt.height - 1) % s->vt.total_height; + c =3D &s->vt.cells[y1 * s->vt.width]; + for(x =3D 0; x < s->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 (s->vt.y_displayed =3D=3D s->vt.y_base) { + s->vt.text_x[0] =3D 0; + s->vt.text_y[0] =3D 0; + s->vt.text_x[1] =3D s->vt.width - 1; + s->vt.text_y[1] =3D s->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, + s->vt.width * FONT_WIDTH, + (s->vt.height - 1) * FONT_HEIGHT); + qemu_console_fill_rect(QEMU_CONSOLE(s), 0, (s->vt.height - 1) = * FONT_HEIGHT, + s->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; + s->vt.update_x0 =3D 0; + s->vt.update_y0 =3D 0; + s->vt.update_x1 =3D s->vt.width * FONT_WIDTH; + s->vt.update_y1 =3D s->vt.height * FONT_HEIGHT; } } } @@ -570,21 +573,21 @@ static void vc_update_xy(VCChardev *vc, int x, int y) 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); + s->vt.text_x[0] =3D MIN(s->vt.text_x[0], x); + s->vt.text_x[1] =3D MAX(s->vt.text_x[1], x); + s->vt.text_y[0] =3D MIN(s->vt.text_y[0], y); + s->vt.text_y[1] =3D MAX(s->vt.text_y[1], y); =20 - y1 =3D (s->y_base + y) % s->total_height; - y2 =3D y1 - s->y_displayed; + y1 =3D (s->vt.y_base + y) % s->vt.total_height; + y2 =3D y1 - s->vt.y_displayed; if (y2 < 0) { - y2 +=3D s->total_height; + y2 +=3D s->vt.total_height; } - if (y2 < s->height) { - if (x >=3D s->width) { - x =3D s->width - 1; + if (y2 < s->vt.height) { + if (x >=3D s->vt.width) { + x =3D s->vt.width - 1; } - c =3D &s->cells[y1 * s->width + x]; + c =3D &s->vt.cells[y1 * s->vt.width + x]; vga_putcharxy(QEMU_CONSOLE(s), x, y2, c->ch, &(c->t_attrib)); invalidate_xy(s, x, y2); @@ -594,11 +597,11 @@ 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; + int y1 =3D (s->vt.y_base + y) % s->vt.total_height; + if (x >=3D s->vt.width) { + x =3D s->vt.width - 1; } - TextCell *c =3D &s->cells[y1 * s->width + x]; + TextCell *c =3D &s->vt.cells[y1 * s->vt.width + x]; c->ch =3D ' '; c->t_attrib =3D TEXT_ATTRIBUTES_DEFAULT; vc_update_xy(vc, x, y); @@ -650,17 +653,17 @@ static void vc_put_one(VCChardev *vc, int ch) QemuTextConsole *s =3D vc->console; TextCell *c; int y1; - if (s->x >=3D s->width) { + if (s->vt.x >=3D s->vt.width) { /* line wrap */ - s->x =3D 0; + s->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 (s->vt.y_base + s->vt.y) % s->vt.total_height; + c =3D &s->vt.cells[y1 * s->vt.width + s->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, s->vt.x, s->vt.y); + s->vt.x++; } =20 static void vc_respond_str(VCChardev *vc, const char *buf) @@ -681,15 +684,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 s->vt.height) { + y =3D s->vt.height - 1; } - if (x >=3D s->width) { - x =3D s->width - 1; + if (x >=3D s->vt.width) { + x =3D s->vt.width - 1; } =20 - s->x =3D x; - s->y =3D y; + s->vt.x =3D x; + s->vt.y =3D y; } =20 /** @@ -708,28 +711,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 > s->vt.width - s->vt.x) { + nr =3D s->vt.width - s->vt.x; if (!nr) { return; } } =20 - x1 =3D s->x; - x2 =3D s->x + nr; - len =3D s->width - x2; + x1 =3D s->vt.x; + x2 =3D s->vt.x + nr; + len =3D s->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 (s->vt.y_base + s->vt.y) % s->vt.total_height; + c1 =3D &s->vt.cells[y * s->vt.width + x1]; + c2 =3D &s->vt.cells[y * s->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, s->vt.y); } } /* Clear the rest */ - for (; x1 < s->width; x1++) { - vc_clear_xy(vc, x1, s->y); + for (; x1 < s->vt.width; x1++) { + vc_clear_xy(vc, x1, s->vt.y); } } =20 @@ -749,28 +752,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 > s->vt.width - s->vt.x) { + nr =3D s->vt.width - s->vt.x; if (!nr) { return; } } =20 - x1 =3D s->x + nr; - x2 =3D s->x; - len =3D s->width - x1; + x1 =3D s->vt.x + nr; + x2 =3D s->vt.x; + len =3D s->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 (s->vt.y_base + s->vt.y) % s->vt.total_height; + c1 =3D &s->vt.cells[y * s->vt.width + x1]; + c2 =3D &s->vt.cells[y * s->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, s->vt.y); } } /* Insert blanks */ - for (x1 =3D s->x; x1 < s->x + nr; x1++) { - vc_clear_xy(vc, x1, s->y); + for (x1 =3D s->vt.x; x1 < s->vt.x + nr; x1++) { + vc_clear_xy(vc, x1, s->vt.y); } } =20 @@ -781,8 +784,8 @@ static void vc_save_cursor(VCChardev *vc) { QemuTextConsole *s =3D vc->console; =20 - vc->x_saved =3D s->x; - vc->y_saved =3D s->y; + vc->x_saved =3D s->vt.x; + vc->y_saved =3D s->vt.y; vc->t_attrib_saved =3D vc->t_attrib; } =20 @@ -794,8 +797,8 @@ static void vc_restore_cursor(VCChardev *vc) { QemuTextConsole *s =3D vc->console; =20 - s->x =3D vc->x_saved; - s->y =3D vc->y_saved; + s->vt.x =3D vc->x_saved; + s->vt.y =3D vc->y_saved; vc->t_attrib =3D vc->t_attrib_saved; } =20 @@ -828,21 +831,21 @@ static void vc_putchar(VCChardev *vc, int ch) vc->utf8_state =3D UTF8_ACCEPT; switch(ch) { case '\r': /* carriage return */ - s->x =3D 0; + s->vt.x =3D 0; break; case '\n': /* newline */ vc_put_lf(vc); break; case '\b': /* backspace */ - if (s->x > 0) - s->x--; + if (s->vt.x > 0) + s->vt.x--; break; case '\t': /* tabspace */ - if (s->x + (8 - (s->x % 8)) > s->width) { - s->x =3D 0; + if (s->vt.x + (8 - (s->vt.x % 8)) > s->vt.width) { + s->vt.x =3D 0; vc_put_lf(vc); } else { - s->x =3D s->x + (8 - (s->x % 8)); + s->vt.x =3D s->vt.x + (8 - (s->vt.x % 8)); } break; case '\a': /* alert aka. bell */ @@ -910,32 +913,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, s->vt.x, s->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, s->vt.x, s->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, s->vt.x + vc->esc_params[0], s->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, s->vt.x - vc->esc_params[0], s->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, s->vt.y); break; case 'f': case 'H': @@ -946,9 +949,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 s->vt.y; y < s->vt.height; y++) { + for (x =3D 0; x < s->vt.width; x++) { + if (y =3D=3D s->vt.y && x < s->vt.x) { continue; } vc_clear_xy(vc, x, y); @@ -957,9 +960,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 s->vt.y; y++) { + for (x =3D 0; x < s->vt.width; x++) { + if (y =3D=3D s->vt.y && x > s->vt.x) { break; } vc_clear_xy(vc, x, y); @@ -968,8 +971,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 < s->vt.height; y++) { + for (x =3D 0; x < s->vt.width; x++) { vc_clear_xy(vc, x, y); } } @@ -980,20 +983,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 s->vt.x; x < s->vt.width; x++) { + vc_clear_xy(vc, x, s->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 s->vt.x && x < s->vt.width; x++) { + vc_clear_xy(vc, x, s->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 < s->vt.width; x++) { + vc_clear_xy(vc, x, s->vt.y); } break; } @@ -1013,7 +1016,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); + s->vt.y + 1, s->vt.x + 1); vc_respond_str(vc, response); break; } @@ -1066,19 +1069,19 @@ static int vc_chr_write(Chardev *chr, const uint8_t= *buf, int len) QemuTextConsole *s =3D drv->console; 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; + 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; 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 (s->vt.update_x0 < s->vt.update_x1) { + dpy_gfx_update(QEMU_CONSOLE(s), 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; } @@ -1137,7 +1140,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; } @@ -1168,12 +1171,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 Tue Apr 7 01:06:58 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=1773737558; cv=none; d=zohomail.com; s=zohoarc; b=cIYMrAWXYZSnJDeKIROEB42AR1Aem8B9MVnbIrDFqH5Szazm+n7dfhoxDA/3W4s+ehVeCybJ57VeE/Be6r7+FDyFh+YDDG5a9SYqiKHjaPyKAY7VAb37jW4OYLKqQfp++d4kgVylZmLqUilogTn7pR0qDIBUKLy9hmtWt3kRDvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737558; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=v84VBpSQgz2PPhXB8Ma6dazp9VnMQEVtuOehucqBMT4=; b=BD0hr3ZMbMSrMpKB/bXKEyZVLaoCrudsBunolrkvvSUuDPE91SPThwrJmk1LJ5utZWe56bxNiqSzvVV7eZW6bhfRmDiuEEVz5AQfdwvan8JXHDkq/bMhn8F03kBTwYOIttbV1+D3AuiSZQNg6oIaPHbCZTryiX10sNz8rmfsNTc= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737558448744.2160403696522; Tue, 17 Mar 2026 01:52:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QA8-0006Ve-Rd; Tue, 17 Mar 2026 04:52:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2Q9w-0006MO-SA for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52: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 1w2Q9u-00036c-JU for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:16 -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-631-XQubV-tqPiaFLNgCpTxx6g-1; Tue, 17 Mar 2026 04:52: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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C127A195609D for ; Tue, 17 Mar 2026 08:52:11 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C7CD61800107 for ; Tue, 17 Mar 2026 08:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v84VBpSQgz2PPhXB8Ma6dazp9VnMQEVtuOehucqBMT4=; b=Yi8E3zVoKMWPiLDXFZknodOPkY2pvuDlitgox6tb4xrbicNPrSB6jhB6bk3HrIYoujCon7 RsNd6183LRjOrriJhU59Jor1j6/OxTymHueil0n5BiTgToTthvz7nlXl9D/ByTQbRiwPre tXPJeldz5i1Xq/8g967oNQR1epiPkBM= X-MC-Unique: XQubV-tqPiaFLNgCpTxx6g-1 X-Mimecast-MFC-AGG-ID: XQubV-tqPiaFLNgCpTxx6g_1773737531 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:30 +0400 Subject: [PATCH 16/60] 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: <20260317-qemu-vnc-v1-16-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=6201; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=dllytJgn8BKfG5SylgaGTl1vNecfGPX/OUJOPjb45E0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaArWNiEtVi6lekkhc2CEcWwxRhZXRmSb2M LAKXbtObqyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5fuHD/oDCDqWf82576YCPgvVbrpf6mh4XwEGXOVSBPhv6c4Y1iz/pAAP/OOy5xUnjdwL4P5HBGF AkJn1+suljEw5Eu5RV1ZnP8VOcuK86odDC/vfriHIsZOYt1Z/3C67sbBY5yTN8dACaOF5QWZ4B6 oAQkQ4gzKyuxR/SWLwXVOs8wMxV90xZzUkMUB0gwUYJz0A+pka8n7RtBppDGcVMbE2JuYNqpBwr E9qi+/1ZVq3xcM2uk1WrGHpBwdFDOVXfD8os6TuxTg5vVNHI1Nrt12/SeR6+UmRk3+y5m3a1NDR ipvwYDYOwxKMaAeGxF5d8VU8+fUYuedUG8KYulzHtIVCOYaHi8wrSaKPwEkmR1zVwbjmvqp5eYm oHNseQAMx6BEIOpW29BuVV60ZqozFbVbOHtyjTXsDO7HfDCDbmaF8+Af1axUb8QfVGI566ExEBL aA2mHxl9ugQ9f1/cZaVrXccDfG+lUAbdgguluSdnCDXf12W+GSzPnTBX2tj9E7C9jSiwgJGgN5k +Yr2VxAF+YqMtVAhcZliS6HaXbeg6J770GlJjlpKKWWFIPomeGdDPgdLOqoKApc1Xrjxx2F20Xc qJpT1rZk4fOjA9rSZClx6zrNyUqeGxiJF5avD3Tc7J2sVVJyjH3rdnGQoPwo7fCFrF9QR8dtF7N iDvjyydN6LawFFg== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737559787158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 41436a38eb5..0e0a9ad245d 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 @@ -230,19 +226,19 @@ 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)); TextCell *c; int x, y, y1; + int w =3D pixman_image_get_width(s->vt.image); + int h =3D pixman_image_get_height(s->vt.image); =20 - assert(surface); s->vt.text_x[0] =3D 0; s->vt.text_y[0] =3D 0; s->vt.text_x[1] =3D s->vt.width - 1; s->vt.text_y[1] =3D s->vt.height - 1; s->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(s->vt.image, 0, 0, w, h, + color_table_rgb[0][QEMU_COLOR_BLACK]); y1 =3D s->vt.y_displayed; for (y =3D 0; y < s->vt.height; y++) { c =3D s->vt.cells + y1 * s->vt.width; @@ -256,8 +252,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) @@ -394,8 +389,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; } @@ -456,12 +452,12 @@ static void vc_put_lf(VCChardev *vc) s->vt.text_x[1] =3D s->vt.width - 1; s->vt.text_y[1] =3D s->vt.height - 1; =20 - qemu_console_bitblt(QEMU_CONSOLE(s), 0, FONT_HEIGHT, 0, 0, - s->vt.width * FONT_WIDTH, - (s->vt.height - 1) * FONT_HEIGHT); - qemu_console_fill_rect(QEMU_CONSOLE(s), 0, (s->vt.height - 1) = * FONT_HEIGHT, - s->vt.width * FONT_WIDTH, FONT_HEIGHT, - color_table_rgb[0][TEXT_ATTRIBUTES_DEFA= ULT.bgcol]); + image_bitblt(s->vt.image, 0, FONT_HEIGHT, 0, 0, + s->vt.width * FONT_WIDTH, + (s->vt.height - 1) * FONT_HEIGHT); + image_fill_rect(s->vt.image, 0, (s->vt.height - 1) * FONT_HEIG= HT, + s->vt.width * FONT_WIDTH, FONT_HEIGHT, + color_table_rgb[0][TEXT_ATTRIBUTES_DEFAULT.bgc= ol]); s->vt.update_x0 =3D 0; s->vt.update_y0 =3D 0; s->vt.update_x1 =3D s->vt.width * FONT_WIDTH; --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737857; cv=none; d=zohomail.com; s=zohoarc; b=iBW/9sUsCyCCvnvarkix0iWGRIlxhg6df59/jxG4yrbqSJnwkvqBo21486lrA/okGc6RGAi8vO7E1ZQZXF1NKgnLzk2j0+lZJaw8naoVn7+LANeW7SM87N1G6D5SQ+5SuTnHh4nFXBvQWs8artTR7grNr6h5nzntL6H/p27GPag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737857; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=JunWrlOjUaBqWEYWaxVNRGfLgE6IGyNbEZUn9hvzWBE=; b=dhtxJ6NfkSscCXtRERhRfzymjlAqKU3D/fV7MfCd4bU2IiK/aUQdr/6dLkrVvoEegNNjkhmTwL+tPXeAO2UQASkLjOPtXjuzmWvuILgamIDYlwWQA3l6YvZ7Er/SCU265JarBABmQ+PKIJ6fZq0Q3WRgRmCAy9t2XPgvXTqXiOM= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737857442713.8103481903031; Tue, 17 Mar 2026 01:57:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QB8-0007w1-2v; Tue, 17 Mar 2026 04:53:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QA5-0006XY-Cw for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:28 -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 1w2QA2-00037S-3t for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:23 -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-270-MB51PgVvPMyeJtSZ9E28QQ-1; Tue, 17 Mar 2026 04:52:19 -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 28ABE19560BA for ; Tue, 17 Mar 2026 08:52:19 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 115D918002A6 for ; Tue, 17 Mar 2026 08:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JunWrlOjUaBqWEYWaxVNRGfLgE6IGyNbEZUn9hvzWBE=; b=HPCoJUBDqMW3S06sb6hqzZdW/u6xSucZ8l/QwVSPd+hK+d9BoNjIUSEmqW/73ucJJ+wEpc FXvWHYOxetnmJyDTdP5rUy+uhrKhZuXs482WYgVhBY7fhgQ/pUelGohh3q7sNejiIb1Fug 3pwuDOW3p/lQMlDQX9zmMla6PQ8eB8c= X-MC-Unique: MB51PgVvPMyeJtSZ9E28QQ-1 X-Mimecast-MFC-AGG-ID: MB51PgVvPMyeJtSZ9E28QQ_1773737539 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:31 +0400 Subject: [PATCH 17/60] 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: <20260317-qemu-vnc-v1-17-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3083; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Q7H7Ck2laPDFYqsQ0lbaAjfNMqA0Xc1//VoNWqqey40=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXahKLWF1Bk4yqKMUkw4vrztcmdigtgahq3a ZZTQhHhq5qJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5X1WEACOQfjBmgbLGEh6GbI1Yddv8ow/dlLTygkqVh3lPV1tfs5Z75+aEZQMPkWtnFEDUG7aCL/ sKKoOTp6bGHSB00BOMZWFBnwyXG+bqNBUAjcev4+yjpdVyTsrJEdoH+Ui6Th9eGF+6oC6/79y7+ nPVZVy9agqDoiS3M//KrO1Z7beZxg4VyrSKo1SsjiHewO4CTv+hi1bMJekrcFCnnE0mG11xL936 W2lzMe51rxmp6McHOcdI0OkJHBVmsmi2IXF/favZ4IPvBQBDxZNWQ5bgyltfJLwpn1VUtOIVHtR 7ULdVbZwWvCJwaRz3dc0QQ3g6LI/1gHNA4xbGwCS2RlbF8ecBzj3JLqiRACa/v/Qv+DNUO/+0/V hX+fcVW7r/TGRZpJsdQ1CRcimzHULz3vIMO2eASS2QianRf9GUYIxJkzMfU1LHAW0pXBKqhDnk7 aplxIiwL/Cy/cRfj7Y8TO2kYh05DoXXeXkWnBK32rHWtm2FzIZRP/Aj1iZgcTlN8KTe8RH1jkJ4 HBo3l1Jn0zOGGOlRX8bRWR/2yWA6blLwwaOR7F1V6tLs8f9s8cUto87HG1PMNSrY/oLxT2iIEov 07yfb8IwdmlXza/c17rLPEyhuUoprGboBHrTokIFARHilxlEqM+v/RAEte6kFCWOvOZgpxoia3C ch7b4OCP0BH0eGA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737876981158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 0e0a9ad245d..c730a8a52b8 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 @@ -216,9 +215,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); } @@ -243,7 +242,7 @@ static void console_refresh(QemuTextConsole *s) for (y =3D 0; y < s->vt.height; y++) { c =3D s->vt.cells + y1 * s->vt.width; for (x =3D 0; x < s->vt.width; x++) { - vga_putcharxy(QEMU_CONSOLE(s), x, y, c->ch, + vt100_putcharxy(&s->vt, x, y, c->ch, &(c->t_attrib)); c++; } @@ -584,7 +583,7 @@ static void vc_update_xy(VCChardev *vc, int x, int y) x =3D s->vt.width - 1; } c =3D &s->vt.cells[y1 * s->vt.width + x]; - vga_putcharxy(QEMU_CONSOLE(s), x, y2, c->ch, + vt100_putcharxy(&s->vt, x, y2, c->ch, &(c->t_attrib)); invalidate_xy(s, x, y2); } --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737684; cv=none; d=zohomail.com; s=zohoarc; b=DO6IV+q/iLJaljdXjUe+tkiJV5tUVfB/1nqk6J42HKN5bflqVPCDGK30/R+4D4AAnL7Wfqw9uleZqy+QbXwNaEXgCu5qY5w9cAhWf9bYFC+WLof3Pn+20FjkMdrkJAUPtYGASBt53bzKDgh7z3eNGd/ibxmIwtujOGD2tT/4vrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737684; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=zhtt844qJCBla7vAdeQO83fRNPACQxKpvzJlDF+Oc8A=; b=WhWBjeQFS2Px701bQW0NT7bIgnpGmPOR37nHPT8HnfI4toMpX9r3KdB8fG/LRkzPzO5P2buu4mWECXKjny3PGuQmkfLc8U9yR7e/I0LCA7jUNXWFdp9becNhLxvYyYQiD4Tvt7EdjUOIDVIPqHab06qL35fE1xXip8sT9jrYV9k= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737684458597.8551510594252; Tue, 17 Mar 2026 01:54:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QB4-0007hh-Sw; Tue, 17 Mar 2026 04:53:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAC-0006eG-5R for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52: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 1w2QA7-00037m-UW for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:30 -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-692-qO4_Rx8GNCWpAgYFBNKIrg-1; Tue, 17 Mar 2026 04:52:25 -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 DD8D019560A6 for ; Tue, 17 Mar 2026 08:52:24 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C44DC1800107 for ; Tue, 17 Mar 2026 08:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zhtt844qJCBla7vAdeQO83fRNPACQxKpvzJlDF+Oc8A=; b=GbNq2bX6DauzVDhVzOFYsYow1efPXRfzOElmZeskrSgHKj5YBSRWQjujneWsHlHzYxFKF1 CPraTfiyy5PYZv2hf0crqvxYEgxrqCH5nl4bsUUCrhbjEeHjrkoy+OxRiND3S0h+ZgBXhp ZEkZzq8RdNLIYWczWvBXdmGUVvERmTc= X-MC-Unique: qO4_Rx8GNCWpAgYFBNKIrg-1 X-Mimecast-MFC-AGG-ID: qO4_Rx8GNCWpAgYFBNKIrg_1773737545 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:32 +0400 Subject: [PATCH 18/60] 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: <20260317-qemu-vnc-v1-18-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2289; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=/BrEMOT5CCiPx1ZrI4u2e6B2BAwyWH8wfQvslbfXeGA=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXa/JaCs2JASR2Izxodw6Hq/A8YrN1HrQqiJ uluf5+qzliJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5T/tD/9FGzTOGcsHAnTEjM4eg0t+CKCiMDCCoKtXHdaiB1MYPMRfdsGNezjAQQxRo3KxarPGxko c6lkYvVtlrfFSN0WrqFNYcFIgf6+78ZTl+7VDAoMiqU4EJ2R4uN7pPwqX+qahGxAo6xZOqZ/Rww kWsPDyDNTq9gUpREwQG9SAxyk04k2RSbqfaxG1iB+0Nj/8lkyg/ziuBxQ3CVGUqm8bmD0XftdIz CQfnYbf4FTFaQofkPIp9cj6ItV1yWDfFm5DNNmmGhD5EpYKg/Ri045iSd9378q9lLnZn/ts7cjp 4fVsjC7bPsQ1KXLTR6jeMkgomDgb4fj3glPIseSwt48snEh785ORsfa2ArRuwNA+QOyXhj6TW0t bFF54TiYJnJ00D3RVp0fD02+pEb3fb480xTCTc3n3rpq9XxT6VJc3s7xyC8LHtOLjg++pSpK89E foiWjqV06yBHT4VpD4PJNVlpKPvFQwG/FCDiph3ECjfxxFGJrDvTlELMutB+Hd1VguqOY9bgdDs kTSzSaH2r2A8NEDvGa86qrlvWFM/0lM98TszIVrE1Krrg0vAteiUpSz9HHpA4jl6qPhIuqjE55F NSxUNNDfxPeh7BAhELaWp0P87Ew+lzFiKIiBKqHz50jIdxNc9ArH8C1FDz8Xh/Q2KyA7N2VYXTx 6QyXI/sx9JY4oPw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737686423154100 This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Style fixes. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index c730a8a52b8..4117429a508 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -179,19 +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) { - if (!qemu_console_is_visible(QEMU_CONSOLE(s))) { - return; + 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; } - if (s->vt.update_x0 > x * FONT_WIDTH) - s->vt.update_x0 =3D x * FONT_WIDTH; - if (s->vt.update_y0 > y * FONT_HEIGHT) - s->vt.update_y0 =3D y * FONT_HEIGHT; - if (s->vt.update_x1 < (x + 1) * FONT_WIDTH) - s->vt.update_x1 =3D (x + 1) * FONT_WIDTH; - if (s->vt.update_y1 < (y + 1) * FONT_HEIGHT) - s->vt.update_y1 =3D (y + 1) * FONT_HEIGHT; } =20 static void console_show_cursor(QemuTextConsole *s, int show) @@ -219,7 +220,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 @@ -585,7 +586,7 @@ static void vc_update_xy(VCChardev *vc, int x, int y) c =3D &s->vt.cells[y1 * s->vt.width + x]; vt100_putcharxy(&s->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 Tue Apr 7 01:06:58 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=1773737693; cv=none; d=zohomail.com; s=zohoarc; b=FQAtfLyejGVUTpPUe2xQ0Ina2PrKViBXdXVcRWStNf7ghDtdzNxN3iaJar0a9OQpGJtSBLh29HEhqMi5EeUY1BfjndbjWXlCTFBqQVTSSuL5kiI2tbOjGHDVtwDpiBF0fiQKsjfT4Hd7xT65XXgNboyOHmh36a89gKgm0KYl4kY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737693; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=PPgZoVBC3b4nDaEUUg80+XlVnCSXlIOSgM1V9iyuX24=; b=I/Qr/iyezNrJIVvjBw74zdkUP+EPAUsKoTpJDPsHJLuWsloVwHuGntX08DNgZ0kLrneDYvqxrDEktel24hgOTMwJG1OOO6XEqPu3sLkiwBfQeOPWWZXe4HgXn4H2pt0HM5HxHhKOg/Ldm2SglHZGSuEJYu1wxAu9RWNK1depJKw= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737693189820.1296302106535; Tue, 17 Mar 2026 01:54:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBF-0008ND-ST; Tue, 17 Mar 2026 04:53:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAF-0006hG-SL for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:39 -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 1w2QAD-000384-7F for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52: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-27-oI_BlhmWMSu-lNKtlZMikg-1; Tue, 17 Mar 2026 04:52: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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6946F19560A6 for ; Tue, 17 Mar 2026 08:52:30 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5135D19560AB for ; Tue, 17 Mar 2026 08:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PPgZoVBC3b4nDaEUUg80+XlVnCSXlIOSgM1V9iyuX24=; b=G+kfqdboKmsV9mWTA20hDceety8IpdvROUX7watf+pZxGQw1BU+ERoA389skc281uUlai5 eEIbAd/GA8GJYDpqi6WZiHx8bjutj2VsxArYbqbnG6N5CNazXgcMZsFyadHPucPrK2K33+ GxdSe8X74VOfBOJ6jx4EgZ9xHsa671U= X-MC-Unique: oI_BlhmWMSu-lNKtlZMikg-1 X-Mimecast-MFC-AGG-ID: oI_BlhmWMSu-lNKtlZMikg_1773737550 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:33 +0400 Subject: [PATCH 19/60] 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: <20260317-qemu-vnc-v1-19-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2790; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=NyYSvih93rJd1CyzwrhBo41dWBooijMHyzc0vvlvhBE=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXa9/4+mZMUFwBNqLlVzWSmXQSJR51b1lVMA n9B0VnZvH2JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5XnKEAC03bgMrLW8YzW0GcFMPHiXUIYb+aDc4kfBdEa8moHwoAwHF/00maC2bmEZeZRfPfbl1VI ZD5eAiQiQ2sQFucXwX8Mt4KfndeWslz3iGm8zSespwPNs828gI0EuLuIfsEccBjO/RGBNFHHfyX prVsF7MI7xvZfYQ1DILZLVgl3lnuRAvn2FFGZ9Nrx/gVw0kicla+lZLJDXEA4yY5bJggJrqk2rI 4bbt9fanno0jSQD8BOGlD/v5g8XpCdwWUF5A6KPs1G8Hqn6c6DikDrnMl6n21yFc0h7I+Hdd7mh hLAgcJwEKRmVT7V/h57QP461DW2gKcL3QAk3woaYVYaDI+3Rugc42hrGzXYn1OmF4NFvcw4bCfj iCsh5H8aLKkKk7QcmnljpLmTPZN71ZIqv/GFrMxnXR0DtJeSp1gsvw8b0/c5kFltJ1o1JyGwyQk ga0dtepvzLFRyo3g2J7SYDt44WgCqWO2oniAekL1/jX6UQwOu/iGbW9xlFENQqYlYX+99Z7Ypuk Yn5WnSZCy4E8dhc9gnnN14xWE0yzkmU5ZCTV3PBnoYC0gQVBfNDmYCdFM9xy9DPs6VYbWn6XeXm IUXgBtBSXZ3l6O2XVdgh2WsQKrRfoVDtH6wPECxIeUhOpsf3RgvnVK4j1goEWCxJZunB3A7BjcO Xfjw0Orf2+xTYMA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737694635154100 Decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 4117429a508..56e2527c7a2 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -195,32 +195,32 @@ static void vt100_invalidate_xy(QemuVT100 *vt, int x,= int y) } } =20 -static void console_show_cursor(QemuTextConsole *s, int show) +static void vt100_show_cursor(QemuVT100 *vt, int show) { TextCell *c; int y, y1; - int x =3D s->vt.x; + int x =3D vt->x; =20 - s->vt.cursor_invalidate =3D 1; + vt->cursor_invalidate =3D 1; =20 - if (x >=3D s->vt.width) { - x =3D s->vt.width - 1; + if (x >=3D vt->width) { + x =3D vt->width - 1; } - y1 =3D (s->vt.y_base + s->vt.y) % s->vt.total_height; - y =3D y1 - s->vt.y_displayed; + y1 =3D (vt->y_base + vt->y) % vt->total_height; + y =3D y1 - vt->y_displayed; if (y < 0) { - y +=3D s->vt.total_height; + y +=3D vt->total_height; } - if (y < s->vt.height) { - c =3D &s->vt.cells[y1 * s->vt.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 */ - 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 @@ -251,7 +251,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 @@ -1069,11 +1069,11 @@ static int vc_chr_write(Chardev *chr, const uint8_t= *buf, int len) s->vt.update_y0 =3D s->vt.height * FONT_HEIGHT; s->vt.update_x1 =3D 0; s->vt.update_y1 =3D 0; - console_show_cursor(s, 0); + vt100_show_cursor(&s->vt, 0); for(i =3D 0; i < len; i++) { vc_putchar(drv, buf[i]); } - console_show_cursor(s, 1); + vt100_show_cursor(&s->vt, 1); if (s->vt.update_x0 < s->vt.update_x1) { dpy_gfx_update(QEMU_CONSOLE(s), s->vt.update_x0, s->vt.update_y0, s->vt.update_x1 - s->vt.update_x0, --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737693; cv=none; d=zohomail.com; s=zohoarc; b=hkAGcFZpOpJWPZRJIx7XX+CdBENozp06SVN06uEP6tFqmBhlpH4CiUkQb+2pg7N/X7Vl3fZPEx2ALw7tWb/jYf3Z88rocrfDViWDJ6M3d4Y1fZP63D4dl5dAqGJMn6xH+uJ7Qkqfiqw8oayg38wyhfXoZbl3VLcNQTa6yE3iJTU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737693; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=icavOFnsmAC1wS6wmw3ja7szZzT5oFLYJ+Vr5KEo2/o=; b=DY2clO3W9NlfrYbvkaABzl6N6h4C4RYbAdRVONj3YaUaQLedX3J3gaWgjhoMiN5yit6KG2NhhYMmvPxmfPtTiMdI9TkRp4bcvWpRdXECqyoMn6qJikD4mU9awvCArIjgiraZFCz2bm6jNcPROiyqOsNbVfjtHACtDWAtVXXuxVg= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17737376933311013.1021959428138; Tue, 17 Mar 2026 01:54:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBQ-00007J-7V; Tue, 17 Mar 2026 04:53:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAM-0006ml-Ng for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52: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 1w2QAI-00038j-KD for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:41 -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-264-A5NN-3EcOcGAobn7FNQlgQ-1; Tue, 17 Mar 2026 04:52: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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 90D1519560AF for ; Tue, 17 Mar 2026 08:52:35 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8735619560B1 for ; Tue, 17 Mar 2026 08:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=icavOFnsmAC1wS6wmw3ja7szZzT5oFLYJ+Vr5KEo2/o=; b=iHeaZtPfE10PIRbVNjEQNFZlkDTU22N63c6WY2brM8shI9TI+nKgz4QHR0pn21JoLpvtwj 5lHPlekww8407EYiMXcGm1fWp5gqbc7eVpyz+POKV3g1nZCZPPlASjW3L7/MAj03WttQhT 9PDSkctZU5pq6c0mInWvlIy7OUGh/VQ= X-MC-Unique: A5NN-3EcOcGAobn7FNQlgQ-1 X-Mimecast-MFC-AGG-ID: A5NN-3EcOcGAobn7FNQlgQ_1773737555 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:34 +0400 Subject: [PATCH 20/60] 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: <20260317-qemu-vnc-v1-20-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3290; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=sHcJ5/rnJHucB0PSSk12z+Rxraq4pYFLDXw8PVc5SzA=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXai0p2aqEA0q0cKMoGNQf1cVq2kYTT+91LJ rO6Q64oE8mJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5VKFD/9zpnYIKxm9GTDlYuQ3zy+4/iMOfCRGvLAjUPXTMM0pUUYI5KotAsxs2glVpsUwdsqL7E0 /BfPli+rcUhGTqrDRa1OHNbAkCoCDVmZRgPQr9+uJ+sQGssWZIiG93CweWeHNK+3yP1drahA8i1 ZPxbeApjQEDBmIrSo/DZuWm1CmEX7OoUryLnfmX48k4qC7J387D5JFwGj7i2CHQKoON2cFWylWF HrcvWh8x0n22HX9Wl9eNh3Pdg8kDwp59+uveLuQ817nRpiF1Chg2Tg1cLuIOEPMZ8qH9XzlKZe6 fcrjdZROcwqmv6y0C+qJDmxDw8UuWfGcy13bEbhs+lQpq8TWlEaDYyZeA00yn4Ujeq6DTIxcS4A N0bN4AAcIfdYfMN9vlEBTTMmAL2Nk+QdETDGBZL4xpPMszsGlYklkqDjbnGW08N2fxxmj2WdAmh 6EY41u8oA8yJGIxHJlg9dIbDIw7L6T7rI5o70hNYMD+uSFDQlWAT9T8hCaTsulHRLh8ZpwRWwYF O72AAzoMpRYSaeRYPoM2oylyX8AuMKzgMGr5KbHVMvTTGRFXXXFIlGPWPzEJFOjhazi7veKhJji uQLNF8NEjWRxxbRnsWOfz3faejZcNOOgQjcEse8lvVJNsokRkGGCzErOCd7k5n2wCiSxF7rcwfU LA1jPLUFb4BjJXw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737694774154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 56e2527c7a2..8a18659036f 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) { TextCell *c; @@ -252,7 +260,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) @@ -1075,9 +1083,9 @@ static int vc_chr_write(Chardev *chr, const uint8_t *= buf, int len) } vt100_show_cursor(&s->vt, 1); if (s->vt.update_x0 < s->vt.update_x1) { - dpy_gfx_update(QEMU_CONSOLE(s), 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_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; } @@ -1175,6 +1183,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; @@ -1205,6 +1220,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 Tue Apr 7 01:06:58 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=1773737694; cv=none; d=zohomail.com; s=zohoarc; b=XUO5y72+SnKNjE6KwCB7ndpRwlIag0hZQfvmB8FuuWukLU79ok8p+V2E6SIrnjAzDqhuiJQc03GpafPIOXPXWFk56o+luPycT/f0K3AK7iTEeX5i+wZ+S0eDh9QN97hH9u5hUtyPMa2Omgy19w4Ofujh5VnvQYIZXALtuiC7GLk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737694; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=TV43fbeXkmMagiHlbdfR05piBLoT3juwzXVH0wLZtt8=; b=Q9J88sb8mElpBm8NfMvCSJWrlaYRoNMaBcBXTRgEtBMISynuP9eEzU52sJlwDgz0H06B8nCC1NqDBm8oNszadq8swRf+DWPxvivGGZ1RxV/mD6fQuSPkQIGWQPP4BqhDJSVHWEBtqhizwU9d2/ucOZHHozmFqDKmaymB2h7TUPU= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737694104748.4146353666275; Tue, 17 Mar 2026 01:54:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBC-0008DW-V8; Tue, 17 Mar 2026 04:53:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAR-0006v7-Hs for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52: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 1w2QAO-00039K-HN for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:46 -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-472-p7xKiseiM0uCAffAdyM05g-1; Tue, 17 Mar 2026 04:52:42 -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 063951956056 for ; Tue, 17 Mar 2026 08:52:41 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D70D51955F19 for ; Tue, 17 Mar 2026 08:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TV43fbeXkmMagiHlbdfR05piBLoT3juwzXVH0wLZtt8=; b=G9W+Nh+Ni4DVPtj/4KsBBA/KIlSZ5fRIsD4p3FbV2wUba9tlf9QnE351/wnXJ3WI2BThnc GipzoNDmxRZYT+ICdPKbRCHnlYbKxbefLxfGx7BVIxMz6ZxRF87s12YCIoyYzCfK/8Qg+v qj09T3WbFdVor1yUESevfJATOh2BGGE= X-MC-Unique: p7xKiseiM0uCAffAdyM05g-1 X-Mimecast-MFC-AGG-ID: p7xKiseiM0uCAffAdyM05g_1773737561 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:35 +0400 Subject: [PATCH 21/60] 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: <20260317-qemu-vnc-v1-21-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2827; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=wh7049aWb42j3hAztzpyZ9eVmnSmItAg5RiicXmbt9M=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXaXdpRqo7VQfFXTMudhy9quB64ePiHdeLIX VyTvj+yTfmJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2gAKCRDa6OEJdZac 5fxAD/9xMaiVOj+K5iQ+/4UiIKPwscg+UbQpWZlZM1fLHmY+SE8YO2aVJBRKSmdz5l+LZh75Nvu wCL4/zfC/ht8sWEpB82dzURZjVWerftRsMELX+17s2uft3fnd6nPu0ct8hS+j6AeFHwGQSksgpb +Jk0k10zrDs41T43vaLrfQJJjqoED1lsP09FLsruwpjUuJtKjUPPGJvP0qU4hQNXh/WwwV4PzgT Z39BMfTowTFYhHXSrxEgkHZ2MAjMUUr/P8nVMBwoHWcaEf7cJiAo35HKqIyPYeV13cE8FmDfHJm Dk+1b601b+HZDlDylaT9WC/WPlIB1kI6f3gSgAuTrFCBjCoZY7ETgbegHy2ckasK4trb7QQV+GH NVeYZs8XjbLcXjs4Mwen/mKClekHxKrcYc9xYWqpVtU3Ca4UvdnWwIne+MjzF1MfnSXKi6RtPkJ lAw0Rbw/kBHBvDX6sUv/C9AHA64gFgz6YLpf1IeQRv4CSQ8QbEyAg3kzHTfTQ9ziwAkr9a/dXFD H1pFwqF/z3s49ad7x81uvSxSnqQwpTsTbixodkqzYMsueC85qHol1kuVXk3oZcx66F2BS0jqBR1 4FyV152MlwAx4wj8BY4Rio/XIVYqaLqmrYbBY1egVlCOs+LJWUkPpD6GdHnhzjaEsjc2+HMpU53 ePkF6ENx8oii+pA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737696259158500 This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 8a18659036f..d2a7d527586 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -232,35 +232,35 @@ static void vt100_image_update(QemuVT100 *vt, int x, = int 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) { TextCell *c; int x, y, y1; - int w =3D pixman_image_get_width(s->vt.image); - int h =3D pixman_image_get_height(s->vt.image); + int w =3D pixman_image_get_width(vt->image); + int h =3D pixman_image_get_height(vt->image); =20 - s->vt.text_x[0] =3D 0; - s->vt.text_y[0] =3D 0; - s->vt.text_x[1] =3D s->vt.width - 1; - s->vt.text_y[1] =3D s->vt.height - 1; - s->vt.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 - image_fill_rect(s->vt.image, 0, 0, w, h, + image_fill_rect(vt->image, 0, 0, w, h, color_table_rgb[0][QEMU_COLOR_BLACK]); - y1 =3D s->vt.y_displayed; - for (y =3D 0; y < s->vt.height; y++) { - c =3D s->vt.cells + y1 * s->vt.width; - for (x =3D 0; x < s->vt.width; x++) { - vt100_putcharxy(&s->vt, x, y, c->ch, + 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 s->vt.total_height) { + if (++y1 =3D=3D vt->total_height) { 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) @@ -289,7 +289,7 @@ static void console_scroll(QemuTextConsole *s, int ydel= ta) s->vt.y_displayed =3D s->vt.total_height - 1; } } - console_refresh(s); + vt100_refresh(&s->vt); } =20 static void kbd_send_chars(QemuTextConsole *s) @@ -1113,7 +1113,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 Tue Apr 7 01:06:58 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=1773737801; cv=none; d=zohomail.com; s=zohoarc; b=iDAybnJO60GGA7RcY4TnRBx1nfpIX9nzuh73JNs5eRiUaslioS7eyio1qpY8HicbZ7JQ1riNCNX1mmuQIiW61sKilV/eiDvVAwHYIlDFK5Amxw2gvdat48F7+LmWt+D6TlzV3IL5fXifg+jAcCocTze54SijJrrf12uIHOqbySg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737801; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=S9nyli9BY8wD/CTz9U2BMlE1zq/HDRv1YjQhX67MylI=; b=b/z0V2b4kaltBPJhGDrmWmRSbJvGXFNzA4rYW+dEdoDHf7Lc65+6yqBnqSz2MZnbEHWSarMKi0+qAntbHzt5Ry7B8rdMcid5aN5u/u0aeuXegdoh06OLqQlVQL+JC79IE5Kke1LcJwjqGD/YbI5VS5zeXnnCOBLUtSHv8Li/eYA= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177373780176931.154507261652498; Tue, 17 Mar 2026 01:56:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBj-0000jo-DJ; Tue, 17 Mar 2026 04:54:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAW-00071t-Hb for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52: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 1w2QAT-0003A1-M4 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:52:51 -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-252-Bz95D4D-OqWdfGThVsEeYw-1; Tue, 17 Mar 2026 04:52: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 7BE7019560B4 for ; Tue, 17 Mar 2026 08:52:46 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7122F3000223 for ; Tue, 17 Mar 2026 08:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S9nyli9BY8wD/CTz9U2BMlE1zq/HDRv1YjQhX67MylI=; b=W1Ns1qT+vtAFgraSa6Tn1IueLX867yMwHpYqNB4fvDkkDW9+MjW6gYhLJDuegYuI66v1yl /v5emlEWfTtGm75nEVNxkyqYt1IJJ2cODLF+qM0Ag/35DnGXYRnEFTSf7rvIiwFBGsZ8ru xTMWewWyorTGFrkSoUaU88Uk2sj6bzE= X-MC-Unique: Bz95D4D-OqWdfGThVsEeYw-1 X-Mimecast-MFC-AGG-ID: Bz95D4D-OqWdfGThVsEeYw_1773737566 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:36 +0400 Subject: [PATCH 22/60] 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: <20260317-qemu-vnc-v1-22-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=5150; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=19Yda8rU5AGiPLr05ZJlrDxs/rzExrhqBPxO9Konvw8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbhrLMoyrH1oD2YCJyxEkxxQXGeCoP6rVuF zoBY5bcVeOJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5cavD/9DJA3gxl/S4u23ZVPRMpoJKN+oSbPmE51FozNGIwosbmjXwp1jWz9H0WrNH83jZk1yo90 8R6Lh3Fpy5lqR9dxsa9QuxiIsp06fq9dvsOXu32YIz1N3kDhuZb+p/vNMC3jWwCjKD/c8dswM7k pwZYPQBoGduQqZkqkq9fUzQgCxs2MjGdxH10OdfCiDPVxfLa3ZNxGz1nl5gegzNAu/01dQV14EU jrpy1EYwRYYEaUMdnEB3cnC4umleKOxopT9rxoMgQZgYH1cu4PbTb64WZtEoe5L+zcntH60wNK9 FvR3ZvV+DBLoOc21rchJd8nYJ626x0Wgafy88X4lbcPfcF6Vpa1/oDHHrxO0CoBST6Imhqn0JaJ IvMYIsgDWySCsDcUexRoO5wXejpQcbltM5bL/BMdx2sWoXWEmcdPxPtyaSGxaHohTRDsOWTSWPC PieJvxVPximR4BI9nUERaLQcaoBgJCJIiFCnO6+GZaJlx82CIo88YrGX2Cn7dvCRNLi7E1R4lDs 3pfWXT9ZYZKwgRqVBII65GKUykAsFlS/AkUb5i2ws9oRkuZCvvpI54VwWqmR66iZCvCRGA1D6aK Ol2/elZWFgVMn0kyeoiU1bbjUp67K58WDmwVJfRU7lr6/1rZK/d5Wotq0gfWhucdc5Nk7x6z6fd by5km5sGj01hFmQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737802278154100 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 4896e9e0e04..401e5a010fd 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 d2a7d527586..22d1128ee6b 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 @@ -1090,20 +1096,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) @@ -1119,6 +1133,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 @@ -1143,6 +1160,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 Tue Apr 7 01:06:58 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=1773737858; cv=none; d=zohomail.com; s=zohoarc; b=DfZMpjPIhQR6LLz63dvoAl7G8nEqwTeIf7+nhtTMejfaOD/4u/H1f/rFoTElyUQCdSUCu9B17DQP1hSOCA96pH9TuXe0x/vQwus7HcmPItHhlyP4cUPgTXlT7x3bK36IkyRUABIajv+syZVYiFSGpsbUScRFFngt/d2ZbNgSVMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737858; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=dc1IVpsqrJifoQWhJGaW7gKSSJjmAOhBW8BJtA1dpsY=; b=dY8/OxGI18AO65g47p6l7AbCb64VR2L+JTuwF+uEemw6dSg6xSe4XIvePszAVLLPIyKbkAL8UDzf86huBJBvwFOpT4OnzMd+MVIR4mWfhu7xA8m0kdZs/XBBDuGlVIqNSMao/iHA+DxzLrdRRyDLh1QPR/hiMHuvxdopJ1ab2NE= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737858862964.1630224720265; Tue, 17 Mar 2026 01:57:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBB-00084W-Tj; Tue, 17 Mar 2026 04:53:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAe-0007BY-Qx for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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 1w2QAc-0003AL-SV for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:00 -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-315-3yLBCL3pPU6yv5UPrdSTag-1; Tue, 17 Mar 2026 04:52:52 -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 C7C7619560BB for ; Tue, 17 Mar 2026 08:52:51 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CE8BF3000223 for ; Tue, 17 Mar 2026 08:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dc1IVpsqrJifoQWhJGaW7gKSSJjmAOhBW8BJtA1dpsY=; b=NJ9yERYUeq/0ZyQijVcgxnQxipy5rc1TiWkiMuoIirJaeBongymxUfRGjlNbmYu4kh7Hr7 B1YhMGEEEF5BM5IC8euj5C4WxsR9bsIcHvJY+fmZaADx3Z/MoNSFkibr3gEmBzqmbeicKl dVCkgnJmY50HQvPFxVppDd/STcbfZP4= X-MC-Unique: 3yLBCL3pPU6yv5UPrdSTag-1 X-Mimecast-MFC-AGG-ID: 3yLBCL3pPU6yv5UPrdSTag_1773737571 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:37 +0400 Subject: [PATCH 23/60] 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: <20260317-qemu-vnc-v1-23-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2751; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=p3/XhfZKxdc3Os8Qglmy6MKxOK7bn/ETt0Qao+PV3qU=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbKVIN5Akuec++M3Vt7inAzF6aURp3zE3pv sPwYzD78VOJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5cpsD/4j2V+x9z2gAOU7v8wOPe8nZFVcTp8z9L3Jh0Rj60wmPUdL2JlWGCdbhjfvvkiN4lhRTiR kdMsGs3ZQktpcLisKxooLaf2ZQmskuTJH/PJT0lpiPOPxMz77KNwQ2bIo6J9hJb0dnXVbgkY2Ft LreBLIizlv8bo/oSYfmHEYP7t5K4VZ8btPZ81Pih9WyLD6KXotzKuY7PXReM7OPyIS/bC6/7JW+ iqiAmIv6Lqj2wov8KOb/yrJ/JYab9NEfcUidOCzk2klOUcijexGyNvZlZQVIkhIDkfz/rxpi08n JcQaejp+9eKRd+WfOtbGqX/0JEORvg0zPIl8hNs3Z5jSosokCaCSTt1M+bizD1j8KOROS03FTCE 7pB9/MVYU0aXYuUlkT4pTlv7KSIs6k1fa11YlqevZ8hEcvvBJdjrVUYnfmPyDQxd55rZyX9CgHq zg7swNwIIppGqAYgAw6Kuq2p4hbecU5WUGQgTrZj6/5I9VQ6k0uCxlyZ0A1be+JLV7nxmrFWc0d FQiAq4Uij/g2qApdq/fclRjiUeRWJ43x7xLgIctDuvzdRlyf/4aZ7Ea/MkeP3hgZbgocguAuvYT yJkWiooFeQht2Zc8ukUOsUF7Ro2bMQfqXWs+En8dhEFXxmXh+LBee9D+wPXGRyeSRK0YncOXqwh QUWq9zujQkFIiNQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737860920158500 This decouples glyph rendering from the console object, continuing the QemuVT100 abstraction introduced in the previous commits. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 22d1128ee6b..a45f4bc875b 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -269,33 +269,33 @@ 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) { int i, y1; =20 if (ydelta > 0) { for(i =3D 0; i < ydelta; i++) { - if (s->vt.y_displayed =3D=3D s->vt.y_base) + if (vt->y_displayed =3D=3D vt->y_base) break; - if (++s->vt.y_displayed =3D=3D s->vt.total_height) - s->vt.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->vt.backscroll_height; - if (i > s->vt.total_height - s->vt.height) - i =3D s->vt.total_height - s->vt.height; - y1 =3D s->vt.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->vt.total_height; + y1 +=3D vt->total_height; for(i =3D 0; i < ydelta; i++) { - if (s->vt.y_displayed =3D=3D y1) + if (vt->y_displayed =3D=3D y1) break; - if (--s->vt.y_displayed < 0) - s->vt.y_displayed =3D s->vt.total_height - 1; + if (--vt->y_displayed < 0) + vt->y_displayed =3D vt->total_height - 1; } } - vt100_refresh(&s->vt); + vt100_refresh(vt); } =20 static void kbd_send_chars(QemuTextConsole *s) @@ -324,16 +324,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 Tue Apr 7 01:06:58 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=1773737822; cv=none; d=zohomail.com; s=zohoarc; b=ADcg7CgR52P+/3vQ5lIIgtREEYH0go0cxBCo3Ijp0lYlvRrZ5CaCeRcOAzc+/XDLsuSgkNh4yCZiv9fHkYH2Bg6rLA9qVVw7hTpX4AsFC9t7EZ9mefKcqKsp5Tsq2AuIv3MjqKR3L0zum1Jlbf5DsR4mbBpsQjD8bWFAS/JC21o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737822; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=MuszwlzFazS/xLxRKGLnEKlT1TF42DEZ+anEnziEuy4=; b=Ljv/WQpJ06eJnuEmBFXeXEV9irmnfsyvj+Jv+yCfAr3nA/smPUOsRHe1XH4vnszeJzRnnq+0uXmxWwJKPE3dHtx2cyo4OLwnSgNvMfOXuyJ5ALtyTvUisi6CqyCrlWUU7xLkfckwiWBZTEZsaxuqL+Ty4Eg/ZcUR6+86xeKPu98= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737822802241.59172311838586; Tue, 17 Mar 2026 01:57:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBZ-0000Na-NB; Tue, 17 Mar 2026 04:53:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAg-0007CX-5o for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:06 -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 1w2QAe-0003B1-Gt for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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-690-VrYtU60POQ6buo5kWj3TmA-1; Tue, 17 Mar 2026 04:52:58 -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 6655619560BF for ; Tue, 17 Mar 2026 08:52:57 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0EA01180075B for ; Tue, 17 Mar 2026 08:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MuszwlzFazS/xLxRKGLnEKlT1TF42DEZ+anEnziEuy4=; b=YNwSm+mtB9LCan1PfPK9F74MCe2tltY/x9rnvMuZCwChcYSXzW3Lnk2R5Eu402jJdn3BP4 /5mKlIOPf+StYCSTnRfz1DCRefK1WQ362Z85CWnYmR0K/a5VPxFQJr929wo00rujc5EfPg ZBm2YmyY+Sq74r/dXw1TUfWl1q5OdUg= X-MC-Unique: VrYtU60POQ6buo5kWj3TmA-1 X-Mimecast-MFC-AGG-ID: VrYtU60POQ6buo5kWj3TmA_1773737577 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:38 +0400 Subject: [PATCH 24/60] 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: <20260317-qemu-vnc-v1-24-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3400; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=numOHj5C41+ncaC5yXhTFVXg90F23EL7KvI8XaI8wcQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbhYblaSb3rHi4/xDsDktjkt9T+En3gYY3d ukewfSe4RiJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5b0nD/oCQTjIhs377kmurH4+h5kF2sdWJ/x1tLvBMaoeYcrOLGEVsPTUkswZTYi0cIj8NwEwmOH KTVXH/zX3k9W1hW26zVeS6izp6V9h5HZ9Um72xpTN7DGkWhTqSpwrmZjwvoCrJHWXWdLNzoTZY2 0fw0ns8LN3ShChN6b2uM/kipO3414uDxVJu5pVWm9hJkscVHKw1a2NlSZ6gBSLa36QqYT1hQI7D s0wScpZQ605SixULZRsOqQ1Ab2Sp9WFqEY78dE2DVtVY3nNp2qIO3+e2oXUTzfg5H2stgR+ZsEr +NDGIoK8wExOQSC6uOBnAh43MLT1rsa/9+eFNTO9Feg9Feg9KKRTeAGM1wOtZoRlUHgMT6rUxRl UCQJJhz/vrDCDHaehmssXfcQ5vTovz4nIOLct0WdTR4OKkklsnBN/B6V5ZZqnYMNelk5M1Kx1R1 o6fKMVeK5VHi6uN6MEUirDxRivdny7gyTyrSHWTQg25QXJ08aUbgED4/gKdK6eujSzZspUikK6Q Npxc4+WlO7kJUIYtcfBaSUpoFRda97JCP11vjII87xx/yLaHX3UIjIVpT+ZfRVz9Zd4GujeBAWn Qieh+MXuHhcyijuXN0Q9FAx3RqMNLxiICRNQp0yjITCfZDZfp2/Jdg4JmFhcElXn7N9XBaSouLf cit7i2LpJMMHu7g== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737824727158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 a45f4bc875b..efb10c2f8f7 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 @@ -395,44 +396,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) @@ -1125,7 +1123,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); } @@ -1245,7 +1243,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 Tue Apr 7 01:06:58 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=1773738057; cv=none; d=zohomail.com; s=zohoarc; b=IrlK2MCOv6AKn+ysv5WPjw12a9r0EX/+G97Ewmti1dxwA+nAi43UZ42a7fyM7w/I9ek5V2ZyDRe+s6Hr+8IyPfCctAei44HlPGUQ8vDoHAgRcTxC0lvPJ62JkMLuvfZ5i/mCslmvmjA50UnOLu11pYsDlHSr4PR/DDYYw1AOkdY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773738057; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=RdRppLzXKV0kIBE71z9E6Q4mBRLBwBrL/zR1buSZoNM=; b=gtU5PVKyURSx5nIs62E4WdYSstGwstbcAzN0E5ex+JAYS+20o2nvCXjJTlZa2mVULd/Tle//esuC1073C9my2ALGv1a/zqCDRwn9pcZjnmmP57eT768Fht9aTGN0uORdW5NJBFKGTsnoOcR7fay5RON9L7lZOTHeOIF6wa8gBbs= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773738057024433.4584436780516; Tue, 17 Mar 2026 02:00:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QC9-0001SK-72; Tue, 17 Mar 2026 04:54:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAm-0007HO-Q5 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:13 -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 1w2QAk-0003Bc-1J for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:08 -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-244-dXb2IO_AOtO2RTEUZhzmhw-1; Tue, 17 Mar 2026 04:53:03 -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 F139B18002D7 for ; Tue, 17 Mar 2026 08:53:02 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E445D1955F19 for ; Tue, 17 Mar 2026 08:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RdRppLzXKV0kIBE71z9E6Q4mBRLBwBrL/zR1buSZoNM=; b=a5r6vKXWefvfAS5A8gflEBnJRyVTn+bspGZNTDLCli3A/w+Y6U4QPT/wvL21wLwC8vpzMD od1jTEXOjk6px1naj1wcD3s15zxva3xh5NplBMIYcA6kKi1/0prFoKN8gmGUsxHNQ8e9HA zP/UmZe0ZUkRlKpTrEvwxMLlmurO5rs= X-MC-Unique: dXb2IO_AOtO2RTEUZhzmhw-1 X-Mimecast-MFC-AGG-ID: dXb2IO_AOtO2RTEUZhzmhw_1773737583 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:39 +0400 Subject: [PATCH 25/60] 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: <20260317-qemu-vnc-v1-25-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=4710; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=pRlgbfn1PFr4rWekZjwkVZ7xjuyL5zukyCJBzUrOO0E=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXb6PQidHGdSHdfO2vzTJt89u3w4qX6Ua2R2 Aiozul6Bx2JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5bGND/sE5PUZ+Ww8TGEkgUtu0SyEyp23iGJBpxZ1PdvYz1Git934LMKMqhHh+xA44hCzs8JwHTe QRLrw7Q9B0qD05BN3rS53IjqtNm5Pejq9C2xWN29P6+pd43HTOUcSiRjOdJ9mdcODb0nkRQEQOE 3oycHXS05COm6pRdehSbcvBMFuxP1TB88USySylNaTodxYyIQE/XZ/Bw1AWGQ7+yi9+T8JAOYZ4 uAcF4eRgy9OcjJmLoBaf66r51Dohc+p3xsxAsxu8Hw7x7hUEf4/Oyx6YlKyWIQpCUINNRhpdxRG HFxydhrAcCv//lblk4xUWZYB8/mcwRBI7kX4niWCQKj0ueYeaxJoAWSQ9KToLvAvW8pw7rFA53p zN4QuLMjnCv5HtUGVG/ob0GQ8NTdTjgBU4TyOma71WVKh0xOiHz/4gSs63FqPSSf4eOY4RPVHc3 zVOvBOmlk66oCRmkH0NB1ozqj/NtLWbt7vLDqPI8NEQDGALksMiYLCtMx5qDj8HWKAuGz7x2lup MbFBiC0MgryHLDU7q3ek8zsWE5RZZKwlcxqNhicTkIY2jNDDCy81I556YobhPrJdKcxbJJ3Xo4r iQYLjisJ/ggR/2eYsP8sPnJ40YtuBO4MtqhN2/EcviaSTkGVPHZ5wNcVPM2WiiH10RjQZymJWEg C69Qb3mi7zBWO8w== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773738058245158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 65 ++++++++++++++++++++++++++++-------------------------= ---- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index efb10c2f8f7..4ea9f88f55a 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -433,47 +433,46 @@ static void vt100_set_image(QemuVT100 *vt, pixman_ima= ge_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; TextCell *c; int x, y1; =20 - s->vt.y++; - if (s->vt.y >=3D s->vt.height) { - s->vt.y =3D s->vt.height - 1; + vt->y++; + if (vt->y >=3D vt->height) { + vt->y =3D vt->height - 1; =20 - if (s->vt.y_displayed =3D=3D s->vt.y_base) { - if (++s->vt.y_displayed =3D=3D s->vt.total_height) - s->vt.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->vt.y_base =3D=3D s->vt.total_height) - s->vt.y_base =3D 0; - if (s->vt.backscroll_height < s->vt.total_height) - s->vt.backscroll_height++; - y1 =3D (s->vt.y_base + s->vt.height - 1) % s->vt.total_height; - c =3D &s->vt.cells[y1 * s->vt.width]; - for(x =3D 0; x < s->vt.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->vt.y_displayed =3D=3D s->vt.y_base) { - s->vt.text_x[0] =3D 0; - s->vt.text_y[0] =3D 0; - s->vt.text_x[1] =3D s->vt.width - 1; - s->vt.text_y[1] =3D s->vt.height - 1; - - image_bitblt(s->vt.image, 0, FONT_HEIGHT, 0, 0, - s->vt.width * FONT_WIDTH, - (s->vt.height - 1) * FONT_HEIGHT); - image_fill_rect(s->vt.image, 0, (s->vt.height - 1) * FONT_HEIG= HT, - s->vt.width * FONT_WIDTH, FONT_HEIGHT, + 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]); - s->vt.update_x0 =3D 0; - s->vt.update_y0 =3D 0; - s->vt.update_x1 =3D s->vt.width * FONT_WIDTH; - s->vt.update_y1 =3D s->vt.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; } } } @@ -664,7 +663,7 @@ static void vc_put_one(VCChardev *vc, int ch) if (s->vt.x >=3D s->vt.width) { /* line wrap */ s->vt.x =3D 0; - vc_put_lf(vc); + vt100_put_lf(&s->vt); } y1 =3D (s->vt.y_base + s->vt.y) % s->vt.total_height; c =3D &s->vt.cells[y1 * s->vt.width + s->vt.x]; @@ -842,7 +841,7 @@ static void vc_putchar(VCChardev *vc, int ch) s->vt.x =3D 0; break; case '\n': /* newline */ - vc_put_lf(vc); + vt100_put_lf(&s->vt); break; case '\b': /* backspace */ if (s->vt.x > 0) @@ -851,7 +850,7 @@ static void vc_putchar(VCChardev *vc, int ch) case '\t': /* tabspace */ if (s->vt.x + (8 - (s->vt.x % 8)) > s->vt.width) { s->vt.x =3D 0; - vc_put_lf(vc); + vt100_put_lf(&s->vt); } else { s->vt.x =3D s->vt.x + (8 - (s->vt.x % 8)); } --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737881; cv=none; d=zohomail.com; s=zohoarc; b=ZeGRKPZtatX3FEYZxPk8EWvHWXfDK1darWTTNxEtGxs2jJmbSe763s7TcuvfaNRN4Q9NGF+O0ITqmfOj5h/ZSez4YaNBdwMQ4z8TiXO+7eNUip6EBpbfvBR6cHl7FRsMPGH7uQeiD9Pzez/zzpZ8KJrGcFtzbRU32CmGJCdqxIM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737881; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=SmRDjLj7ipFrLHCObHHmmLv5yjAMdPQASv1LdJP6SDY=; b=NFKLUchoSWmb/kSShrhSCevkrUs11TkblB9QGbYjFB1SDCLGF9lWz3dPLJdqASHmj2FKebOJSs1Flz12mGVSZI9x1rb+x6WCWThEMp3xIFtCFBxl+wgzoX7L2oHnEKFS/hJm9BopzRs3AjJdBa1fk+Gf8625SNG00HVBU2ZdWc0= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737881893883.0831228659702; Tue, 17 Mar 2026 01:58:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QCy-0003Tm-Jb; Tue, 17 Mar 2026 04:55:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAr-0007Mj-7u for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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 1w2QAp-0003CA-IV for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:12 -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-619-mCXbk_rIObyxH2mJv-1oPQ-1; Tue, 17 Mar 2026 04:53:09 -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 3320C195608B for ; Tue, 17 Mar 2026 08:53:08 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3614819560AB for ; Tue, 17 Mar 2026 08:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmRDjLj7ipFrLHCObHHmmLv5yjAMdPQASv1LdJP6SDY=; b=hj9QedZ8ro25f1jl0YO9PDSLfMB3F8lTckmhxEWXqHkOpzNEwDBHq51gTSWjvuDD4mvdU5 Ocn2VMK5kicMMZtZ9Ff0xEFrLG8U+bQ4QJiRc6TlGLEHgoILgVBtbc+eVK10yUBedkHW05 fKJeGIW9KUphzSzqyWm7hRMwo/DQz54= X-MC-Unique: mCXbk_rIObyxH2mJv-1oPQ-1 X-Mimecast-MFC-AGG-ID: mCXbk_rIObyxH2mJv-1oPQ_1773737588 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:40 +0400 Subject: [PATCH 26/60] 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: <20260317-qemu-vnc-v1-26-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3549; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=bqSrs4f//wifWiC1OG0jromCGTEbHnPBPszWsC7hIV4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbBDT+5eO7Z+30AbJeHQ7Q3sUOkH+aA0xX3 6YcgiWLJoqJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5YBbEACON8FvAyE2OpAEDg3liaNwC+afd0SNj5l3ueBZrexaRIV73CHBJHbm8Lwx/soRVMlKcbA 9Jl5iohYPkXQLM07lovzU0POHrbf67PSBqsSPxUkq1qJemP6nNScGTtjJmfEKkF1nu6xsaHVTrY kqAMs5OFRrrMjwpasH7eB8u7PSRE0dh9ZSiFauJlCfnIdsAGTJSTZo3P5VQ3MChv21jA/QfebEX i7CA8Pa2qU/xAk7Nid5m5n5zWErius+K4ZlLLVrYyIIpBP9T9LOnDAMhx8MSGjo2uSJmyaHsq8u RoHDNE30O+GWKv2olcyhpBRTLrALfuBWxxmgq4pI9MTUT5tXKXVzv6ZvnFbvGnvzlLs8g1NOHfo n4mHBvvOGmvnH9RnEsYKP61ok71cVOrYQreIx1mYQjkeSmqP0ywlmGsKHgeV7fN2BWoivHwz42Z NbzfUVHnxQ19nGRbi9b/P/27X/KZfp9Q1Rw5LA2/hglV3oaFZD0ewURQlqb/b3vi/OhAsSYKncb um/a0M5FbgMucIJbqdO5rhW4ybpft55OMgQKnRWGwUBbbgCa76aq5tydNi4izRkDWIsuiFSoSXn AwSLJb1rg5LRhRmo4abJJA1A/CeMrLPKqNgaRzrStfxMtvBkQILVw71e7nFpePJTfIZ7M3fzS74 X1gaWcED+mgDjbQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737883453154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 4ea9f88f55a..8d4178f8cab 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,12 +316,20 @@ 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) { uint8_t buf[16], *q; int c; - uint32_t num_free; =20 switch(keysym) { case QEMU_KEY_CTRL_UP: @@ -360,9 +368,7 @@ void qemu_text_console_handle_keysym(QemuTextConsole *s= , int keysym) if (s->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; } } @@ -673,13 +679,6 @@ static void vc_put_one(VCChardev *vc, int ch) s->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) { @@ -1018,13 +1017,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", s->vt.y + 1, s->vt.x + 1); - vc_respond_str(vc, response); + qemu_text_console_write(s, response, strlen(response)); break; } break; @@ -1183,7 +1182,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 Tue Apr 7 01:06:58 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=1773737697; cv=none; d=zohomail.com; s=zohoarc; b=G7GV6YrL+vislYkb3m5kSLT/NWCJoLU4j9hne4m1YNKzwKFmLGZERHBmgVHncxuOVKSYqAfzbWX00i/MKYnaEDK7AuiMA/1+XBODZuXI7TCiQ5SQsBHE61y1WoCbyI22eaWtqa00gi+JolDqtJIjHFzhwrRHSEYCUmwBrNUwOzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737697; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=9jm2AeQLeY/7PKyygV7fcEQuEoBhALKKz1KnR9T9Mnk=; b=lfyfAmEgbCWLaPwje8xe/BDw67FV2tXmk5g92xB+t170DfCw0feCSVyv21qUkjJrlUI4Q1vlrF+E7x1zv3zX6FnL14Q9SMe6DhVbF8FkQSz+CYBG1SEVR+7POitGjBsCI5CQnBD51aYK1BSbm//4MV/qvA9KpjmPE5v3wDaVJq8= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737697504289.9079194343427; Tue, 17 Mar 2026 01:54:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QBi-0000jO-As; Tue, 17 Mar 2026 04:54:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QAy-0007Wb-Tk for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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 1w2QAv-0003D9-U3 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:20 -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-216-AB5_KiAeMOqh_lXwX5zkOw-1; Tue, 17 Mar 2026 04:53: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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D814318005BD for ; Tue, 17 Mar 2026 08:53:14 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 974691800576 for ; Tue, 17 Mar 2026 08:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9jm2AeQLeY/7PKyygV7fcEQuEoBhALKKz1KnR9T9Mnk=; b=TlI6oOQ+DE3u4Xrmfjp8mO7WjFcVqwnYGGZjHFUTjTCCK5FHUQ17iPtCT01Tg/71ebb+QQ PHBoPeSxosEYftuU6Tldr4joCMiqDUUSeHw93Cr8dASKS0YUcb9eQPjZUS7lLkAybeucWF EJP5/hTs8rD+mZjShU3cVwaA1UvDCzU= X-MC-Unique: AB5_KiAeMOqh_lXwX5zkOw-1 X-Mimecast-MFC-AGG-ID: AB5_KiAeMOqh_lXwX5zkOw_1773737595 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:41 +0400 Subject: [PATCH 27/60] 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: <20260317-qemu-vnc-v1-27-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=32824; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=FBZeB+mSYqwGVV6u9MQO/spZ7c8aebHEI6nlJf7L0k0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbJRas4i/pFkySlhrvIilWjLpLfT7/T/Xx0 jDOAoTFKuOJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5ZmcD/9iuGmsHbc98T+x/YdlVRZiUHHXb8Sum99DJoqd+nK2NzE5s+Dz7/xyIit3DnK5h931eq0 zx4qkaoYW2ZtUts38qExXAyVS8EJUhckwtJ20cmd6i6kJPrX5iUGa3H79XOt9ZVbmPHNSNqnznl N7fMskct8HZFuaTK/9Fn8cCxNoPpZ9s49YOVGBRtr+eKSZwaHWGVe8IxZmws9h6mQdLgmVD6wsP CIgiOIup9T6i1CGzhI6eGHg9AOS5fHbNTx/apCT6LeqYFIMwTEUxxBcq+vHN5AThHIBM6Ygn9aE /C6mrW0448LI/7UQ906FTupreM0pQzYRN5aGMzD9uH5KCbA2wdoc223zS+HJ25b4hhdc99nUmQv OSHxZBXnrBF+dDMMl1UDAZG5Ql86Q5oiSLG8byD+j7rMvUdimW9ObWywrWM9nabapBuExXtvi4H ohp8URG2Tkt3wF+4VaI6zLD4a9DWfr/nfzKR1t8YIKKrppAj6msuI/U8lJi8nY7HBFUntBGoUcD mSssGr/p8Qw3RhqFCmME4yci/OVPBcpvkb+z1HOxt4JM0jhsvbeiGMopU02SuC1SWSYE/KjkGZm 5W79QwMq5jFm3dOhNLzjm4MzQDRYlquQuf1XgUclDslXgfvWicb8T3mRvbIA5P/5xm6MdC0vMME vHG0IYvGcYqU2FA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737698604154100 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-vc.c | 433 ++++++++++++++++++++++++++++------------------------= ---- 1 file changed, 215 insertions(+), 218 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 8d4178f8cab..87881c072ee 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,30 +300,30 @@ 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 */ @@ -368,7 +369,7 @@ void qemu_text_console_handle_keysym(QemuTextConsole *s= , int keysym) 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; } } @@ -487,137 +488,135 @@ 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; TextCell *c; int y1, y2; =20 - s->vt.text_x[0] =3D MIN(s->vt.text_x[0], x); - s->vt.text_x[1] =3D MAX(s->vt.text_x[1], x); - s->vt.text_y[0] =3D MIN(s->vt.text_y[0], y); - s->vt.text_y[1] =3D MAX(s->vt.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->vt.y_base + y) % s->vt.total_height; - y2 =3D y1 - s->vt.y_displayed; + y1 =3D (vt->y_base + y) % vt->total_height; + y2 =3D y1 - vt->y_displayed; if (y2 < 0) { - y2 +=3D s->vt.total_height; + y2 +=3D vt->total_height; } - if (y2 < s->vt.height) { - if (x >=3D s->vt.width) { - x =3D s->vt.width - 1; + if (y2 < vt->height) { + if (x >=3D vt->width) { + x =3D vt->width - 1; } - c =3D &s->vt.cells[y1 * s->vt.width + x]; - vt100_putcharxy(&s->vt, x, y2, c->ch, + 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; - int y1 =3D (s->vt.y_base + y) % s->vt.total_height; - if (x >=3D s->vt.width) { - x =3D s->vt.width - 1; + int y1 =3D (vt->y_base + y) % vt->total_height; + if (x >=3D vt->width) { + x =3D vt->width - 1; } - TextCell *c =3D &s->vt.cells[y1 * s->vt.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); + vt100_update_xy(vt, x, y); } =20 /* @@ -661,44 +660,41 @@ static uint32_t 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; TextCell *c; int y1; - if (s->vt.x >=3D s->vt.width) { + if (vt->x >=3D vt->width) { /* line wrap */ - s->vt.x =3D 0; - vt100_put_lf(&s->vt); + vt->x =3D 0; + vt100_put_lf(vt); } - y1 =3D (s->vt.y_base + s->vt.y) % s->vt.total_height; - c =3D &s->vt.cells[y1 * s->vt.width + s->vt.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->vt.x, s->vt.y); - s->vt.x++; + 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; - if (x < 0) { x =3D 0; } if (y < 0) { y =3D 0; } - if (y >=3D s->vt.height) { - y =3D s->vt.height - 1; + if (y >=3D vt->height) { + y =3D vt->height - 1; } - if (x >=3D s->vt.width) { - x =3D s->vt.width - 1; + if (x >=3D vt->width) { + x =3D vt->width - 1; } =20 - s->vt.x =3D x; - s->vt.y =3D y; + vt->x =3D x; + vt->y =3D y; } =20 /** @@ -707,9 +703,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; TextCell *c1, *c2; unsigned int x1, x2, y; unsigned int end, len; @@ -717,28 +712,28 @@ static void vc_csi_P(struct VCChardev *vc, unsigned i= nt nr) if (!nr) { nr =3D 1; } - if (nr > s->vt.width - s->vt.x) { - nr =3D s->vt.width - s->vt.x; + if (nr > vt->width - vt->x) { + nr =3D vt->width - vt->x; if (!nr) { return; } } =20 - x1 =3D s->vt.x; - x2 =3D s->vt.x + nr; - len =3D s->vt.width - x2; + x1 =3D vt->x; + x2 =3D vt->x + nr; + len =3D vt->width - x2; if (len) { - y =3D (s->vt.y_base + s->vt.y) % s->vt.total_height; - c1 =3D &s->vt.cells[y * s->vt.width + x1]; - c2 =3D &s->vt.cells[y * s->vt.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->vt.y); + vt100_update_xy(vt, x1, vt->y); } } /* Clear the rest */ - for (; x1 < s->vt.width; x1++) { - vc_clear_xy(vc, x1, s->vt.y); + for (; x1 < vt->width; x1++) { + vt100_clear_xy(vt, x1, vt->y); } } =20 @@ -748,9 +743,8 @@ static void vc_csi_P(struct VCChardev *vc, unsigned int= 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; TextCell *c1, *c2; unsigned int x1, x2, y; unsigned int end, len; @@ -758,74 +752,69 @@ static void vc_csi_at(struct VCChardev *vc, unsigned = int nr) if (!nr) { nr =3D 1; } - if (nr > s->vt.width - s->vt.x) { - nr =3D s->vt.width - s->vt.x; + if (nr > vt->width - vt->x) { + nr =3D vt->width - vt->x; if (!nr) { return; } } =20 - x1 =3D s->vt.x + nr; - x2 =3D s->vt.x; - len =3D s->vt.width - x1; + x1 =3D vt->x + nr; + x2 =3D vt->x; + len =3D vt->width - x1; if (len) { - y =3D (s->vt.y_base + s->vt.y) % s->vt.total_height; - c1 =3D &s->vt.cells[y * s->vt.width + x1]; - c2 =3D &s->vt.cells[y * s->vt.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->vt.y); + vt100_update_xy(vt, x1, vt->y); } } /* Insert blanks */ - for (x1 =3D s->vt.x; x1 < s->vt.x + nr; x1++) { - vc_clear_xy(vc, x1, s->vt.y); + for (x1 =3D vt->x; x1 < vt->x + nr; x1++) { + 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; - - vc->x_saved =3D s->vt.x; - vc->y_saved =3D s->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; - - s->vt.x =3D vc->x_saved; - s->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; 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 (utf8_decode(&vc->utf8_state, &vc->utf8_codepoint, ch))= { + switch (utf8_decode(&vt->utf8_state, &vt->utf8_codepoint, ch))= { case UTF8_ACCEPT: - vc_put_one(vc, unicode_to_cp437(vc->utf8_codepoint)); + vt100_put_one(vt, unicode_to_cp437(vt->utf8_codepoint)); break; case UTF8_REJECT: /* Reset state so the decoder can resync */ - vc->utf8_state =3D UTF8_ACCEPT; + vt->utf8_state =3D UTF8_ACCEPT; break; default: /* Need more bytes */ @@ -834,24 +823,24 @@ static void vc_putchar(VCChardev *vc, int ch) break; } /* ASCII byte: abort any pending UTF-8 sequence */ - vc->utf8_state =3D UTF8_ACCEPT; + vt->utf8_state =3D UTF8_ACCEPT; switch(ch) { case '\r': /* carriage return */ - s->vt.x =3D 0; + vt->x =3D 0; break; case '\n': /* newline */ - vt100_put_lf(&s->vt); + vt100_put_lf(vt); break; case '\b': /* backspace */ - if (s->vt.x > 0) - s->vt.x--; + if (vt->x > 0) + vt->x--; break; case '\t': /* tabspace */ - if (s->vt.x + (8 - (s->vt.x % 8)) > s->vt.width) { - s->vt.x =3D 0; - vt100_put_lf(&s->vt); + if (vt->x + (8 - (vt->x % 8)) > vt->width) { + vt->x =3D 0; + vt100_put_lf(vt); } else { - s->vt.x =3D s->vt.x + (8 - (s->vt.x % 8)); + vt->x =3D vt->x + (8 - (vt->x % 8)); } break; case '\a': /* alert aka. bell */ @@ -864,177 +853,177 @@ 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, s->vt.x, s->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, s->vt.x, s->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, s->vt.x + vc->esc_params[0], s->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, s->vt.x - vc->esc_params[0], s->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, s->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 s->vt.y; y < s->vt.height; y++) { - for (x =3D 0; x < s->vt.width; x++) { - if (y =3D=3D s->vt.y && x < s->vt.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); + vt100_clear_xy(vt, x, y); } } break; case 1: /* clear from beginning of screen */ - for (y =3D 0; y <=3D s->vt.y; y++) { - for (x =3D 0; x < s->vt.width; x++) { - if (y =3D=3D s->vt.y && x > s->vt.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); + vt100_clear_xy(vt, x, y); } } break; case 2: /* clear entire screen */ - for (y =3D 0; y < s->vt.height; y++) { - for (x =3D 0; x < s->vt.width; x++) { - vc_clear_xy(vc, x, y); + 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 (vc->esc_params[0]) { + switch (vt->esc_params[0]) { case 0: /* clear to eol */ - for(x =3D s->vt.x; x < s->vt.width; x++) { - vc_clear_xy(vc, x, s->vt.y); + 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 s->vt.x && x < s->vt.width; x++) { - vc_clear_xy(vc, x, s->vt.y); + 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 < s->vt.width; x++) { - vc_clear_xy(vc, x, s->vt.y); + for(x =3D 0; x < vt->width; x++) { + 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", - s->vt.y + 1, s->vt.x + 1); - qemu_text_console_write(s, response, strlen(response)); + vt->y + 1, vt->x + 1); + 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); @@ -1046,10 +1035,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; @@ -1060,7 +1049,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; } } @@ -1081,7 +1070,7 @@ static int vc_chr_write(Chardev *chr, const uint8_t *= buf, int len) 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(&s->vt, 1); if (s->vt.update_x0 < s->vt.update_x1) { @@ -1156,9 +1145,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; } @@ -1182,7 +1168,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) @@ -1204,6 +1190,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; @@ -1233,24 +1226,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 Tue Apr 7 01:06:58 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=1773737976; cv=none; d=zohomail.com; s=zohoarc; b=Sxo4oLVLJtbXuGMg/2PiT1USHtDP4nCYKMlWKdgSUC24IqkkO8PI8f/HrDENrtAnSy7RIT8i3CDZCyw0kVYa1rzP/E246qOlCFF1uzKF9ZNO7xZu54gdEgPE96K7qrOno9TI6nDnAkDj7vIYUFDVwzyxbQdOr2ZkR719oPv9H1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737976; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=f6iBwh7SNoVfaJ2LXhz1UHz1mkTyYheJKXjvVaHYuPQ=; b=m1Fr+MyXE1Oi1BO1rH97BisHwiDP1L2y7Q/WiW2MA2Sr/KEoLoVtpuYlUnhszDa1Gc3Wo/Ot33qMfncvlJJnspw7jLBQElSn4Z4yiXfAKQBH8g///+kgFKIZbyKZ2yX6/hEwCFR//fQxYUaFfBGnype65xiNTYO6YIAZe7TMcnc= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737976030554.6717086451305; Tue, 17 Mar 2026 01:59:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QCK-0001a1-9n; Tue, 17 Mar 2026 04:54:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QB3-0007kz-Cj for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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 1w2QB1-0003Df-Io for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:25 -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-33-LJgHamrxNBGmIJwg8ci3bg-1; Tue, 17 Mar 2026 04:53:21 -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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 884F3180061A for ; Tue, 17 Mar 2026 08:53:20 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 81AB41955F19 for ; Tue, 17 Mar 2026 08:53:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f6iBwh7SNoVfaJ2LXhz1UHz1mkTyYheJKXjvVaHYuPQ=; b=OOwbs4w/PwNcwDcVBI1S2YQ6IiVwCxI09Djs+Ma42Rw0dQfqI4tTH3WLKT24ol6yCD+MhM Zgd5zn98PlwCqHDVNSjt4zJIoweZuGwl0FuYeonm1oLYZVtUHRp7/DoISo28BQkix8Fx1X ro4ISvsPuMSMTvc/gik/f5+iOqJJ1+g= X-MC-Unique: LJgHamrxNBGmIJwg8ci3bg-1 X-Mimecast-MFC-AGG-ID: LJgHamrxNBGmIJwg8ci3bg_1773737600 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:42 +0400 Subject: [PATCH 28/60] 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: <20260317-qemu-vnc-v1-28-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2517; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=tpF3wLAlBoCVCTJK4D6eHSvDy4HtuaSf8JKMiatOB5Y=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbmNfHiI7WTrjHnTVoPGU+Ox2NYNmpjC+Nf XFA2oXNdJqJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5S7JD/0W/q0t9F1EgcclWfXtFpVO+lr+k+Qq2A3wTZhBwoG3b8idWzfugZcpGnFJStDxKCUJQ5T E6GaU4veMVzHAw3kboZbzoaa3P61l8ftZjsw8J9uZElcEXdgUQnzlBFfvVnmSdnXbXIlCo9l3n2 TOl/XlKItho7rYOaX2Eh/DH1+UR5Ksph3swN9Fitz8xXbfiWLS2uM0NNBqczHvJlRrdt1qDBFNq 4GPndBmT6doVv9md+IdfwkiyCsXXdp4nQ1ZUQyBb/KGNL39Ztss/RlDkx3qFtASo3h2j5G4P7bQ VZTD13NtW+2ATRSYmei7s9Ig4T67qBONxu2QR4QXzWVVl7OVKukbwYG2JTilyBeZRKJJ9dU24f+ pSWqrSjfBFaa9siUh0xYuh+B3pXXYibzLjiXjl9FrCRnC3Lz0aVGR8H5nhMB5WKT3s1arut0ea4 x0sIz9BZ1ufDCfcxNAslj6fFPBbEFeOHpVMDihpXVRMzas8qfA7XBsOrK7DqqqDui0Xi034WykK Ohm5g7SsHyxAeSStmJpNwxyDYnvQb88t2hMge+V7hgFbwiKgp6B+XkvmSv7kQKwWl7yUXaCkJkS Ba7l7a3Tgpp3SKf/k44e+unldSRfad8tyikzKbgDAPjiZxb2NQGm1FfJH9O0BPEvI/lPFX5rAH6 MX2MPuZfCgYfHfQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737977538158500 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(). Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 87881c072ee..3ef492c2d4c 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -1058,29 +1058,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 int vt100_input(QemuVT100 *vt, const uint8_t *buf, int 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 Tue Apr 7 01:06:58 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=1773737766; cv=none; d=zohomail.com; s=zohoarc; b=hl4hj4QW9rd2GEn7ehTzMBCEBBijuxrL6tb5OGQV1IzRDZjO2JHkDmP0av0sw298mNCfhkzXkO7wiN0bAe1tHBe9eZRsJlMhjirftp9Q5SpRPKfcVFtV4q264XhHOGHL/37NAstUlXtYHttDquRJX18S0j1SawJhPOne2aWG9Ng= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737766; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=xWzndOWq7ArgzZjWdyWaap0dhjwt0oLMqBrIzkL/y8Q=; b=FCn2C/Zp1nY6pI+5YuBgu3+U9gLOm6eokaKz/RhysGlj/F9/Kio272Kq9agufPXb6WmLeMe8WvDHJlz1WxP0GhxeV2CVahzlYZBXpo5VztlTwmNoTQoSunflTrRaPcMw0YGg6PhtshxqBkujwuRhzGOBoR25HGnFcnsMvPTJXFY= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737766498597.9461182543768; Tue, 17 Mar 2026 01:56:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QC3-0001EA-Ti; Tue, 17 Mar 2026 04:54:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QB9-00085z-AH for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:32 -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 1w2QB7-0003Ov-Nw for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:30 -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-9-kuFnNGocNUa3ODb8Z9u5xA-1; Tue, 17 Mar 2026 04:53: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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 20120195608C for ; Tue, 17 Mar 2026 08:53:26 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0980B1800361 for ; Tue, 17 Mar 2026 08:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xWzndOWq7ArgzZjWdyWaap0dhjwt0oLMqBrIzkL/y8Q=; b=GDRkuAmcdfr7vSCekKuTldWD1JgbzFQN+ngfQezW8kDGNL4Ii89SAvoN0px0lCp2LcC6Y8 zyKfdjTz4Wt8IrB5ExdPGU0mN8oi/ONAp8KeI7Fett9FpsOoKYxqhU/tPNoHJF5L01lkue w/RcFTHv95GveEgZ+QSRv89aE+SFSkw= X-MC-Unique: kuFnNGocNUa3ODb8Z9u5xA-1 X-Mimecast-MFC-AGG-ID: kuFnNGocNUa3ODb8Z9u5xA_1773737606 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:43 +0400 Subject: [PATCH 29/60] 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: <20260317-qemu-vnc-v1-29-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2718; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Z81RkVNThOvnq6XkQ31MYQymYu0yiyGQpUgt2GLyfpg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbisCYld+dRzGUDGXkNJ/cL7gF4MSYoK8w+ 1OGbvm1j66JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5fs/D/4teXnS8qHZ4DS8tH/EVfFZgVGvCHLvzf2Da/ZxRmTgVmve7f0EknxjSuKF8lZePoMZgwx 1Tp8K1C9dcmZ3wxnayw2gq/C6Rm23wj/4uHQcn5vHt6sWOeAjUcX88/9PwiYBBVQtmjWzIk3Jet CLpCygXsPrtM/fR9rXXAGyUoPBiyGI+qpvJmsB5HrKoD5GW9TKMpB0Z3UOynPq7CDi4DUz5wQ7+ iMH6Wy546GmbPuBlde3HoQIyVMqx61/14k8ieAPNIatveSI0TOHZPvy0ye/4ShngusSrGUh1yeK 81/lgmg8VM6mrgPrkVrjwxkylDraL4QQ/1ScC001JyMaNmENPvxUIoaWQfm/ep7vyY2CDyH6cHT sam/+nS1W3EdRBfPS56l8CMevUIei0u3vp9THiHE+j3IZGJoZl4NOE9Or3sQwPaNlTSfXyIm7f1 wiyD9WMAMX3gdqZps4ttPaQ9AQZ3VQwA6erc2YaORlCvJJ00HdsTQIW80lakwWKE3PZ8WlYB/r1 yRT5EZyq/EqE8GZ8fPArcC+tNdstY2MkVic3MUn8jzVVIKRxcgqXPMIynlbxYELguKrWkibLS4l pxJ93BvgFCATbBXTomxtAwVrtvBN1Cr4pOvojAl8xdvBjRznaO7l6BOZcGUr4yZa50hbP5uFRDL vmmil3CJB3GfXpg== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737768507158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 3ef492c2d4c..dcd6445a1c3 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 Tue Apr 7 01:06:58 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=1773737801; cv=none; d=zohomail.com; s=zohoarc; b=Gs7H8MdQBiNojcU5ZDL+7/Hoz2BxryIqVURMFBeO3NhLnnAbSECyP+yAKsUrrEc3975foR33QYCoTbHf/AUnX2OW5AvgbsLhGqNFDx812vCyzgOqWImREO9D803d6ekCn8rKBdZQgd3INww1J5kFIRcNZjUYNLUFqmc1BKSt18Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737801; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=rHs/HBxbOx8cNaTTIgZTyocDDR6sCef4ZHGJ0N76QVE=; b=UBiZApuhoTu0F5FRi8CWlu/2UH/MLU6V+DWJPwjEeSH1htYgInM4AihIZ7j9Qo5LcTkqkvWTBTtM7D/9nn0sGcsq1FMt8EHTlgBSKcNZYBx5Uj75aq+vmNxkGU03TLP4IpBGCibc0piyYx/RFBq7l9B+yolLOCXAP6jA9taeq8U= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737801443948.4600215108959; Tue, 17 Mar 2026 01:56:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QE7-0005Mt-UC; Tue, 17 Mar 2026 04:56:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBE-0008LN-Br for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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 1w2QBC-0003cX-P5 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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-580-K6Il0sAHPlaHcrvjCSb-WA-1; Tue, 17 Mar 2026 04:53:32 -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 A33721944F0D for ; Tue, 17 Mar 2026 08:53:31 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8AF75180075B for ; Tue, 17 Mar 2026 08:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rHs/HBxbOx8cNaTTIgZTyocDDR6sCef4ZHGJ0N76QVE=; b=SyBdua/nKss59LLk4qIoknOoddKh9iN26HkN5b731NXlN+3TCYjMvLwhFowaGMiRLQFSrS lmkQhnT62lma3b0wbjD961Ia4O+zePkskbgjh22u5z9KgxQ061Gy9X7EfltKFDZgLROEsG d8hIUbvjtI3uVMxrWyiHHfXD3AwhNgQ= X-MC-Unique: K6Il0sAHPlaHcrvjCSb-WA-1 X-Mimecast-MFC-AGG-ID: K6Il0sAHPlaHcrvjCSb-WA_1773737611 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:44 +0400 Subject: [PATCH 30/60] 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: <20260317-qemu-vnc-v1-30-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3543; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=00Xoza8JQeEUd9LzojSZBy3M+SiLz9lRDLo7CP78xWI=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXb1axGWWa2Ae+PbW5mx6r6fkZmYKsFbAVuA +TbeP/zsT6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5Z+0D/9O+cifrHLpR+brvJn7ZFu5bmQrLi8ANo0QtrWYL6Dki1tvVw3YnaXGb0ZvpIL0FC8B/a5 XX07D8pgdTfE4jjZB7IQLQCwDGsgnNsPbgHaddHDvRCYTZcFebbg0YXWkQJace1ncedrDm9FOTn 6jUwzZknJqYu91ojD0LsNDkIoQE5V0v58d6DlZzfeV9cTAiw7u7AGYhdyRNvPBnFA3vGpZNqDWw vjNLEEA2svVZqASJLLFGB4q6YA7Jnn3mF0jCZ3V/TyFHdwLIGSN/AFPgiTceN7vRCI90xoOMSIa 2cnwBGMqtivmD1ZSRBikjfJ4JN0A+T1pdUDSZPpbWeRVUzaKkmf/gWTkBSpJkr3oZqiX7KiFq4i en+1JiMHesmXpoMOzGZ/tmDmdpx0/+ZDQTxLZuQYgxLoiodyGZsS9VuUWRt78qYqDq+L5c3C8i1 1CwlGJcAoTncJDQBajMfczKfrGytdrQkWyVh3joSziwoxXdVeuDiou5TEScgEQ9Bis1Dsss4Zs7 TR6TLjwp8qN4tLUP5IUjLtxGqX3vQygEaFhdtIv26Cfix5uSLQN/UZ2bbdGQK+P2ZQH1ZPV5j/b khTv586hbgdd0zj5Oxs5goRyAK4d4wJIgVpU1H3QyBxK4lyuHi5QuJ5mtgPjaXjDnlio8p0Yqjm 4DCT4axCtwz3TYQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737804582158500 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(). Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 dcd6445a1c3..b30adac83ac 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -1128,12 +1128,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 @@ -1141,10 +1148,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 @@ -1210,6 +1213,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; @@ -1239,20 +1261,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 Tue Apr 7 01:06:58 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=1773737882; cv=none; d=zohomail.com; s=zohoarc; b=bR1LjfU5t6Zb6HiJFme779kijjTtD3uKSKqWGHLudpr6uFlv+pZwBGWmF/omILGmHHN0O+V3NIA/LDf1W66pe3uo3NcRWlMJqafzcAstgkGX5cCr17jys1TTeDf85V13Aaj9tauO35M5Iw0yBkP4x2XTN/TlDOd6WNvp9BFQPbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737882; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=O2QbvOfd+SV8M5vKScZ3odoTY2MoLyj/x6VAfh+kc/Q=; b=EMdNE4+eLERpn/95kvA09poLyfQqx7UfPSe+IYytpFX8/IY2RLq9I0QxBsU/BJYHFVtk1llXUfaeuPWqNDhLPs3n4elEP1ODyW5hv9/vHKYkRTOdc4o3jdxpBmms3fzQaTWvnH+z52lQiYQcLLdMmDnUki0dDDOp/c4n90aKMq4= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737882208757.520531537908; Tue, 17 Mar 2026 01:58:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDs-0004WL-Sh; Tue, 17 Mar 2026 04:56:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBK-0000A0-VP for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:45 -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 1w2QBI-0003tn-62 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:42 -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-684-XKx6mmAuOyOIJpUb65b3zA-1; Tue, 17 Mar 2026 04:53:38 -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 2FB1719560A1 for ; Tue, 17 Mar 2026 08:53:37 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 37538180075B for ; Tue, 17 Mar 2026 08:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O2QbvOfd+SV8M5vKScZ3odoTY2MoLyj/x6VAfh+kc/Q=; b=MZwdiNG1t54XjI6dubrLSPhW4tJq5nrRHcRxsq6sBLGueU1r4Bytt1A8pgCD9IvEJeDAHU d8oDUlISBmw/yYXRXFGiIl7eP0x8UqOfpY6UVOmVVfepx+SX0i6mz/WH0WuA5RE6Vlapfb o+qSFCBPdzQaqMf3ixfcs+Y4IS0IG60= X-MC-Unique: XKx6mmAuOyOIJpUb65b3zA-1 X-Mimecast-MFC-AGG-ID: XKx6mmAuOyOIJpUb65b3zA_1773737617 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:45 +0400 Subject: [PATCH 31/60] 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: <20260317-qemu-vnc-v1-31-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=10951; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=wA9U9FrKK/wUybhtmxzjutcU4bIMajNA4vD4m5xcBGo=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbfxNn4XNKFxY6BaK4p/JM4f5puw9hak64x EZpCoWmCzaJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5da2D/9LzWFbAA8/7IP+0aPSHcvqT4oMEUqmHzY1sQt8lKR0pFWYkOixO0h/2XbRBqKB3ibHtTa 01gF+8DfZdgXXgK6DidHwpWf8bP0/5S0PaO+ITBAO9GUqpELYptT9OeAJ9ispcyj531bhFSjRs4 VqPZaXh1xqYlvCo1Iwy93eVdsGnp7XMG3knXEh6JoloW79wEIVrqtSICtOcIOb+nSf4u+Jw+9Au 5YsExphcP+8WQr99H5mQJozhjb8NS5dOIQDhv8BSfjWeFSSxmrki8zrZWifG7NvnjiA9jR6BBeI 1PEk+dIn9IsXSZbcW7AQisLqo7nnFQI78j9BA9N1kwsAgmUqReMyeM3IjaKvdGDdKCnRfBnobA7 dYPdnC2yP49b1CxiPkYUJaM1VZe/Lmw2b1lAjDM4yVS9RCzrjm5CiIuynioFbF1hrGGZJwTUzr2 f2R5ok+/lROPRe8SZM/52d7lQ+cd9u8fYPDUBbXEQ4sKgXEDV445zsSRAp663Gm2m9jDV/Q5hq3 s9AoL9bTGmCUMUc7yydPRe0LUkR47YqnfvyXRMlifpzkfM2LkGdg+s+swRvc+OMbWMGj/EBgYFP SwvSqP/Pt9ndAouU+JExP5zxs+c198XyjseY7h34mAeH1zi6a2uPivA761Zu+ODE8t7UiLG5uev QicELPOW83L1BZw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737883139158500 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 401e5a010fd..152333d60fc 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 b30adac83ac..ba440c50744 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 Tue Apr 7 01:06:58 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=1773737693; cv=none; d=zohomail.com; s=zohoarc; b=QyLwRaZXf8d9c36ilC9atXHflDasA239TLUcjJRBptWB7sJqCmCjxiKhLRuXDtVotgUc9TZiNDiZJehM33l+daH9i2fTeDrO3i7ANWKKJ5rojkAO+kM87W740oa2n36luDWH4UkPqkk8yMO14gECliecVgaApeg+fF8TiBYTeyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737693; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=w6Wmhvu3qtjJn/X5jMkUTw8laUSnzr6OvearJ6n3vyw=; b=WxgzsKti/FZBIbfSNxuSeo59kaEWi5V+1oBWBveClP3ZGj2dwcDGniOhGAfsupJafY+2zMhNYY6Jaf7b6VqRmzhQvlfWOu9Z8oby03wAFJknGw6z8GiMqDfRUKHkAVKm+4OyhzyU+5D8rx6Bx4K5+C8gwQ2N/FcZNa0xLMMIwHQ= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737693756255.88834246684416; Tue, 17 Mar 2026 01:54:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QC7-0001EM-2M; Tue, 17 Mar 2026 04:54:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBa-0000Tc-Kb for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53: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 1w2QBT-0004Vd-Iw for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:57 -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-179-9iqNzXMIMiyyPJSVvvwlOQ-1; Tue, 17 Mar 2026 04:53:48 -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 1BEA318002DD for ; Tue, 17 Mar 2026 08:53:48 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 807A11955F19 for ; Tue, 17 Mar 2026 08:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w6Wmhvu3qtjJn/X5jMkUTw8laUSnzr6OvearJ6n3vyw=; b=E2oPOzdyVV8gGg82fBW42LhvvcRq8++JyiQkW4dyXtmOn8bvwsX1R9EIrc7AHn4bV9km7V Oaq4poSotYEitsrna4tAs1SXZALeJISqGa09kJUrLfaQPEOf13Hdmq+1CFXHY1n2BpwcTq JrCTQKI0w6ECLFUBgfJZmmiWtpuBc7s= X-MC-Unique: 9iqNzXMIMiyyPJSVvvwlOQ-1 X-Mimecast-MFC-AGG-ID: 9iqNzXMIMiyyPJSVvvwlOQ_1773737628 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:46 +0400 Subject: [PATCH 32/60] 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: <20260317-qemu-vnc-v1-32-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=237186; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=hByuGJ63VtAW5Oz6Hi4NvxHawMjBMz7mk+aKnBgL6EM=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbs04uPJ38rCBTgZmo6ctn+hv36qD5v3Pjl RkcsNT6322JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5doRD/9oN+BZmLHfeEHeTRRMXMGEY7nmuXK6zpZ2gUthhIHZ61XzvbWEEimKXdfqDEhihrXa2GR +X1oTr4Q2E9zA3HUEDARAjGIeGbh8w+tE7vM6PTR27VxfsKudlYeI2FqMpNE+scK24pbMPCtd9E Uat0R8/fb0+/MlEaTwo29K/CPYm+BtWkW8egk+649nDF2YUAmqmVZowvjYhOs3vnaQ0YazdfKj0 aU19b0pAXM6qrkvv+6dyg7V/5bpx3G/FDFevT2xyU4rqclN/oImUdVyb6bvOXSyB1CjI3IrwFGu rb9UDpWqlcXuMyMncgkuvxoC0z8vVOKSnLUx98DsaEyXUpWEqM9dU570u1KuMoG0LkGO4vhtXxB Ic02NjSYK0SXxM6TQ9ExbaI6s22/EH0tGxlTpy6PPuAB3ZPDxOJDiHV2PdUHfGCKEqGnWKU491R ftFo9W7CAlYZ1IUXRkCQ9ImFUQMIJ5thFjTJFPpK1wsH4o2Dr7/ZfSE8Koo5OF35vLxh6f6m1gu UT33eI3PtD2DYyH/KceSF8tAP/dDil70DigcOQoex4QfOuba4q/grDgC8j2TZjbt3qV43by4Qlf YBKudxELwzOIF9SPVt1ZFBzG8ni2hBJixiZSa0EQlMy6za4xk2IgGemGUxG/JjZp/XjX2Pb2tXq XALnRt5HGjo13kQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737696436158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737882; cv=none; d=zohomail.com; s=zohoarc; b=ThYN8I6F7MEv9N1aeHby7JZs1YqBfuUn4SRJAzTGwdyv6GEb7G8mA+biLjdyX7J0E1LfP8FvEo6MxojEg0PW+ubZhLjgSgZY5BWm60Did8L/1AYZAzH/bBbpnDFXKq/Xt7WCJ60XvF46UpYmYp4FaHPBpKrvcS9WCZkKBLbyD2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737882; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=JXUoNPZN5EV2zp3AGyiG/87i2Fj/dzAN818B1iCDWio=; b=dY/wkBg5QgxkMnpU7aj01sLpwLL7+l3NwvD2gxtJ2F/5Ov7xC6qniPh/ZOSjloqeth+9CvV+vt/1b00YVe0RS/QHFvg6QX6MlT72xvrRoakha2YwTs20K1GNKHTQ6i8YnjNQZ/weTEN1M2xpBgHkwPqrrpvwZ4bupIFUzCvWFJE= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17737378821421004.3227151403468; Tue, 17 Mar 2026 01:58:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDS-0003ij-MW; Tue, 17 Mar 2026 04:55:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBc-0000Vq-0Y for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:01 -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 1w2QBZ-0004vW-2u for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:53:58 -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-547-o5AE1slNPBS8g8-dpeCc8g-1; Tue, 17 Mar 2026 04:53:54 -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 B41A7180034E for ; Tue, 17 Mar 2026 08:53:53 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A784119560AB for ; Tue, 17 Mar 2026 08:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JXUoNPZN5EV2zp3AGyiG/87i2Fj/dzAN818B1iCDWio=; b=TD4aC5DQD/nlxUDckcaSg/WTnosMCKdDsI5L5BK0lLr6xOye7g0l5LroFg1RCVemX7IvoC +POOdnhV6KwL9MN29fJDhuF6Cy9X97wTg1jGBsvkCrphxSrGuJc9zPPY35HphZxa9K75Ud u1VumIq3SV0D5aUmvfGAwlvOxxKWqR4= X-MC-Unique: o5AE1slNPBS8g8-dpeCc8g-1 X-Mimecast-MFC-AGG-ID: o5AE1slNPBS8g8-dpeCc8g_1773737633 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:47 +0400 Subject: [PATCH 33/60] ui/vgafont: add SPDX license header MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-33-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1018; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=qMWcNg5eH1Tz0uC8J8gSFxwxyHv0Vnd+i9HhHOYtORc=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbtJnW5wfK+kp7bbYkuBsD+bRmg1FHYWyz+ Re/onhV00SJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5Q+SD/4uL/cq02gOW4Z3mbouWCg9ftkslkvOJezzkVx8MLODX+Gg79/BUQ+r50DoUA0gW6gpVtm DnJKTZ4uggy+goGP5+hhKegyaBlvTpxBpQwEbJ3Lhklu15/1OGphfEqZH55TZMUN9AKfbr8blNr 3kRCl+35H0tJb3XZbGzyDbPLWiF0mZpp/AAhKtgz33kdQtJKMkl2k+Fe0cC7MAXCw5U9k56x2xv a4jvCHzSY/sIgd1B3y6ItZkNtd7PfoAXmN7r2qADTOlexy91UDsQgjXvdghSW8rYhfpdQX9AMjp 7eTOSi6HCNCmvhy0CgxY12oX0qCQxLCE0D89ymxQqsj04EwzewADMmYaWNqi2DvY1eUa8XI/nd3 vxzFc6UMskpC7DyVYrVRTo5gdpBz4RJoBRWJNdmMR5UM36PyM2KNYPl1zK7x0ZofzNA/YbnqGYp 5R89t/gSW/xwwwcZOGKvkp15q2sncoKWTDeBMQmWJZMqVVC6AXvjbUQ4U1o0A9YrfsvKGhK3+70 oOgnrCGPyG7weDNtVUn0K1GK+0Cf1asRGYj2flj/fmLSyawJrhZl/ZgVypcvATiuZV6mASIlbmI TyariJYHR7YLMHwxdrztd38ugrAanYOKoqAAQaqo22XNN0/lCyzvADSplswFQFScJKSiFKosRDg RIAmnidR5UrCnng== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737882993158500 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 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737803; cv=none; d=zohomail.com; s=zohoarc; b=NsHCumLd1tfOMOoDnJ8LAibctIUfQdaF8blM3KmnAWUOqq49lp2oWpJaeSsiVbwNtahTibSGIAz+TsEIDa+MdxIFHBagQoRJC8csZgvDaKAqXU3eGtkx9zvBwn2b/osPDr64k02PrUbkQIOuErI0wxBOnUyvHeh5hmxbAftThaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737803; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=EzDZzBWodmNOOZ3jULA7Y2Qa5xw3WpxQ4VBBSaX639Y=; b=KWjtzjIYwxJMQwpVau1DTUupGump2JbDHlLFMyHGY3wdC0c5EtWjT8ERcKMkk7B/0INT28D1XAAgVVPBzSVh+ldBanHnotGI9Y9mj8BPLK3KB7JdgIGadSuucQqqcz2DRqXMnQ9b1qpJ/6sSA3Rj82ffAkseVrE60hbwVBZLK5Y= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737803728133.9633580172008; Tue, 17 Mar 2026 01:56:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDg-000491-Eh; Tue, 17 Mar 2026 04:56:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBk-00010Q-Jr for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54: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 1w2QBh-0005Vg-Ih for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:07 -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-442-8UqOVVaCPLWwkaTHGj_2_w-1; Tue, 17 Mar 2026 04:54: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 5997D1944F12 for ; Tue, 17 Mar 2026 08:53:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4DFF6180075B for ; Tue, 17 Mar 2026 08:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EzDZzBWodmNOOZ3jULA7Y2Qa5xw3WpxQ4VBBSaX639Y=; b=MHKjut/ipoPvU4DnWJnHOFYMQQnqr0sqJeFDv3O2Pue5/uCtlTlejhwiw3ppZ4KzTi807+ xbqEXB+1Zb5vaNqNfEp2PTdiAxdN4W96ZMwK3SGaR11myzNROMPy2Qf6fJFM2XB31gVT5h sjBIDUo6JE8PYu9MzXTksGV68fNrwT4= X-MC-Unique: 8UqOVVaCPLWwkaTHGj_2_w-1 X-Mimecast-MFC-AGG-ID: 8UqOVVaCPLWwkaTHGj_2_w_1773737639 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:48 +0400 Subject: [PATCH 34/60] 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: <20260317-qemu-vnc-v1-34-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1648; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=1+OWbtQSnb2bEVpjfuso7ec3n8EQR/XImyRKC8nO+lE=; b=kA0DAAoB2ujhCXWWnOUByyZiAGm5FduhCw5PTWUwAFUoRXqo7WZZY1wxzbkQrBtfcyzanVP2E YkCMwQAAQoAHRYhBIepvZM/h8YG0nb2Ldro4Ql1lpzlBQJpuRXbAAoJENro4Ql1lpzlKqIQALVG gMZj8ejma1Y4rvZAgC+FNg3h/eoIg74+zgnPlz0rPxyn4ihlbnrbaRmS1bn1v9YEkHxgrFuwOek LOVGnOsZpCVlx5RRKc9vgh8iNyc1l4dhEq+r+DoIqL9OIn95yAMWp2yHFpNv2COF+rQ8efDoHBm xT0Y77AIx0mzjPx6cG9LjTui72/ZoXAil7cv3LsOXcp6Q1tCqPFpbqmCgBc6LmI25+DOUBcHvPP HIplCQ6QovvTH1aupEycALNozQAH+Oo7KDAwiR8Z23Tk4LZiX5pNKhPxxSFAUBgg7bah04V5Br+ 18+3YRAGbVp4h9PwniIiSNSjmrboUg1jdIhTJ+96yAHYHNAZk2dSnMR41QyuOKXbEzyECALL/L8 7OhGi8q3I0yWkOTcm2qWaTfGl3M+y0s4gjfFuUppWCaXGv9Q+Q1DZZyOajGXrUA51+ofimIAtlr TjiTR0NKXcVV2t+2bJuywiNsMdcxTXeDvQoMdl6Jl6bSCrt9BF8vhIWQNpymJ3mldkP3ZJI16r6 Hy6ALMZGjbrcK4TQxzGWy4oBvaNPJ/ZB5qPRkAE9SMEUZ4u8PMvHi76jv36n5BFsS87KYsqcCd1 zRF2jy0CNt5d77pxlGAf2vz8xMzexmJk5Vpz62YguFj9jO2KbFbazB78Iwy5sVLdr08uG5GOCRe e5BfU 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737804582158501 Since those values are related to the VGA font, it make sense to move them here. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 ba440c50744..8e785cde94c 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 Tue Apr 7 01:06:58 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=1773737793; cv=none; d=zohomail.com; s=zohoarc; b=jSaBU3RJs6S6oVVYagsHwyUsbzalW+d2BID3UlXA29zjw6FCPVm6PB2eNwfzR6Hvb6wyUdKHIf32md5srWp2YKhDYhHK7Aq8vpFcRHSCvSdPQ0uLPt2Xmr0R/a7mfqx2Ok/EaiegaWU8Ytd/UUiIrXnWju1B6t6C1qkVGT1iwoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737793; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=7QvEdpFOkTuMJ8AUFSwX7PSaL1V7+UXlBfj5Rp+8q5E=; b=XDMc1Y9r6wg2ggHTNb/llO+G7YoF4TE4VwtyH4jVkLsAejpcS88QeZv6Jkc18vycyTA3JiRl/cbkdfRJ7xV70zmOEKdHtVIR7SSeCrQDSonVSiBrImj0LlPJmkBQwIywCoDuRzx9USoMIsf8cI+9+uq1fM4qCFgCdJ84myt5mag= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737793657893.6890692362159; Tue, 17 Mar 2026 01:56:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDJ-0003Xs-74; Tue, 17 Mar 2026 04:55:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBt-0001De-GA for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:18 -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 1w2QBk-0005fh-VR for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:13 -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-cpP86b5ZNw2jXzKQenzaUw-1; Tue, 17 Mar 2026 04:54: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 C893F180035D for ; Tue, 17 Mar 2026 08:54:05 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8F99630002DA for ; Tue, 17 Mar 2026 08:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7QvEdpFOkTuMJ8AUFSwX7PSaL1V7+UXlBfj5Rp+8q5E=; b=HRKEORZHWaGGp5tOik3vngZm+sXXA/pQ51tzgY5jaoMpmq9+zOFyl0hPsc2eM8UrRbS6Te T2h1OV12Yghgbxixq49yK4ayQJXfMaPZHnGIUMALRAfRC//u7d2CmTngBVvnOMhqEhSEax vv0v7vfOlYRKDba9bygMuG7vXji9z0Y= X-MC-Unique: cpP86b5ZNw2jXzKQenzaUw-1 X-Mimecast-MFC-AGG-ID: cpP86b5ZNw2jXzKQenzaUw_1773737645 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:49 +0400 Subject: [PATCH 35/60] 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: <20260317-qemu-vnc-v1-35-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=71902; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Ou5POjR0QnEPG4TneCR8IvUiVVhST8hyL1/WQpsoBR0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXblrH6GU/LzK+J+dagwhNOwQFFTKSvEwuor pTsPBWRUByJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5ZuED/4iwUeLxOYxuXqkcCBnpoS0N5eYW3DhlYnKaVm4ipTXvMnrmNG4YmY9ElpmESBlMuik9aF IXgdo3gOloxGPwYSIlM6O2huyefCeclnwaEDzXN78v03Ro0vkdEnr3l9/UNnG6/jOr9lQBm2XiO 6q+DoVBC4LBq3tSGlNC7jP0RfUrmuq9cy1YbYKZzZc50/aXrD4uF9IyFfv53CW/zvXs0b9NXBb0 KDqhb0oBD4ZUy5O+SOOt0Iz1arzo9w1dqaINQTt6VaCWodc4tYaXr5xO/ooqOrwlTkxhiiFwY3E TkL7zGi2wEn6JcwFoyyZQWtK3NMyjZ3gFk9TMmEWXb1Y2J+grFP4iOzsOXjQwq8iNNPTlXHmWF0 wjTtb1+JUH3jXSRyxBkgdIJAgHd0wO3FczoB1NMhZCDh4pX29LEASEWw4zTmsKYNEjx6lBtZ1NW HJvP+Y9GQl23oulgqDKxUTxk2RiOfSb2nl9bAuotXtFjJ9WofhBW9xlRdXVv/2A60nu54xValsk dRLAebWeXymzXvq95E5VMsT5fYeY7YnPhzn5C5kHtBIl/R+q/zYZbptGKvI1SBoFvn6BtUAJQuM bqyb2FL94mI83dJ8jMYWAVecbuELQCbLr/qTpTXubkPOj9yTAyH1GdOev+lXfL5bky6MrPPTmEf r6JztSgr3nA1Saw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737794692158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/console-priv.h | 1 - ui/vt100.h | 92 +++++ ui/console-vc-stubs.c | 1 + ui/console-vc.c | 1035 +--------------------------------------------= ---- ui/console.c | 2 + ui/vt100.c | 987 ++++++++++++++++++++++++++++++++++++++++++++++ ui/meson.build | 4 +- 7 files changed, 1086 insertions(+), 1036 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..18e5320766b --- /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); +int vt100_input(QemuVT100 *vt, const uint8_t *buf, int 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 8e785cde94c..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,682 +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 UTF8_ACCEPT 0 -#define UTF8_REJECT 12 - -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, -}; - -static uint32_t utf8_decode(uint32_t *state, uint32_t *codep, uint32_t byt= e) -{ - uint32_t type =3D utf8d[byte]; - - *codep =3D (*state !=3D 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 (utf8_decode(&vt->utf8_state, &vt->utf8_codepoint, ch))= { - case UTF8_ACCEPT: - vt100_put_one(vt, unicode_to_cp437(vt->utf8_codepoint)); - break; - case UTF8_REJECT: - /* Reset state so the decoder can resync */ - vt->utf8_state =3D UTF8_ACCEPT; - break; - default: - /* Need more bytes */ - break; - } - break; - } - /* ASCII byte: abort any pending UTF-8 sequence */ - vt->utf8_state =3D 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 int vt100_input(QemuVT100 *vt, const uint8_t *buf, int 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); @@ -1094,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); @@ -1128,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) { @@ -1213,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..e24c91f538c --- /dev/null +++ b/ui/vt100.c @@ -0,0 +1,987 @@ +/* + * 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 UTF8_ACCEPT 0 +#define UTF8_REJECT 12 + +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, +}; + +static uint32_t utf8_decode(uint32_t *state, uint32_t *codep, uint32_t byt= e) +{ + uint32_t type =3D utf8d[byte]; + + *codep =3D (*state !=3D 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 (utf8_decode(&vt->utf8_state, &vt->utf8_codepoint, ch))= { + case UTF8_ACCEPT: + vt100_put_one(vt, unicode_to_cp437(vt->utf8_codepoint)); + break; + case UTF8_REJECT: + /* Reset state so the decoder can resync */ + vt->utf8_state =3D UTF8_ACCEPT; + break; + default: + /* Need more bytes */ + break; + } + break; + } + /* ASCII byte: abort any pending UTF-8 sequence */ + vt->utf8_state =3D 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; + } + +} + +int vt100_input(QemuVT100 *vt, const uint8_t *buf, int 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 Tue Apr 7 01:06:58 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=1773737973; cv=none; d=zohomail.com; s=zohoarc; b=QtuOgwcKa7BEaHgcXlAAJ9+E5U4PmSi2oJJZeziGT/b/RptMIr6gCpjZw1pHPd9Y+0OPKIV5IYrwcI69RpRvUvAN5MwjI9dMmvVrhXAdtPxhOB/VHnMhIZ9wW8LWDReHTuahx7a9Sa2yLwRNM+SD0ARBeGBTHXTxUnshjYQDr+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737973; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=J2tiXkQUButPcdvhDbOgDCuPStfuovK+PgHgx264dx4=; b=Oqjr5YWyGcwHwzJb03xQZ923qq/0s8wN62f2cvTWTEtbTSFi3yKCmgTnxOwHKBkG8ngPBPGxf+vIK2CepyY92CspC4OYeIpYFjRwr35343OQnskCc7qDJPPQyerm4Dx8vlPPRSoEu7CXUq8lWMa5tb+6C66wUYhv8Z34VAGItes= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737973132176.23484915958636; Tue, 17 Mar 2026 01:59:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QE8-0005Ty-1e; Tue, 17 Mar 2026 04:56:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QBt-0001E9-Qh for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:18 -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 1w2QBq-0005zc-C1 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:15 -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-613-bgbCFA_0NUyOgJpUuCQLOw-1; Tue, 17 Mar 2026 04:54:12 -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 383B11956077 for ; Tue, 17 Mar 2026 08:54:11 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 304CA1955F19 for ; Tue, 17 Mar 2026 08:54:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J2tiXkQUButPcdvhDbOgDCuPStfuovK+PgHgx264dx4=; b=f/6O+m2+ZEA70tlgBAqoJON+GOxr9HYG8RRGP+GOrAmuB1L4rAj5EazqSMYS5ta2lze6tx MZJcLV0okIs9jJlsUdbGig2xybInNqeneZt8jYOlBb+r4x81VLp3dWOPkPZYtPRZWk5wzQ 2k8eTbb0eR9D2/O6DJlZf6waxZIoZxA= X-MC-Unique: bgbCFA_0NUyOgJpUuCQLOw-1 X-Mimecast-MFC-AGG-ID: bgbCFA_0NUyOgJpUuCQLOw_1773737651 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:50 +0400 Subject: [PATCH 36/60] util: move datadir.c from system/ MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-36-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2464; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=K7IuTTL5eOIUvVD/UX/oXHOXc2eSfE+3CHdr6yiVJZ4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXb6yvLCuuEW2HI5PUascDdUknfouo+CxmfI 4BgYdBHliaJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5TW2EACdN5Di8mliNmvYODYhCo/H3Ed4K2D1tK9KHKp7fQ0/13Ftl7JhtMbxF63srn24mlNr4c1 Ku+XRFU3lVALwRtYeyUfuwuULDL8Eescn/6y5OOynzMeMcgrfV3G8Z33dIMmpV7tEpfNOQ//E5B rdFoGMbLziIwWTh+gno8ZJ69GHEl0NtrYL/D9MHrzeT3lUAKazKX6Uy5xCTlEv0Fwba83HJPB4o KTLQWUGPylCGkRhAvuwBMI2TL+BZYEQyE3Bo476EUxRSHckVRH0s9imUETRzlQTkZVjV06UKrxY e/SFD9JPpr7Hu1VCMPaOb7/1am7VG6oYv+0wdPUSaPQI+Z4LXMAsPgR/+u3UUUs/QrO/h5wYgqk W9OQ/gtCGPNIIdwcdbISaCVhQ6Yb/22sa1W++0+Vc+iqKvIiFgC4zMOjDZT8Hh2JKokEeyV4GxD u3J+h+CPrsk+cxNvO1HmoHC4O9BdEymWAVRsJokmsgUerOa7llwldiI0ehSkhomae8jXnxjZOv9 kJ5LLhessbw29WfjrdRzXN2YcuqHqLZQMrlRNLyF/bNc+Kl7lAf8+cdyIYiBx5RkqF7u/nZ6Wj8 5lr44miEhYfTdV4lblncN5xK/REo8PPlWqi+QVLyTCtRS05KH8Jv3TqNWBMLGQQ7IjRojRZEow8 OwrufHiQZnoZvkQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737974844154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- {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 33132c04ad6..cd56fe2ffe4 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 Tue Apr 7 01:06:58 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=1773737800; cv=none; d=zohomail.com; s=zohoarc; b=goPHK0ln7kgFZIz3n6atuAowCX/q3rRRmfpptUSxgSeZ7rCrS5riocL/F2MAusqKUda1A2sBYtk3282wL5fiA48cGTKzKuoEIL4Z/1/ZhgAWr8y5sS4N/rwUeaC2jdEBklF8jMCb/Nlx9Ax+VJUTiijMLCGBKuohnDF+XqwtHo0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737800; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Je3D/oVHOaNNSdW5WSugsbqqD58+fYmcQzif1BnO0Ag=; b=fVaEjiYscukdtWQJNFpT1IPV0lXJsj4ruHzuC9LJbIPDJotvDi8mOL/r+LoGkSjQQNfB4z3T/Hk+ZlvmsnjcH2ZwU2Ww5nZQ6/d8Py0yXu9ZLcSXaJmqFYHmsYnGlhycDlGQ+U8CeaGabYuGVcB9eIKM42t30xreqfZwvZC/OW0= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737800108288.98736170462075; Tue, 17 Mar 2026 01:56:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDz-0004uM-Pa; Tue, 17 Mar 2026 04:56:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QC6-0001S8-V1 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54: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 1w2QBv-0006E7-7y for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:20 -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-552-IP4EVsu7M3KR_2_SddSIVg-1; Tue, 17 Mar 2026 04:54:17 -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 88CB418002F4 for ; Tue, 17 Mar 2026 08:54:16 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 81C37180075B for ; Tue, 17 Mar 2026 08:54:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Je3D/oVHOaNNSdW5WSugsbqqD58+fYmcQzif1BnO0Ag=; b=dvb7c7+S9eHlftMiC5h6P/8sgtKtUgupKJXKCynYeMYRfXiXrl6PEz9wExZOmCiAbb2UQe rXE3SigZkhKf/kxLJRd2DImsVljz27TYvkogpfoYKemAdKlRGd5yerthl6cg8SsQ7oWyfV iuyKnunyTEfVkfnQfz/at1SqYkJB8QE= X-MC-Unique: IP4EVsu7M3KR_2_SddSIVg-1 X-Mimecast-MFC-AGG-ID: IP4EVsu7M3KR_2_SddSIVg_1773737656 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:51 +0400 Subject: [PATCH 37/60] 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: <20260317-qemu-vnc-v1-37-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=8016; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=JZsllecZAZ6RBYQJxYQi5yn6aJpI7CmsU0KzlK2TaOQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbAsroaM5RegpESR91OzgnNxf+ZTv5i/UES PEWmH+EtDqJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5Zv2D/4hTtL+Hiolr7Wb9buTAZtd7F3Yc8EECYhWqYJ4MTfNnDlm95dyLkyUgsiHIVjVWixzvOB 1dAPC2Swjk0JD/x0N/LUk2dVup1NSaCA/Z3j2O/cYN8zdIjDOFqB/Ham+IgYS4IGg1s8V8Q7/Dy RAtt2MJ5us3oN01UsNG86UljuGGUzeBJq/ZV0BzytSQ4d/D0wUjEqsXt8PnCH3VV4NvyHriitZS pquDw5GPyWarlzrWIwOVM6pLusc1N033f+WFjMA0LqQ+jdDirsv/NO7kpTsD3CEgBveQ4vQcD1e aSvuOWZ63UlPodcRYvwjUHSt7Mkc9TerEjv5LPk7muRXaVku3xSY4dvAUFpi/3lrIEgoCXYghYb Inf+WStaUxXDj3Ou1snTSJpoVN6GKBQ0QFJPt7qbN3HEeh3YCa1/Lz0/r4Su4Di7Vp6IUKTdl/S POxgJ+WleyTnaHcETZ7WeEqal4UYZYj0VOqbAqO1gOz0kHjsNkjKIg2sQEPOkIU4WO7nJqt8P3n ErxtXdKEu9FSpIi6nQUlNJxDIMXTBQbsmQveA5dHBbrjd9xbVvtkJTyv3ISBFiFaa8eYpo2odXR jf7XmLmhHRgfBOihMkigV5gNCtno4BC8Ef+gDeQlNtvnbcztylmLjEpgJfeZRt707NmYF1xPu95 63vCYUyh4wqlsyw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737802287154100 Extract DisplaySurface creation and destruction functions from console.c into their own file to reduce the size of console.c and improve code organization. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737881; cv=none; d=zohomail.com; s=zohoarc; b=P9vGpjXCx+WsLbNdJ+DeRhT9MSA4o4LCNrMp69tUzUeAJ71XB6hyn1wDObghWeSVKI0Le86xzTEgtkco5Fo8Ir9yN6X2QiN4duYKQfSX6INQRavMCiBEo1iHoU2PnYhHHa6wGLF6/kTwbuLzLf7LwUo3nsR47HXx+Ae6VVYwzUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737881; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=NOx64XRhujGSH8IrhEedHMjtXZ46UUG6Jko0MMU5Z3M=; b=TDdwZ0/EzP0sFGfUFyXU8VrkvIPFXq6DcEDgZPqOpMW4CLJnSOp+EUUUGoNcGIT9MvrEEicHF5yMYpy1jb/bNIvSpCh58UDfZE7a2tITF2AAEnu6h7yQIheJiDu2NfDbgUq8qEHoqowkOPmk9Dw5C+iqkOT8VPU7Buf0NFncuoU= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737881711485.0982131570919; Tue, 17 Mar 2026 01:58:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QCw-0003RY-Bi; Tue, 17 Mar 2026 04:55:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QC6-0001SA-Vf for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54: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 1w2QC1-0006S0-7j for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:27 -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-74-UOKP6dDSNxufmyMceYY8JQ-1; Tue, 17 Mar 2026 04:54:22 -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 B4A53195604F for ; Tue, 17 Mar 2026 08:54:21 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AEB01180075C for ; Tue, 17 Mar 2026 08:54:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NOx64XRhujGSH8IrhEedHMjtXZ46UUG6Jko0MMU5Z3M=; b=REEwu8V5diodb2+zsmRYD9Ho8R+NBx21YbW3wwTriG3cxNvnsmKO9h7ib4vx8wbzbRnUPe 7ISQcKUtYE/5OIYa20ya3sHcdblKCXs63DhdlMMgak1eXbFsN2BXAFGZs9cTHIMe2cWDTU thcRW3Aa3qET/8p90O2joDE/4s2dVHQ= X-MC-Unique: UOKP6dDSNxufmyMceYY8JQ-1 X-Mimecast-MFC-AGG-ID: UOKP6dDSNxufmyMceYY8JQ_1773737661 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:52 +0400 Subject: [PATCH 38/60] 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: <20260317-qemu-vnc-v1-38-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2361; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=4KE36+894DGb/k8lJOSMKo0Z5AGMIZ1lzcBmMhSASHI=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXbhjX+MYhBQW51gunIJxZzc8TQvzIHk7+zT eJbyfvlIPeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV2wAKCRDa6OEJdZac 5ZDED/9P4JUm6mjo5oJ32Y2j3aBuYEV/LmCPyXzzq/ImzlG5O/dTQJz5hy3sugs4LY33suaNfVY MIFq35p376MTocDI4A5P6uFtZ5A3SxToU5sioY1cGBrSOZn70bQVAEp2S0wR0gPt+gGxFXzfqS4 oak9mrIZDPrOh+FWUtkoluey1TnRIyvhiH1oXrE7o2s6E1jRxbFB90L4otO51mkn20UV6QsZKUV ytVETNsbkdzajSBPFS95McwywkLr3hhVvjdCMc3YiphR+TTOOiQiiSJicNBv+m8Z3cBeehv+moX yavntt8BYl3yEEnD0irsFT798c7H2RnuigdHuCWMhsCsPWrCC6FWo2Vq8Gcj37jm5nGaRao/FIY UqI5GJMhXD3EGTTnQaFdZF579YatNWBA/cX34n0b16VbyTUAN6KzhRuJxNdqdTEksxLefAWddgG ER+nPQH/1v1VWiyfypg83dzF8WbxDMqLMmryiBmYfWTTdn2hGNl5YDR4tmFrxVzAx3nmM/Q2rPi sfD/2+nlXoeWfo4zRikhxmApakzbM9EXfxcxVP/D+g2jAaUpGWDk2/cYW5UYZHfIQomJXZRIE8v 2GSkyJY40c1Rudn2rFbAMN23nQErXVdsHEze8Up9Fh7hG5E1fcz1bKvuuuy4SQJxzeosX6vWeoy XIEb23LY6lGGMog== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737883443154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 006b1986bb9..3d71010c758 100644 --- a/include/ui/surface.h +++ b/include/ui/surface.h @@ -28,8 +28,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 Tue Apr 7 01:06:58 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=1773737896; cv=none; d=zohomail.com; s=zohoarc; b=nxv/Ur+IJ0vgAFcNzHEcf6lvUPP/uqe06cD93BEbvmSxr+Hy7rElxUVGfwSC9Z2KSr+A396NZyb7LOs7T6ciNctWqZ000uGhPSnLFpRJYjcBgYumG4ZpmnTvPglWMN20JqFCkAEczFxo5b5cjm47LEdITmvo2cteji67zrnRYpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737896; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=qLhkKn7+1QU/CW6mOGx1V73AjWJQDotgUmzx8ZNgxNA=; b=WK32ZS38nnen9A11FJU8X8l8nmGue677WMzEddFnAK0b97c/18BsYDXA7wBp3VBgtpFLdH5XBLpp2WRSx3S7n6hUYQwKVq6QNJjsx+y+dkZiQB92aMrpwFgkHpqhXVLLdrZ3gulHbGIH0rLV28MQntvJ5dlYZoGRqpOxNJy9EQU= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737896378939.3720118353641; Tue, 17 Mar 2026 01:58:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDk-0004D1-AE; Tue, 17 Mar 2026 04:56:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCA-0001T7-TY for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54: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 1w2QC6-0006ls-S3 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:32 -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-518-aQ9qyaXiPlCWBjVdsvR6qg-1; Tue, 17 Mar 2026 04:54:28 -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 4D39E19560AE for ; Tue, 17 Mar 2026 08:54:27 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ED15F19560B1 for ; Tue, 17 Mar 2026 08:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qLhkKn7+1QU/CW6mOGx1V73AjWJQDotgUmzx8ZNgxNA=; b=MriojdKlKt/5j0liwE/AxKNTGyErCS2rNPhNZm4wpBTvbpji6gLfuD66meQILOpNqOfMyr 1T6NZ9rEKFY9Fa3qgPTe9o0ni39jEp3qVua9mK8WefYBh1piu8ev91bUxhECAISjTa9iH3 0OCZtDEAEqaHHg0Gxnue9u/2RVzpyo4= X-MC-Unique: aQ9qyaXiPlCWBjVdsvR6qg-1 X-Mimecast-MFC-AGG-ID: aQ9qyaXiPlCWBjVdsvR6qg_1773737667 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:53 +0400 Subject: [PATCH 39/60] ui: make unregister_displaychangelistener() skip unregistered MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-39-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=653; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=UmkZ3twV9e8nEpmSc6Jg74ouNXvCipF8aGA338TlrOw=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcXsiUPubQ4ExGV+zz2Vvhy0NeZT6jo1+gr pCIl7w0MsiJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5W37EACMRAIdhmc/Er0sHAmvYeDlJ6BnPbqpXmgU16+2eJ4SB7MtFLu2KbErkZFdgbzuLZNloW6 Ln5isFBBf5mhk/72gcHzaboSKHZ26iJVV7g/dEUvRIq9eTUraQxCqgavX5QGV/nmiuT1+mxRBIF FN3g5FKiic29dU39z9EXvZNgGryGkd4lzVt76upthmAhTgKoBqHwbVTCm2k34kghQxheG5Zy7SL Yh+6JRkL5b9v6GQiiL3wqqjIXRGstOS+pPfVuqO8RxKGQM2Bvrln7Sz5SncnMNW9cYQU5nkFdqD PbOfawQKwmrtKTqRA1fcEWSQjidhpYDTBPq/yzRI37itastvw7HBW3FAmjypYe6q8xTV9YLTPmJ sx+fusWEXLQSvDIXPpXkCWZxh2F85JxE7GxoJ6RKPAP5y1C8HCGLPj62mn2DLWM9fFKVrvwzAkC 4bOZEfYZO01a3BSJ4Ir4K4+Zk0I8Woh+wC1DcPopO1w+uiEfSKzRKkddz/9HHHnnlxCQdtetTRa J1EGRD3IRuAlu4EJ6KOSsY6KgRRYNUWw54UgEKhdjOA6x7oND6TiMqVTQA9PHog/NQqhInYmYHf X7P0t+sRE77oaiZicAK5xwcLOqPilrJMT+QMeRMHV18uYYH6oUfOmEU7s9LNXNYtQqJDigkz6N7 jmTcnbAUnuCkS2Q== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737897077158500 If the listener doesn't have associate ds / display state, it is already unregistered. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737821; cv=none; d=zohomail.com; s=zohoarc; b=hWRAiu+y4W0E6sDNCLfJaPMVYNko44nyqNlWS89KvPxTLU0voSA06JeEc6qpcsW0F/cJiIT0zXdlxTy4FiNC4NJh+9AopX7NdixuCV1TE+mX3DoU7q7uoVQv7rAyxkwReT5bLJ3+01VpReoej1Daupt3XUDisIBfQyLO1AJCi2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737821; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=fkEYT5wpR4Ys9ytN70/AlMugRB4ENeg9RxZzymCS7rM=; b=bPHGlhtRe74T6CE/0oqcKtZwKFok9Q5xzW56PnN3qvrcCc7TXJJCarImEEMS5Le7CxIyndCk+okH4Rm5rLrCyNyZvmEeG3i1vzdpyn2U5qQVUh9iwTH8itW9OG0lY+EHGdNksSerD4qOGijnyBst2/0HGGQ9WZ6ISyPYnr5CeZY= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177373782158230.373662779681126; Tue, 17 Mar 2026 01:57:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDw-0004bg-5T; Tue, 17 Mar 2026 04:56:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCG-0001Uw-3B for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:40 -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 1w2QCC-0006n0-0b for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:38 -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-211-8JziJq1gOtGQB4iFWgIoPw-1; Tue, 17 Mar 2026 04:54:33 -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 CCFAF1800365 for ; Tue, 17 Mar 2026 08:54:32 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C909919560AB for ; Tue, 17 Mar 2026 08:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fkEYT5wpR4Ys9ytN70/AlMugRB4ENeg9RxZzymCS7rM=; b=Sbn0Z9mdKZG8r9wWKGNoDjfNX5YuyUF2z/iaiV28hO/RFFVLt5f9w8m+qYMSoUGvZTcxEu Bol+WaSi4Eyr3WHV4Bs6+4/5l+5Q53Q9R9P1Lgna2F9FvzR5JWOuOYtU5qo2frlzS+SuJM 7E8XVyBuYmltXDiUVa270qutnuByAIg= X-MC-Unique: 8JziJq1gOtGQB4iFWgIoPw-1 X-Mimecast-MFC-AGG-ID: 8JziJq1gOtGQB4iFWgIoPw_1773737672 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:54 +0400 Subject: [PATCH 40/60] ui: minor code simplification MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-40-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1816; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=Q0M7GWnDFRrF6HdZ6kHjqcXeOxYXVszPB8J9MyF5eo8=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcCVuv4mctGMkLPRFiStHPdIGAyvvbd8SLn +aIGKX7qV2JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5QtYD/9okE700t4zcWeJJvCjjHeAuSD88ABb8KddFilJYKoz3u2OKKzk16G/raQmhrbi49z8o5h lNV3RlHf0WrVeW3pKcmfo0nUuHAGgULgHJisiBJnq5kA0XN/iKASenIwCzatDEU5dI35X5KnUOx HKH4Cg36IR0Oi9OQwyuKG1oEuXIDYiE1aLfdluTK0cjqGuuuVgAAD+U+qGnmDsYpGRYfrgA9evf /q1OMmr8nAfcaDQocfztMdaHzkMSFsxp1zcXjGJAQWU6ndFUmRLXpPog47WjAS0+4HqfjkOcAaW pnbkXMdN70x/PuPXtNlb95lflhcF48GfV8csz2lQMbVy/sCb46k9oNR1PKKwOdsreL9fT/CPLwf E8FKMpx5DRQPFQJadDvI/SmkOEdlAbb3Y6ChtBY0HStfV/rlMRL4UX/EYeS3D1HuFTer7Cdfkie /2Y9SLjnOgzyZ5bThExZutzM2PpJl4PsJVqtCkqlqz5Tm6j+rqOns8BlV14fhliT4Rxm99rZHjk 3JnAh0frZ/B9lOjW+eGe0uq0JZbHYAJO6YNhpuOaKpItN3NtqIJliyQpQzKxAfas1Iu1+xUzvjc CgRiZqfQ0BidyQ1KZwTUHj7FEO3EImZVWvykkQr56DXSa+RmAvwLQR23gD10XMqw/VXng+XZaBZ 0keVaa7QMz6uFFg== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737846914158500 Remove the extra "info" variable and its initialization. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/sdl2.c | 10 +++++----- ui/vnc.c | 7 ++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index aaaede56e0e..3ffb8acaff8 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -600,11 +600,11 @@ 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; - dpy_set_ui_info(scon->dcl.con, &info, true); + dpy_set_ui_info(scon->dcl.con, + &(QemuUIInfo) { + .width =3D ev->window.data1, + .height =3D ev->window.data2, + }, true); } sdl2_redraw(scon); break; diff --git a/ui/vnc.c b/ui/vnc.c index 4aa446a48d7..87ec3e6d799 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2638,11 +2638,8 @@ 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; - dpy_set_ui_info(vs->vd->dcl.con, &info, false); + dpy_set_ui_info(vs->vd->dcl.con, + &(QemuUIInfo){ .width =3D w, .height =3D h }, false); vnc_desktop_resize_ext(vs, 4 /* Request forwarded */); } else { vnc_desktop_resize_ext(vs, 3 /* Invalid screen layout */); --=20 2.53.0 From nobody Tue Apr 7 01:06:58 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=1773737859; cv=none; d=zohomail.com; s=zohoarc; b=URtk/AwqcE5H2/VPp1KqNtrm9RyhMHMxcMV2jLlF4tffb3+l8vuqjXRrxQDvecQRLDqFZqUFP8R9/ej/4HcmxqU4MdmqpNuWYxDynikrkWA0lKw4/TbmCVR8pKI6zR8724L5JPoZXb/MWaZy1VsH7csi1w/yj7nS3FhQL83W8PE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737859; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=2/qj383L7ITRR5UHJaz+Vjb08FlmpMy3/lXEF3fgdaA=; b=JOEv53BifBL2PoavXp3KNr9YnEaLrLwUGu+HalGpK0HCVi/qrMNiOwk6UbBYslk6XvJ/TmJuwgCqJFBdwfIGD6LK1v9rgkG3fvhqWE5ReVpp3cEBCI50kZ+ISmFkWNQd9FKMY+lGr5LbXX3bE8e35gFhCNQkJHGu8KV8SxaFoxg= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737859969137.36044097389617; Tue, 17 Mar 2026 01:57:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEA-0005mP-6J; Tue, 17 Mar 2026 04:56:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCK-0001d3-Fp for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54: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 1w2QCH-0006oD-EM for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:43 -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-634-Dq4KYt6cMiStJkoRB0hI5w-1; Tue, 17 Mar 2026 04:54:39 -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 6833E18005B8 for ; Tue, 17 Mar 2026 08:54:38 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5180A1800576 for ; Tue, 17 Mar 2026 08:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/qj383L7ITRR5UHJaz+Vjb08FlmpMy3/lXEF3fgdaA=; b=MV8URKhQKzDQ6CcX5adciF8bP183z4eGvE02OAlHwE6iUVrZUCKVPzDSDpKnaieh68tj+P M+oWVS56gR+uyKvtuVBMyp3YpBAdfh6HxcJoM8LMQbmxJR12UyTSyiYOze5GvrE1CR6iZn /9DI4BvNcJE+tnAufDgyPgg1IBHG2Ec= X-MC-Unique: Dq4KYt6cMiStJkoRB0hI5w-1 X-Mimecast-MFC-AGG-ID: Dq4KYt6cMiStJkoRB0hI5w_1773737678 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:55 +0400 Subject: [PATCH 41/60] 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: <20260317-qemu-vnc-v1-41-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=599; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=AHQP1IHteOcc8yrqt84V01z2iY57/v3Mf6vjZMrcSlQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcnIPNp5VacNg6ApLEgxT68T3BC8GVTfvkg VY+mbwC+U6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5ZAdD/4qyNyClRaDSt7HXcwnwJTRBmkyL9kbzvddAzsDHzPw/cl9RodFZT+O71vtnl5HrrT1FTk HnPlsR0no0AFraFBvvKvFyQYXekbks2EgL0LeFNtqnWZgOmsAfEnBQPyScTbDaLt3m1oDjdpZTM gJmMj1ZMsBm8uecmq3MKqVln8l9BLTy3AeLk2llCp0aaLxw8ughQMQhLCxvL42fDt4FhPMPqKwD EInci88FYBqeOQkZsl0s0OkKRa6z4SmgxdB8aOriTEvBeR8tdPpOUsjVKHec33xGYwtWHkarUCs vzRJzfHBuc36Yy06BiBzzm+i725K6sPOikO8JDcegzSpNtNs5U27ga1w9HOi4K3p5YIusjj1mCK TGkGT4UTk3mxWWRxi+/Uko52oeXNQ8wka9ugroLtwl6i/DyXSZdt7YGIwrK/EZyi10SBhViCJX0 gVU9uTZToGY7I2uZDDRPrVZReHlACsV1YDxwxLaz0pXL0L9K78i/EGS6HES7lmeroUY+EAZ6JGB LcEzUlb0bXOEWi6J9+QNh7ClkH8e9Ggp0Lf9ZZpCqwghwf7DOf2WrgdzSgnx/Gv//47/dpDJC75 D1G5rvqPSNRSS7k0y91RGzzwgFK1Tlv9M7Jl9TKvS2zFVVwfafNg9iyy0nuv21nAcRsnq8IEOm7 eKDeP2Q7lf8aFnw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737861327154100 For convenience. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- system/runstate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system/runstate.c b/system/runstate.c index 77cb14ae028..7d8bdf62dd6 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 Tue Apr 7 01:06:58 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=1773737795; cv=none; d=zohomail.com; s=zohoarc; b=fQiGZe6v+ou//9YcSvbmCM92lTt+DUVVbhoNkyQtiJj8CKBCCKmdRlgqFinWExRdh3ZMcbniKGzvMi+vrWCAwOMk49m7UmEJDbcC4IFdI9v8tkdKegkVLEbnaQxt8HTYsd/fNnMX7JbCvVLensF8UYnfBNA/unuiLDqZIDxoKhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737795; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=EGn1kwoZqRzEPfZ7L3thAtcBGbOjUmNNivIgdm7tnB4=; b=Q/fHsgRWSqU8kN3z+eBNjpGetr7nHLGst+vRPzwzNXLnNbecS9XP/Y6OUosIELGXpnLcz//bwn6vU22C9qdGCZiQ1SKau4FbtL6dlAJXt4do4Lh0EZxvgI2Y2Hjdvf0du6glARMV8XHhQeVw5IoKyRpq3MAEvaQWEtbjNSJpy3w= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737795346328.16475571740216; Tue, 17 Mar 2026 01:56:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QDz-0004uZ-PV; Tue, 17 Mar 2026 04:56:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCQ-0002ya-KD for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:52 -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 1w2QCM-0006p1-KM for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54: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-417-vjqSHQFIMKmtsS1Bya0MvA-1; Tue, 17 Mar 2026 04:54:44 -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 C6EBB1955EAC for ; Tue, 17 Mar 2026 08:54:43 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A9D0F3000223 for ; Tue, 17 Mar 2026 08:54:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EGn1kwoZqRzEPfZ7L3thAtcBGbOjUmNNivIgdm7tnB4=; b=iAwotrkE+NFsN4VCBVNSEPMfPd4xKoj6s9cvPw2RbJGGGNyXWNdXx1lm44+XW/lSHP2fRy Ix07aBFdLccLG66R4iaLazGTMNTYhO04jXb83xTpD3r3pPl33uMXg+gEip5/Fo1luMTkLs 2cdtRBq7CY8zCNIvPa7UaQBNdQ0ktYA= X-MC-Unique: vjqSHQFIMKmtsS1Bya0MvA-1 X-Mimecast-MFC-AGG-ID: vjqSHQFIMKmtsS1Bya0MvA_1773737683 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:56 +0400 Subject: [PATCH 42/60] 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: <20260317-qemu-vnc-v1-42-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1325; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=X4qgBvBliW+YREf4/3xvNHw7a1+98eJKhFPoGll8W5U=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcZtehu9FXAyg/a/h3Cxam+x/WwH2exmBUm I/XHSeKVpyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5bJGD/9KmQSyeiVeb0H5irkKizDwFX0zWB8Lgtt3ePAAn8/HgiJugvyJXr6xnkQBomJ65xQSFR7 LZGT9Y0LNT9ypFXMCZPo1RTTEa/kbNNSplad7Yb+xx7s0VNkovbvrooIz1etEHRxWs7Ph092SI2 1lWLK5uQLp8Ku4jH0Ixngn53DvayT/a9kzoN3wUw0BSDBCSA6uC5nLtcyIqHkywji+EJ5AMLwVY XYn4thYhOKvs8uIjcJAOrVjkdDBCiacmRa9CFNaJSqQqZ4o+f8liKxolEWktpL/6Xs3C14P/W3f cnxk6CZSdXkNaeofrYimv3HIR2fMseekkDBve5E4/LWat0JpV8JYvU48oG4MI7kfANmSr3H2dvn c8JF2j1WmuxqVfH9n/nvfjROR+MDACd0cu24LjRMHVy2LGvMZ1rmlvUuIMDS7njdLdvYFsj3JSI hEmAJBSxhTuQscVwIb6xSNP4W8DqNU0lzVNg90WeD0YV8igkrNCd56nAXS0Xr1oTR4WKgmuP1eH wqdVtNS/xddBcaibxr0ZWWcVNXghJIp8Pp3fkS9fh5mZsmCkOw1qgQmmhG8EnoBRMqYTBd9UABr 1b5qRVPrGquByVr7FO3yhHxaMPZGk4kJSm+Xz9ij+ioCQrwH0BCWns9yIewvIkh9BwMnxJjV5tC 8kvKInN6aPxmKQA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737796192154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/vnc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 87ec3e6d799..605e5117b7f 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3464,9 +3464,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); @@ -4067,15 +4065,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 Tue Apr 7 01:06:58 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=1773737930; cv=none; d=zohomail.com; s=zohoarc; b=d4AZaXrzvxYN+qBqUDzx/Q/NyoZQ3d9vW4/P2dIckLUqnPVHTfcGD64rFuBY8Lc35QvHHPrAxMve/FyVKYvBjgUgsVeWWPVkaEtsMVCmXjUa1HGm2u1+7o1B5A6td32EKz9QFxNUMFa56Q+bULsiA50QsoDp9K5/kDQDgQdX/Q0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737930; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=MohqLKRFXQbENKBHTeznLw2KfQVmXjody2QDCT0Nb0U=; b=h8SGcbkgKjwjncajzlutalUebdo3k/Qkg6xAirR/rA5IYqWgIoCMyD1aPzyYRZ5JXLMxW1vTfyoQGUGMxNCqzqI1YD38YHXe1wWHa+s0aDZ3syfNLgbPgx1COHSs/rfy4GcLVdxJB77kHvMl1yOdaTdNgPfQeQI08sDl4NLc7ZU= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737930654179.0607735819044; Tue, 17 Mar 2026 01:58:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEC-00065N-CU; Tue, 17 Mar 2026 04:56:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCc-0003Ni-Tq for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:10 -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 1w2QCU-0006pe-5i for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:54:56 -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-227-QQmW4duxNLaDGMqO7iQBFA-1; Tue, 17 Mar 2026 04:54: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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2ECD319560A1 for ; Tue, 17 Mar 2026 08:54:50 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0B0F919560AB for ; Tue, 17 Mar 2026 08:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MohqLKRFXQbENKBHTeznLw2KfQVmXjody2QDCT0Nb0U=; b=E2XtvRQpnTXS496yqjWHiIaxy/5nJcpjyzNPo2L6317YY4QNaCE5RjVTUpBHNIUh/c51j1 25L465jdU7wQKcszTUMeAocgoZn/H/+jTJ3PLkJNoSrf3zThwg9EANlyd6VsAhee4+vrmV heGWMbESa7aZM++FaRI6WZJk+VDG3FU= X-MC-Unique: QQmW4duxNLaDGMqO7iQBFA-1 X-Mimecast-MFC-AGG-ID: QQmW4duxNLaDGMqO7iQBFA_1773737690 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:57 +0400 Subject: [PATCH 43/60] 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: <20260317-qemu-vnc-v1-43-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1054; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=mpTuET72Uh5XCNvV40mgiXnypBmj/w1fe3eUGvOKBRA=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXc5CKClv3vED1vOCNsHQp73gXJY60OSkVHR ItcCOCVDVuJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5e74D/9jUDYZEUsNTTrvpDhhHCRO+DNLLxcgbu7qCEPtneGLYzfRQAgtgtwH6cN9pKHM2eCDZkH Pau4txiU/tqddOvT06/AjzXSXSnx48a5kEnOh7bg6lHaQ7Wfl+FYyZHD9u5i3oIj/oTnL5YNAYc RlQsBgTtaiIRng4lN3u/FMeM1Cc5fZpRRbFM4cF7Vj81dRhxOphi2tKMwTt/I2RDgYW0FSagBhc /LGfxaElAQFYMc/eExqTes23RCvNwgUgn670YL8HtioZQUdhRl3aNDIRjkopHUJCrCIOXV/9Dz3 srfZgAR4cz22GYjiDZfWaOC+frROXd8+9OV4IIU/azXUCnTSrM3TAu14UVsRyvDoccEasvWqjFW 2NumDbkXb1U1qjdUvcX1fTvHRqOElZV/R6exM3jw/e+7kuCG3YW6KQh0NXvNmUTkx3nqRuermQf 3IPV5wfa4xF5B/145ssP7XP5P5E2PQY+LYYD6Q+HlKog5gQpAW4leSAFZFXlNyCVtRWY6U0o8LR gbGCCq/VE9fyb1VRlEgyVmvkteQA/GKUlogJWahsM6OvNlIWY5YtT7zwx4Rj3EQ3DSG0bc1frzq +UVBBXrRrCC26UuJLrCYdLS4JcaU/n4105/8Z4afyT+4m0Ks9N28llo/qCJgXL6XSelN15LnsRj L0KL+5OXWWUzA+A== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737932195154100 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- ui/vnc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 605e5117b7f..af5fb3c1551 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -4318,7 +4318,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) { @@ -4326,14 +4326,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 Tue Apr 7 01:06:58 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=1773737849; cv=none; d=zohomail.com; s=zohoarc; b=oAdDE24iIPMfWGgcl/TfUAH2KpyT8SC4M9Z3XzL4BWu4eXIatR3xchTmczYaLEoznHgrG+6MRaw9tRYHE8SIXEbealb3i9LjXaQV1KFRACE0d51jpdn/Fzyczmte9YLnQp0EdCZz5zosJXIQQRTL50r8dJZvs7CJfeebutZ8dss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737849; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=fweQuvSX1fJ436MkX9foXwMd8CWTbAfJ1duBpJZqSfM=; b=V7ZB0ODEPpLJskbl/H+goE6rswSJvWRRBADcUreAsj4AcKLfdBM18NmQfmIcq7cOLhp6TY2Yl04tiAjozwjBdqNAxwKVpsch6UFniMUbnNpV9XGVc2rqkqqCIVyfCkRYth9ya2kWmDB/5LSDkTgrQsDn5Q26rGLYwnYKEfYderI= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177373784974344.292474937530415; Tue, 17 Mar 2026 01:57:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEJ-0006Xy-Jk; Tue, 17 Mar 2026 04:56:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCp-0003SZ-GV for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:19 -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 1w2QCm-0006qQ-Gw for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:15 -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-436-9ge4crJSNLumu6Wwi0S2sQ-1; Tue, 17 Mar 2026 04:54:56 -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 080151800629 for ; Tue, 17 Mar 2026 08:54:56 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C259A180075E for ; Tue, 17 Mar 2026 08:54:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fweQuvSX1fJ436MkX9foXwMd8CWTbAfJ1duBpJZqSfM=; b=TIOCL+qE6Zu9ErQRVSwgSG3sUnS/q8bIrnh8D0fQeiqjbb0nU6jF+xZwOLBZJPnOk5w2PF goHsbJJgvn5+8KiAo9DJHx+j1VWXJU8Ak6KjUjquelm7PucIiWqNX7wPPAsIUtMt0/Z0VX wYO+VRPOi0wkU4rsqQT0YSfAANNz4Ig= X-MC-Unique: 9ge4crJSNLumu6Wwi0S2sQ-1 X-Mimecast-MFC-AGG-ID: 9ge4crJSNLumu6Wwi0S2sQ_1773737696 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:58 +0400 Subject: [PATCH 44/60] 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: <20260317-qemu-vnc-v1-44-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1115; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=cDn9IqWN893vcRegr8B65WB5VYcrJdV13eo/ttHO/EQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXctfEBcMoF7jFrkDt6V/HrwPmtR8sg93VoY NGDMaJ3gRKJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5fjJD/9CgFy7p8bI63smT2C3IJQme53jNlKTzbAxPVOCJJJkO44y/nRJrqVU//s46glw1WixHr5 WRM4u9bK8I5gXIIHg8l9M1yB9E1+E6iYQWi6EPo9ohq/lLt6i19JhlLWUE0C0DUFg/RGO9Ps8eD xXdQWE/6lmHZC/nD1DltoCLHKfrjBq3ho1SQZuhQvaX9KqZSu5qqK1skeEPYQL7wuk207gMr0eA pXWJijiCGNYC5ZDtl5/taQ1zyhUYB4B9PN6FhThbZ18WW4iQDX21DpolKn54q12sIT2wS8Ukwh6 5cFOqjNmejOEbkdSR8Xl+Bfeisuo/zgRyVIk0ug37Rg+KExrjsu+5ttOrvCHWWxqTAMF0uWrZta +9pgs5L4b1ObXI3yI0EIouNeePuociSKHachjO5QBpYMcOhm9EjRHHNY1caKDEPp5TRYQ1mpTep TMzs1KAflojATYehbPSkFc12iXnutDbkgSvNONRBPZsAgejeyC9HLnPARtBQqs6iYVz1QfJfEUZ mzfIV18igrWnrcWmOPytU53bB9WCLVAC/FLlTscoKx1A5rY+zjdsDJFMiI1usn81m4ssrNIDUs/ UsU3X+SV6ZGkt3QcQMqFjJE/Gx1r36/8/0gekgXL4WxaqoFls/NP195GuqD0cjoC4R7SCSkRYwy dEokU1a+oJcxqXw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737876904158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 af5fb3c1551..763b13acbde 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3430,7 +3430,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 Tue Apr 7 01:06:58 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=1773737930; cv=none; d=zohomail.com; s=zohoarc; b=CMKK4y165AhXzTf4LLxFm7ZCbViDbxxDz6lXYX/1Loxu6y16bwfe8St373EKvx5Z9pBAIgiMPgfkWT55DEAM2gTnPduFP6hw5K51jOYnPHCCui08AZUmcFfWagBt9VLBxywiA6/zXhC/3ozEO0pQTUK3f5fK6LBclHwD+L6W15E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737930; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=cTW6lO9YRG5qaKR/kxc3Wtw+Ba3ssnDvxbOSDxQ4xuk=; b=P+z6Xo3dZQNx1PponQQt558mYM0u6b/2RlmosJSULFGc2ijC3BhBsmYxLZgirpTG11Ue/FJfQu3sWl0q6lFM4jwHnxz8Ft1fmM+gcLdi70mqnT7cqM0KOUaVJcF0A/FYYfNM2W33mwrdkEcIZLWIidAroCrLppPvIQbjdHSeVAs= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737930860966.2441516875082; Tue, 17 Mar 2026 01:58:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEC-00065V-En; Tue, 17 Mar 2026 04:56:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCp-0003SX-EL for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:19 -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 1w2QCk-000727-Ga for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:13 -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-416-Szj6poL8ODyqnV1ofPe7WA-1; Tue, 17 Mar 2026 04:55:04 -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 3EEA119560BE for ; Tue, 17 Mar 2026 08:55:03 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 741531955F19 for ; Tue, 17 Mar 2026 08:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cTW6lO9YRG5qaKR/kxc3Wtw+Ba3ssnDvxbOSDxQ4xuk=; b=CVQm2d5w+DA69qLD4aSmd2ycMV5OEGmiFG1v44s74aLyRiz+18FTYwqgHIp+0Has5C4xDp qFdP/Xbvfs7a9vKsYWvMopa6nezDCClPD/3j5UI1pn3199piYyW5Ae+wcR1fGzS8G5t3AV 3QG+RH4Nn0myib/fdSWj8mZ6o9t2sq8= X-MC-Unique: Szj6poL8ODyqnV1ofPe7WA-1 X-Mimecast-MFC-AGG-ID: Szj6poL8ODyqnV1ofPe7WA_1773737703 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:50:59 +0400 Subject: [PATCH 45/60] 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: <20260317-qemu-vnc-v1-45-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=4072; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=fR1oB8ljP4opnh/NW5I2x4OFCScpcbx3pOr/dxjVmz4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcjRHo7MEYnxHrqbw0hm4zERRnl/cO2+dOX WgwC6hkHm6JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5avlEACEuYtH+7P2K7+ZH4PpOyNeKXAefy2rboq4PpOuyB22xgPBL7XCb0ym+qAnrdDBH63MFsR HcqJruq+5qyN+DrorhQ1jP351/+u1kdO8KtjUwQDusGOKicH2wlvVB/QO59LHZ2AyAtr2cPsh/c RZcAnSUrpKxSm1uxsjrysWeO1QCNMa8WPNi6j5dPDbZl+OLZNNvapeqIi7qJKiPohG82EBr+0/m S58QhHrjllJnjV9ivQ62LY3W0Kl07Z4sTMt5YCnnsQXzqWOuSLZe+4GIY4w0NECOMddpfb3Xek4 e9SOe9OpZCcWNME5FJoVcTMkeGKq9xVxOvXUkYn+auEPJUw2+8vVQxrjuv/AdzrdU581XkCUQj5 TryDppn3wkxTbfGoWFQWbKQyTPB92tAWuGUAWre0U6Wp1eWo6pYTcnmbS7XWB4I3f1IOQMArpv3 J28cfH5YUnIVSu6Yha99hiswkM6qu8u26B7rNmuc7DNmNq53/pxeTl1y864evNi6XralvoqFn6c vQGfU72BcVrGn60k+etIu56tCvXcw13DPt6ile/i7rdDYtqV8V4FYxJe5vuTY8cZ+2ahRINXrwe IowV8aSKLs4UmE2gH54z4MrjDEmQg7cGIjtLtUxCUf4uaL25oQ3Tn75bERWpLOXyqCAnijr2AhX CnSXPUSQzyt2BrA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737932233154100 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/keymaps.h | 1 + ui/keymaps.c | 13 ++++++++++--- ui/vnc.c | 30 ++++++++++++++++++++++++++---- 3 files changed, 37 insertions(+), 7 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; diff --git a/ui/vnc.c b/ui/vnc.c index 763b13acbde..115ff8a988e 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3421,6 +3421,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; @@ -3430,8 +3432,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; @@ -3445,22 +3448,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) { @@ -3504,6 +3507,25 @@ static void vnc_display_close(VncDisplay *vd) #endif } =20 +static void vnc_display_free(VncDisplay *vd) +{ + if (!vd) { + return; + } + 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 Tue Apr 7 01:06:58 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=1773737820; cv=none; d=zohomail.com; s=zohoarc; b=j03oN00pSB9u5sNd9zR/jp790Cg4+ozE60cwMoHKnAKt5F2C56yH7Gnyqf87m8+mxT/ACfsGOofKWt9CXEZzCe9sLm2eV03tSn8JEfuCPdrQs0Og3zdSJ9o1SSqNGW20fwbPmBzcFL4/8e2oH+lb7Y7ql9119CuWf1VJBmUY4M0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737820; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=pm9z/KLmnvqjHU65Y307HLafFM7uqzQ++FqrxJANaLc=; b=SFP1gqzfOPKrCplipuX62UPLQA/JMgYA/WSk/i/k9/xV8mj2LBPcnNivJV9VFBroHqfBw0mXYfU0P5iHwvxNL4jd+vRfk8NE3wFP+49O0Tydgj3IU0XagiiNoFubug95XyPslOJkU+QQWWpT/W85bhKEOSpvAsjBcKQ/m6Af3Bo= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177373782055367.24089275391202; Tue, 17 Mar 2026 01:57:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEA-0005mj-6v; Tue, 17 Mar 2026 04:56:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCp-0003SY-Eb for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:19 -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 1w2QCk-00072K-IG for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55: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-591-b5zhYZSgOCK8yJ68t5R74A-1; Tue, 17 Mar 2026 04:55: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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C310F19560BB for ; Tue, 17 Mar 2026 08:55:06 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AB30B180075B for ; Tue, 17 Mar 2026 08:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pm9z/KLmnvqjHU65Y307HLafFM7uqzQ++FqrxJANaLc=; b=jPg85Fblc/Jc+ldh149QX0u4hybbnmNDZr+kczI9HbXeBJyi7j1/ALtzbXfBfBA/P6ZsGB n7fRurEpPKiiVku6DY1M5fTLFlx5sVmCvAR1VZ/FJYrYHswcG82pA4xzFwXMbKR3WkDx3E 4hA38Me+n/7JClR61eAThjTj9z1FYno= X-MC-Unique: b5zhYZSgOCK8yJ68t5R74A-1 X-Mimecast-MFC-AGG-ID: b5zhYZSgOCK8yJ68t5R74A_1773737706 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:00 +0400 Subject: [PATCH 46/60] 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: <20260317-qemu-vnc-v1-46-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=10263; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=y0rdJ4i09dkViDqaBY5p5uE+zFyhrsF9I6NHbnFZ5sQ=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcbpKG45PNdNRwk32ltBSJEaCWloyYK1GQc jYxMEF3s1iJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5V1hD/96bG+PWZoNbOZ4LGob0HWnp9ZyHYtqMS9f1yXrtggXfi7WnzbPu13zKi700oNV6Y9O/ik 27VJkawx1KWpKKisCS1Qv9n005RhF83193+6cjq9j8mI3znTguvHXQMCt1SHIkg7RIZgmTUP/w3 yG5j17ofeRKTcTFYVG7oioTqePGKNqgF2AxciMEvROC1gpvdHRdOVkb0i7JRaaHkJAsIHJW8NqK kYQJvReD9FhG83PH6FQcdPI2oP1v3G+XUWDwPO9zlKe6iRQP/NTqa3KdsPuLXsf1J+k0LWiAiJa huYrkzmbMZO0Oj5yTwlpLgDTFXaqnOgDVAbltCo9aNmiyhA14nTGrjuTaX7mQWse6XabfCZCB93 wNttTj2bSM9LB9hvnF+HIpGAWfV5TvoqWc9kk0pB/VIRFxZ2RmNvjMCdfBEoV3WHgiqfpIAcE+B SatOvRflDThqZicTh5R85w4G5g8FZ0fQXB92Rcf9btpRDIWlAZQ3sx/l7+T7R31bGxfZqhPedB8 nP5poJ0Erzs4Bb7zgGp/Eb5DqsXJcQMNyFYub/IoJK6SP26F3JpEsHf0kxfhAXUx8KKPedr9fFQ WNaSdwqTuZUmUgnYHgaig11t0vx0fuIUBOctkktLvIsOPk3xwvFec9CjPe5C8Z0ZVZHkk3PtfmH mh4ga3tK/2sPRxg== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737822619154100 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 | 79 ++++++++++++++++++++++--------------------------= ---- 3 files changed, 37 insertions(+), 47 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 152333d60fc..737ceba3890 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 */ -void vnc_display_init(const char *id, Error **errp); -void 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 c5d678ac31e..6afe0f16d12 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -548,6 +548,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 115ff8a988e..03b99c9e590 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3421,14 +3421,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 -void 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; + return NULL; } vd =3D g_malloc0(sizeof(*vd)); =20 @@ -3449,7 +3449,7 @@ void vnc_display_init(const char *id, Error **errp) =20 if (!vd->kbd_layout) { vnc_display_free(vd); - return; + return NULL; } =20 vd->share_policy =3D VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; @@ -3462,7 +3462,13 @@ void 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 vd; } =20 static void vnc_display_close(VncDisplay *vd) @@ -3507,7 +3513,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; @@ -3525,7 +3531,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); @@ -4068,10 +4073,9 @@ bool vnc_display_update(DisplayUpdateOptionsVNC *arg= , Error **errp) return true; } =20 -void 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; @@ -4090,26 +4094,23 @@ void 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 { @@ -4120,7 +4121,7 @@ void 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 @@ -4130,7 +4131,7 @@ void 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"); @@ -4141,7 +4142,7 @@ void 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, @@ -4149,26 +4150,26 @@ void 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"); @@ -4181,7 +4182,7 @@ void 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; @@ -4215,20 +4216,20 @@ void 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; @@ -4241,7 +4242,7 @@ void 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); @@ -4255,7 +4256,7 @@ void 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(); @@ -4271,16 +4272,16 @@ 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) { 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 @@ -4288,11 +4289,7 @@ void vnc_display_open(const char *id, Error **errp) vnc_display_print_local_addr(vd); } =20 - /* Success */ - return; - -fail: - vnc_display_close(vd); + return true; } =20 void vnc_display_add_client(const char *id, int csock, bool skipauth) @@ -4348,15 +4345,7 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Erro= r **errp) id =3D vnc_auto_assign_id(opts); } =20 - vnc_display_init(id, errp); - if (*errp) { - return -1; - } - vnc_display_open(id, errp); - if (*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 Tue Apr 7 01:06:58 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=1773737906; cv=none; d=zohomail.com; s=zohoarc; b=H735oS/Cj2xmo6+IMus3timsz5jeO7rAekB4QSSf5j5xa7CtQbnMTUZmuAxrOjIqgMSSOI4uw7kJD8vHL5FaifN1VqtzvQp60NizUoIs4y4m+Eq5eM2PJyectUv3oVbghJZz6SycCsel1CSbEbmu1aIVBdRO19voc14DNTpEA+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737906; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=e0JR/J6OJK+GQEzT8ir8klbcnwwkITj+TK5vevotDWQ=; b=j/ok5sH9TYjLWmvSUGXcdjKWePyVcjj7jNvWbYZSKiKEf9qKLl7EFmH+vIIQ+mVkev7KKKj/ySYzJ3VHMe18lreHRB4RgLjsiENIphfeAd0t8NTT0eAYembzRebGH4NYLF0fnWttIdzdNZn+/wy/qcmz7OnQID2xRyzgylsLaK8= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737906292288.90832474747833; Tue, 17 Mar 2026 01:58:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QFC-0001H7-IA; Tue, 17 Mar 2026 04:57:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCq-0003TY-Tj for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55: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 1w2QCp-000736-BZ for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:16 -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-657-8qPUIYJ4Onmfg1KQCZ2XLQ-1; Tue, 17 Mar 2026 04:55:13 -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 5D42C18005B0 for ; Tue, 17 Mar 2026 08:55:12 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 508D530002DA for ; Tue, 17 Mar 2026 08:55:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737714; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e0JR/J6OJK+GQEzT8ir8klbcnwwkITj+TK5vevotDWQ=; b=emVIv6+tT938A4bZolbqczFEt2h83fH1lfZq5MWjlbZ/BvEwyy21bDHyytb0Xd6u0mYrFI yxQPyQC1haEwwp76JWvrn29ip4AqvHopqsHyP2eHr3RwFQW9sYdbSxPFeZJ5sYK730yDcu aZcej1HSqvEicilWny9fYn/RR6lGWnI= X-MC-Unique: 8qPUIYJ4Onmfg1KQCZ2XLQ-1 X-Mimecast-MFC-AGG-ID: 8qPUIYJ4Onmfg1KQCZ2XLQ_1773737712 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:01 +0400 Subject: [PATCH 47/60] 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: <20260317-qemu-vnc-v1-47-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=688; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=tbQe9OOb5vcHdHHZ8MKDbxR1oX4ZCQVt+T/ARXPvgwk=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXceKPzXZk8scS5cNs6p3M5EnJd/r76sf0eh hDzszrGLUOJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5clcD/43Vo0dBHwUNJWXMFRdIuyW8LSP8rSCiy65S6EbGbrHI7iKJlArrqxpcqBUhxxh/mclf/2 E6z1o9yvk7T3U4mj40bJz04OXb8otvddh/tjcXP/wz71gF+nN4uydCah9TYEE4Tgk+gEpAlvvrl go6IbRqUNA/wbi7VvA+tMf1l9upqhSuRfOpu/xIU83rk4r99A8H6Go3gfZAu5bClnfRBkPJAHuN f7VhUOmSfiBf2Pdx9hv8UBlkPWaaQYaaIVvBJ1Q/m5nMLopT0aaLbeMRteSBjHP9NxNUemUOOdi jPjP/wc/0Gwoma3mbCB97d27LJ3iX96fJSKYhHAx7ICqYnFu1cyy6z6j1NYtOEZnLckqlzCP+9+ /2zkb/0EERFNDONBvKTW8CHPP5yS+6sbwmYS11KG61joRGc2p54UzriCxmQm8QQKEY+y6OaBSLP GfZBGRbiHU3svVpAv349T+e9F/CA+Gz8jmIFO4/EOqmqfewtwYjWfYZTXAKwJRUc/XfUvETwVGh sKwTUs9OaJfUS/68jLivYYH3hXC+br8Rh5jsYEMAFOdbUNBsvRrLIr/Q5T3YcUavSmG7kJhChPI FAEV6Un2tu01+QJ7yJMFLLUAv/chCeK6M5CQua37XRGjy9HHJfuWDLv1sqR4sg0uWD8YzcsqqYm E73SGTUXBIFWbwQ== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737907157158500 Returning NULL without setting an error is odd. Note that we could make this a programming error too, as the duplicate check is also done during QemuOpt parsing. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc.c b/ui/vnc.c index 03b99c9e590..2c53c92914b 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3428,6 +3428,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 Tue Apr 7 01:06:58 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=1773737847; cv=none; d=zohomail.com; s=zohoarc; b=VufMLf/LEHiaaLs/7Z8dY7A+V1OI8MJpSXaayeC3WRGEwHcL9iq+qPCn1bWCren0laB9FL8O6bOrog1u9iD4uCf9sTPeegjUbEG3T2zBntj7fjbwWqMy+FICfZfSmz4GzOusHvU/CxFyCOTCf+Q28wEVIeFfEt28gJXd5BTbx74= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737847; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=yCXR2+AcR/DGDwWpZSm9RScE/rcFlXwHiIjwQncmniw=; b=A7v8OZI9ofWYQ4d/KwL7cnU2DCWD216na6xAzuJ7lHveEFBMFROFp1L8CE5Ax3fsjVXBPVxhmrim1/xENHCQIylei5kXofHQfqbJAKJqUBO/wOUL7HJT4UpTT4JEhFWg2C+XO76PHOKGTEaemBgTdevx83VOX+LO8SEx9Cv/2hM= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17737378472661023.1597692907733; Tue, 17 Mar 2026 01:57:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QE7-0005N6-VU; Tue, 17 Mar 2026 04:56:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QCy-0003V5-5G for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55: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 1w2QCu-00074G-Sm for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:22 -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-la9ebm_5P7is5p_8Mnf3cA-1; Tue, 17 Mar 2026 04:55: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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9DF95195609D for ; Tue, 17 Mar 2026 08:55:17 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A03001800576 for ; Tue, 17 Mar 2026 08:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yCXR2+AcR/DGDwWpZSm9RScE/rcFlXwHiIjwQncmniw=; b=iSU24QGx+LBSgAeyCAkOJ1rw+7ENmC00IRdh3ppCy/B0sJom18spZONg6+8pRzYGrdg8I9 rAx6NIRfmUjPYxcMmleAlj+6B97S866yrwK/7fsFlNZg+e8p9VYsyzInypwRY8ASeE+scy osBgogIiUapQrwp9ztLvSgAzTtdCnIw= X-MC-Unique: la9ebm_5P7is5p_8Mnf3cA-1 X-Mimecast-MFC-AGG-ID: la9ebm_5P7is5p_8Mnf3cA_1773737717 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:02 +0400 Subject: [PATCH 48/60] 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: <20260317-qemu-vnc-v1-48-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1705; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=lSKR0ylzg5pfugxCI27NznzkCqR45WH+pLi9aJ4ssU0=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcK+tgrGcTdVAArYW/wTmxvNGRZtZMbONzV vf3w1rQLdiJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5X2tEACOzFM72rR5QAfjvaBeOxPWMKgDOYVsn7ZnqSNy3xKoOb761OABusm1TGz75QxtwKx3/iu F0pD5pv5kNsND95TemYd4uNUM8lRRvBxMFxmKhTjYQVQoVjYXZo7Noc2M+wY5/1H+jEks9WDFMZ gNrGWsaxZSN7SFr24PxroSb3Z0AFI6u6TpAZdR0xVpX0Y9L4wP9HSggzAaEIzgAdNcZdJuIfDIT bWqe4b1MR+K/QM4IkydzUV0Ad1tT1hhq4KMIfrzQbRr5kcEDFeVWUapNA+h/Fsoufn4da9owL5w +ZoH7mV9IVGpprAZK5s0i2lgKw/ob0RhBRveY99WL+iaRiAdOW4iMwJkZVnE6HV32qRSsLgJZCj qhJWVLUWZipEploJumo9bHDkIP2cIPiQQGQujxVs/ICytw5SiYpSHzPyRgNadAk8LGKyVSS0Z4j As0MPVbHbiQjD/iuKaa/46y2NUsmDxoLkMSd5t5AGaGJTYotqosJiaPPUsUMzRzFRiOmRAXjIhP 9iC27oaxitGB//o46xG+7StETpMdf2pVOu4zlu79AnSFbU6yzsfK6OiGGYublc8CbAWQEuHUCYw krMwKG3hugZ6rOAPAcOSiBcuvqWHV6GD9BiAB5xTKdgPL691KnrCrZ49DZZxpMKEZrcu3Zuof7J eINzzD73LdYVB8g== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737848818158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/vnc.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 2c53c92914b..c38be7113f1 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3458,8 +3458,6 @@ VncDisplay *vnc_display_new(const char *id, Error **e= rrp) =20 vnc_start_worker_thread(); =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 @@ -4263,13 +4261,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 Tue Apr 7 01:06:58 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=1773737849; cv=none; d=zohomail.com; s=zohoarc; b=CrV0lh80N3EXbPnCWfM0RUAAXkPTzSOOh8bh2m6RpH7ObmFAPji6/S9ikLfCyw/T7akmUR46CUgIcoa/E8cyl7pXqN9nkR/AWu0Aichu/PoyxJU7FuF3GdwU+KYHnxoKNhaWeruksYewbmeuVPyIeU0CEB1QyIEjYXUxr/mU4A4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737849; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=kHZNzWRxqxGiSXE7F2i8ljBio5nXXS47O7N1x/xGiG8=; b=TUJUOVX09yR85R0psTDv/gd+7w42/DH813Rgw4Qsy90Dln3uYuOlORQr1VNFNRVu9kAgj5DQeG5k7AeSic6CwhyL3AzHEr5nywePF7j9ix2G/TQoxPGazSuXo6ma8yPNQCXi7m3VptCBRiRshrqsf3M4ouLL6CSEGoG6XwWEMQs= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177373784938695.79790379920314; Tue, 17 Mar 2026 01:57:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEQ-0007J9-FK; Tue, 17 Mar 2026 04:56:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QD1-0003WD-TN for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:33 -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 1w2QD0-00074u-0k for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55: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-27-LhebHe7gOB2rtAP-EFKC0A-1; Tue, 17 Mar 2026 04:55: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 4EBC01800614 for ; Tue, 17 Mar 2026 08:55:23 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5706A1800361 for ; Tue, 17 Mar 2026 08:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kHZNzWRxqxGiSXE7F2i8ljBio5nXXS47O7N1x/xGiG8=; b=SQRX2PHvVIaKBj7PZs2/IKl5/1VyAUBGBxcbxc9B7LyLzYkMXjIkxVpZpmbdNNFddExU+G PCRGFc42J+byk1AfQFpQc84YU9ZPd4CLuMz5VxB2yQ+kTKwJb5Jb22cetYoFfdGjx5nOdL sh5mIpQOD9dSnnJLzEcu9H8rVcTroGY= X-MC-Unique: LhebHe7gOB2rtAP-EFKC0A-1 X-Mimecast-MFC-AGG-ID: LhebHe7gOB2rtAP-EFKC0A_1773737723 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:03 +0400 Subject: [PATCH 49/60] ui/vnc: explicitly link with png MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260317-qemu-vnc-v1-49-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=638; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=KE0+NAziyLdDva+i9ZPLvG9Nc6njG7yN6tsIU9uJ1Vw=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcTS76s6R73NRkLV0ZmknjKYlHHQyancAwD LyeoD/PGxqJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5chUD/9aLeVHHW2O6i/Dp0mT4u4JQAq+4d8NPb5Ny/Sw4ZfFQoMOVByB5d80j5qFpIE3i2oSBZn 8OL0RTFmkFca9ALut2cIagBL6xh+PoR15sUSQb+B8wD/Zx0rBt8L56OcH35ybbc3lmBB6TSWW4I gqeeRJyej+xVVvD3zUeonsbprhOyLMqIT1yrDM6McCS07YnKbjpiR8AG+j4pa8PStfSj04+kPjp Q5Qyr7YYpmCfJhRKmrD22GLivFz5xty5Qu/vyXopCDtoqoHlB7+gzQNovmihFKSc5kx5h2RkkWq ahjWKxFTbPl3u63UMbzKsVy6eTKIQeTc+D+2LU9/sJ5e8A7wLbafyfdvjpQMlzBjaEgK7zNHhxT FCcL+FSLJ4PXUj46HkrXXPSPNPRljd7Te6FeF/Ma3BEmfRMciF9/+ESxHUxdNAWwhUkbhMQ2O73 lteqP0SFCjgopjfTrUPvy5N4IWxTNHjJHOvsZumGH5SyZ+IW2JUKCcSs8sFjoUIR9MHjxi4BtTG mXwh935qEybm5XiCxyjd/9RdOPCDX2E0ZDACu46TsfVTBJaJzgiX6vpHJvdlfwEeST2I04JC1a/ FdRF22lTz/hKq3QJdUDn2e4bhRRD9wcNuv/l5713cvi+pVwTUwm56RTxxNgkZh4jI2hEybY350x pmAZVfyY/blllJg== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737850804158500 The VNC code uses PNG directly. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737903; cv=none; d=zohomail.com; s=zohoarc; b=XMs2kRkutsmY+GXh4Emw+OvwX/nKayHCJjtcXbDanY1mjW9xafnU08liLJHqxcrfVtN4BtkjrJmCJTB1DCGoT1IPJ3sxKG3fnyEXjHYyv1TrAVgsf/Q14xWlYsr1/bcxSZ/9zRcMYBT8e2W2ns8TA2EYLC7fJKGqna1d9Sl/KSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737903; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=irDzdmZlKqZlZ/OSsviQSMNHKsUUa1AJoPXCVd7AfrY=; b=kRE3/6U81MtS4TKvn7OODU9IW60ewxusI2Cu4rRKvNp/Y6O0M0Z4dy2TaGRpfvfl+41ZN2cu3QeOqYJe1koFEU0qMhuQG8WWoRfnkgOV6Zl/gHTkkDPIqWNF7S+svgnI+sPeAcM7a60XjLIKXEm/RHdRXktBTCfmTI2Se4hahj4= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737903470212.92577087262873; Tue, 17 Mar 2026 01:58:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QFQ-0001tA-6u; Tue, 17 Mar 2026 04:57:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QD9-0003XJ-64 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55: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 1w2QD7-00075Y-F8 for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:34 -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-77-RcQloQdSNFGIItbklTZfRw-1; Tue, 17 Mar 2026 04:55:29 -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 AC88B19560BB for ; Tue, 17 Mar 2026 08:55:28 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AEB3B3000223 for ; Tue, 17 Mar 2026 08:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=irDzdmZlKqZlZ/OSsviQSMNHKsUUa1AJoPXCVd7AfrY=; b=bWkKHVJNMJOYGeWlDmCVjjLC0QbNxLVoRb1zN/d9dCYta40kZCloJa5AJrZHJS3NXSDgm6 3ch2gLoWyuTyRgqHUDjzZuyBPSN0vq4yyHJ6/CPbfcinL5oTV3xlmLZCyB5AvPTZNFYE4x 84PiEuZI00yA+TYKKP7HUntTBewcwdE= X-MC-Unique: RcQloQdSNFGIItbklTZfRw-1 X-Mimecast-MFC-AGG-ID: RcQloQdSNFGIItbklTZfRw_1773737728 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:04 +0400 Subject: [PATCH 50/60] 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: <20260317-qemu-vnc-v1-50-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2652; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=37JYZZ/P1/dRjhOzYk0C7VpU4vVI2PAO/cjaK3GzNI4=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcRcGwJCKFRaEXEi7xmC01JZKBVfnhQ/KwZ edKCEIVEBmJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5V98D/4564clLhp9TDRB0CILguG6DdmGwy2WbmUX2CBre0f7LcLI5KDPZ/nVFi64xzLd6llgzFI QtGi2VTbQ0GJW54uIDSHexYAERCkEGUOe4Kf6wb5wkb0bUl0h7uyOYpQr85ng1n4j5rTiz1PcYS yhcNK5AM9umlhotw4Y7+nelTaXvB6m45b+MvLMcV///FuRQb56Dz658KkbqMGsQEFWOMGIobNxw aE6+kQRKj5t/oQFYpt9fpAQdpcbzNY50Z8pM46kHnRVyY/39nNQhgkNmzMz28Pyxpmt+t9NBn7V RtxgVu9UGGC7+74v8Hw9wKsxwsCnAX87wfKdm9Tu37uI+pQbeLhXk0JRRDYTkS6KDHX01eQ+y8X 9T44khEg6+vg8i4ExklY6hGv5rJz/sb39fi/kSN89D2lH08QtCm0UNjB88LKYNuMyWJQKH/rE8i rxWtYbUMW1tSPkM7gfKOkB01iDVAfKzRoKLD6cyhDS4xdTd/NO2hm0da1dFPp7A89Ikid01tVlB HtfU61KhJ4O5Vc6V4WVR4anM2wcJJvUvscJs6R9V5sbUTgFeN9dv/6+eL4hLXYBYgKmSNRDkoU5 rUpuKVlQAyNcDDYUYAd9yUiJWjMSJ7ascvZe/rEOuwmqX+uNc2Y8rUJiBYIWyubF0b4pOKQ6sMn 9ee2pFU4MuVl0HA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737905773154100 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 6afe0f16d12..1db9747599c 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -648,4 +648,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 c38be7113f1..fe2659a39ca 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2520,13 +2520,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 Tue Apr 7 01:06:58 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=1773738090; cv=none; d=zohomail.com; s=zohoarc; b=EVYoc+5GzuY8PaBP3rYK7JLtcdTBCkgBZFkg2aTY7sPKvWUHXNlmb2D/gxXZHC6bc8yD7HG0J/4XppRh0najg1cUy3zvJfGaD+o5k3KiAoE9EuDMU60RMBpiMTbpt/ICQl98XMYPqhXoAX54UWYgrQdXDkRw3ShG3wRrSNtI4OU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773738090; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=zaTStWYBUGR86O3Vlvs/c5wzHrDQ5EGJBZS4Xsnja34=; b=M9nHN+zv2uLVsckYlgB5SANpsIOZ8vs43/ECBrmjleHDXwV76dsVLycu0nn9nAvVur+A2Sl1vQv/CNYY4xzCo16oOONOAIeu5klU1J/5PR4L2WQZUMPoLHE0N+mmgnAENTpBsznfI+SAtSw6HqKSbZ25A5mfUZ0dYghZrgznm/8= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773738090276852.1728576028756; Tue, 17 Mar 2026 02:01:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEK-0006cb-HT; Tue, 17 Mar 2026 04:56:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDC-0003Xu-QU for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:43 -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 1w2QDB-00075w-6p for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:38 -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-327-k4m5m8dAM4260xls094A2w-1; Tue, 17 Mar 2026 04:55:34 -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 022D618005B0 for ; Tue, 17 Mar 2026 08:55:34 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DB5AD1800361 for ; Tue, 17 Mar 2026 08:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zaTStWYBUGR86O3Vlvs/c5wzHrDQ5EGJBZS4Xsnja34=; b=SoL9EICAOTuzWghd8G2V14VRbvj9efDmi2Tqua2q8V36YbZceO5kjz1oU4MUvXB4uPa2r5 N3G7Ob8jc/NzJWrM0LNbWz/JhD9FsWShSXIiJJ1pXzEO84zlc7o+nMQzR57NZeA9OdJzv1 ICIl+NJ14c07Cbnoiovyo6R76uWcIRI= X-MC-Unique: k4m5m8dAM4260xls094A2w-1 X-Mimecast-MFC-AGG-ID: k4m5m8dAM4260xls094A2w_1773737734 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:05 +0400 Subject: [PATCH 51/60] 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: <20260317-qemu-vnc-v1-51-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=4732; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=CBB4c2mSRdNUcLuCSl4VRna1qSTaNHj3bnixxtfMgBk=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcCIhwqZrsOAwey3hvujRbM7mRmjxUG5ZRl /2myyG2VuyJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5R3bD/92PY6KzhKerX+oZjlCB3pJQ1QgNvlE+WrWyk1X1Ra8OvGPHuYmFw3Lo4BOPST6G1FJPMW 1tgrosPaJq/ELtaSHXd+wQYz8jD/1uToJABB08MVM0qNpfeOrrlaHOpqRwcoZYJA7FO+bylkEZ/ l4eivz9lc3DVag7+s63N3vk7VTIaXBu8OSXozpIJpD2/BlAhOvobEo7qej2f6hRSMBcTmgWE3Uw A4fwFgUyy28uPCyy+8fLmLTyKL2qBU85xT5soahUmGSD0sLsX/QRDyQ+GSHAzhmeKdsb0iT83gz 67gKMet0s+UmEpfrgRCCtcmUCo2DP1x7Iw0R65pqKkNC4F/A4cY03X/ky6rxtUkXgQei2YFpxqr PaNWgRnPg8fu+b1RLs0s3ImPtjJG4Vw4Ba1NBMVky4rZ1zTnKQxnIH9ukZvnxX9STxx5pBm8VQv ntcr22xLSB8fgvLm3++g/Ko2bKi3Vo9QRwNHNSKnA3Cm8Uc1rzdGF6EPwu4R5XllF6oTAMZRaEq LRqtTqcwtRwxRo4pVnodYpSjNzOCGw3Xs/2RueZewP5f7DbZDajERfls0/vfSIfnINy1YgSDkmW UqqhSZHXD54HC7I84JAYBOhlJPEnZmRpTo1lh/cRBf8HygzY1HNYNCrfLW5PRoXW931+Y8PSqL8 0qYFP25qOZLEm2Q== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773738092362158500 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- 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 737ceba3890..3189788fb5f 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 Tue Apr 7 01:06:58 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=1773737893; cv=none; d=zohomail.com; s=zohoarc; b=iYnKggflUe2lbNP2QnYWSgER3iz85KPx2pcFf7NYMPaaxYHbaWnjXh6epJwGKQSrB76Z8Et0F6CFdkOPaiz49TDB4uKkx9BGM6/ycAfew/pcgfZhkkAXIgFcfKcgwRnqVc8jzLZneSdbfUxYH39+9yYp+UrUJmKpsi6LvqGvJec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737893; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=Bjq/I5an7jhXTUfDIYlo4yMIuFMryDH7DTNnS6bMqMU=; b=j/GAI5e2dX9y8Ysulhp8yv1xuvaE3heYZ1kZJdCbzL5EeOQSoiSRoqqZUvnbCkBoyHSW/tgio478/krcqCvbc6jwDadKPTiq1RBWs6GQZjaFnwzyILwOWpaFMwG8FfUO2mmyxIzkHnkEziBGQ8MFtKLcsLdF+JQiH+5taBWlH2Q= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737893004229.3981160887986; Tue, 17 Mar 2026 01:58:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEi-0008UB-DK; Tue, 17 Mar 2026 04:57:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDJ-0003nZ-Ur for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55: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 1w2QDH-000772-Ke for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:45 -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-124-PPSQN73XOESLJQu1jo88dQ-1; Tue, 17 Mar 2026 04:55:41 -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 49C8C18005B8 for ; Tue, 17 Mar 2026 08:55:40 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B43119560AB for ; Tue, 17 Mar 2026 08:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bjq/I5an7jhXTUfDIYlo4yMIuFMryDH7DTNnS6bMqMU=; b=Oh3U7OMrIfw56i97GhzwXBa2nOGlq9nxjgMNu5YHsl7CxVsUtfiQAbT601ByiZhdKn2eY9 82dACbwwrBF1FGLWbuHqIV/1vrlwbw6G0QfYLXvMZFoclelyB3I14rLXuSyGjMedS3OahH mc4ubLyqT8xluIlW8CcUja9p3baoGSA= X-MC-Unique: PPSQN73XOESLJQu1jo88dQ-1 X-Mimecast-MFC-AGG-ID: PPSQN73XOESLJQu1jo88dQ_1773737740 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:06 +0400 Subject: [PATCH 52/60] 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: <20260317-qemu-vnc-v1-52-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=17713; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=3QMyvykSeNihPOMmOy65HbB45H7C1fTDJzS1FwBZNlw=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcgTqQ/Vrdm+I2vBCJdX39ELnE4WPrmc6E0 mQQB6rjL/yJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5VAMEAC4dXKHjNAUjZD8XRSPb+qJHc8fHiArnOxOta2sQXdpCOJ3cdpNYNwN+xyssJ5M+WQ1dT6 uQtJiEWXOkbtXV3xJ6Yhd+RZlw0izGxYNEo1YUrLLwI8rtuZgNUgBOJ+aOBm7kkp28L0uSHGWqP ezQDH5Ly9mmqCsELiOvp55hwqCUeVL42m0ixVc6KOnbdzhtBkBOEXX+DuygrXNQ6J7dhKmHPsBj 3Ah2Pi7+d+ZUaTWz0p+w2Y81dqI3Tuu4cVgRN/BrJwhEIoZ1TBpvW/1LD9I05l9XstPLQdp5Cue g5JjU752LVqX2n1q2lpN/Mvh9Ty1wv1pRY5MiqGUqfESXfnK1vNOq9FrMGNUrfaDoRM+KD0oNFb hEcMeJkQEBK3q9B91ztyiLDpC5Gbc0FTZIQBX8jWtekCwq7xpEC2DE+CNCXXZpX/3FKZKeqnn9B L80+2MhhRo5TIHIMf7da0feduxkxpJkkKrU4Vo7YrqDrD4xp5luXVGwoxPLaD/0TUa3/Jw1sHt3 +35ch33NYtV/dYHxQ8WQhAhI/xefj/Iw5BcvwaQtelsuJnwhulhFvSiQm0E+ySB7INr1jMoTzF9 me35ERNfNCmr+X7TibGdK68idkQG7IVuQVexTs4xjOxDSMt8eEDmqXZv/C4yBrmedaDnltmeWyC VSgRfM9rnKmj9ww== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737895636154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 3189788fb5f..c695b433fe3 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 3e2b4adf41f..45b8cc74a6b 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -956,7 +956,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); @@ -977,28 +977,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 @@ -1241,6 +1225,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; @@ -1272,8 +1257,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 3ffb8acaff8..105e1ee9399 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 5052f371f44..44e8637ea4f 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1380,13 +1380,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, @@ -1396,8 +1396,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 @@ -1415,7 +1413,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 fe2659a39ca..9daf295a763 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1858,10 +1858,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; } @@ -3435,7 +3434,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; @@ -3518,7 +3516,7 @@ void vnc_display_free(VncDisplay *vd) return; } 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); @@ -4261,8 +4259,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 Tue Apr 7 01:06:58 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=1773737974; cv=none; d=zohomail.com; s=zohoarc; b=Xqa1mqjmBAPZb8XjzPqhNtVgcu69t+MQifvyOw3FoaBIr/ztgvfY8DXU/+azcc+hAWAftuR7e4+NZs4TVo3mG9oBxh4rRp/vaIDZ4lZ23KRINGpl+7Inom5sXne6glZ0Rn9P3t1XSmbLoJdHPJ36CrBbnwOlV1xEtdCedPDROkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737974; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=O1+TP7sACu0ZqTQ4CxFc1KblJVoYvAFHX7N4s0VZKLo=; b=Q846iSbj8UTGGn9JBwGiW8yNZq8jMiGbipQX8cbfscGE31ceTne4wOlgtGw5RQNE2mFNq9zkNZ14Pu3o9p9cNFiZNqAAI0aTXIN9e+cT20JouDCBvCHuLB+kHp+xa5Ms4v7yq9nIwjfbYNWzpKFuEhI6WXbsckBVhECtfK1/YwM= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737974633222.5413289877879; Tue, 17 Mar 2026 01:59:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QFT-00027H-H1; Tue, 17 Mar 2026 04:57:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDQ-0003pr-Ci for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:54 -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 1w2QDN-00077h-BO for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:55:52 -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-518-Cpe3LL4sNOKeC6D4g_pdpg-1; Tue, 17 Mar 2026 04:55:46 -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 2F88B1800614 for ; Tue, 17 Mar 2026 08:55:46 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C700C180075C for ; Tue, 17 Mar 2026 08:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O1+TP7sACu0ZqTQ4CxFc1KblJVoYvAFHX7N4s0VZKLo=; b=iYfJuXJ24YypmVfQChpT3rQhcynT+5w5oQvVUW6ncapZmiypETFdoYeOrsyHc6gs1sUraA 6lnML0CSwD/rk6PmaUDjKXmT7Y9ychYBB6CwLz3NZViov8w1RUuZnQBylVBdt8FNpCf9xS TOh7ynpLK2n1694U4xwvRnrJDq6yD8Q= X-MC-Unique: Cpe3LL4sNOKeC6D4g_pdpg-1 X-Mimecast-MFC-AGG-ID: Cpe3LL4sNOKeC6D4g_pdpg_1773737746 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:07 +0400 Subject: [PATCH 53/60] 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: <20260317-qemu-vnc-v1-53-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=32461; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=XGSdQ3L0q16Njzu6zZ2qaH2nm6WhEWChw33eSbHdOGI=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcIZ2kr+yTqoqjqshfwon+cJG5gSFu2lkyA +lYOXPIevmJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5eodD/98iCsIrBwNVtRL4rgcXNu9Wy+gclJAvzha1W/fA5o3/TEDCN8GUOXvhjvEvjrnmEL5TzZ 7SkM9oO9+6sUJPMBoR31r6ZeiU+tQ0Va62mRV1SuHbQvWBjr+tVlvj69tkYZ6gMgAeEEDFQfZPO IX98mYOPkzljdeJhMyqN4LjR5iWQQ0NyNukZ4anoJAGycvYs7QSNTDrh0O4G86/EbJ6mo51MAol xgbNbf07QF7gfUM9KssrnNZUe8D0jzaV9FtDDhJ+phFmoKnm1B7TBk6a8ZSfHFaRcdPHxfWR28o ONBNLJ3McZi/AjNTDEGtCf/Bn+lTn0QsjMVRdvGEvTKujgTJUPrcpsXd7xT3RZVVjIHg0NFwaSo szUG3m9zKG25JHyu+POSZoG4rGq5GW0mbeoPlDqGtLm03j94Ymz5TeEC7uYVQakdrq+3PI2Y8Aq Yyv0XNcdV006mJk946PbkAQQiS68FMoIMWgaa6TR5HMkh6FPSSEaGRbK79p99Jr+8i7ENamh3H9 x5evumEOOjjLgcTIztqFR3YRQMkPajpQ7pKQhfCyKnrZs1AIjrK9/FdPDXOAdIIfX048VdjWhWz VCWD2MxFCRZwjTi7qTE8lF/K2HMxreqyqg5xy34YMdv+gnzl2jyE+ZAghihrHpdAhGbSqd6UWiq fg0wHM4w8yL5qtw== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737975666158500 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 | 3 +-- 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, 121 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 c695b433fe3..2ac9c59e151 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -363,8 +363,7 @@ 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() */ + bool (*gfx_update)(void *opaque); /* false if deferred update_done */ 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 61bdb0552e9..8c2bf534ab7 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 c8a4ac21caf..aff26d3ce58 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 3ab987add34..c8e3bc300fb 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 Tue Apr 7 01:06:58 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=1773737835; cv=none; d=zohomail.com; s=zohoarc; b=Sp2mFE9MLn9NxSdRNrrEIfsWMNOUx/P37YF+u/hRxSH71DwlPz1Q5NsrkVVMVbHkc6mj37rGIzTPSeVy/gnmW5QoUBwrTB9hSWpWkmxetvXBebvlju28oYLwki2Z0/yRFj7fwXoHKgUqTK/qHU1PpQ2EgIL1wZq4Z/iOMkycnoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737835; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=oSu2GyxHHkUzdO6IuFXMwzjgH9xGa7lpotwa6PSX2cI=; b=aSlfwbQv893KyGQH0KTgNz9zcmWCMR8lZwmOc5/K2SLykqLsZuUZnpPMEvo2pFSeWemFa2FzLoJGGqEzLjSkIqOuERHukeSh+nUKgoslsf8AkiVcokIrX3sXpXKdK1wlCssU11Eg/FnlQOkckbkWihvQRBuQOUQW49SYilWR288= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737835466693.718639972473; Tue, 17 Mar 2026 01:57:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEM-0006uP-5L; Tue, 17 Mar 2026 04:56:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDZ-00044Y-8L for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:04 -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 1w2QDV-00078h-3Q for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56: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-140-jowhnqSnMHKzgAbJ2jwPOA-1; Tue, 17 Mar 2026 04:55:54 -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 6C85E18002DD for ; Tue, 17 Mar 2026 08:55:53 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4D30719539A0 for ; Tue, 17 Mar 2026 08:55:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oSu2GyxHHkUzdO6IuFXMwzjgH9xGa7lpotwa6PSX2cI=; b=Z9AECJNaN6xKjTIijNKc4Hfr2PDxuANFdl8pzaV9T8gLcj0ROS8I5PXZa1vxXq/GX5LnCh ifgaNudd26tuFVP8uLaMqHOFbbpFXRVtVZhb/vSNJlmmwa2VPhJw9GU3p8Hr5/ibRRJtCW V1BLau6wtfpcB3yeFMy2ZprrthnIprc= X-MC-Unique: jowhnqSnMHKzgAbJ2jwPOA-1 X-Mimecast-MFC-AGG-ID: jowhnqSnMHKzgAbJ2jwPOA_1773737753 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:08 +0400 Subject: [PATCH 54/60] 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: <20260317-qemu-vnc-v1-54-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=111815; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=X4r02NnH3Cal589PB5mgEGAjXDbeXRhxLdW21rGhxmg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcdG6fisfeFanRMLiD13BlhkIJp6R/rlkIm k5zDtQga0CJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5Y7XD/9ZGNaQJTjvhPMTO2OKPM4EgsgrPIlyy+JV+yAwupGuHm7LWrZVYuwHno2qqYc9CBqzrWo by1b7P9fi3XmgLyE7mclga7jVRGhrWCZXMV8cHr20p5xGTZmrZJwjfThWxtFlxPzHsrC5qkBhGW loc9RjTELbC8C2bQ9hWOPWxs5oIuCCpLAmuvr9GHcCsCwAIgtq10Jq3HZyHl7GCsUXbB9sn3vVx ljM/kxERaM8epLI9x6sjuU1WrmPye6JMHM1W62VVqk774ATMdN7rPJVfDwWghJhJHUbfPIQb7F5 Ow46kj8ygXj1d68HYmlUdWtPbTUAFw6khd/1b+K+4kKTmhONS27bXCAmueuKhZxKhDc87VhWSeO xJ+emElnWx4oMqI2fY1EIh+BFEgylwhndw8Pv6SS9aDQEBzCL9V+LGD8BGLDlNOoBRhp6kJE055 FbFnf565aiam534wI7gY2C4eFQIlngBnFdmNEEWEHxAZJVgN3jlAPrTtzjmfGTiNEQtLJH5Dr0q 9NDLggwzqoiDoGCSviwlWDPkN4ro7Jpmt4Lmlz9Ub18YW12O6mXOZN/6q7PiRJ84hqwAmMDQ0WZ kaBUtjoKzCZV15M0E0aD15tR3fzZ2AENBNrLac6f9Rk+5ZOVut7edoAJdgIARbG7HcqrBXd3NFp bvIAQwPrYB2PP2Q== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737836767154100 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 | 16 ++--- ui/spice-display.c | 16 ++--- ui/vnc.c | 22 +++--- hw/display/apple-gfx.m | 16 ++--- ui/cocoa.m | 10 +-- 56 files changed, 376 insertions(+), 388 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index 2ac9c59e151..f8163ef96a8 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, @@ -369,19 +369,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 05cf507bd47..6dd024f984e 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -162,7 +162,7 @@ static void ati_cursor_define(ATIVGAState *s) } cursor_set_mono(s->cursor, s->regs.cur_color1, s->regs.cur_color0, &data[512], 1, &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 */ @@ -623,9 +623,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 @@ -772,8 +772,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; } @@ -1099,7 +1099,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; @@ -1159,7 +1159,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 8c2bf534ab7..2f714e523c0 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) { @@ -316,7 +316,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 629b34fc68d..4cf4403b446 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 @@ -2962,7 +2962,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 bad9ec7599c..979155e1916 100644 --- a/hw/display/cirrus_vga_isa.c +++ b/hw/display/cirrus_vga_isa.c @@ -63,7 +63,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 aff26d3ce58..85c7943168b 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; @@ -869,9 +865,9 @@ static void tcx_realizefn(DeviceState *dev, Error **err= p) 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 95d85ff69a5..ec351cbba23 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 ed5ae52acbe..0742024e9bc 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 de7a86a73d2..836eea0dcea 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 * @@ -378,7 +378,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; @@ -519,8 +519,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; } @@ -570,8 +570,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); } } } @@ -637,7 +637,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 { @@ -653,7 +653,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 || @@ -674,7 +674,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 @@ -1466,10 +1466,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); } @@ -1585,7 +1585,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 c8e3bc300fb..05c72e19c02 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 @@ -659,8 +659,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 @@ -690,7 +690,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; @@ -699,16 +699,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) { @@ -727,7 +727,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; @@ -752,15 +752,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.= "; @@ -798,8 +798,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; @@ -834,7 +834,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; @@ -849,7 +849,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; @@ -864,7 +864,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; @@ -879,7 +879,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; @@ -898,7 +898,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; @@ -916,26 +916,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; @@ -953,14 +953,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; @@ -984,8 +984,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; @@ -1002,8 +1002,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; @@ -1019,8 +1019,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; @@ -1035,8 +1035,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; @@ -1051,15 +1051,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; @@ -1068,7 +1068,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 /***********************************************************/ @@ -1105,17 +1105,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)."; @@ -1134,16 +1134,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 @@ -1151,7 +1151,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"; @@ -1161,13 +1161,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) @@ -1353,7 +1353,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 45b8cc74a6b..1c9b010c560 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; @@ -710,7 +710,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; @@ -739,7 +739,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 1b5c1d4533c..9422be612a3 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) #endif } =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 105e1ee9399..48f0a564c2f 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -599,13 +599,11 @@ static void handle_windowevent(SDL_Event *ev) =20 switch (ev->window.event) { case SDL_WINDOWEVENT_RESIZED: - { - dpy_set_ui_info(scon->dcl.con, - &(QemuUIInfo) { - .width =3D ev->window.data1, - .height =3D ev->window.data2, - }, true); - } + qemu_console_set_ui_info(scon->dcl.con, + &(QemuUIInfo) { + .width =3D ev->window.data1, + .height =3D ev->window.data2, + }, true); sdl2_redraw(scon); break; case SDL_WINDOWEVENT_EXPOSED: @@ -632,10 +630,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 44e8637ea4f..c5b86c42d52 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 9daf295a763..de33b03ff92 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2323,8 +2323,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) { @@ -2382,7 +2382,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]) { @@ -2636,8 +2636,8 @@ 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)) { - dpy_set_ui_info(vs->vd->dcl.con, + if (qemu_console_ui_info_supported(vs->vd->dcl.con)) { + qemu_console_set_ui_info(vs->vd->dcl.con, &(QemuUIInfo){ .width =3D w, .height =3D h }, false); vnc_desktop_resize_ext(vs, 4 /* Request forwarded */); } else { @@ -3240,14 +3240,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 @@ -3321,7 +3321,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) { @@ -3361,7 +3361,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); @@ -3417,7 +3417,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 Tue Apr 7 01:06:58 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=1773737899; cv=none; d=zohomail.com; s=zohoarc; b=afwQGmjC+fzMitVRXF4Tza2MkgUmU5fdPLT1xGsZHPCl+q/mb9Zko4OUNLmuk9qoiaYFi5axPPfoHLzTuKYQoQmAPZDjj+WlXCJlk3PNli7uBr2rD6F9+sxkuL8FT30JkiHGC1JK2jGoMIK5gjAx+4OgP6lTYeC49uKlyERhYO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737899; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=7VJL4O8+9LOo4hAKKpIFVFC+Y74OqIliDbmAvOmaadA=; b=Cx4pMzHw03bM63nUcpJOWQnVMxa/Mau7N7It4d/UCKGnAuDwijD7gWs6xg1r+55rkSVF1rN0uGFtSa63qty2YkXvNNcppC+JcSDahBxTFfHZ8EqBpNSOqlfLGl2MSdZdnpAICThGhKdCv8sJCNc5mUUTHxeIFvWl3TXWeMdEEHI= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177373789912779.33558591080896; Tue, 17 Mar 2026 01:58:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEm-00005x-UR; Tue, 17 Mar 2026 04:57:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDc-00044k-0l for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:04 -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 1w2QDa-00079K-9h for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:03 -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-530-fgBwIegrNZenWK_ngrdZOg-1; Tue, 17 Mar 2026 04:55:59 -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 1DB731956062 for ; Tue, 17 Mar 2026 08:55:59 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 05F9F19560AB for ; Tue, 17 Mar 2026 08:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7VJL4O8+9LOo4hAKKpIFVFC+Y74OqIliDbmAvOmaadA=; b=Gwu8ZhDZvUGheCrqEEQFKjCQLZMPpYj0XzcVB4CXW0p6y3T0mvupz/AFbTfQEsRx2mKkNn qQ9uiphx3VQ3uxRar+52Ysi4eeVDyEUTNmUWp1+GM4E3cG/JiG4d58MBbb90fanS47w2OO dgpM2WsQtj+MzTAeyMq1zs6qcFoG8tI= X-MC-Unique: fgBwIegrNZenWK_ngrdZOg-1 X-Mimecast-MFC-AGG-ID: fgBwIegrNZenWK_ngrdZOg_1773737759 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:09 +0400 Subject: [PATCH 55/60] 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: <20260317-qemu-vnc-v1-55-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=9163; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=t+6Ffhw7rudrKvlgQwWmSl0HC8a1R6zvwMGLDGQoEoY=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXcrooT+4BTEc1EfOvod+OaJgEXb81sM04AL H72dnAw/bSJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5bbMD/9X2j6ghtNBTPAF63e0OZCLDJRdgjA+4RKnNC2BraaMchYf10z5U2v+5NJFLguEpSVA19D i2rtwozSdV2xnDYyRMioiZLKWkO5i/Fu/m7Ny0zueKIWN1p8ctJc5weMzYhO9mQar90X0VyiAze JuxwMUy1q9Q0MO0IiSnBYCy/5uXS0XL8cOiXlKJ6t23tUmYREHpd4WrV0igGuZoF0cHhrYFQfyA eIKzhYPNVR5cqJwBDNqZdcVbbhU+ILmXuyc5tDAd55dPeV7NUAV4d7bC+HQ0pYKLPGUpplLNN8w awmV2CCvIlPf//LCj7fKp+qj/O7o6YhyinSYEE7h0kojYHhK2/E2sAtgQsTgMOs+VBeY0O/zAPS oJo8YFz7rZMC3dZToePR7QUeFFY/Mbf7M/QopwGZWhnE1YWG0Yn5YUhrcxOTH3vTN7JmsZ3Uk1W 3wz3mgh8yRsiuFmog9bQkqNo5+LbhbpXC1KHwHAc4a8DNwqC99jwFTsRWyzoeT9URmh6Qj0nxRj nZNvNzvCoCWd9pIHUoEl6AHc9YCIaJnx9O116CR3QkwLY62NC/5rGZPOgNj/D6Fm8UTOFJxwA7V K71ZUVX1pHBY1XhiC+iVNEs/BAYEagGal0Mnzs6SGRE/UzUFwNq3Vf3wBw0z6OZNVir2gMmgdGf 8fXsBaw0Box0ViA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737901811154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 f8163ef96a8..6968a1e35f3 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 05c72e19c02..d1079348970 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 Tue Apr 7 01:06:58 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=1773737929; cv=none; d=zohomail.com; s=zohoarc; b=PaWvm+TiINVUaIwwg5exsfGdY4Tb3qS8uo435hFc32MOn08JW0GDaBd/xRPd/2DO8uy6GvxBTFWgx9Qq2EiFT3SLp7xoTzwsUp3gFG0jBIL1Ovr0xypnuGBPRD2/Qu/6FyBDaFFnkXMBIm44Kx2oYe60sm2YK9PuuUnxsq9VFgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737929; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=iJ/S1HD4zJEJT7auFJflqd01X5wN+0xFE93QSqun8/c=; b=GvItc0HVEu5Gexkix+Ieh0tDfywfbiG+Lyt3cTV2X+DDnGmD8yBKGsCxHk88lT1zRvD/ybG+lkRsM1Q/bgWgGmlmnPbKkHITeyrMfRMD83UY20xg65VUCS6J1QUW6XTfmV74vGG5Ce+EKhxFVWTM5bli6P/wKhdO5/Uj78kidXA= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737929950954.1082580601665; Tue, 17 Mar 2026 01:58:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QFS-000267-Kg; Tue, 17 Mar 2026 04:57:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDh-0004IH-Ct for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56: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 1w2QDf-00079s-Ck for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:08 -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-614-MCt2B6RUNviKUWzL_62vhQ-1; Tue, 17 Mar 2026 04:56:05 -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 B7DB51955F6A for ; Tue, 17 Mar 2026 08:56:04 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A04E630002DA for ; Tue, 17 Mar 2026 08:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iJ/S1HD4zJEJT7auFJflqd01X5wN+0xFE93QSqun8/c=; b=TAlnRqht6kPwkWbcfyRrANds/JCZzP4z7mFDvZa8Ia+rpFwdbPNZ5CcOC+5cW2SnCWX2vC DfcbCU3uKnOCEQdGzbCg7itCOeP6fp63Yy0Yfs1q5eNtb2zEJNXSqX9jPrEGP3464JzxDJ LCmBXFwXLURbO54tYEnNsjb7aRZLYK8= X-MC-Unique: MCt2B6RUNviKUWzL_62vhQ-1 X-Mimecast-MFC-AGG-ID: MCt2B6RUNviKUWzL_62vhQ_1773737764 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:10 +0400 Subject: [PATCH 56/60] 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: <20260317-qemu-vnc-v1-56-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=4370; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=fbSBEB8CYPoQe44hyU9awPms6P1r5vnWodUEwJ1Ikco=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXck3xralkWCW7/FH3H+JdutEgTiWsu1GJqA 8lV3NKSI0+JAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3AAKCRDa6OEJdZac 5VyFD/4xjK+37w5T31muISb3FNDp0nrPgjhDJOE8aksJBFdMf3OlV5eTV6g3UR/dRjg8nj6cNN5 RytZmO2kiHM7BaNH8XyIMiXKqpvQL98NVKbg55qeoltkuLCLR72AggmNMByCk3OZu2p14f7IRts E0XHKzeUyHNgeg9vNZHOEN3IeEwhtIo6eNBWxWMKCEAGgH+sYCeUvDNaftXQARakp3MxoxLIXsJ wo4kNLcpAn5vMtPbSeQkaEKIP2QffPuWgoUdtUAtmFcbngwJ4eQhk3gmTtSAIjGSp1lR38X0IoH axMPszEbcTC1PP8p89wn4+Wbyr9EJl5+DfnsMO7sjB0kDapN6EB6DWvQIKW7qdIeFD6RkYIi8q0 a4oUyL2t7ulqOMY3yxTJqJt4rQnAqJvZXLD/64iTPiZEFVn8WQwH6ebsD+l/AIJ1wSaW27Xa3Ko pg1YQdq3MROHVx+dQQh2d2L/7CzEycts2kkYjOFs3f6z7hJk8sTryQConvVRATUakpzs0qUDohC TS8c2bZBkEv0h66qd/tUyl7A9yq+9aRRWbTDVbopsF+SkSXbzrPQgpDQ44XbvEZFkI5BoABKuY/ W/7Jm4oBPm/QaM1MRBqHmZBambz7e6jpTTilWaKSxO7TFa4cZarCZdkVv8lXyE1bHGSPKGTzffC P/b9ZuwCMJl+sNg== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737932256154100 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. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737929; cv=none; d=zohomail.com; s=zohoarc; b=lDDhYi7/8OaVUDrPWu3IL7owbliVs8eLcT5nVz6jC1WrdSJpNmxKAaV/j8WwcMEEatOtkFOMtHoP66jdE4OZElIYEI3idGnAlxOSn8t1xLmVNrNkS/nVejiKgewFtjoXLOJr1k8pjB1xbjh96QREGklPPV1Ci7DSdO1uJSrnC5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737929; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=IThIbV3TFRFRLbuyCHha/PXGer5pKdYiecHjOLIjUJo=; b=SHjcOw+2YMir1yLfXPpmQares2eQM0eBWQbeTPA8xF5M903w7Nt9k6T3MD3/TVi/YRrZv16zGjELsdgl4r550v+oA7YeN+0nn8/UJdq9e+fjQVjMPsuksKLALZijrL9GxcZx2Jd61V5v4kSatbMjvUM9ukh9NUaGzda0ici/iPk= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737929236849.0901147118578; Tue, 17 Mar 2026 01:58:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QFV-0002QZ-41; Tue, 17 Mar 2026 04:58:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDn-0004S6-7E for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56: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 1w2QDl-0007Al-9f for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:14 -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-35-6TsztJv_NBC1t_gVSCjhng-1; Tue, 17 Mar 2026 04:56:11 -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 1D14A19560B5 for ; Tue, 17 Mar 2026 08:56:10 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1449C180075B for ; Tue, 17 Mar 2026 08:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IThIbV3TFRFRLbuyCHha/PXGer5pKdYiecHjOLIjUJo=; b=JXoE2rMhHC7buPS1KnvYlq+rYH+7BsE2kcX7r8H9cegUJYAWC04tdcP8hFLIYsNWwMKJjv 2FmREx0wRB2qM5bV0+VUF77Ndu+4kK/fKUdlt7ycJkutaHG8H+dAqJZ/ASONP/Ddzx60xi IDb0XwamLaFNsguW8qUmupApUUiGZeI= X-MC-Unique: 6TsztJv_NBC1t_gVSCjhng-1 X-Mimecast-MFC-AGG-ID: 6TsztJv_NBC1t_gVSCjhng_1773737770 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:11 +0400 Subject: [PATCH 57/60] 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: <20260317-qemu-vnc-v1-57-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1187; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=I8NqN9mhZ5tch4xSwu14CjXz3zrFIMA/k1n2seamxoI=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXdJn4AvotO+ZHOQcAqzqNW76H2bhhU1DcS5 /3Jk3lUErGJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3QAKCRDa6OEJdZac 5UvREACteLOxeiWOlJAqo7XrWShWDkCPvw9SvwAYucvxS/Egcnpf/P3DTPdyAaEKl/1EQpLMFoz xWE74hCtZSMKRGnUZxeGnyBg6mNXhHcE2pnM+mZhbpAUBlSQAq/8gEfkzyhUat+H+Z2HG/s2+oQ hYRgCKaOOLWpMrQrqftRviDHGpAIJAe4v/yAQGnMvuG7c076BNJXchf1/UW+46DkMSHWFM/FQlK OayO3W/fpzkpwl820EbKtfoCXrx4LZyzCWhbkq0ufiTi+pNW5hEkdsq6c2nSvW2wdZTOYmiRMH9 PLj02LE2px/KbYW12ZwXoSMFNyCwQ0te7hBYc0l9+2UOwPzB5SNHhd7FtQ/qipGkbSqXNeS7360 H3pZsz3Cx3iV/LcL8PYvq7BYatMgb73Qi2KFJFVtHDm9HQ5K5tPscjWaFTHKXQ8SeCAXjgWtXvv jtI2oESyYpiaOrbFN6wsmZYDWZO23xCSSSnqpCsvpocE3IOEkbOjPluqee6+Qafb6t8J7ZptApq j5N2L4J2RHjDof1+OrC2E+n8UtpktI4nezeQncI/7VBohrUH9nLzbqUbuzfzLs0ym4lVZAKqTGj 3RPiqHiNR3CiXX+ikTY7/AEUKjTVzO1Z5dwUT7Xo1cfBMJ5z88hsSoDUAKcQiboBFhBbWu4+b5O kSOLBak6g9ndhOA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737932196154100 The following patches are going to use it for qemu-vnc. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 Tue Apr 7 01:06:58 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=1773737889; cv=none; d=zohomail.com; s=zohoarc; b=OfVO2gQ8mojEcmOxxe3eiiVGTvG7X5lg04NgxqieNqrvT+r6OvF4YDSiNwvuDoSAx3g5UhQMHjVm/4nSAzscWLTpo9rG0KpdqODmG1RPTjU7Si/ofgZU6rjdcx1p/S2oY8PMJoEYiSsBsFL6J7/TMykIHGhLWuBWhw6aB6Hws2g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737889; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=8f/MrTFsI13Xy/4oaaD45EfqL69PEH6L1W1Oztn73fU=; b=HnXhooobxcWXbx0m2izpqfvP3kaZHjmAxNEvEdnWoEilcxC5/fq98rgjHZZb1zu9u8hI+d7ZPHhRpssrmD1DdmVHGnOKRCy9tT8bxHw6toupJjj1rivVPPh3bYB6XGP9F3VljRDonWhkjXqAaXjR3c84qw8iuQIp7jq2GDyL0m0= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737889131439.6631864675677; Tue, 17 Mar 2026 01:58:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEM-0006y2-RP; Tue, 17 Mar 2026 04:56:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDu-0004d5-1N for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56: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 1w2QDq-0007Ye-Oe for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:21 -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-302-klZk8HIPPqez1vwMeebwDw-1; Tue, 17 Mar 2026 04:56:16 -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 AEBC71954B23 for ; Tue, 17 Mar 2026 08:56:15 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 95D151955F19 for ; Tue, 17 Mar 2026 08:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8f/MrTFsI13Xy/4oaaD45EfqL69PEH6L1W1Oztn73fU=; b=WJ49ILi5iEsLpW52vhf6JhgQGLG4uNDgQPkeBzcXQX+LlAH2cqtE8LQNkDlauasfCscuj3 Ijxxbyn1lEjbhsgwxpG8RCvDEM2lZCwb7OjgdzI1T7CbJpyzyPQrI9mzK4tS1MRaV7IkEl JKvTnFOo3gEdxlfvrN0q/W//s9TuRuQ= X-MC-Unique: klZk8HIPPqez1vwMeebwDw-1 X-Mimecast-MFC-AGG-ID: klZk8HIPPqez1vwMeebwDw_1773737775 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:12 +0400 Subject: [PATCH 58/60] 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: <20260317-qemu-vnc-v1-58-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=2482; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=hF96GHtpSZxgrTbAMaUASqNvy0ihSke9RgQRhVtrfxg=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXdEL3VPPjPSo9piF4jMfMs1vziZyGhgV3pl wNlZRuguYCJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3QAKCRDa6OEJdZac 5cU0D/0dh24YwfI7HXCIB0OIylQjF3domL+edU1UGzUBXigq3SmNHS0TiVcE/a3r9VKQHYE/Zpl BHytx7fM4atFEiEKPCvz1ItZnt5WZ1rI9cGFMqdvFONbTTAV8S4Wq8vDHjowIAtrLkGhJ0yzYws 7YwsXCTA4qUjG0HjUirHTYMx3CvCdOL96UgZS1ZBJr7l29XSg9LM8vjg0KF9v2+0Voh+sRDGwuS 7ZHaiIU/JodCLxBiyrlVHg9BrX7UI08pz4IucRkGlGX8mvhswHq9UDFgLtw3KZaYK4zIO8R5QzB Cx3hg/1Y99qHcmxSohpILjYOTRbh1zkwEYaiaipNcT+KbTeDuoU1xjZPmAAWoC+OAJHA4Qm+uI1 bJc0A7bOtskcP39a3DukZQz3TMPfC5SyZCZKK/x5QwatfhCfXqLnjc/x1V/j/xuk61w1oZNsC2f DQsx7VLQK2+ujpktObILdzQHqw3fqVwufzbv5sJ13ktWUs60G0hwrZQZKCqzpdifPSMBfXSh/xR xXiBLCdzaTt+XkZrPZFo8nPSCCOXIGLZ9tzzZ2jiZAlxMvSB3GtrlDtUCBsnx5I4jWL1f0ZnQqt x+cpNxC8qM87KgHQX3yPVMCA1FucvtWJ1AFnVVXANquAJd+1gTzjcy7lduhhn0ZpEnfV6p7ueiK J1//ptbSyerLs8Q== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737891553154100 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 6c990864e3e..ed4a52d0255 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 @@ -229,7 +229,7 @@ test_dbus_vmstate(Test *test) =20 thread =3D g_thread_new("dbus-vmstate-thread", dbus_vmstate_thread, lo= op); =20 - 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); @@ -342,15 +342,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 Tue Apr 7 01:06:58 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=1773737932; cv=none; d=zohomail.com; s=zohoarc; b=jKY9MWANxa5Lklap7LxvYwcZdbgQkAR6QhCbwGuRoa/Qlqm6WleHrfjXBBMa+KPlc4LAjhT3rP+31wEBt6UbFgrwub3rmWq5IWZSQjj7IgTOQp+UNzg36GCxatXGWXI0Pr+JQYgf7BF84YQgXYnM/5jzsOxbKmLimEltRFMuDDU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773737932; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=yZha2cobxbnJSN26XX9Uh5E5JAqwHkCKFFu6Rh83jWM=; b=YSVucbASc0iZTGCH7jbmvT+qdsbRIBltSLY3Saj3ALsVML8kYkXX6ZDmX/0MOegdrkBYLOxN+eo2zageJxbUmxKHLtHBSpW1ibks+ugB85v58zXMuW1376nAtTigEdTOPRGOOO7o+tJHwOvssI+aXypVXzerB+f9Kgi6xZd98ZY= 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773737932290590.7791725978201; Tue, 17 Mar 2026 01:58:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w2QEE-0006HF-57; Tue, 17 Mar 2026 04:56:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w2QDx-0004qV-Qi for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56: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 1w2QDw-0007dx-BZ for qemu-devel@nongnu.org; Tue, 17 Mar 2026 04:56:25 -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-171-8i6CQ7clNNWTVGACC_LNzg-1; Tue, 17 Mar 2026 04:56:22 -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 692B118005BB for ; Tue, 17 Mar 2026 08:56:21 +0000 (UTC) Received: from localhost (unknown [10.44.22.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 54CFF1800361 for ; Tue, 17 Mar 2026 08:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773737783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yZha2cobxbnJSN26XX9Uh5E5JAqwHkCKFFu6Rh83jWM=; b=c7XN2L2J8teHVhYd/yY7urwiJrWfXaCpQxhLmWNTCLW0t2zte/U9fiAXlLM6bm5OX6t7mM PktsXugZfRiUOEBLPX1HMyW0jfY8fvkRoSBOYCAzSTo74PjSqIMLhhjVlm6pF0ejYKJ5Fu VOXxWvGHogZbOzmmjXIHEQP0PrM1JwU= X-MC-Unique: 8i6CQ7clNNWTVGACC_LNzg-1 X-Mimecast-MFC-AGG-ID: 8i6CQ7clNNWTVGACC_LNzg_1773737781 From: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Tue, 17 Mar 2026 12:51:13 +0400 Subject: [PATCH 59/60] 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: <20260317-qemu-vnc-v1-59-48eb1dcf7b76@redhat.com> References: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> In-Reply-To: <20260317-qemu-vnc-v1-0-48eb1dcf7b76@redhat.com> To: qemu-devel@nongnu.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1247; i=marcandre.lureau@redhat.com; h=from:subject:message-id; bh=pWmLiM6H0bHXqtHHxabbCrpUXS9tin4BcNjH23gfJYw=; b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBpuRXdAg7c/RLYBUK3z0g47M6R2utqpTFCb7/jQ abK0wJMGPCJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCabkV3QAKCRDa6OEJdZac 5XgJD/9IPxVOipz6vo+zhWTYiXPhvYiM1Brz6mHfwzg0Bt4ZOwG/cuanxcr+d9Q7X99nvudYI7P qxHKgLoSQeD05Ng3TEgFyMAgcMSgOeEhFhLi9ENuTttOfF5zSOz2S4wsi2eP9xq78Kibu51KGJF fIpl0H1RxU4HH3yvhclnfasmEj058LFxcMAvVMP+f/JnByAxNboT5N2uufVJg7mHfJXpAFWLJtr Z24ngQwxlBhs0eAvLpVq5IP0+HEUYA3MSOp9n07yTDpb1Pt/4y0FvlWcTinVNfr4vBlg/2fs0E+ 6SnicWFEVTpxS3g5pRBcu+pirTVlppZWAMZdumBQIwLMTuuYsctR0bGmaiOnmX/dGds8JJpMnA1 Ou0TXaSWAiRnj+PCzuZ5DYV2etI6GNZq/JrRYIZFI3XhOP1BR3e088MjWwCfsBsSoHHiCHgjFXj NA7uzy1GDb+Ycc7oFC9k08Ms5ce33j7+WA6JIIlcw6gfu//LbqtKH8nVR/MUMUyyKwI3ZljEl1Q MoMydJxucaR6Alm89/yT8DfEuxMCk6eXcWUSBR11r8fgq+JnAqQBvyi6vy40aC+uTT2pc/IK/Rl raWKlGKkvCCFkgaq4NmCqhN5Ya3tv69uP1YEqVTvwnh3rtu/GS7mFYfMLCFzI2JLolo2adRTgUk Px8x1A/LCxQGUCA== 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: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, 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: 1773737934217154100 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 ed4a52d0255..23d1c872f71 100644 --- a/tests/qtest/dbus-vmstate-test.c +++ b/tests/qtest/dbus-vmstate-test.c @@ -352,8 +352,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/contrib/qemu-vnc/trace-events b/contrib/qemu-vnc/trace-events new file mode 100644 index 00000000000..f2d66a80986 --- /dev/null +++ b/contrib/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" diff --git a/meson_options.txt b/meson_options.txt index 31d5916cfce..ef938e74793 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -119,6 +119,8 @@ option('vfio_user_server', type: 'feature', value: 'dis= abled', description: 'vfio-user server support') option('dbus_display', type: 'feature', value: 'auto', description: '-display dbus support') +option('qemu_vnc', type: 'feature', value: 'auto', + description: 'standalone VNC server over D-Bus') option('tpm', type : 'feature', value : 'auto', description: 'TPM support') option('valgrind', type : 'feature', value: 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index ca5b113119a..5f7a351ca4a 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -174,6 +174,7 @@ meson_options_help() { printf "%s\n" ' qatzip QATzip compression support' printf "%s\n" ' qcow1 qcow1 image format support' printf "%s\n" ' qed qed image format support' + printf "%s\n" ' qemu-vnc standalone VNC server over D-Bus' printf "%s\n" ' qga-vss build QGA VSS support (broken with MinG= W)' printf "%s\n" ' qpl Query Processing Library support' printf "%s\n" ' rbd Ceph block device driver' @@ -458,6 +459,8 @@ _meson_option_parse() { --qemu-ga-manufacturer=3D*) quote_sh "-Dqemu_ga_manufacturer=3D$2" ;; --qemu-ga-version=3D*) quote_sh "-Dqemu_ga_version=3D$2" ;; --with-suffix=3D*) quote_sh "-Dqemu_suffix=3D$2" ;; + --enable-qemu-vnc) printf "%s" -Dqemu_vnc=3Denabled ;; + --disable-qemu-vnc) printf "%s" -Dqemu_vnc=3Ddisabled ;; --enable-qga-vss) printf "%s" -Dqga_vss=3Denabled ;; --disable-qga-vss) printf "%s" -Dqga_vss=3Ddisabled ;; --enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dtrue ;; diff --git a/tests/dbus-daemon.sh b/tests/dbus-daemon.sh index c4a50c73774..85f9597db43 100755 --- a/tests/dbus-daemon.sh +++ b/tests/dbus-daemon.sh @@ -62,9 +62,17 @@ write_config() =20 - - - + + + + + + + + + + + =20 =20 diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 5f8cff172c8..0eca271abc8 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -411,6 +411,10 @@ if vnc.found() if gvnc.found() qtests +=3D {'vnc-display-test': [gvnc, keymap_targets]} qtests_generic +=3D [ 'vnc-display-test' ] + if have_qemu_vnc and dbus_display and config_all_devices.has_key('CONF= IG_VGA') + qtests +=3D {'dbus-vnc-test': [dbus_display1, qemu_vnc1, gio, gvnc, = keymap_targets]} + qtests_x86_64 +=3D ['dbus-vnc-test'] + endif endif endif =20 @@ -442,6 +446,10 @@ foreach dir : target_dirs qtest_env.set('QTEST_QEMU_STORAGE_DAEMON_BINARY', './storage-daemon/qe= mu-storage-daemon') test_deps +=3D [qsd] endif + if have_qemu_vnc + qtest_env.set('QTEST_QEMU_VNC_BINARY', './contrib/qemu-vnc/qemu-vnc') + test_deps +=3D [qemu_vnc] + endif =20 qtest_env.set('PYTHON', python.full_path()) =20 --=20 2.53.0