From: Marc Zyngier <maz@kernel.org>
To: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Oliver Upton <oupton@kernel.org>,
Zenghui Yu <yuzenghui@huawei.com>, Fuad Tabba <tabba@google.com>,
Will Deacon <will@kernel.org>,
Mostafa Saleh <smostafa@google.com>,
Quentin Perret <qperret@google.com>
Subject: [PATCH 3/5] KVM: arm64: pkvm: Turn __kvm_hyp_init_cpu into an inner label
Date: Sat, 21 Mar 2026 21:24:17 +0000 [thread overview]
Message-ID: <20260321212419.2803972-4-maz@kernel.org> (raw)
In-Reply-To: <20260321212419.2803972-1-maz@kernel.org>
__kvm_hyp_init_cpu really is an internal label for kvm_hyp_cpu_entry
and kvm_hyp_cpu_resume.
Make it clear that this is what it is, and drop a pointless branch
in kvm_hyp_cpu_resume.
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/kvm/hyp/nvhe/hyp-init.S | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
index 55e0dce65dc56..2e80fcbff2dff 100644
--- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S
+++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
@@ -175,7 +175,6 @@ SYM_CODE_END(___kvm_hyp_init)
SYM_CODE_START(kvm_hyp_cpu_entry)
mov x1, #1 // is_cpu_on = true
b __kvm_hyp_init_cpu
-SYM_CODE_END(kvm_hyp_cpu_entry)
/*
* PSCI CPU_SUSPEND / SYSTEM_SUSPEND entry point
@@ -184,17 +183,8 @@ SYM_CODE_END(kvm_hyp_cpu_entry)
*/
SYM_CODE_START(kvm_hyp_cpu_resume)
mov x1, #0 // is_cpu_on = false
- b __kvm_hyp_init_cpu
-SYM_CODE_END(kvm_hyp_cpu_resume)
-/*
- * Common code for CPU entry points. Initializes EL2 state and
- * installs the hypervisor before handing over to a C handler.
- *
- * x0: struct kvm_nvhe_init_params PA
- * x1: bool is_cpu_on
- */
-SYM_CODE_START_LOCAL(__kvm_hyp_init_cpu)
+SYM_INNER_LABEL(__kvm_hyp_init_cpu, SYM_L_LOCAL)
mov x28, x0 // Stash arguments
mov x29, x1
@@ -223,7 +213,8 @@ SYM_CODE_START_LOCAL(__kvm_hyp_init_cpu)
1: wfe
wfi
b 1b
-SYM_CODE_END(__kvm_hyp_init_cpu)
+SYM_CODE_END(kvm_hyp_cpu_resume)
+SYM_CODE_END(kvm_hyp_cpu_entry)
SYM_CODE_START(__kvm_handle_stub_hvc)
/*
--
2.47.3
next prev parent reply other threads:[~2026-03-21 21:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 21:24 [PATCH 0/5] KVM: arm64: pkvm; Rework aspects of the PSCI relay Marc Zyngier
2026-03-21 21:24 ` [PATCH 1/5] KVM: arm64: pkvm: Move error handling to the end of kvm_hyp_cpu_entry Marc Zyngier
2026-03-22 15:08 ` Fuad Tabba
2026-03-21 21:24 ` [PATCH 2/5] KVM: arm64: pkvm: Simplify BTI handling on CPU boot Marc Zyngier
2026-03-22 15:37 ` Fuad Tabba
2026-03-21 21:24 ` Marc Zyngier [this message]
2026-03-22 15:43 ` [PATCH 3/5] KVM: arm64: pkvm: Turn __kvm_hyp_init_cpu into an inner label Fuad Tabba
2026-03-21 21:24 ` [PATCH 4/5] KVM: arm64: pkvm: Use direct function pointers for cpu_{on,resume} Marc Zyngier
2026-03-22 15:49 ` Fuad Tabba
2026-03-23 8:43 ` Marc Zyngier
2026-03-21 21:24 ` [PATCH 5/5] KVM: arm64: Remove extra ISBs when using msr_hcr_el2 Marc Zyngier
2026-03-22 15:55 ` Fuad Tabba
2026-03-22 15:57 ` [PATCH 0/5] KVM: arm64: pkvm; Rework aspects of the PSCI relay Fuad Tabba
2026-03-23 11:05 ` Marc Zyngier
2026-03-23 12:33 ` Mostafa Saleh
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=20260321212419.2803972-4-maz@kernel.org \
--to=maz@kernel.org \
--cc=joey.gouly@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=oupton@kernel.org \
--cc=qperret@google.com \
--cc=smostafa@google.com \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.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: link
Be 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.