From nobody Mon Nov 23 05:09: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=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1790695257; cv=none; d=zohomail.com; s=zohoarc; b=G+2qSfQpeHeCmp5Ki3e59yt/SdhJjXjQr9TDu1jqAnNd0Ut6E/VW8t3hSn/v6VxtBrsTSxg/CF0+vys0To91UOiMfRg9vI0fBaUX+EloyoiszgMVUC5f9RxuKyYdiGHNRTctPRnuXwpkO8MkCEHaRnfH9ML+c3FQP93BcQhyb5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790695257; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AyWEwOYPKBgiHx49e2sKdwXr45PgJ49vFwtRTt1WrwA=; b=RgngsW0c85JvaeaZJo0PzbPH0IG2m6t28lHYmgAQoyRmjmeeEw7Haol+9H+2zLErvnCk6x3D0aoNJ8Kn/97PbRf6V9qnZzXX+aM/n5ifl1DK+QG2eYS7HVMqOJP6tdTCbVHEsboDMa9ld57DPborPR0C1CG6R7XoQG4J1ZYmi18= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790695257934235.62366580300613; Tue, 29 Sep 2026 08:20:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBZdG-00043d-QD; Tue, 29 Sep 2026 11:20:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBZdD-00042h-7q; Tue, 29 Sep 2026 11:20:35 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBZdB-00071w-JK; Tue, 29 Sep 2026 11:20:35 -0400 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68TB5Qfk4060015; Tue, 29 Sep 2026 15:20:21 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gx5j57vmp-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 29 Sep 2026 15:20:20 +0000 (GMT) Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 68TF3uCC1647349; Tue, 29 Sep 2026 15:20:19 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 4gxu2ya25g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2026 15:20:19 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 68TFKF7L47382880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Sep 2026 15:20:15 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92BBD20043; Tue, 29 Sep 2026 15:20:15 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3F8032004B; Tue, 29 Sep 2026 15:20:15 +0000 (GMT) Received: from li-fa2166e9-1f7d-4f1a-8ca5-7ccf0f022c25.ehn-de.ibm.com (unknown [9.224.79.183]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 29 Sep 2026 15:20:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=AyWEwOYPKBgiHx49e 2sKdwXr45PgJ49vFwtRTt1WrwA=; b=UEV0nhgAnrLeuRfvxseBsiIJpVdOHJhKk C2pK3IznICj+I2o+2LQdHr4nzVUhfaDI88a7HWJrDyIkJJ3R8D0XnDteOjbvQZlb mEeiRQ88gkwPg+lLMb+J3bDzhd9gGaylAZ3tzz9eFKdJ/1GqWoq+KaQ8EI8zTeEP VbmFz+FknTTSCPlnzLf/4WPP0ZE26UCFMJ3FbwAGyY9SpySJ5NqEmL0M1aOKc9Ni RIMHUx//Ys7nSbMP9Nn8RTVTVjgNrp1pjVLhpbGqRNjT4yFf3FhIsrTt/8yvVDvq VgWjMBLx8t18CGc10PiVoG3n3rKmTZr9BqAogZOAFSBkzzbvZf7oQ== From: Maximilian Immanuel Brandtner To: filip.hejsek@gmail.com Cc: amit@kernel.org, armbru@redhat.com, berrange@redhat.com, eblake@redhat.com, eduardo@habkost.net, lvivier@redhat.com, marcandre.lureau@redhat.com, marcel.apfelbaum@gmail.com, mst@redhat.com, noh4hss@gmail.com, pbonzini@redhat.com, philmd@mailo.com, qemu-devel@nongnu.org, wangyanan55@huawei.com, zhao1.liu@intel.com, pasic@linux.ibm.com, borntraeger@linux.ibm.com, jjherne@linux.ibm.com, qemu-s390x@nongnu.org, mjrosato@linux.ibm.com, brueckner@linux.ibm.com, farman@linux.ibm.com, cohuck@redhat.com, maximilian.immanuel.brandtner@protonmail.com Subject: [PATCH v3 1/2] s390x/sclpconsole: fix indentation for console_reset Date: Tue, 29 Sep 2026 17:20:11 +0200 Message-ID: <20260929152012.2696005-2-maxbr@linux.ibm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260929152012.2696005-1-maxbr@linux.ibm.com> References: <20260921121641.1354712-1-maxbr@linux.ibm.com> <20260929152012.2696005-1-maxbr@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYwOTI5MDA2MCBTYWx0ZWRfXx6DtGAQbeBUV 2nSlWTzrkLIRBJZV6egEeeaiVWlaIyX/AFVb2kIc29hTdNGFfZWBsKCemXum2RnVVlK/vSKegSp 4q54a/49cWAYEtJL662sQTp9y4weMPg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTI5MDA2MCBTYWx0ZWRfX6qjyndfstdDp 95eiLLgP3SjLpsJ5cVD8OwOhUnEXukYNwFhaKKrIAZEWEc0EKtmVVRwcrJAfKOh6+s9ZLw1uNGJ 36AnMSTAd/wxPUF3vvFPtAkvx94O5Djc8XqUTwSJcbmU28NIjzg+KGY2sTU4+V/+oNyBlR1dIHw r7fV2w6xqT4iD2p/kbtQEDnkejqiUdayQwCLAbhm2+NLfxfIyD5oI8w0gPps8a13MKyLu0/uxp+ PF/ZxK9ffhKSml56nNY48Pw//i4Ng2MEwbJcLON9IpgdW/Zp8sh3sVuPk/Z19/RGK5a4BLv8r/4 wW7osoirt71zh+8vd6vMxAUEXyqiMf7pWXygLVH3+YiPzhtiJrts93EE0RkW9CvKbPHHR9L1Tv0 KlKnPma5sIJURu8uQqVd56jJxK6kNiyhwpYSxPuUZp11w/UPiWTW6LhzfZp/lz8xXH2AWm22jQn p0jf820UUS3mbLRpT/Q== X-Proofpoint-GUID: o5eDxxRLaaJRzVmma7spIycD3H7AfosS X-Authority-Analysis: v=2.4 cv=RKcmjIi+ c=1 sm=1 tr=0 ts=6abbd734 cx=c_pps a=aDMHemPKRhS1OARIsFnwRA==:117 a=aDMHemPKRhS1OARIsFnwRA==:17 a=VdqzKS8jKosA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=iQ6ETzBq9ecOQQE5vZCe:22 a=VnNF1IyMAAAA:8 a=vA-fpVHSMCYthAec8ikA:9 X-Proofpoint-ORIG-GUID: SSoGeQlfOoOnMXf5jn1IrQ5Gu6ueyIKv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-29_04,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 spamscore=0 bulkscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609290060 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=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=maxbr@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @ibm.com) X-ZM-MESSAGEID: 1790695260497158500 Content-Type: text/plain; charset="utf-8" Adjust indentation to match the rest of the file. No functional change intended. Signed-off-by: Maximilian Immanuel Brandtner Reviewed-by: Matthew Rosato --- hw/char/sclpconsole.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index 179d12745c..1ad39084d3 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -240,15 +240,15 @@ static int console_init(SCLPEvent *event) =20 static void console_reset(DeviceState *dev) { - SCLPEvent *event =3D SCLP_EVENT(dev); - SCLPConsole *scon =3D SCLP_CONSOLE(event); - - event->event_pending =3D false; - scon->iov_sclp =3D 0; - scon->iov_bs =3D 0; - scon->iov_data_len =3D 0; - scon->iov_sclp_rest =3D 0; - scon->notify =3D false; + SCLPEvent *event =3D SCLP_EVENT(dev); + SCLPConsole *scon =3D SCLP_CONSOLE(event); + + event->event_pending =3D false; + scon->iov_sclp =3D 0; + scon->iov_bs =3D 0; + scon->iov_data_len =3D 0; + scon->iov_sclp_rest =3D 0; + scon->notify =3D false; } =20 static const Property console_properties[] =3D { --=20 2.54.0 From nobody Mon Nov 23 05:09: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=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1790695293; cv=none; d=zohomail.com; s=zohoarc; b=nWstlMBqJpO/93a32BvF+o2BRw5DT94F3ZpqHK9k9U96W3ytLOjr7SEeWdCohMyMyoQ0ErieMgbd45UQyBSxqz9aCLiEWKfgTQKTx3XGvyPHaWzW3tzLhYqb7De7aTPc9XO94Q/5EEsotKOOsCcuwTWX0wzbR7OK6BDaFq03vMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790695293; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=f4x+oSXPj3rdYcA4yB3usef617Q+F1wc48cgksYK/js=; b=TrTRLDftPQHxybLFLRuY2nrY2trCUuny7GFzQ+s16D3DUgp1CfHD8Pe7Ds2bZn95B7kTmLj8upPPuc0ke7H2gecd1OgaQQNlxey+iK6DQT9ZyNrXapM9y8WSY3ZN4/QYwSBo+1RsJvhkb7K5J9HaYAxEGnnM6Ta7uKzYnR1loyE= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1790695293866339.0633662474162; Tue, 29 Sep 2026 08:21:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xBZdI-00044k-3A; Tue, 29 Sep 2026 11:20:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBZdE-000434-H2; Tue, 29 Sep 2026 11:20:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xBZdB-00071u-Tx; Tue, 29 Sep 2026 11:20:36 -0400 Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68TB5U4q4017555; Tue, 29 Sep 2026 15:20:21 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gx5pt711r-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 29 Sep 2026 15:20:20 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 68TF1tmY1617010; Tue, 29 Sep 2026 15:20:20 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4gxrrwact4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Sep 2026 15:20:20 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 68TFKGiD40501680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Sep 2026 15:20:16 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DDE2620043; Tue, 29 Sep 2026 15:20:15 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 982AA2004E; Tue, 29 Sep 2026 15:20:15 +0000 (GMT) Received: from li-fa2166e9-1f7d-4f1a-8ca5-7ccf0f022c25.ehn-de.ibm.com (unknown [9.224.79.183]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 29 Sep 2026 15:20:15 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=f4x+oSXPj3rdYcA4y B3usef617Q+F1wc48cgksYK/js=; b=AN0Ls4ktoMXBd628NYbKwEqDb+xs7bB6a ijLvzzGTk6B8MsYE8vGtTTegaPNF50IpB+5FaJP/DUIODx116MInRWuvfioDntUB sH6lWt3c2yHRTpmvgXjSdK4YkH64Hnsf/YaGs2KudunkVpnsSd9ws2xyv2McfrvV N9OHbQBad/nhd0b+c88aRTH+uVanlO+BZcnco2eMybVdtaaawl3ROIPPsCZga7Nb joe3175CGycbbwtPoRw9X48YcgFSF9vU615Jc3lOTR2CQpZnPAJOlIEj9IWQSsML kB8QlXonQdrO/pGPct2KO6Cj4kub7jjbYLHtStCel5WwkLBg1F9aw== From: Maximilian Immanuel Brandtner To: filip.hejsek@gmail.com Cc: amit@kernel.org, armbru@redhat.com, berrange@redhat.com, eblake@redhat.com, eduardo@habkost.net, lvivier@redhat.com, marcandre.lureau@redhat.com, marcel.apfelbaum@gmail.com, mst@redhat.com, noh4hss@gmail.com, pbonzini@redhat.com, philmd@mailo.com, qemu-devel@nongnu.org, wangyanan55@huawei.com, zhao1.liu@intel.com, pasic@linux.ibm.com, borntraeger@linux.ibm.com, jjherne@linux.ibm.com, qemu-s390x@nongnu.org, mjrosato@linux.ibm.com, brueckner@linux.ibm.com, farman@linux.ibm.com, cohuck@redhat.com, maximilian.immanuel.brandtner@protonmail.com Subject: [PATCH v3 2/2] s390x/sclpconsole: implement resizing for vt220 consoles Date: Tue, 29 Sep 2026 17:20:12 +0200 Message-ID: <20260929152012.2696005-3-maxbr@linux.ibm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260929152012.2696005-1-maxbr@linux.ibm.com> References: <20260921121641.1354712-1-maxbr@linux.ibm.com> <20260929152012.2696005-1-maxbr@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-ORIG-GUID: d9iPjrFrWmnoXtMyi5tbPwrcg0s5ZLN2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTI5MDA2MCBTYWx0ZWRfX422/r+dXo90I im5FJFKlQ3bsCQe9RGlsSkjWMKVIL6o0TqZsJEWMrvcySZsJMMok0oCPAA43CHb9F1MzivMWPBD eMWy7rjX0hW24q7RmWgxZ2OXPrw+6dlrqMANvYtj00UbkTK6DEO2gLZnKWCVp67XR9NUbLaHKND JTVNUTte3VSwyqRvfshhVmJurC0fM+Zl4v0roZKJwq1GYKczkAPWHS0Cz6HdRI0MLd8StSTrlbb v74MtpmWl6XmLRvl74W79KbgBJu15WyTttRsB9sBtxrSwwmnPEQG0gKNbO8v9NP+81lZbQHVchs 1kWsmO6kJbedRTRsqyEVszXzvEtv9i9Wdm25UsN6cggjbNpHBQJ0xr3M8oSOWY2txhzQOJurJkN 5Q3w7OCMKma8Ib34+NJbKcHUwj1/hgHFm+35cTmp6cKuYtjfkvOn837jpRofuIAl1ToWe1SrzYg gKj+KXeGIyqoF4y03dg== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTI5MDA2MCBTYWx0ZWRfX+sIrz5vCle/N ZNb98A0quxocSZTY1l42oirTJLMlzTLnLEvWAfQ/xCUfYACKc0lvZI8OnGUE7gr/5eiuGk/+WW1 uugIkg+DSYbYjiae9f5rDuHxh0x+K/8= X-Authority-Analysis: v=2.4 cv=EY5d0/mC c=1 sm=1 tr=0 ts=6abbd735 cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=VdqzKS8jKosA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=VnNF1IyMAAAA:8 a=q2DVYbRnPiRVfZbQHhQA:9 X-Proofpoint-GUID: V7W8C5RntE6wP0Ch3QKnrHVtMxHds_IK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-29_04,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 suspectscore=0 adultscore=0 clxscore=1015 malwarescore=0 impostorscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609290060 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=lists1p.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=maxbr@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @ibm.com) X-ZM-MESSAGEID: 1790695296555158500 Content-Type: text/plain; charset="utf-8" Add a tty code to indicate a resize frame. The body contains two big endian 16-bit integers rows and columns. After reset, the guest must be informed of the terminal size again. A chardev that doesn't report its size yields 0x0, which shouldn't replace the guest's default. Signed-off-by: Maximilian Immanuel Brandtner Reviewed-by: Jason J. Herne Reviewed-by: Matthew Rosato Tested-by: Eric Farman --- Changelog: v3: - split console_reset indentation fix into its own patch v2: - Use packed struct and named event type codes for resize frames - Trigger initial resize event in console_reset() instead of console_init(), skip when chardev reports no size - Reset event_pending after resize event Requires the following pre-req: [PATCH v7 00/12] virtio-console: notify about the terminal size (https://lore.kernel.org/qemu-devel/20260609-console-resize-v7-0-0c550f= dcec15@gmail.com/) Testing: - Tested on QEMU: commit 38879a667f with the following patches applied: [PATCH v7 00/12] virtio-console: notify about the terminal size - Tested on linux-next (commit c1f49dea2b8f) with the following patches applied: [PATCH 0/2] s390/sclp: Resize for sclp-vt220 console --- hw/char/sclpconsole.c | 76 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index 1ad39084d3..12033e1e46 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -33,6 +33,9 @@ typedef struct ASCIIConsoleData { /* max size for ASCII data in 4K SCCB page */ #define SIZE_BUFFER_VT220 4080 =20 +#define SCLP_CONSOLE_EVENT_TYPE_DATA 0x00 +#define SCLP_CONSOLE_EVENT_TYPE_RESIZE 0x08 + struct SCLPConsole { SCLPEvent event; CharFrontend chr; @@ -42,6 +45,8 @@ struct SCLPConsole { uint32_t iov_data_len; /* length of byte stream in buffer = */ uint32_t iov_sclp_rest; /* length of byte stream not read via SCLP = */ bool notify; /* qemu_notify_event() req'd if true = */ + bool resize; + bool resize_init; }; typedef struct SCLPConsole SCLPConsole; =20 @@ -49,6 +54,12 @@ typedef struct SCLPConsole SCLPConsole; DECLARE_INSTANCE_CHECKER(SCLPConsole, SCLP_CONSOLE, TYPE_SCLP_CONSOLE) =20 +typedef struct SCLPConsoleResizeData { + uint8_t type; + uint16_t rows; + uint16_t cols; +} QEMU_PACKED SCLPConsoleResizeData; + /* character layer call-back functions */ =20 /* Return number of bytes that fit into iov buffer */ @@ -81,6 +92,29 @@ static void chr_read(void *opaque, const uint8_t *buf, i= nt size) sclp_service_interrupt(0); } =20 +static void chr_event(void *opaque, QEMUChrEvent event) +{ + SCLPConsole *scon =3D opaque; + + assert(scon); + + switch (event) { + case CHR_EVENT_RESIZE: + case CHR_EVENT_MUX_IN: + scon->resize =3D true; + scon->resize_init =3D false; + scon->event.event_pending =3D true; + sclp_service_interrupt(0); + break; + case CHR_EVENT_BREAK: + case CHR_EVENT_OPENED: + case CHR_EVENT_MUX_OUT: + case CHR_EVENT_CLOSED: + /* ignore */ + break; + } +} + /* functions to be called by event facility */ =20 static bool can_handle_event(uint8_t type) @@ -104,10 +138,37 @@ static sccb_mask_t receive_mask(void) static void get_console_data(SCLPEvent *event, uint8_t *buf, size_t *size, int avail) { + SCLPConsoleResizeData resize_data; SCLPConsole *cons =3D SCLP_CONSOLE(event); + uint16_t rows, cols; =20 - /* first byte is hex 0 saying an ascii string follows */ - *buf++ =3D '\0'; + if (cons->resize) { + if (avail < sizeof(resize_data)) { + *size =3D 0; + return; + } + + qemu_chr_fe_get_winsize(&cons->chr, &cols, &rows); + + if (cons->resize_init && cols =3D=3D 0 && rows =3D=3D 0) { + *size =3D 0; + } else { + resize_data.type =3D SCLP_CONSOLE_EVENT_TYPE_RESIZE; + resize_data.rows =3D cpu_to_be16(rows); + resize_data.cols =3D cpu_to_be16(cols); + + memcpy(buf, &resize_data, sizeof(resize_data)); + *size =3D sizeof(resize_data); + } + + cons->resize =3D false; + cons->resize_init =3D false; + event->event_pending =3D cons->iov_sclp_rest !=3D 0; + + return; + } + + *buf++ =3D SCLP_CONSOLE_EVENT_TYPE_DATA; avail--; /* if all data fit into provided SCLP buffer */ if (avail >=3D cons->iov_sclp_rest) { @@ -150,6 +211,9 @@ static int read_event_data(SCLPEvent *event, EventBuffe= rHeader *evt_buf_hdr, to =3D (uint8_t *)&acd->data; avail =3D *slen - sizeof(ASCIIConsoleData); get_console_data(event, to, &src_len, avail); + if (src_len =3D=3D 0) { + return 0; + } =20 acd->ebh.length =3D cpu_to_be16(sizeof(ASCIIConsoleData) + src_len); acd->ebh.type =3D SCLP_EVENT_ASCII_CONSOLE_DATA; @@ -233,7 +297,7 @@ static int console_init(SCLPEvent *event) } console_available =3D true; qemu_chr_fe_set_handlers(&scon->chr, chr_can_read, - chr_read, NULL, NULL, scon, NULL, true); + chr_read, chr_event, NULL, scon, NULL, true); =20 return 0; } @@ -243,12 +307,16 @@ static void console_reset(DeviceState *dev) SCLPEvent *event =3D SCLP_EVENT(dev); SCLPConsole *scon =3D SCLP_CONSOLE(event); =20 - event->event_pending =3D false; scon->iov_sclp =3D 0; scon->iov_bs =3D 0; scon->iov_data_len =3D 0; scon->iov_sclp_rest =3D 0; scon->notify =3D false; + + /* the guest defaults its terminal size on reset, announce the real on= e */ + scon->resize =3D true; + scon->resize_init =3D true; + event->event_pending =3D true; } =20 static const Property console_properties[] =3D { --=20 2.54.0