From: Mykola Kvach <xakep.amatop@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: "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>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Jan Beulich" <jbeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Jens Wiklander" <jens.wiklander@linaro.org>,
"Rahul Singh" <rahul.singh@arm.com>
Subject: [PATCH v9 00/13] Add initial Xen Suspend-to-RAM support on ARM64
Date: Tue, 12 May 2026 20:07:07 +0300 [thread overview]
Message-ID: <cover.1778605274.git.mykola_kvach@epam.com> (raw)
From: Mykola Kvach <mykola_kvach@epam.com>
This is part 2 of the ARM Xen system suspend/resume patch series, based
on earlier work by Mirela Simonovic and Mykyta Poturai.
Part 1, covering guest suspend functionality, is already in mainline.
NOTE: Host-wide suspend/resume support is guarded by CONFIG_SYSTEM_SUSPEND,
which can currently only be selected when UNSUPPORTED is set, and thus the
host suspend backend is neither enabled by default nor built in supported
configurations. The separate HAS_HWDOM_SYSTEM_SUSPEND policy bit only changes
how ARM treats SHUTDOWN_suspend from the hardware domain; it does not enable
the host-wide suspend backend by itself.
This version is ported to Xen master and includes extensive improvements
based on reviewer feedback. The patch series restructures code to improve
robustness, maintainability, and implements system Suspend-to-RAM support
on ARM64 hardware/control domains.
Key updates in this series:
- Introduced architecture-specific suspend/resume infrastructure
- Integrated GICv2/GICv3 suspend and resume, including memory-backed context
save/restore with error handling
- Added time and IRQ suspend/resume hooks, ensuring correct timer/interrupt
state across suspend cycles
- Implemented proper PSCI SYSTEM_SUSPEND invocation and version checks
- Improved state management and recovery in error cases during suspend/resume
- Added support for IPMMU-VMSA/SMMUv3 context save/restore
- Added support for GICv3 eSPI registers context save/restore
- Added support for ITS registers context save/restore
---
TODOs:
- Enable "xl suspend" support on ARM
- Add suspend/resume CI test for ARM (QEMU if feasible)
- PCI suspend ?
---
Detailed changelogs can be found in each patch.
Changes in v9:
- Split the control-domain SYSTEM_SUSPEND flow so host availability,
runtime blockers and domain-readiness checks are handled separately from
the host suspend backend.
- Gate vPSCI SYSTEM_SUSPEND on cached host PSCI support and Xen runtime
suspend blockers, and log firmware support during initialization.
- Fold the arm64 resume trampoline into the CPU context save/restore patch
and use asm-offsets-generated RESUME_CTX_* definitions for the assembly
save/restore path.
- Tighten the GICv2/GICv3/ITS/IPMMU/SMMUv3 suspend/resume paths based on
review feedback, including state-save/restore fixes and safer failure
handling.
- Reorder the host suspend/resume phases so timer and GIC state are
handled with local IRQs disabled and restored before console/IOMMU
resume.
Changes in v8:
- Rebased to latest master and refreshed the series accordingly.
- Added a new GICv3 patch to tolerate retained redistributor LPI state
across CPU_OFF/CPU_ON.
- GICv2 suspend now disables the CPU interface and distributor before
saving state.
- GICv3 suspend/resume fixes the redistributor base used for LPI state.
- ITS and SMMUv3 suspend/resume paths were tightened, with safer
restore/rollback handling and stricter fatal-error handling.
- System suspend now checks that all domains are already in
SHUTDOWN_suspend before proceeding, and renames the hardware-domain
suspend capability/helper for clearer semantics.
- Fixed alignment/cleanup issues in the low-level suspend/resume code.
Changes in v7:
- Timer helper renamed/clarified; virtual/hyper/phys handling documented.
- GICv2 uses one context block; restore saved CTLR; panic on alloc failure.
- GICv3/eSPI/ITS always suspend/resume; restore LPI/eSPI; rdist timeout.
- IPMMU suspend context allocated before PCI setup.
- System suspend: control domain drives host suspend.
- Dropped v6 IRQ descriptor restore patches; use setup_irq and re-register
local IRQs on resume instead.
For earlier changelogs, please refer to the previous cover letters.
Mirela Simonovic (5):
xen/arm: Add suspend and resume timer helpers
xen/arm: gic-v2: Implement GIC suspend/resume functions
xen/arm64: Save/restore CPU context across SYSTEM_SUSPEND
xen/arm: Implement PSCI SYSTEM_SUSPEND call (host interface)
xen/arm: Add host system suspend backend
Mykola Kvach (7):
xen/arm: gic-v3: tolerate retained redistributor LPI state across
CPU_OFF
xen/arm: gic-v3: Implement GICv3 suspend/resume functions
xen/arm: gic-v3: add ITS suspend/resume support
xen/arm: tee: keep init_tee_secondary() for hotplug and resume
xen/arm: ffa: fix notification SRI across CPU hotplug/suspend
xen/arm: smmu-v3: add suspend/resume handlers
xen/arm: Add vPSCI SYSTEM_SUSPEND policy
Oleksandr Tyshchenko (1):
iommu/ipmmu-vmsa: Implement suspend/resume callbacks
xen/arch/arm/Kconfig | 2 +
xen/arch/arm/Makefile | 1 +
xen/arch/arm/arm64/asm-offsets.c | 20 ++
xen/arch/arm/arm64/head.S | 118 +++++++
xen/arch/arm/gic-v2.c | 181 +++++++++++
xen/arch/arm/gic-v3-its.c | 133 +++++++-
xen/arch/arm/gic-v3-lpi.c | 80 ++++-
xen/arch/arm/gic-v3.c | 394 ++++++++++++++++++++++-
xen/arch/arm/gic.c | 35 ++
xen/arch/arm/include/asm/gic.h | 16 +
xen/arch/arm/include/asm/gic_v3_defs.h | 1 +
xen/arch/arm/include/asm/gic_v3_its.h | 23 ++
xen/arch/arm/include/asm/mm.h | 2 +
xen/arch/arm/include/asm/psci.h | 4 +
xen/arch/arm/include/asm/suspend.h | 36 +++
xen/arch/arm/include/asm/time.h | 5 +
xen/arch/arm/mmu/smpboot.c | 2 +-
xen/arch/arm/psci.c | 38 ++-
xen/arch/arm/suspend.c | 194 +++++++++++
xen/arch/arm/tee/ffa_notif.c | 63 +++-
xen/arch/arm/tee/tee.c | 2 +-
xen/arch/arm/time.c | 44 ++-
xen/arch/arm/vpsci.c | 120 ++++++-
xen/common/Kconfig | 3 +
xen/common/domain.c | 7 +-
xen/drivers/char/serial.c | 12 +
xen/drivers/passthrough/arm/iommu.c | 4 +
xen/drivers/passthrough/arm/ipmmu-vmsa.c | 319 +++++++++++++++++-
xen/drivers/passthrough/arm/smmu-v3.c | 182 ++++++++---
xen/include/xen/list.h | 14 +
xen/include/xen/serial.h | 1 +
xen/include/xen/suspend.h | 2 +
32 files changed, 1951 insertions(+), 107 deletions(-)
create mode 100644 xen/arch/arm/suspend.c
--
2.43.0
next reply other threads:[~2026-05-12 17:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 17:07 Mykola Kvach [this message]
2026-05-12 17:07 ` [PATCH v9 01/13] xen/arm: Add suspend and resume timer helpers Mykola Kvach
2026-05-12 17:07 ` [PATCH v9 02/13] xen/arm: gic-v2: Implement GIC suspend/resume functions Mykola Kvach
2026-05-13 14:08 ` Luca Fancellu
2026-05-15 7:59 ` Mykola Kvach
2026-05-15 9:52 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 03/13] xen/arm: gic-v3: tolerate retained redistributor LPI state across CPU_OFF Mykola Kvach
2026-05-13 14:51 ` Luca Fancellu
2026-05-14 8:41 ` Mykola Kvach
2026-05-12 17:07 ` [PATCH v9 04/13] xen/arm: gic-v3: Implement GICv3 suspend/resume functions Mykola Kvach
2026-05-13 16:11 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 05/13] xen/arm: gic-v3: add ITS suspend/resume support Mykola Kvach
2026-05-14 14:45 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 06/13] xen/arm: tee: keep init_tee_secondary() for hotplug and resume Mykola Kvach
2026-05-12 17:07 ` [PATCH v9 07/13] xen/arm: ffa: fix notification SRI across CPU hotplug/suspend Mykola Kvach
2026-05-12 17:07 ` [PATCH v9 08/13] iommu/ipmmu-vmsa: Implement suspend/resume callbacks Mykola Kvach
2026-05-14 15:57 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 09/13] xen/arm: smmu-v3: add suspend/resume handlers Mykola Kvach
2026-05-14 16:41 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 10/13] xen/arm64: Save/restore CPU context across SYSTEM_SUSPEND Mykola Kvach
2026-05-14 17:20 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 11/13] xen/arm: Implement PSCI SYSTEM_SUSPEND call (host interface) Mykola Kvach
2026-05-15 7:04 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 12/13] xen/arm: Add vPSCI SYSTEM_SUSPEND policy Mykola Kvach
2026-05-13 6:53 ` Jan Beulich
2026-05-14 14:51 ` Mykola Kvach
2026-05-15 8:17 ` Luca Fancellu
2026-05-12 17:07 ` [PATCH v9 13/13] xen/arm: Add host system suspend backend Mykola Kvach
2026-05-15 8:44 ` Luca Fancellu
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=cover.1778605274.git.mykola_kvach@epam.com \
--to=xakep.amatop@gmail.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=jbeulich@suse.com \
--cc=jens.wiklander@linaro.org \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=mykola_kvach@epam.com \
--cc=rahul.singh@arm.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--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.