From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A7172DF156; Wed, 2 Sep 2026 07:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788335227; cv=none; b=HiH2TXgnnFSQXIOxCcslVk5fsuqL+N/x0airQWxsJ03kxy2y/Y2VLFhfH1UBtO8EZKe4q5kAHzpQ1esG+P5CIqH67qhiS7KWVwIlnbw4L7umgYiDOv4QFHN0PINFrMsFRxydin7g3a0JgwCJB9mqKPyhnf8MRawEnNYdcWIwMmU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788335227; c=relaxed/simple; bh=GRZlElthwAaKzvZ/FHWHV1BMeCYeXxgkQIz3UzAzEsc=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=qGOWtjEdEkbwm6nmi9I8WDklJH8OMtFQb2n5oHrRXlH2iSxGepJVbKCaD0OqNeZS5+en1MNZ/4FdF7zmtBEjGtP11vrLZm7A6Bb1yPoCWoOAcYGmVhhUg9qiu7dRqKhUnajglEBLc0wZj1V0KhO1Nl5reHKXB4puN1M6XUxPYP8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kmWx0i1N; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kmWx0i1N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D9C31F000E9; Wed, 2 Sep 2026 07:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788335226; bh=HMrRYkbF5OZt+EYuQBRlyrF86w/zMKZa5CwvbhvSVgQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=kmWx0i1NgJvsbl7HVHwHOHUrzI7dPQ8T/ayJKlDyUU/WXndfT4LTsi34pD8oCMJwW LCeYnse+v9023DMTMpO3TYaWx2TztOJTuP1Knjb3yiuj4ZweZqdFJ3b6dvOsIed9ZL MFc2q9nn7rferIqHBLii9tMX8z0IJmfR32q1fVDwW9cGyQcY/i+iz5AFUi0oW55rAo BAcd2sMaWjXJ8IPb/iP9toIkpV2PYNDruENhzsi9SGxXH/ouzmwATwuUz77HR6r1QO EsLNO5rwzI+IL7qBCE+IpMe324knTkP44Y92J2raQrqhy9Eli2Y/SBLf+I9H2/htTp WeDczrwosL6+w== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x1fgV-00000003lmO-22FI; Wed, 02 Sep 2026 07:47:03 +0000 Date: Wed, 02 Sep 2026 08:49:36 +0100 Message-ID: <87ld9km6sv.wl-maz@kernel.org> From: Marc Zyngier To: Steffen Eiden Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Alexander Gordeev , Andreas Grapentin , Arnd Bergmann , Catalin Marinas , Christian Borntraeger , Claudio Imbrenda , David Hildenbrand , Friedrich Welter , Fuad Tabba , Gautam Gala , Hariharan Mari , Heiko Carstens , Hendrik Brueckner , Ilya Leoshkevich , Janosch Frank , Joey Gouly , Nico Boehr , Nina Schoetterl-Glausch , Oliver Upton , Paolo Bonzini , Suzuki K Poulose , Sven Schnelle , Ulrich Weigand , Vasily Gorbik , Will Deacon , Zenghui Yu Subject: Re: [PATCH v2 03/20] arm64: sysreg: Define OSLSR_EL1_OSLK_MASK In-Reply-To: <20260901092552.231001-A-seiden@linux.ibm.com> References: <20260831145536.913567-1-seiden@linux.ibm.com> <20260831145536.913567-4-seiden@linux.ibm.com> <87v78pmmtz.wl-maz@kernel.org> <20260901092552.231001-A-seiden@linux.ibm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-s390@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: seiden@linux.ibm.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, agordeev@linux.ibm.com, gra@linux.ibm.com, arnd@arndb.de, catalin.marinas@arm.com, borntraeger@linux.ibm.com, imbrenda@linux.ibm.com, david@kernel.org, fritz@linux.ibm.com, tabba@google.com, ggala@linux.ibm.com, hari55@linux.ibm.com, hca@linux.ibm.com, brueckner@linux.ibm.com, iii@linux.ibm.com, frankja@linux.ibm.com, joey.gouly@arm.com, nrb@linux.ibm.com, oss@nina.schoetterlglausch.eu, oupton@kernel.org, pbonzini@redhat.com, suzuki.poulose@arm.com, svens@linux.ibm.com, Ulrich.Weigand@de.ibm.com, gor@linux.ibm.com, will@kernel.org, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 01 Sep 2026 10:25:52 +0100, Steffen Eiden wrote: > > On Tue, Sep 01, 2026 at 08:51:04AM +0100, Marc Zyngier wrote: > > On Mon, 31 Aug 2026 15:55:18 +0100, > > Steffen Eiden wrote: > > > > > > Define the missing mask for the OLSK field of OSLSR_EL1 which is > > > required to safely write a value to that field. > > > > > > Signed-off-by: Steffen Eiden > > > --- > > > arch/arm64/include/asm/sysreg.h | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > > > index 1c5c4df260be..5a439853b721 100644 > > > --- a/arch/arm64/include/asm/sysreg.h > > > +++ b/arch/arm64/include/asm/sysreg.h > > > @@ -200,6 +200,7 @@ > > > #define OSLSR_EL1_OSLM_NI 0 > > > #define OSLSR_EL1_OSLM_IMPLEMENTED BIT(3) > > > #define OSLSR_EL1_OSLK BIT(1) > > > +#define OSLSR_EL1_OSLK_MASK BIT(1) > > > > Just move the required sysregs to the sysreg file, with the full bit > > description. This will sort this once and for all. > > You mean to the tools/syreg file to generate the descriptions? > > I wanted to do that but OSLSR has a split field (OSLM in bit 3 and 0) > which the generation tooling cannot handle. (right?) Composite fields are nothing new. We have those everywhere (page tables, for a start). > > Now that I am rethinking this: > > I could move the stuff to the tools/sysregs and in addtion define the > OSLM field here manually but this time using the generated constansts. > probably sth. like: > > #define OSLSR_EL1_OSLM_MASK (OSLSR_EL1_OSLM0_MASK | OSLSR_EL1_OSLM3_MASK) > #define OSLSR_EL1_OSLM_NI OSLSR_EL1_OSLM0_NI > #define OSLSR_EL1_OSLM_IMPLEMENTED OSLSR_EL1_OSLM3_IMPLEMENTED > > Shall I do this? Yes. Except that OSLM3 should really be OSLM1, being bit 1 of the OSLM field. And it would make a lot more sense to express NI and IMPLEMENTED in terms of the two bits, just like the JSON describes it: OSLSR_EL1 [2,0,1,1,4] MRS # Reg cond: IsFeatureImplemented(FEAT_AA64) Res0 63:4 UnsignedEnum 3 OSLM UnsignedEnum 0 OSLM 0b00 VAL_00 0b10 VAL_10 EndEnum UnsignedEnum 2 nTT EndEnum Field 1 OSLK Thanks, M. -- Jazz isn't dead. It just smells funny.