From: Mykola Kvach <mykola_kvach@epam.com>
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(-)
--
2.48.1