From: Marc Zyngier Date: Wed, 8 Apr 2026 11:23:24 +0000 (+0100) Subject: Merge branch kvm-arm64/pkvm-psci into kvmarm-master/next X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=b693940e81318d5cf4432afc97be5e22e541e2fd;p=thirdparty%2Flinux.git Merge branch kvm-arm64/pkvm-psci into kvmarm-master/next * kvm-arm64/pkvm-psci: : . : Cleanup of the pKVM PSCI relay CPU entry code, making it slightly : easier to follow, should someone have to wade into these waters : ever again. : . KVM: arm64: Remove extra ISBs when using msr_hcr_el2 KVM: arm64: pkvm: Use direct function pointers for cpu_{on,resume} KVM: arm64: pkvm: Turn __kvm_hyp_init_cpu into an inner label KVM: arm64: pkvm: Simplify BTI handling on CPU boot KVM: arm64: pkvm: Move error handling to the end of kvm_hyp_cpu_entry Signed-off-by: Marc Zyngier --- b693940e81318d5cf4432afc97be5e22e541e2fd diff --cc arch/arm64/kvm/hyp/nvhe/psci-relay.c index ab4c7bddb1636,5aeb5b453a59e..e20db999e3288 --- a/arch/arm64/kvm/hyp/nvhe/psci-relay.c +++ b/arch/arm64/kvm/hyp/nvhe/psci-relay.c @@@ -201,24 -200,12 +201,14 @@@ static int psci_system_suspend(u64 func __hyp_pa(init_params), 0); } - asmlinkage void __noreturn __kvm_host_psci_cpu_entry(bool is_cpu_on) + static void __noreturn __kvm_host_psci_cpu_entry(unsigned long pc, unsigned long r0) { - struct psci_boot_args *boot_args; - struct kvm_cpu_context *host_ctxt; + struct kvm_cpu_context *host_ctxt = host_data_ptr(host_ctxt); - host_ctxt = host_data_ptr(host_ctxt); + trace_hyp_enter(host_ctxt, HYP_REASON_PSCI); + - if (is_cpu_on) - boot_args = this_cpu_ptr(&cpu_on_args); - else - boot_args = this_cpu_ptr(&suspend_args); - - cpu_reg(host_ctxt, 0) = boot_args->r0; - write_sysreg_el2(boot_args->pc, SYS_ELR); - - if (is_cpu_on) - release_boot_args(boot_args); + cpu_reg(host_ctxt, 0) = r0; + write_sysreg_el2(pc, SYS_ELR); write_sysreg_el1(INIT_SCTLR_EL1_MMU_OFF, SYS_SCTLR); write_sysreg(INIT_PSTATE_EL1, SPSR_EL2);