All of lore.kernel.org
 help / color / mirror / Atom feed
From: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
To: Mykola Kvach <xakep.amatop@gmail.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Mykola Kvach <Mykola_Kvach@epam.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>
Subject: Re: [PATCH v8 10/13] xen/arm: Resume memory management on Xen resume
Date: Thu, 7 May 2026 22:06:45 +0000	[thread overview]
Message-ID: <873402ub63.fsf@epam.com> (raw)
In-Reply-To: <02b55a02f329d09c9f8b15d97ca9176b3c33017a.1775125380.git.mykola_kvach@epam.com> (Mykola Kvach's message of "Thu, 2 Apr 2026 13:45:11 +0300")

Hi Mykola,

Mykola Kvach <xakep.amatop@gmail.com> writes:

> From: Mirela Simonovic <mirela.simonovic@aggios.com>
>
> The MMU must be enabled during the resume path before restoring context,
> as virtual addresses are used to access the saved context data.
>

I agree with Luca, this patch does not makes sense as is. I don't see
why it should be separated from the rest of the resume path that is
added in the next patch

> This patch adds MMU setup during resume by reusing the existing
> enable_secondary_cpu_mm function, which enables data cache and the MMU.
> Before the MMU is enabled, the content of TTBR0_EL2 is changed to point
> to init_ttbr (page tables used at runtime).
>
> Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
> Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xilinx.com>
> Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
> ---
> Changes in v7:
> - no functional changes, just moved commit
> ---
>  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)
> +        /* Initialize the UART if earlyprintk has been enabled. */
> +#ifdef CONFIG_EARLY_PRINTK
> +        bl    init_uart
> +#endif
> +        PRINT_ID("- Xen resuming -\r\n")
> +
> +        bl    check_cpu_mode
> +        bl    cpu_init
> +
> +        ldr   x0, =start
> +        adr   x20, start             /* x20 := paddr (start) */
> +        sub   x20, x20, x0           /* x20 := phys-offset */
> +        ldr   lr, =mmu_resumed
> +        b     enable_secondary_cpu_mm
> +
> +mmu_resumed:
> +        b .
> +END(hyp_resume)
> +
> +#endif /* CONFIG_SYSTEM_SUSPEND */
> +
>  /*
>   * Local variables:
>   * mode: ASM

-- 
WBR, Volodymyr

  parent reply	other threads:[~2026-05-07 22:07 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02 10:45 [PATCH v8 00/13] Add initial Xen Suspend-to-RAM support on ARM64 Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 01/13] xen/arm: Add suspend and resume timer helpers Mykola Kvach
2026-04-20 15:22   ` Luca Fancellu
2026-04-02 10:45 ` [PATCH v8 02/13] xen/arm: gic-v2: Implement GIC suspend/resume functions Mykola Kvach
2026-04-21 13:24   ` Luca Fancellu
2026-05-07  7:48     ` Mykola Kvach
2026-05-08 10:56       ` Luca Fancellu
2026-05-10  6:02         ` Mykola Kvach
2026-05-11  6:40           ` Luca Fancellu
2026-05-11 20:41             ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 03/13] xen/arm: gic-v3: tolerate retained redistributor LPI state across CPU_OFF Mykola Kvach
2026-04-22 15:55   ` Luca Fancellu
2026-05-05  6:06     ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 04/13] xen/arm: gic-v3: Implement GICv3 suspend/resume functions Mykola Kvach
2026-04-23 11:28   ` Luca Fancellu
2026-05-05  7:26     ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 05/13] xen/arm: gic-v3: add ITS suspend/resume support Mykola Kvach
2026-04-24 10:53   ` Luca Fancellu
2026-05-05 10:09     ` Mykola Kvach
2026-05-08 11:30       ` Luca Fancellu
2026-05-08 22:11         ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 06/13] xen/arm: tee: keep init_tee_secondary() for hotplug and resume Mykola Kvach
2026-04-24 10:59   ` Luca Fancellu
2026-04-27  8:19   ` Bertrand Marquis
2026-05-07 22:26   ` Volodymyr Babchuk
2026-04-02 10:45 ` [PATCH v8 07/13] xen/arm: ffa: fix notification SRI across CPU hotplug/suspend Mykola Kvach
2026-04-24 12:05   ` Luca Fancellu
2026-04-27  8:20   ` Bertrand Marquis
2026-05-05 10:18     ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 08/13] iommu/ipmmu-vmsa: Implement suspend/resume callbacks Mykola Kvach
2026-04-24 13:34   ` Luca Fancellu
2026-05-05 11:45     ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 09/13] arm/smmu-v3: add suspend/resume handlers Mykola Kvach
2026-04-27 14:01   ` Luca Fancellu
2026-04-27 14:02   ` Luca Fancellu
2026-05-05 15:23     ` Mykola Kvach
2026-05-08 12:21       ` Luca Fancellu
2026-05-08 21:44         ` Mykola Kvach
2026-05-09  7:50           ` Luca Fancellu
2026-04-02 10:45 ` [PATCH v8 10/13] xen/arm: Resume memory management on Xen resume Mykola Kvach
2026-04-27 14:50   ` Luca Fancellu
2026-05-05 15:55     ` Mykola Kvach
2026-05-08 13:26       ` Luca Fancellu
2026-05-08 20:51         ` Mykola Kvach
2026-05-07 22:06   ` Volodymyr Babchuk [this message]
2026-05-08 20:59     ` Mykola Kvach
2026-05-11 16:11       ` Oleksandr Tyshchenko
2026-04-02 10:45 ` [PATCH v8 11/13] xen/arm: Save/restore context on suspend/resume Mykola Kvach
2026-04-27 15:26   ` Luca Fancellu
2026-05-07 22:17   ` Volodymyr Babchuk
2026-05-08 10:38     ` Mykola Kvach
2026-05-11 16:00   ` Oleksandr Tyshchenko
2026-05-11 18:52     ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 12/13] xen/arm: Implement PSCI SYSTEM_SUSPEND call (host interface) Mykola Kvach
2026-04-27 16:21   ` Luca Fancellu
2026-05-05 16:15     ` Mykola Kvach
2026-04-02 10:45 ` [PATCH v8 13/13] xen/arm: Add support for system suspend triggered by hardware domain Mykola Kvach
2026-04-02 11:00   ` Jan Beulich
2026-04-29  8:05   ` Luca Fancellu
2026-05-05 20:34     ` Mykola Kvach
2026-05-07 22:25       ` Volodymyr Babchuk
2026-05-08  8:37         ` Mykola Kvach
2026-05-08 14:30       ` Luca Fancellu
2026-05-08 20:49         ` Mykola Kvach
2026-04-16 12:51 ` PING: Re: [PATCH v8 00/13] Add initial Xen Suspend-to-RAM support on ARM64 Mykola Kvach
2026-04-16 12:52 ` Mykola Kvach

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=873402ub63.fsf@epam.com \
    --to=volodymyr_babchuk@epam.com \
    --cc=Mykola_Kvach@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=xakep.amatop@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.