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 4B837CDB465 for ; Thu, 19 Oct 2023 11:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m3BUhwMqA7czzOlGnLDsvSBG0EUN3m6McsFBk+6z7LE=; b=iAaGW4cVJJ3Lko x3xqwMmSNJ7DcJMGOqO6xgOva3S9tIJhr8xmVzcugsdmsy/uYnZo8Z9h6IOCJ4YqKyXiiSbJ0OG63 ZfjFss+6dTyPQJWdhXcAP2D6RaLwQlrILE4L2wG5Rn4/qmKoD49ciwlikRyJWDXjF4kNrBXRHW0CQ Em1YKYC4QUlrYbptnmFtH3NhOWzhSRbvUvFMFeMDVDQbC2A65RYZmDr7lEAUpM46jb7qG9AFUqLHQ nLDisbTevVEUlkicGfpwoQZuI4ETKWArCdR2gA6+GLiBkDeNQkDjBSNlhXCjIFIskkjx6gomwmU9A 1dnh4osJsE4ZZAGots/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtRNA-00HBkb-2e; Thu, 19 Oct 2023 11:39:28 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtRN7-00HBjG-2Q for linux-arm-kernel@lists.infradead.org; Thu, 19 Oct 2023 11:39:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 352B260DD6; Thu, 19 Oct 2023 11:39:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF650C433C7; Thu, 19 Oct 2023 11:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697715564; bh=6+e6tFBhwXttTI2OnODBoBY84he1JXmNi2O8ceFHcY0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cGUkEUnkDwmjLpWSwji7kRrKtBa9/hEFyX1iZYjdhNx6Mv3SyPW5vmc99ct4ClHXl Fuba2gKB5+qguHr7lh0RI7x1+WZKB6Gf1TCkOMWn94Ifjs9d/uylja4ccrJXyF6gTY qCu5pS1LTACCS+mGdaj+KnJ54lqmY2kXfQj6oRwdyIoLcTAEeev2K8xqr5KYNEk80W ZuFHhJuIrIbYJ1Tcf1lNkwpHxjiM2gzJq7oZlQgn9HTu7eTICP5wr8uC6ZYgp8HlQX Mqg9fOlC/GP0m3p9WGXQuDk8x+lt/NPEY4GttIrCGOPYHXeYjC3biUr7tcPjWOMEVx pe/fWT2I/Ex7Q== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1qtRN4-005jF6-61; Thu, 19 Oct 2023 12:39:22 +0100 Date: Thu, 19 Oct 2023 12:39:21 +0100 Message-ID: <86jzrin8nq.wl-maz@kernel.org> From: Marc Zyngier To: Miguel Luis Cc: Catalin Marinas , Will Deacon , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Jing Zhang , Eric Auger , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v4 2/3] arm64: Add missing _EL2 encodings In-Reply-To: <20231016111743.30331-3-miguel.luis@oracle.com> References: <20231016111743.30331-1-miguel.luis@oracle.com> <20231016111743.30331-3-miguel.luis@oracle.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/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: miguel.luis@oracle.com, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, jingzhangos@google.com, eric.auger@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev 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-20231019_043925_873767_83E0BB99 X-CRM114-Status: GOOD ( 15.90 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 16 Oct 2023 12:17:41 +0100, Miguel Luis wrote: > > Some _EL2 encodings are missing. Add them. > > Signed-off-by: Miguel Luis > --- > arch/arm64/include/asm/sysreg.h | 39 +++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index ba5db50effec..8653fb67a339 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h [...] > +#define SYS_SDER32_EL2 sys_reg(3, 4, 1, 3, 1) [...] > +#define SYS_VSTTBR_EL2 sys_reg(3, 4, 2, 6, 0) > +#define SYS_VSTCR_EL2 sys_reg(3, 4, 2, 6, 2) [...] > +#define SYS_CNTHVS_TVAL_EL2 sys_reg(3, 4, 14, 4, 0) > +#define SYS_CNTHVS_CTL_EL2 sys_reg(3, 4, 14, 4, 1) > +#define SYS_CNTHVS_CVAL_EL2 sys_reg(3, 4, 14, 4, 2) > +#define SYS_CNTHPS_TVAL_EL2 sys_reg(3, 4, 14, 5, 0) > +#define SYS_CNTHPS_CTL_EL2 sys_reg(3, 4, 14, 5, 1) > +#define SYS_CNTHPS_CVAL_EL2 sys_reg(3, 4, 14, 5, 2) While the secure definitions seem correct, what is the rationale behind their presence here? They cannot be trapped from non-secure, and the pseudocode is pretty explicit: if !IsCurrentSecurityState(SS_Secure) then UNDEFINED; Given that, they cannot be trapped, handled or accessed from a KVM guest, as Linux on arm64 *always* runs non-secure. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel