From: Miguel Luis <miguel.luis@oracle.com> To: Marc Zyngier <maz@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, Jing Zhang <jingzhangos@google.com>, Eric Auger <eric.auger@redhat.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev> Subject: Re: [PATCH v4 2/3] arm64: Add missing _EL2 encodings Date: Thu, 19 Oct 2023 13:23:09 +0000 [thread overview] Message-ID: <21F82E44-6D93-4F4C-8991-F14948673F54@oracle.com> (raw) In-Reply-To: <86jzrin8nq.wl-maz@kernel.org> Hi Marc, > On 19 Oct 2023, at 11:39, Marc Zyngier <maz@kernel.org> wrote: > > On Mon, 16 Oct 2023 12:17:41 +0100, > Miguel Luis <miguel.luis@oracle.com> wrote: >> >> Some _EL2 encodings are missing. Add them. >> >> Signed-off-by: Miguel Luis <miguel.luis@oracle.com> >> --- >> 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. > Thank you for clarifying. Those definitions were needed for the refinement on patch 3 which clearly didn’t considered that statement beforehand. Yet, should we keep them here so they could be used? Thank you Miguel > M. > > -- > Without deviation from the norm, progress is not possible.
WARNING: multiple messages have this Message-ID (diff)
From: Miguel Luis <miguel.luis@oracle.com> To: Marc Zyngier <maz@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Zenghui Yu <yuzenghui@huawei.com>, Jing Zhang <jingzhangos@google.com>, Eric Auger <eric.auger@redhat.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "kvmarm@lists.linux.dev" <kvmarm@lists.linux.dev> Subject: Re: [PATCH v4 2/3] arm64: Add missing _EL2 encodings Date: Thu, 19 Oct 2023 13:23:09 +0000 [thread overview] Message-ID: <21F82E44-6D93-4F4C-8991-F14948673F54@oracle.com> (raw) In-Reply-To: <86jzrin8nq.wl-maz@kernel.org> Hi Marc, > On 19 Oct 2023, at 11:39, Marc Zyngier <maz@kernel.org> wrote: > > On Mon, 16 Oct 2023 12:17:41 +0100, > Miguel Luis <miguel.luis@oracle.com> wrote: >> >> Some _EL2 encodings are missing. Add them. >> >> Signed-off-by: Miguel Luis <miguel.luis@oracle.com> >> --- >> 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. > Thank you for clarifying. Those definitions were needed for the refinement on patch 3 which clearly didn’t considered that statement beforehand. Yet, should we keep them here so they could be used? Thank you Miguel > 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
next prev parent reply other threads:[~2023-10-19 13:24 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-16 11:17 [PATCH v4 0/3] arm64/kvm: Fine grain _EL2 system registers list that affect nested virtualization Miguel Luis 2023-10-16 11:17 ` Miguel Luis 2023-10-16 11:17 ` [PATCH v4 1/3] arm64: Add missing _EL12 encodings Miguel Luis 2023-10-16 11:17 ` Miguel Luis 2023-10-19 16:11 ` Miguel Luis 2023-10-19 16:11 ` Miguel Luis 2023-10-16 11:17 ` [PATCH v4 2/3] arm64: Add missing _EL2 encodings Miguel Luis 2023-10-16 11:17 ` Miguel Luis 2023-10-16 11:31 ` Eric Auger 2023-10-16 11:31 ` Eric Auger 2023-10-16 11:42 ` Miguel Luis 2023-10-16 11:42 ` Miguel Luis 2023-10-19 11:39 ` Marc Zyngier 2023-10-19 11:39 ` Marc Zyngier 2023-10-19 13:23 ` Miguel Luis [this message] 2023-10-19 13:23 ` Miguel Luis 2023-10-19 14:07 ` Marc Zyngier 2023-10-19 14:07 ` Marc Zyngier 2023-10-16 11:17 ` [PATCH v4 3/3] arm64/kvm: Fine grain _EL2 system registers list that affect nested virtualization Miguel Luis 2023-10-16 11:17 ` Miguel Luis 2023-10-19 12:41 ` Marc Zyngier 2023-10-19 12:41 ` Marc Zyngier 2023-10-19 14:46 ` Miguel Luis 2023-10-19 14:46 ` Miguel Luis 2023-10-19 15:38 ` Marc Zyngier 2023-10-19 15:38 ` Marc Zyngier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=21F82E44-6D93-4F4C-8991-F14948673F54@oracle.com \ --to=miguel.luis@oracle.com \ --cc=catalin.marinas@arm.com \ --cc=eric.auger@redhat.com \ --cc=james.morse@arm.com \ --cc=jingzhangos@google.com \ --cc=kvmarm@lists.linux.dev \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maz@kernel.org \ --cc=oliver.upton@linux.dev \ --cc=suzuki.poulose@arm.com \ --cc=will@kernel.org \ --cc=yuzenghui@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.