[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen: Introduce system suspend config option



commit 69c83031737b5fa490d292a9c11864e3fd85c872
Author:     Mykyta Poturai <mykyta_poturai@xxxxxxxx>
AuthorDate: Wed Jun 11 11:09:00 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jun 11 11:09:00 2025 +0200

    xen: Introduce system suspend config option
    
    This option enables the system suspend support. This is the mechanism that
    allows the system to be suspended to RAM and later resumed.
    
    The patch introduces three options:
    - HAS_SYSTEM_SUSPEND: indicates suspend support is available on the 
platform.
    - SYSTEM_SUSPEND_ALWAYS_ON: used for architectures where suspend must always
      be enabled.
    - SYSTEM_SUSPEND: user-facing option to enable/disable suspend if supported.
      Defaults to enabled if SYSTEM_SUSPEND_ALWAYS_ON is set and depends on
      HAS_SYSTEM_SUSPEND.
    
    On x86, both HAS_SYSTEM_SUSPEND and SYSTEM_SUSPEND_ALWAYS_ON are selected by
    default, making suspend support always enabled. The options are designed to
    be easily extensible to other architectures (e.g., PPC, RISC-V) as future
    support is added.
    
    Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
    Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/Kconfig |  1 +
 xen/common/Kconfig   | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 7afe879710..752d5141bb 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -33,6 +33,7 @@ config X86
        select HAS_VMAP
        select HAS_VPCI if HVM
        select NEEDS_LIBELF
+       select SYSTEM_SUSPEND_ALWAYS_ON
 
 config ARCH_DEFCONFIG
        string
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index eece1370a3..867710134a 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -122,6 +122,9 @@ config HAS_SCHED_GRANULARITY
 config HAS_STACK_PROTECTOR
        bool
 
+config HAS_SYSTEM_SUSPEND
+       bool
+
 config HAS_UBSAN
        bool
 
@@ -593,4 +596,19 @@ config BUDDY_ALLOCATOR_SIZE
          Amount of memory reserved for the buddy allocator to serve Xen heap,
          working alongside the colored one.
 
+config SYSTEM_SUSPEND_ALWAYS_ON
+       bool
+       select HAS_SYSTEM_SUSPEND
+
+config SYSTEM_SUSPEND
+       bool "System suspend support" if !SYSTEM_SUSPEND_ALWAYS_ON
+       depends on HAS_SYSTEM_SUSPEND
+       default SYSTEM_SUSPEND_ALWAYS_ON
+       help
+         This option enables the system suspend support. This is the
+         mechanism that allows the system to be suspended to RAM and
+         later resumed.
+
+         If unsure, say N.
+
 endmenu
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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