From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796303216; b=z1L9r+GP7lWIzskO+TRbSPlh7cPnoVI3dr+jFN9rDtaHlGj60ZY3YtkV2o2gdOiVlyAh dIfnPh7WP2H/xNP1Vg+n8CTTDyJBh9uAKHylQ3iJPznV3hdKpYa0VpLDIVzVXE9oPBUaI or2c9CEfDP3mpxlqk3iR0soyR/kgqbL8P0+CkWFLKS4fh71I8b1Y3sC2SAu0hGIo5nZSL h+OLNJYIbITvAR/xSpZRcewbDbsTlHI8UWG27dSpm4VJ6yoTZtZeeSeJkJPpSU8xJaaf7 qbcE5GF/xRF3/R3HZbfxTxePqoy6SFLwo6pNIdwhukMeqm3GuInAqb7Qyzxyg6xWWIA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796303216; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:Received:Received:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To:X-TM-AS-GCONF: X-Authority-Analysis:X-Proofpoint-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-ORIG-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=SZlCXqeNGWTfrAK8hXmJO8teqLNglhwE7R8tktu7Y+A=; b=o1piNAyQMYK8ipJsB03K94aJ5XqRy/YNu0nWQ2cfm3DLVak8RZ0BDQ4aHra6j3lRGal8 LzN5Bwdz+8Ku+YryF1Zu9WRKKD62RRIMuvmItZjQZUqkDMwIdX/n7QSfprEbV88SCjnBz i8oXhzwhumo/EUk11bF+HEkDmtlNl/J1E2sUSe7OLIEwrCXUFq9fpCCJ92bkk5PYOouMs m/rcdLjy0ntp5JsGkkxQeo9TgNKxBFFLQPsAF54RESjrYZgb51kqO2UcFbDmYWdRWqvWD 1vRnEPmBCd6nVxLLhQWGb85nxWgKb2CvNlP0YuW4kNpHgTqgGJpxFjWKhTZFxrJ00Ag== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=DjVBsy7C; arc=none smtp.remote-ip=148.163.158.5 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E4BE606A32C; Thu, 3 Dec 2026 13:06:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3E4BE606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=DjVBsy7C Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B3AYviT3132126; Thu, 3 Dec 2026 13:06:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=SZlCXq eNGWTfrAK8hXmJO8teqLNglhwE7R8tktu7Y+A=; b=DjVBsy7CnT++cFMNVS3tm6 DwhmT2vosTmyaGNQjeqIeAe5s4xzbWfMq8weFpONsExFAg6PvzUx70rFz44lFrvi LamtkUlGHLSvwZPxby7krI1KpNqWkR8sFaeB1jkcBtZWnrih/iQdPN8VnapdGtef Ix9beEKgKAoXG9KUwDUdLl1IzBlnV87NCjDr8NammsP5vLhyBbebyyT0GiU5hJ6R 63ZZ0H7j8WNZqGEMVr3m9aFW+n954wwRf/b4SPl+buyuXQ6wVdEYs3Zx2ZdqZekh ABNDjhJ3qlNzIcPRPgTTea/3Cx2G2W7KV+jzdbK/qlFFK2MoIjUx3SVjoPmmtsBw == Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4jan7uvyqe-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 03 Dec 2026 13:06:50 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B3AJKJj289311; Thu, 3 Dec 2026 13:06:50 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4jb5a1gux5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2026 13:06:50 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6B3D6kmD56295914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Dec 2026 13:06:46 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4D2832004B; Thu, 3 Dec 2026 13:06:46 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 22D7F20040; Thu, 3 Dec 2026 13:06:46 +0000 (GMT) Received: from osiris (unknown [9.68.29.29]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTPS; Thu, 3 Dec 2026 13:06:46 +0000 (GMT) Date: Thu, 3 Dec 2026 14:06:44 +0100 From: Steffen Eiden To: sashiko-reviews@lists.linux.dev Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-s390@vger.kernel.org, Oliver Upton , Marc Zyngier , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger Subject: Re: [PATCH v4 10/25] KVM: arm64: Share system register code with s390 Message-ID: <20261203130644.97472-A-seiden@linux.ibm.com> References: <20261127-sysreg-v4-0-a6318d18aab5@linux.ibm.com> <20261127-sysreg-v4-10-a6318d18aab5@linux.ibm.com> X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=Vvy2kO2n c=1 sm=1 tr=0 ts=6b11696b cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=8nJEP1OIZ-IA:10 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VwQbUJbxAAAA:8 a=c92rfblmAAAA:8 a=VnNF1IyMAAAA:8 a=eeWqwkmxeoLAeJay37IA:9 a=3ZKOabzyN94A:10 a=wPNLvfGTeEIA:10 a=GvGzcOZaWPEFPQC_NcjD:22 X-Proofpoint-GUID: K2gRX-WFqfYum8EvwOvm5JgG2TwMJlwE X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAzMDA1MiBTYWx0ZWRfX5j2AaNM88cL5 2YYyzCIqAloyZGWkcD6kPdZ0OGYfwVY4YW9i4SLHNd3O0yQEHnC87wVfEnkoiIWvsLqcVC28PxS cywJ39cpXFwt6Ac8ZKD7MubqQWUBYMg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAzMDA1MiBTYWx0ZWRfX4yJtIdMAdf+o 535QlSQRD+ZZWYH1qA2wZSrVYswyTmDYhsQnajeO6721jsNSvz5QO7TfKk3EtSBVbsTsqYZg8HB lOs/5GdGmBdUYgGKFHL65RKi8ggvswZwg1t+mpfAhgL5cGVTDPL4dYB8PiK//tclJydY0FqyC1v ysI+S70CQJ9wMrgzQWdTLCI/fagiLp+nuGj8giLgwvmnTZuMkn8AOrrjjzXC3FGiVkNPuJc1fez ymgzg2nKC0TL97Dnt5zV+pS5UgaTFoxRkwl8tpCWnMUVzvkfCL88/4SHGqgbpV8UCvZ6jBrfrjn S8/WyRFYvd7ZMOiLwkv3YyG4Aj4N++WXShsiTajKvyDRH/nQshdOT1BeCmZjaxZOwhdveda0hLr CHkCnV9HaFumHVGjqVu11UghZuBD/S97cSONlpdHoxdqazc3cjvP9cGsT9jdt0PMWj+RcsvR6Wn DHvuii2YPK4FIu6EvEA== X-Proofpoint-ORIG-GUID: K2gRX-WFqfYum8EvwOvm5JgG2TwMJlwE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-03_03,2026-12-02_07,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 priorityscore=1501 spamscore=0 impostorscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612030052 On Fri, Nov 27, 2026 at 02:36:02PM +0000, sashiko-bot@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 1 potential > issue to consider: > - [Medium] KVM: arm64: piecemeal sys_regs.c sharing and mixed PAuth/SVE > changes > -- > > commit 674857ecf2e2398c1a40ecd629858a2ef61bc1be > Author: Steffen Eiden > > KVM: arm64: Share system register code with s390 > > This commit wraps selected system register helpers, pointer authentication > checks, and SVE register definitions in ARM64_S390_COMMON guards so they > can be compiled into the s390 KVM implementation for arm64 guests. > ... > > [Severity: Medium] > As reported by Marc Zyngier on v2 [1], why does this patch slice > arch/arm64/kvm/sys_regs.c into nine scattered ARM64_S390_COMMON blocks > instead of sharing the file and sys_reg_descs as a whole through state > access indirection? > Sharing the table is not possible at this point in time. s390 does not have all the required infrastructure available. But we will be able to share this in the future. > Leaving sys_reg_descs, kvm_reset_sys_regs(), kvm_handle_sys_reg(), > arm64_check_features(), and finalize_sys_regs() outside the shared sections > causes commit "KVM: s390: arm64: Implement arm system register managing > infrastructure" to duplicate the architectural system register table and > core handling logic in arch/s390/kvm/arm64/sys_regs.c. > Some of this core handling logic needs to refer to s390 logic or we do not have the proper infrastructure in place. > In addition, bundling kvm_has_full_ptr_auth() in arch/arm64/kvm/arm.c and > SVE helpers in arch/arm64/kvm/guest.c into this commit mixes unrelated > pointer authentication and SVE changes (including moving ARM64_S390_COMMON > markers added earlier in commit "KVM: arm64: Share arm64 code with s390") > with system register sharing. This would add more sharing commit churn than required. > > [1] https://lore.kernel.org/r/87o6ehmkzz.wl-maz@kernel.org > > -- > Sashiko AI review · https://sashiko.dev/#/patchset/20261127-sysreg-v4-0-a6318d18aab5@linux.ibm.com?part=10