From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B8EEC3DA64 for ; Wed, 31 Jul 2024 20:12:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iqleLji7/oFtV6jDvxUuBDg7ClF0BQgM9Sf66uZJK8Y=; b=DyXmdsFssmJKkusQ6c4pVFiKBJ GoYsNKJr/Z1fNt673nEYK1qWTwxUiBR3PXjv8oPVV+XXa+HAja0QRJZDpHjY2csy9GRycKy7j91dV QsK9R2oA+oP9JbibBRnr4wq+ew9MBW5q/anDsTVQOF1nUZnmZTAhfgbAcpwB2KYPP1yCvmwwt45Ju jjelSeaaNgU1wGA5BbqJ+1BvZ7Cup1ega8bWSbL4kJhZ0Na8oh9n4vvIvTWomY+pSO/XVYKzUQDRJ 22EbzYJ2zp1zO3XMEFi3PWNDb7QrJa3uJ36fVS6s0STuzs6ImhrYCYAiO3DvxMYKfJBXHLQJge/4m f6QyWVoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZFgY-00000002PRj-0D6l; Wed, 31 Jul 2024 20:12:34 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZFg5-00000002PMJ-2R2J for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 20:12:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id CB080CE17D2; Wed, 31 Jul 2024 20:12:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F8D7C116B1; Wed, 31 Jul 2024 20:12:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722456723; bh=5IeJZWRy61r1+KpM9Ds67BGzx8a4wfH6JVyA+DyWDoE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Vt+QSq4bzdxKdy9JENfaxNjJv5lZI3/6Le8VIwsPYAyrt3KBvl1diWGcJIVHXTMSB l4oYCqDH4hCzUoeZMC3s9qTZAk+Zkc6s9ZCnVQwIKM2bc4DxG7AobXMhqQMNPp7KsR af0/ngdvsXtRSBfmRMHPhDEeeotphdHJpgZg4bH/r/lPbahyKvVXeaGOgOTqsM2iA7 9kFOli1C24jMkQnN2MIW+I4dfS0qzbXwAR05RXLASkMSEWLdghQftDq18pj686sItO zpaut9sGNWH0WOkYsr1G4hBgQeIvV5DscPwIuiLmfbjldaaEman2NwxQqahtigB6Q7 DGURJmCFVrU8A== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sZFg1-00H70p-4D; Wed, 31 Jul 2024 21:12:01 +0100 Date: Wed, 31 Jul 2024 21:12:00 +0100 Message-ID: <87v80l48z3.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Fuad Tabba , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] KVM: arm64: Clarify meaning of _MASK and _nMASK for FGT registers In-Reply-To: <20240731-kvm-arm64-fgt-doc-v1-2-abb364f8fe57@kernel.org> References: <20240731-kvm-arm64-fgt-doc-v1-0-abb364f8fe57@kernel.org> <20240731-kvm-arm64-fgt-doc-v1-2-abb364f8fe57@kernel.org> 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/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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: broonie@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, tabba@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240731_131205_816138_DC3B4878 X-CRM114-Status: GOOD ( 20.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 31 Jul 2024 19:58:38 +0100, Mark Brown wrote: > > Since the use of _MASK to mean bits where setting the bit causes traps to > be generated is a little unusual add a clarifying comment. > > Signed-off-by: Mark Brown > --- > arch/arm64/include/asm/kvm_arm.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h > index d347483395b4..1d8745740fb1 100644 > --- a/arch/arm64/include/asm/kvm_arm.h > +++ b/arch/arm64/include/asm/kvm_arm.h > @@ -343,6 +343,10 @@ > * FGT register definitions > * > * RES0 and polarity masks for the FGT registers. > + * > + * _RES0: Bits which are RES0 > + * _MASK: Bits which enable traps when set > + * _nMASK: Bits which disable traps when set The rest of the code call this "negative polarity". Also, in some cases (such as with HCRX_EL2), such bits are *enable* bits. So you probably want to capture this as well. M. -- Without deviation from the norm, progress is not possible.