[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


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Mykola Kvach <xakep.amatop@xxxxxxxxx>
  • Date: Fri, 8 May 2026 23:51:37 +0300
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aA0+nB+/Zf5LNNPDHfcvzrP2LrNRyeHJUPzaReKZ5lo=; fh=uAzoxIkY79cy0zES8IqO07ArU7DBG3jlr2bg4XRVkR0=; b=edpIJWphpJzgfz+8I2lXR+2SX6uiPicHwLC5fFBrzm1Pgou+Kai3zwd5FyHRKYrTx9 hgryCYxmoQzzZmUP9Zs8yVe/oUxtsM50xQrcoY5D4Q+QE6CWPO50UetFTEbDbPXh7BBj JWm+tnTBTc4g5O6FVIdmyQ3GmpUk2+8/S495H2JaVtmnyMK/hATRoAzS0iSSa1BoV64v fO0JQdLtJyRxZF1trba8gYDpu2aKb5t4aUNC5IYsvOZAwYJWucdy+O+HrgVcAz9XTlYe k/y2p64tcutypu8YI6bvXvZ/6jQ9eJ7uweulTtnhuni8WI8TWXBNBxcMtgsVLkyKAfRy A+Ow==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1778273509; cv=none; d=google.com; s=arc-20240605; b=OEgtxLnM91k9ykq2RKkXRBi02LKDMLzn+QhX+fbLc2x9DKPrpmKviDvbkH31vzId9n qTX+YC2d/uLJfCaGgSirRmTCpSwGvwK9UfG/o8GPSkNBfyHfVkQBn5aEGOdPe8hZsSvg 5kYl8cCSQzfahGetcTztcxUPq2r4Tz9k3bCNvWQFoHlJzbxZOH4I6ExLzcAdTx1qLb0F m80qtNsmBtFR3u9kIX3KjA4Lreiz+uHP7vGaBl6rFw2NbB5KKqWJpbe4avHoJtNfmC8o 1WGVN/fWwTOYw0aS6QAECZm6yIqFe/EDLzkrSplv/8xMl8pQChtxdR2eg+So1OAB6od0 DCwA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 08 May 2026 20:51:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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
>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.