From nobody Tue Feb 10 08:48:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1765478788; cv=none; d=zohomail.com; s=zohoarc; b=FNu3p1BaE/rhnmZYyyjK8/GUj/ds4vFub1kW6L/yiXkZtVIqDGTBa6ZsJicSpnkPv7VX46pK+dUcfuA8zACyYbraYnQs1aWmQTZDr6acnTQKZXhAvskCMkskgqqrP/WU/Zmqely1Y3zTBeOUlHgguyULjq7eF+QoJX8TFwgdHJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765478788; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Wn2YE/N1073l2aBvkRQ/5nSVLZsSRqqVHeilL+wTO7s=; b=elzFrfWTH1UFYpPkc9q761/QQZ2wyGsYFMQqljnhxb5ChEHj+f806Vii92ApOwEIXLIP/jbHbG26z0APwkHLH/lTUwbE2a6RlR0N0tr++wylMW1H5dA+ndQtb63eANoBewSUuPZBjZWZTxbyn1KJyB8C5KZj9+Pm6EE9PMuERns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1765478788398982.8976535837189; Thu, 11 Dec 2025 10:46:28 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1184555.1507037 (Exim 4.92) (envelope-from ) id 1vTlft-0005In-OC; Thu, 11 Dec 2025 18:46:01 +0000 Received: by outflank-mailman (output) from mailman id 1184555.1507037; Thu, 11 Dec 2025 18:46:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vTlft-0005GH-Ey; Thu, 11 Dec 2025 18:46:01 +0000 Received: by outflank-mailman (input) for mailman id 1184555; Thu, 11 Dec 2025 18:45:59 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vTlfr-0003I8-Of for xen-devel@lists.xenproject.org; Thu, 11 Dec 2025 18:45:59 +0000 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [2a00:1450:4864:20::52b]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a24f9c8a-d6c1-11f0-b15b-2bf370ae4941; Thu, 11 Dec 2025 19:45:59 +0100 (CET) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-640c6577120so745990a12.1 for ; Thu, 11 Dec 2025 10:45:59 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-4.as6723.net. [185.5.253.4]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa5d0b0dsm345870466b.67.2025.12.11.10.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 10:45:57 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a24f9c8a-d6c1-11f0-b15b-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765478758; x=1766083558; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Wn2YE/N1073l2aBvkRQ/5nSVLZsSRqqVHeilL+wTO7s=; b=U2K1rrkP8HrRAsKbYGydTyb4MHfxJJMX2vqC62fUA0rEjBSDoPe3hP/Lw2ysqUn+Pb vlP/MgWQTsYAivoBfIP+3Ly25bW4QKD0aCoA1hkzFcoWLBcDkFZUaPRrk6Ufajo04is8 C2N0MyubzOkCVMIaTe1d/PDGIRm9CGJOu6/vlRRGKRIoJeBwZkh3sz6hLc4q89q825SO h3IOjKDisWq/jutw+glsa8IZ14MB89eEsHOWdeh+BY1K4EKMUP5he1NgUCe0VcCQ80fk apgqG7RtiMb4b8wtKMp8R9SjiG8oHr6lA3dC5LmhPi7xbuHRugRbWdJ17E9BMc5F9nLe RggQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765478758; x=1766083558; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Wn2YE/N1073l2aBvkRQ/5nSVLZsSRqqVHeilL+wTO7s=; b=UxIW7P/YKIBLnJhn8cSehbj0mdQPpNy3B0O87EDoLMq5ngMYFloL65ZHcefuDP+Nri VFOBAqpjj6IdREzODk8FA4gxG9yVRlmbttv2AZB1ToH47tU97Z2cpiCBcokUP7q+jEWG qgm4oBAczrweZ0W7KkSOX2XJmXcZvcIeOaVcsw9QMDWJOAm6PYS3yDWkSYINsSYZuV2G dseqCcHbzwI8Bm64TuOxp1VHmm84j172X9CT+2KwWXSy8ZO2r8wJCuuyBttEmTNZVUfa OTeVo/Z6kwgpdHsUbvn9MnDdSj4clA+gi2+RMH3a61D8zIPauSlt4dZmf6z4gJUIw81x Juvw== X-Gm-Message-State: AOJu0YxJ/86zoUuTO2PEe7N5iI8tqDwFSfJAuOrOJCsZjDuWZXK3GUVc yYFMIsCo4SW9k8HsG75E4nHZrMG6G7ANv9/ahRtS23fAjSXmSFPh4DymvQoS5BW0 X-Gm-Gg: AY/fxX5n77E9gqy2P20dmhlv55tB6jVKiOW3Qd6ewAkanOvgTy8frZbRaozvctTySaq zNHsEviaQyUvhngx+WhmGKm0ZZAVmjl40xyikW0KQsnOCMvxDSzwH+xploUKo8YgeyUgKKLwvxV R+Din+y/82CVd/75h50eYSjOP3dW8Hp3S3dN6jk1POO8DkjC7+QxCAOcAm+x9yUdLXskYu+952M 9TwFlkgWIAkniooDbM1sUxKiQwHYfLQNzBGGPjmhFKEGReU7WUJCn7XWTKcPl9KtIIHCJjXf/He JTTYjPpvTpPGR2wV8brVRC6SMS4+ZbhjOYIK7oVvlref0b+guzIdEx5GaGNpFIMiCCjZnDLkKnR GM2svAZNONoEi80W8f7kycSO2uG2cDqfinKxprSgu1AhlL+Y5+8+dufx7ggr/JryoL+Pjvx2WrQ obrZjFQWQ+pyeJK9nY5DoGCEFnp4iXynvoXSC6zJ1l X-Google-Smtp-Source: AGHT+IG/6t+gwx01s3fl4EBu4KpU0cbUis+6SFVAgfqdG0pLbcu3Q3IeGyxpzSPn7jghoibq6b4loQ== X-Received: by 2002:a17:907:7f04:b0:b7a:2ba7:18be with SMTP id a640c23a62f3a-b7ce84cc764mr748318866b.62.1765478758172; Thu, 11 Dec 2025 10:45:58 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Mykola Kvach , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Saeed Nowshadi , Mykyta Poturai Subject: [PATCH v7 09/12] xen/arm: Resume memory management on Xen resume Date: Thu, 11 Dec 2025 20:43:33 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1765478788580158500 Content-Type: text/plain; charset="utf-8" From: Mirela Simonovic The MMU must be enabled during the resume path before restoring context, as virtual addresses are used to access the saved context data. 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 Signed-off-by: Saeed Nowshadi Signed-off-by: Mykyta Poturai Signed-off-by: Mykola Kvach --- 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) =20 #endif /* CONFIG_ARM_EFI */ =20 +#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, =3Dstart + adr x20, start /* x20 :=3D paddr (start) */ + sub x20, x20, x0 /* x20 :=3D phys-offset */ + ldr lr, =3Dmmu_resumed + b enable_secondary_cpu_mm + +mmu_resumed: + b . +END(hyp_resume) + +#endif /* CONFIG_SYSTEM_SUSPEND */ + /* * Local variables: * mode: ASM --=20 2.43.0