[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: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Mykola Kvach <xakep.amatop@xxxxxxxxx>
  • Date: Fri, 8 May 2026 23:59:19 +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=eAgts6Lk1e6Br8PJPCkg4d5BLgobGJO5+1d6RgjQF0s=; fh=HHRjWkdysX2ZkNpVMY4DcdwfNbPq2J2BPJfxbJK3Acs=; b=XqgQaHO6pGZd/dtA2Wf5fTKEIudXx9yhj96TGxbRbswGRqweb3oOp3OBgLb/YXFlMx r8bWHM+budCRxG788VmGxMIhd/KoB3qPXab7rHyndBzdMUOKmoeK5DQtYs2IpuMyCKY2 s4M/aC016Fd9/eL8olWVQe6k8MrF18Zq2+0lA2o3D5M+DNMm/bj77pt5ah7bNCy2B9mF tgPhG4M58KYAdS9wanb2gsbDhaoHukroBlEtWdwgr3ZAE4enR0ixKytE+AKjWSU4q2Lj sOUz4WV1b3aQCvkbeGaAs//Zgn29QEEL1bkcLE91wSgStu/X8NJz/8nfCtupttNmd3yj uMrg==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1778273971; cv=none; d=google.com; s=arc-20240605; b=RAfYPJSDNBimiDZ9GCrStWAU44bb/+P6lxyQZByV64NLdI90pa1BDrJoUp0ON1J+14 ugsKiwQYNMF2+uCYeIZW4CQPrsIh7XjIiFuMshGaRT7ZHu8uuDeUD4IGWgterIUWX8rg Hn1b5eVOojOkNOEkllg4aPfVy3MvNDdRUkqcmaBwtVGcV+ATnyYoZoOAl+ZUqaTFlaUI zizHCvbzKEf+Gj9hYnm8l5BAEU7Iq39fd8M1A0OryT+dIQGz28OuTNNzOaFuNyLYgliR Dld55XHBrUjidwYuaJ1pj1aODXmtjLgHADiAO4KpIeHZj9XNmTtGH3Dm5oi/DUjnVh45 9rJA==
  • 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>
  • Delivery-date: Fri, 08 May 2026 20:59:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Volodymyr,

Thank you for the feedback.

On Fri, May 8, 2026 at 1:06 AM Volodymyr Babchuk
<Volodymyr_Babchuk@xxxxxxxx> wrote:
>
> Hi Mykola,
>
> Mykola Kvach <xakep.amatop@xxxxxxxxx> writes:
>
> > From: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
> >
> > 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

Ack. I'll combine this with the next patch in v9.

Best regards,
Mykola

>
> > 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@xxxxxxxxxx>
> > Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>
> > Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
> > Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
> > ---
> > 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



 


Rackspace

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