From: Marc Zyngier <maz@kernel.org>
To: Joey Gouly <joey.gouly@arm.com>
Cc: kvm@vger.kernel.org, alexandru.elisei@arm.com,
drjones@redhat.com, kvmarm@lists.linux.dev,
Oliver Upton <oliver.upton@linux.dev>
Subject: Re: [kvm-unit-tests PATCH v1 7/7] arm64: run at EL2 if supported
Date: Thu, 20 Feb 2025 15:34:49 +0000 [thread overview]
Message-ID: <86seo8r5nq.wl-maz@kernel.org> (raw)
In-Reply-To: <20250220141354.2565567-8-joey.gouly@arm.com>
On Thu, 20 Feb 2025 14:13:54 +0000,
Joey Gouly <joey.gouly@arm.com> wrote:
>
> If VHE is supported, continue booting at EL2, otherwise continue booting at
> EL1.
>
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> ---
> arm/cstart64.S | 28 ++++++++++++++++++++++++++++
> lib/arm64/asm/sysreg.h | 5 +++++
> 2 files changed, 33 insertions(+)
>
> diff --git a/arm/cstart64.S b/arm/cstart64.S
> index 3a305ad0..2a15c03d 100644
> --- a/arm/cstart64.S
> +++ b/arm/cstart64.S
> @@ -68,6 +68,20 @@ reloc_done:
> mrs x4, CurrentEL
> cmp x4, CurrentEL_EL2
> b.ne 1f
> + /* EL2 setup */
> + mrs x4, mpidr_el1
> + msr vmpidr_el2, x4
> + mrs x4, midr_el1
> + msr vpidr_el2, x4
> + /* check VHE is supported */
> + mrs x4, ID_AA64MMFR1_EL1
> + ubfx x4, x4, ID_AA64MMFR1_EL1_VH_SHIFT, #4
> + cmp x4, #0
> + b.eq drop_to_el1
nit: you can replace these cmp/b.eq with a cbz.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2025-02-20 15:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 14:13 [kvm-unit-tests PATCH v1 0/7] arm64: support EL2 Joey Gouly
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 1/7] arm64: drop to EL1 if booted at EL2 Joey Gouly
2025-02-20 15:23 ` Marc Zyngier
2025-02-27 16:53 ` Alexandru Elisei
2025-03-04 17:02 ` Joey Gouly
2025-03-06 15:52 ` Alexandru Elisei
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 2/7] arm64: timer: use hypervisor timers when " Joey Gouly
2025-02-27 16:55 ` Alexandru Elisei
2025-03-04 17:05 ` Joey Gouly
2025-03-06 15:52 ` Alexandru Elisei
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 3/7] arm64: micro-bench: fix timer IRQ Joey Gouly
2025-02-27 16:58 ` Alexandru Elisei
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 4/7] arm64: micro-bench: use smc when at EL2 Joey Gouly
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 5/7] arm64: selftest: update test for running " Joey Gouly
2025-02-27 16:58 ` Alexandru Elisei
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 6/7] arm64: pmu: count EL2 cycles Joey Gouly
2025-02-27 17:01 ` Alexandru Elisei
2025-03-04 16:56 ` Joey Gouly
2025-03-06 15:58 ` Alexandru Elisei
2025-02-20 14:13 ` [kvm-unit-tests PATCH v1 7/7] arm64: run at EL2 if supported Joey Gouly
2025-02-20 15:34 ` Marc Zyngier [this message]
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=86seo8r5nq.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=drjones@redhat.com \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--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