|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v8 10/13] xen/arm: Resume memory management on Xen resume
On Fri, May 8, 2026 at 4:28 PM Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote: > > Hi Mykola, > > >>> xen/arch/arm/arm64/head.S | 24 ++++++++++++++++++++++++ > >>> 1 file changed, 24 insertions(+) > >>> > >>> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S > >>> index 72c7b24498..596e960152 100644 > >>> --- a/xen/arch/arm/arm64/head.S > >>> +++ b/xen/arch/arm/arm64/head.S > >>> @@ -561,6 +561,30 @@ END(efi_xen_start) > >>> > >>> #endif /* CONFIG_ARM_EFI */ > >>> > >>> +#ifdef CONFIG_SYSTEM_SUSPEND > >>> + > >>> +FUNC(hyp_resume) > >> > >> I think we should mask all exceptions here: > >> msr DAIFSet, 0xf > >> > >> until we resume correctly the status (VBAR_EL2, etc). > > > > This was discussed in an earlier version: > > > > https://patchew.org/Xen/cover.1741164138.git.xakep.amatop@xxxxxxxxx/2ef15cb605f987eb087c5496d123c47c01cc0ae7.1741164138.git.xakep.amatop@xxxxxxxxx/#CAGeoDV97no7mXSKd7auFu5E85wSXAHKWvqGW2=-VEAbkrTyU8Q@xxxxxxxxxxxxxx > > > > For SYSTEM_SUSPEND, PSCI ties the call semantics to CPU_SUSPEND. In > > particular, section 5.20.2 says that the caller must observe all the rules > > described for CPU_SUSPEND, and section 6.4 explicitly says that the initial > > state rules also apply to SYSTEM_SUSPEND. > > > > For the return Exception level on AArch64, section 6.4.3.3 requires > > SPSR_ELx.{D,A,I,F} to be set to {1, 1, 1, 1}. Therefore Xen expects to enter > > this resume path with DAIF already masked by PSCI-compliant firmware. > > > > I agree this assumption is not obvious from the code, so I will add a > > comment > > at the resume entry point to document that this path relies on the PSCI > > initial > > core configuration requirements. > > Yes please, something along the line of > > /* > * PSCI SYSTEM_SUSPEND follows CPU_SUSPEND initial-state rules. > * On AArch64, firmware must return with SPSR_ELx.DAIF set, so > * PSTATE.DAIF is already masked on entry here. > */ Ack. Best regards, Mykola > > Cheers, > Luca >
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |