From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Joey Gouly <joey.gouly@arm.com>, kvm@vger.kernel.org
Cc: alexandru.elisei@arm.com, andrew.jones@linux.dev,
kvmarm@lists.linux.dev, Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>
Subject: Re: [kvm-unit-tests PATCH v2 2/9] arm64: efi: initialise SCTLR_ELx fully
Date: Fri, 6 Jun 2025 11:17:22 +0100 [thread overview]
Message-ID: <4fb8327f-a3e7-4127-9fa7-754c4e6cbdcc@arm.com> (raw)
In-Reply-To: <20250529135557.2439500-3-joey.gouly@arm.com>
On 29/05/2025 14:55, Joey Gouly wrote:
> Don't rely on the value of SCTLR_ELx when booting via EFI.
>
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> ---
> lib/arm/setup.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/arm/setup.c b/lib/arm/setup.c
> index 67b5db07..0a22dbab 100644
> --- a/lib/arm/setup.c
> +++ b/lib/arm/setup.c
> @@ -349,6 +349,11 @@ efi_status_t setup_efi(efi_bootinfo_t *efi_bootinfo)
> {
> efi_status_t status;
>
> +
> + // EFI exits boot services with SCTLR_ELx.M=1, so keep
> + // the MMU enabled.
> + write_sysreg(INIT_SCTLR_EL1_MMU_OFF | SCTLR_EL1_M, sctlr_el1);
minor nit: Given this is in a common file for arm/arm64, may be worth
adding a helper function that does this on arm64. I understand EFI
cannot enabled for arm32, still keeping this file generic would be
cleaner. e.g.,
mmu_on(); or even setup_sctlr();
Suzuki
next prev parent reply other threads:[~2025-06-06 10:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 13:55 [kvm-unit-tests PATCH v2 0/9] arm64: support EL2 Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 1/9] arm64: drop to EL1 if booted at EL2 Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 2/9] arm64: efi: initialise SCTLR_ELx fully Joey Gouly
2025-06-06 10:17 ` Suzuki K Poulose [this message]
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 3/9] arm64: efi: initialise the EL Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 4/9] arm64: timer: use hypervisor timers when at EL2 Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 5/9] arm64: micro-bench: fix timer IRQ Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 6/9] arm64: micro-bench: use smc when at EL2 Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 7/9] arm64: selftest: update test for running " Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 8/9] arm64: pmu: count EL2 cycles Joey Gouly
2025-05-29 13:55 ` [kvm-unit-tests PATCH v2 9/9] arm64: run at EL2 if supported Joey Gouly
2025-06-16 12:34 ` [kvm-unit-tests PATCH v2 0/9] arm64: support EL2 Alexandru Elisei
2025-06-17 12:49 ` Joey Gouly
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=4fb8327f-a3e7-4127-9fa7-754c4e6cbdcc@arm.com \
--to=suzuki.poulose@arm.com \
--cc=alexandru.elisei@arm.com \
--cc=andrew.jones@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).