Skip to content

Add CONFIG_SYSTEM_SUSPEND and SCIF UART suspend/resume handlers

Mykola Kvach xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v22 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xen: Introduce system suspend config optionxen/arch/x86/Kconfig xen/common/Kconfig+19 -01 reply
2/2xen/char: implement suspend/resume calls for SCIF driverxen/drivers/char/scif-uart.c+38 -22 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJan Beulich
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] Add CONFIG_SYSTEM_SUSPEND and SCIF UART suspend/resume handlers

From: Mykola Kvach <[email protected]>

Hi all,

This patch series introduces CONFIG_SYSTEM_SUSPEND to Xen and implements suspend/resume handlers for the SCIF UART driver. These changes address feedback and discussions on the Xen-devel mailing list:

    https://lists.xenproject.org/archives/html/xen-devel/2025-03/msg00169.html
    https://lists.xenproject.org/archives/html/xen-devel/2025-03/msg02188.html

I am marking this series as v2, as it is a logical continuation of the discussion linked above regarding the SCIF driver changes.

Patch 1:
Introduces the CONFIG_SYSTEM_SUSPEND infrastructure, which enables Xen to
support suspend-to-RAM functionality. It adds three new Kconfig options:
- HAS_SYSTEM_SUSPEND: Indicates whether the architecture supports suspend.
- SYSTEM_SUSPEND_ALWAYS_ON: Forces suspend support on platforms that require it (e.g., x86).
- SYSTEM_SUSPEND: The user-facing option to enable suspend support, enabled by default when SYSTEM_SUSPEND_ALWAYS_ON is set.

This approach is intended to be easily extendable to other architectures in
the future.

Patch 2:
Implements suspend/resume callbacks for the SCIF UART driver. These functions
ensure proper shutdown and reinitialization of the UART hardware across suspend/resume cycles. Their inclusion is gated by the CONFIG_SYSTEM_SUSPEND option.
The SCIF suspend/resume functionality has been tested on the Renesas R-Car H3
Starter Kit board.

Compared to v1, the main change in this version is the addition of a
CONFIG_SYSTEM_SUSPEND check around the SCIF driver's suspend/resume logic.

Changes introduced in v3:
- select HAS_SYSTEM_SUSPEND from SYSTEM_SUSPEND_ALWAYS_ON
- drop selecting HAS_SYSTEM_SUSPEND from X86
- simplify default setting in SYSTEM_SUSPEND
- hide prompt of SYSTEM_SUSPEND when SYSTEM_SUSPEND_ALWAYS_ON is enabled
- move HAS_SYSTEM_SUSPEND alongside other HAS_* configs

Best regards,
Mykola Kvach

Mykyta Poturai (1):
xen: Introduce system suspend config option

Volodymyr Babchuk (1):
xen/char: implement suspend/resume calls for SCIF driver

 xen/arch/x86/Kconfig         |  1 +
 xen/common/Kconfig           | 18 ++++++++++++++++
 xen/drivers/char/scif-uart.c | 40 ++++++++++++++++++++++++++++++++++--
 3 files changed, 57 insertions(+), 2 deletions(-)
Signature · 1 line
2.48.1