Re: [PATCH v2 6/6] KVM: arm64: initialise SCTLR2_EL1 at __kvm_host_psci_cpu_entry()
From: Yeoreum Yun
Date: Tue Aug 12 2025 - 06:30:14 EST
Hi Marc,
[...]
> > > > @@ -219,6 +220,8 @@ asmlinkage void __noreturn __kvm_host_psci_cpu_entry(bool is_cpu_on)
> > > > release_boot_args(boot_args);
> > > >
> > > > write_sysreg_el1(INIT_SCTLR_EL1_MMU_OFF, SYS_SCTLR);
> > > > + if (alternative_has_cap_unlikely(ARM64_HAS_SCTLR2))
> > > > + write_sysreg_el1(INIT_SCTLR2_EL1, SYS_SCTLR2);
> > > > write_sysreg(INIT_PSTATE_EL1, SPSR_EL2);
> > > >
> > > > __host_enter(host_ctxt);
> > >
> > > This needs to be folded into patch #1.
> > >
> > > Otherwise, there is a window of patches where the kernel will not
> > > survive CPU hotplug when booted in protected mode.
> >
> > Do you mean fold this patch into patch #2 where initialise
> > SCTLR2_ELx?
>
> Yes, sorry, I got it mixed with HCRX_EL2. Patch #2 is where it should
> land indeed.
>
> M.
Thanks for confirmation :D.
I'll fold it into patch #2 in next series.
--
Sincerely,
Yeoreum Yun