From nobody Mon Dec 15 13:34:14 2025 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=1765545782; cv=none; d=zohomail.com; s=zohoarc; b=jSoL70SedpCnlSxDSeMFeN0NK8ImEtOP74JObMued1GSxCol/QJYIZS/WSnvPRzyad7PqDJKAYRb/Y+XBvtDP1hkd9ktQHhj5PluNjtWunPqpdsM3khbs2mT8ZjKniFIIwl48m2Tw2EYmBNILkkSQI8xIYosq0/fXadkGTQ2KFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765545782; 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=yIP3SfEKENNmXaK6cHV/ouukhRUCsSHaHnKoL4OIvAA=; b=nxHCMKyNB3Xpb8gCx86Q+5m5MTAsm1D0ReP0EfebqigW3PmBYSLjEDGLmJGzzwBI2NU9nzCwB+LkD4O4eT2gTEEdrCA+QAu68XDQ1gabeBBbA99wpdUCrvv3pvGUqjnjw9G+/FoYlwzTydRdTR2BJpL44Muj+W1KpoIb5mLi+Rc= 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 17655457829131021.7501140180376; Fri, 12 Dec 2025 05:23:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1185384.1507563 (Exim 4.92) (envelope-from ) id 1vU36R-0000YL-SX; Fri, 12 Dec 2025 13:22:35 +0000 Received: by outflank-mailman (output) from mailman id 1185384.1507563; Fri, 12 Dec 2025 13:22:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36R-0000YB-Nb; Fri, 12 Dec 2025 13:22:35 +0000 Received: by outflank-mailman (input) for mailman id 1185384; Fri, 12 Dec 2025 13:22:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36Q-0000XM-TL for xen-devel@lists.xenproject.org; Fri, 12 Dec 2025 13:22:35 +0000 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [2a00:1450:4864:20::52a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9d71dc3f-d75d-11f0-9cce-f158ae23cfc8; Fri, 12 Dec 2025 14:22:32 +0100 (CET) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-6499159273dso1451200a12.3 for ; Fri, 12 Dec 2025 05:22:32 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-4.as6723.net. [185.5.253.4]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-649820f77fbsm5168260a12.19.2025.12.12.05.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 05:22:30 -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: 9d71dc3f-d75d-11f0-9cce-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765545751; x=1766150551; 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=yIP3SfEKENNmXaK6cHV/ouukhRUCsSHaHnKoL4OIvAA=; b=CVWgNP9MYTNAln43hXyW0NyKhfhKrhIdb/VPg+SAaU5kOKneLF6Z2rPNFjWDJIE1nK /d/YvfdqoX2Mg8Draw9hjU1Xa5Rl1Z5KuboQPflm79Xu8wBZg8Q2RRZeQaZEbdy4S2Bc cvyHqB9wILQFtt/YIju2+toCO1Z5cOIj/7ldFT4r24U+wMMNoit4M4hExEISCmrnaGv4 S7c8XW26yVviWfG/Hvzcf9gvdbSgEf1LivYz927Z2IEfMdnFE/rzibmKwBBpM0cpC04b jK/7g/RL9syBloBVn4J6+ugPq0hGa54AF3seeSTX477AE8r4KxHLx9KsTplVJ9NbEKJO MZ6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765545751; x=1766150551; 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=yIP3SfEKENNmXaK6cHV/ouukhRUCsSHaHnKoL4OIvAA=; b=asunE2j6YRADy3UEG0GjPRGcNx5R6NdMwZPtoCYrqMbWlc6Gn6c5qIofjXVWtk82+T PFHum9EXZJ5agrvIEEtU4FYvXMi90wDay5FnASIXGRo/jINwUbUh7qyi7rLIMZsJ0ID6 TNaWzeIO5o1Myo+vyjtQEJ/Va2rHBW7Yg1xyuw3WF2Vonb1/g8kKjZR8Nj862o3+CsNR qUy8Hz+AmXuUAsiUqVQJfyRqkKw/l3SJ+bGw0oVwW+M32CoUdulxuWVAQs3wpd5oHRE8 ZjLxeMLz4z6woumg+p6O0kMzrE7/hAc5Zn4lAYZ5++cEu0p1ppbwwUeEhiezar3KFudZ 5Z6w== X-Gm-Message-State: AOJu0Yx4PswePOWdcVsH+W2br2gRsZgf7TSn+jGiGnopBPgkEYWO9+mN HF0Nf6BE7/j5Syds5N/IcBnUrZR8ekT5u/oIe8a3XFBSd4uMhO+6TOiAwQ75sh+c X-Gm-Gg: AY/fxX6OdcSFSxlzuXl4hZNFnsQHpGESCm/CLGLc6pDcWmpIsuO/sduqDZ194a3MGeE cQmPTB99Vc6nuXRnabcYX+bliKGBgEPwvB7rBsjmxBstAXWUcBzwGh5dEVnwgPYNWvh3Xw/xaiL tTQiHJcW1VQu901ZB/DumELrnQjls7smuFJDAj1W9CTOFGVUlBLWVGIWrFmxtCg9h4E8LeA6tN0 0+uOLGi/teMSluovDO66ItjGB1MvZj8+KKkQWULn3b/JLQgsZYqj6jL+CXOFehl6ff3T1zk+K8L 2XIF2GFxNjujwg68t7NTMemwSQ/FB2+w6TbqwRaL8iQs0yr+pgl6dySQVCAi8HUOXcZfG5HGmt3 jvS6G/wxtc6mM2VrRUvHvoUs1Kf2rCfmS35l/WLfgHaAb4THqHe0/XIUsjRWp4IBW5kFcAGtztn fEd+XGo9EYWp8LA/oaLPhBpz0Og7sfAt2yS9HeN9Bp X-Google-Smtp-Source: AGHT+IFcSgWpsZtXTMwLskLJqr7Z8qqlgxwtEsEtGFnFRCUSxymEjlxdaSAwWlxEKroRl0M366aZSw== X-Received: by 2002:a05:6402:2709:b0:647:54f9:cce6 with SMTP id 4fb4d7f45d1cf-6499b182ee4mr1997508a12.12.1765545751057; Fri, 12 Dec 2025 05:22:31 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v16 1/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests Date: Fri, 12 Dec 2025 15:18:18 +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: 1765545784461158500 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach Add support for the PSCI SYSTEM_SUSPEND function in the vPSCI interface, allowing guests to request suspend via the PSCI v1.0+ SYSTEM_SUSPEND call (both 32-bit and 64-bit variants). Implementation details: - Add SYSTEM_SUSPEND function IDs to PSCI definitions - Trap and handle SYSTEM_SUSPEND in vPSCI - Allow only non-hardware domains to invoke SYSTEM_SUSPEND; return PSCI_NOT_SUPPORTED for the hardware domain to avoid halting the system in hwdom_shutdown() via domain_shutdown - Require all secondary VCPUs of the calling domain to be offline before suspend, as mandated by the PSCI specification The arch_domain_resume() function is an architecture-specific hook that is invoked during domain resume to perform any necessary setup or restoration steps required by the platform. arch_domain_resume() stays int to propagate errno-style detail into common logging; preserving the integer keeps the reason visible and leaves room for future arch-specific failures or richer handling. The new vpsci_vcpu_up_prepare() helper is called on the resume path to set = up the vCPU context (such as entry point, some system regs and context ID) bef= ore resuming a suspended guest. This keeps ARM/vPSCI-specific logic out of comm= on code and avoids intrusive changes to the generic resume flow. Usage: For Linux-based guests, suspend can be initiated with: echo mem > /sys/power/state or via: systemctl suspend Resuming the guest is performed from control domain using: xl resume Signed-off-by: Mykola Kvach --- Changes in V16: - Refactor error handling in domain_resume: move logging to generic code, use explicit return code checking. - Make context clearing conditional on success in arch_domain_resume. - The 'int' return type is retained for arch_domain_resume for consistency with other arch hooks and to allow for specific negative error codes. --- xen/arch/arm/domain.c | 39 +++++++++ xen/arch/arm/include/asm/domain.h | 2 + xen/arch/arm/include/asm/perfc_defn.h | 1 + xen/arch/arm/include/asm/psci.h | 2 + xen/arch/arm/include/asm/suspend.h | 27 ++++++ xen/arch/arm/include/asm/vpsci.h | 5 +- xen/arch/arm/vpsci.c | 116 +++++++++++++++++++++----- xen/common/domain.c | 10 +++ xen/include/xen/suspend.h | 25 ++++++ 9 files changed, 205 insertions(+), 22 deletions(-) create mode 100644 xen/arch/arm/include/asm/suspend.h create mode 100644 xen/include/xen/suspend.h diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 47973f99d9..f903e7d4f0 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -12,6 +12,8 @@ #include #include =20 +#include + #include #include #include @@ -24,10 +26,12 @@ #include #include #include +#include #include #include #include #include +#include #include =20 #include "vpci.h" @@ -851,6 +855,41 @@ void arch_domain_creation_finished(struct domain *d) p2m_domain_creation_finished(d); } =20 +int arch_domain_resume(struct domain *d) +{ + int rc; + struct resume_info *ctx =3D &d->arch.resume_ctx; + + if ( !d->is_shutting_down || d->shutdown_code !=3D SHUTDOWN_suspend ) + { + dprintk(XENLOG_WARNING, + "%pd: Invalid domain state for resume: is_shutting_down=3D= %u, shutdown_code=3D%u\n", + d, d->is_shutting_down, d->shutdown_code); + return -EINVAL; + } + + /* + * It is still possible to call domain_shutdown() with a suspend reason + * via some hypercalls, such as SCHEDOP_shutdown or SCHEDOP_remote_shu= tdown. + * In these cases, the resume context will be empty. + * This is not expected to cause any issues, so we just notify about t= he + * situation and return without error, allowing the existing logic to + * proceed as expected. + */ + if ( !ctx->wake_cpu ) + { + dprintk(XENLOG_INFO, "%pd: Wake CPU pointer context was not provid= ed\n", + d); + return 0; + } + + rc =3D vpsci_vcpu_up_prepare(ctx->wake_cpu , ctx->ep, ctx->cid); + if ( !rc ) + memset(ctx, 0, sizeof(*ctx)); + + return rc; +} + static int is_guest_pv32_psr(uint32_t psr) { switch (psr & PSR_MODE_MASK) diff --git a/xen/arch/arm/include/asm/domain.h b/xen/arch/arm/include/asm/d= omain.h index 758ad807e4..66b1246892 100644 --- a/xen/arch/arm/include/asm/domain.h +++ b/xen/arch/arm/include/asm/domain.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -126,6 +127,7 @@ struct arch_domain void *sci_data; #endif =20 + struct resume_info resume_ctx; } __cacheline_aligned; =20 struct arch_vcpu diff --git a/xen/arch/arm/include/asm/perfc_defn.h b/xen/arch/arm/include/a= sm/perfc_defn.h index effd25b69e..8dfcac7e3b 100644 --- a/xen/arch/arm/include/asm/perfc_defn.h +++ b/xen/arch/arm/include/asm/perfc_defn.h @@ -33,6 +33,7 @@ PERFCOUNTER(vpsci_system_reset, "vpsci: system_res= et") PERFCOUNTER(vpsci_cpu_suspend, "vpsci: cpu_suspend") PERFCOUNTER(vpsci_cpu_affinity_info, "vpsci: cpu_affinity_info") PERFCOUNTER(vpsci_features, "vpsci: features") +PERFCOUNTER(vpsci_system_suspend, "vpsci: system_suspend") =20 PERFCOUNTER(vcpu_kick, "vcpu: notify other vcpu") =20 diff --git a/xen/arch/arm/include/asm/psci.h b/xen/arch/arm/include/asm/psc= i.h index 4780972621..48a93e6b79 100644 --- a/xen/arch/arm/include/asm/psci.h +++ b/xen/arch/arm/include/asm/psci.h @@ -47,10 +47,12 @@ void call_psci_system_reset(void); #define PSCI_0_2_FN32_SYSTEM_OFF PSCI_0_2_FN32(8) #define PSCI_0_2_FN32_SYSTEM_RESET PSCI_0_2_FN32(9) #define PSCI_1_0_FN32_PSCI_FEATURES PSCI_0_2_FN32(10) +#define PSCI_1_0_FN32_SYSTEM_SUSPEND PSCI_0_2_FN32(14) =20 #define PSCI_0_2_FN64_CPU_SUSPEND PSCI_0_2_FN64(1) #define PSCI_0_2_FN64_CPU_ON PSCI_0_2_FN64(3) #define PSCI_0_2_FN64_AFFINITY_INFO PSCI_0_2_FN64(4) +#define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14) =20 /* PSCI v0.2 affinity level state returned by AFFINITY_INFO */ #define PSCI_0_2_AFFINITY_LEVEL_ON 0 diff --git a/xen/arch/arm/include/asm/suspend.h b/xen/arch/arm/include/asm/= suspend.h new file mode 100644 index 0000000000..313d03ea59 --- /dev/null +++ b/xen/arch/arm/include/asm/suspend.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef ARM_SUSPEND_H +#define ARM_SUSPEND_H + +struct domain; +struct vcpu; + +struct resume_info { + register_t ep; + register_t cid; + struct vcpu *wake_cpu; +}; + +int arch_domain_resume(struct domain *d); + +#endif /* ARM_SUSPEND_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/arm/include/asm/vpsci.h b/xen/arch/arm/include/asm/vp= sci.h index 0cca5e6830..d790ab3715 100644 --- a/xen/arch/arm/include/asm/vpsci.h +++ b/xen/arch/arm/include/asm/vpsci.h @@ -23,12 +23,15 @@ #include =20 /* Number of function implemented by virtual PSCI (only 0.2 or later) */ -#define VPSCI_NR_FUNCS 12 +#define VPSCI_NR_FUNCS 14 =20 /* Functions handle PSCI calls from the guests */ bool do_vpsci_0_1_call(struct cpu_user_regs *regs, uint32_t fid); bool do_vpsci_0_2_call(struct cpu_user_regs *regs, uint32_t fid); =20 +int vpsci_vcpu_up_prepare(struct vcpu *v, register_t entry_point, + register_t context_id); + #endif /* __ASM_VPSCI_H__ */ =20 /* diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c index 7ba9ccd94b..c4d616ec68 100644 --- a/xen/arch/arm/vpsci.c +++ b/xen/arch/arm/vpsci.c @@ -10,32 +10,16 @@ =20 #include =20 -static int do_common_cpu_on(register_t target_cpu, register_t entry_point, - register_t context_id) +int vpsci_vcpu_up_prepare(struct vcpu *v, register_t entry_point, + register_t context_id) { - struct vcpu *v; - struct domain *d =3D current->domain; - struct vcpu_guest_context *ctxt; int rc; + struct domain *d =3D v->domain; bool is_thumb =3D entry_point & 1; - register_t vcpuid; - - vcpuid =3D vaffinity_to_vcpuid(target_cpu); - - if ( (v =3D domain_vcpu(d, vcpuid)) =3D=3D NULL ) - return PSCI_INVALID_PARAMETERS; - - /* THUMB set is not allowed with 64-bit domain */ - if ( is_64bit_domain(d) && is_thumb ) - return PSCI_INVALID_ADDRESS; - - if ( !test_bit(_VPF_down, &v->pause_flags) ) - return PSCI_ALREADY_ON; + struct vcpu_guest_context *ctxt; =20 if ( (ctxt =3D alloc_vcpu_guest_context()) =3D=3D NULL ) - return PSCI_DENIED; - - vgic_clear_pending_irqs(v); + return -ENOMEM; =20 memset(ctxt, 0, sizeof(*ctxt)); ctxt->user_regs.pc64 =3D (u64) entry_point; @@ -76,8 +60,37 @@ static int do_common_cpu_on(register_t target_cpu, regis= ter_t entry_point, free_vcpu_guest_context(ctxt); =20 if ( rc < 0 ) + return rc; + + return 0; +} + +static int do_common_cpu_on(register_t target_cpu, register_t entry_point, + register_t context_id) +{ + struct vcpu *v; + struct domain *d =3D current->domain; + int rc; + bool is_thumb =3D entry_point & 1; + register_t vcpuid; + + vcpuid =3D vaffinity_to_vcpuid(target_cpu); + + if ( (v =3D domain_vcpu(d, vcpuid)) =3D=3D NULL ) + return PSCI_INVALID_PARAMETERS; + + /* THUMB set is not allowed with 64-bit domain */ + if ( is_64bit_domain(d) && is_thumb ) + return PSCI_INVALID_ADDRESS; + + if ( !test_bit(_VPF_down, &v->pause_flags) ) + return PSCI_ALREADY_ON; + + rc =3D vpsci_vcpu_up_prepare(v, entry_point, context_id); + if ( rc ) return PSCI_DENIED; =20 + vgic_clear_pending_irqs(v); vcpu_wake(v); =20 return PSCI_SUCCESS; @@ -197,6 +210,48 @@ static void do_psci_0_2_system_reset(void) domain_shutdown(d,SHUTDOWN_reboot); } =20 +static int32_t do_psci_1_0_system_suspend(register_t epoint, register_t ci= d) +{ + int32_t rc; + struct vcpu *v; + struct domain *d =3D current->domain; + bool is_thumb =3D epoint & 1; + + /* THUMB set is not allowed with 64-bit domain */ + if ( is_64bit_domain(d) && is_thumb ) + return PSCI_INVALID_ADDRESS; + + /* SYSTEM_SUSPEND is not supported for the hardware domain yet */ + if ( is_hardware_domain(d) ) + return PSCI_NOT_SUPPORTED; + + /* Ensure that all CPUs other than the calling one are offline */ + domain_lock(d); + for_each_vcpu ( d, v ) + { + if ( v !=3D current && is_vcpu_online(v) ) + { + domain_unlock(d); + return PSCI_DENIED; + } + } + domain_unlock(d); + + rc =3D domain_shutdown(d, SHUTDOWN_suspend); + if ( rc ) + return PSCI_DENIED; + + d->arch.resume_ctx.ep =3D epoint; + d->arch.resume_ctx.cid =3D cid; + d->arch.resume_ctx.wake_cpu =3D current; + + gprintk(XENLOG_DEBUG, + "SYSTEM_SUSPEND requested, epoint=3D%#"PRIregister", cid=3D%#"= PRIregister"\n", + epoint, cid); + + return rc; +} + static int32_t do_psci_1_0_features(uint32_t psci_func_id) { /* /!\ Ordered by function ID and not name */ @@ -214,6 +269,8 @@ static int32_t do_psci_1_0_features(uint32_t psci_func_= id) case PSCI_0_2_FN32_SYSTEM_OFF: case PSCI_0_2_FN32_SYSTEM_RESET: case PSCI_1_0_FN32_PSCI_FEATURES: + case PSCI_1_0_FN32_SYSTEM_SUSPEND: + case PSCI_1_0_FN64_SYSTEM_SUSPEND: case ARM_SMCCC_VERSION_FID: return 0; default: @@ -344,6 +401,23 @@ bool do_vpsci_0_2_call(struct cpu_user_regs *regs, uin= t32_t fid) return true; } =20 + case PSCI_1_0_FN32_SYSTEM_SUSPEND: + case PSCI_1_0_FN64_SYSTEM_SUSPEND: + { + register_t epoint =3D PSCI_ARG(regs, 1); + register_t cid =3D PSCI_ARG(regs, 2); + + if ( fid =3D=3D PSCI_1_0_FN32_SYSTEM_SUSPEND ) + { + epoint &=3D GENMASK(31, 0); + cid &=3D GENMASK(31, 0); + } + + perfc_incr(vpsci_system_suspend); + PSCI_SET_RESULT(regs, do_psci_1_0_system_suspend(epoint, cid)); + return true; + } + default: return false; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 93c71bc766..09ad0a26ee 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1374,6 +1375,7 @@ int domain_shutdown(struct domain *d, u8 reason) void domain_resume(struct domain *d) { struct vcpu *v; + int rc; =20 /* * Some code paths assume that shutdown status does not get reset under @@ -1383,6 +1385,13 @@ void domain_resume(struct domain *d) =20 spin_lock(&d->shutdown_lock); =20 + rc =3D arch_domain_resume(d); + if ( rc ) + { + printk("%pd: Failed to resume domain (ret %d)\n", d, rc); + goto fail; + } + d->is_shutting_down =3D d->is_shut_down =3D 0; d->shutdown_code =3D SHUTDOWN_CODE_INVALID; =20 @@ -1393,6 +1402,7 @@ void domain_resume(struct domain *d) v->paused_for_shutdown =3D 0; } =20 + fail: spin_unlock(&d->shutdown_lock); =20 domain_unpause(d); diff --git a/xen/include/xen/suspend.h b/xen/include/xen/suspend.h new file mode 100644 index 0000000000..528879c2a9 --- /dev/null +++ b/xen/include/xen/suspend.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef XEN_SUSPEND_H +#define XEN_SUSPEND_H + +#if __has_include() +#include +#else +static inline int arch_domain_resume(struct domain *d) +{ + return 0; +} +#endif + +#endif /* XEN_SUSPEND_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Mon Dec 15 13:34:14 2025 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=1765545784; cv=none; d=zohomail.com; s=zohoarc; b=Cx24UMlt5IOO32u17luMaFL+T2AS6rOocx5+Fp5Kh0LUcNaBcDqmEivQTKPfFy37Zz1fX4sDNi1R5asfH4Moh+g3n8NMDuKZppLNDCXN+1MuK9QKu/fyYKImQZp3AnYIpJ8iqTAWP54UXrlqUiDWqaVetZoHgRTcHBluW2rXtrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765545784; 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=SjKcgpgVhPtaCMEXLSjgtM5Jeo9qa3Adh6wKPCR5tAQ=; b=E63cL47w8oc2WmPKbxBSbquDyh2c1kYRJcuUhM5uU5xAacKwkj257sdPlOle6Cv7MkndYg+oUPLVlNNbkU+/nuQX7QIM9dazOer6E58NahYQUkyEW5q5F7LafKANiBYTyYwLbkmM15ZLo7wnXZhbJXJFvlJgXWhJg11UFU/FuwM= 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 1765545784050250.13204264982733; Fri, 12 Dec 2025 05:23:04 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1185386.1507577 (Exim 4.92) (envelope-from ) id 1vU36T-0000pp-ET; Fri, 12 Dec 2025 13:22:37 +0000 Received: by outflank-mailman (output) from mailman id 1185386.1507577; Fri, 12 Dec 2025 13:22:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36T-0000op-9R; Fri, 12 Dec 2025 13:22:37 +0000 Received: by outflank-mailman (input) for mailman id 1185386; Fri, 12 Dec 2025 13:22:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36R-0000XM-Id for xen-devel@lists.xenproject.org; Fri, 12 Dec 2025 13:22:35 +0000 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [2a00:1450:4864:20::534]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9df72b55-d75d-11f0-9cce-f158ae23cfc8; Fri, 12 Dec 2025 14:22:33 +0100 (CET) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-64979bee42aso1708711a12.0 for ; Fri, 12 Dec 2025 05:22:33 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-4.as6723.net. [185.5.253.4]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-649820f77fbsm5168260a12.19.2025.12.12.05.22.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 05:22:31 -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: 9df72b55-d75d-11f0-9cce-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765545752; x=1766150552; 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=SjKcgpgVhPtaCMEXLSjgtM5Jeo9qa3Adh6wKPCR5tAQ=; b=X3g0mvrZzxMpipSENyD51oNnAWI4TK7ED7YAX0Uj+fSLIl3I1IOOeM0in5Bx0C7PCJ z8SrZXKoy6lmoWJha9RCWHWsiIRiCtL60ZMBoDeVxtuLsxz/C9SENiOCVd4/9u7gN4e7 zeGAtu5oRp1sDUU9mM5P7HRg+dcMjjY/WlQodaiKI1FvjZ4fDoN9LPTOUE5x/uB/sx4L 9mhepllWSO7TbAle0XGgmaNFZpMbJU0CirK3eomTI5HrZ/k/RIAbWclG+fwRvD+dm03U PTJZBlMygPfmi36b78ho/TvUh7Ukx7uZo+fzgWDkAzouo+wROuKN5imsT6oMH0Lc+Loj BHAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765545752; x=1766150552; 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=SjKcgpgVhPtaCMEXLSjgtM5Jeo9qa3Adh6wKPCR5tAQ=; b=X5jaz7hpM8TCv+d5Whqd42nasoHa4xW79sCU6cSi2BLtVBHj7zZ7B2ZYxMRiFnn2g2 Ja0YAExZAKdqbblltThM1a5j7jbnRTA5Mdajw7ussbySGZ2V2ioIHVhEjwE5yDJVBz0y ePdGMXYWht1cQj0oHsy5STD9gBRrNcEjx2wtoCb6EiFm7zkGHXKSLv8EN6Yv54kqcREN J3gEW7jyeAUbUHIbtCMEy4XdXzWmOPL6fDjitJo0LhlI0ReYVZKm+D6fdqbqB+Wnk7y3 65JaEBeWyhUMf5X7ziMxQeHljnx4JKS+ENawzIt3Sw9wOCPXEZVZAepUDw6qYeyxxcrM Nprg== X-Gm-Message-State: AOJu0YyNtZcttryARMzSpGiLJJtnRwwA9wpIIvfyEl/8DZQRLdQUjDor CW0xJd4CUsU7xBRms3Yz3iOT/n+YP4Ep9mMU9E5UwS+tYzhe/jqps/w4wIwE6dZA X-Gm-Gg: AY/fxX6KiERxQWnrdxegDfvgU5gd0dcKAympvsHrw4fMOuSSTRmOuQMAVU0kroj02q0 8lK07hCheyHdrYQBl0X6Vs9XQjgajZzmJzmMzUqXLSJSN3qpBmjNG3nSYo6kdVM8Cp9q7Ifo6Oa 8qCwirJMFmCW9du1sDT01wALA4yY0jtsOHxA3VAzxQ5anN0YmWsVlbB/h11Gv/ZWiU79d/CSoPd Us/QTynEx1Owon2EASpAx4auLIqvlPM9me+mY0ryl6IB5jx+8bHwSznSAnnDxWFwCO6QMfa+PyY Q39e92WjRIVdrZQlowHd0PF3Ru9o245rXImU4hIxXASmlyUa2/Ec3hIx4Ed7UB4GFOgu23qCcJ1 oial/uJNUFNiP3nG/IxPwgRSU4bXWiPpZXNUATUEXDbJawTX0OMhYx3EIHvSpE3IbqngLMzbgJz W+yroJX/6WjA9COEbzetyuJ0GlkBNOYhwWJlscaRlDmzlkkIeqhuo= X-Google-Smtp-Source: AGHT+IG8C9rI5U+m+A9wSFp7RpN80ekmEr/smPOOiIk91E1+Hg5S/5fApusnrdGUTrWDuvO/5JDKHA== X-Received: by 2002:a17:906:c154:b0:b79:ff73:f3b4 with SMTP id a640c23a62f3a-b7d235c843amr209089966b.13.1765545751932; Fri, 12 Dec 2025 05:22:31 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Anthony PERARD , Juergen Gross Subject: [PATCH v16 2/4] tools/xl: Allow compilation of 'xl resume' command on Arm Date: Fri, 12 Dec 2025 15:18:19 +0200 Message-ID: <673b2f721b93d8d154f3290797dcbb99f9d46104.1765533584.git.mykola_kvach@epam.com> 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: 1765545786015158500 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach The "xl resume" command was previously excluded from Arm builds because system suspend/resume (e.g., SYSTEM_SUSPEND via vPSCI) was not implemented. On x86, this command is used for resume. This change enables compilation of `xl resume` on Arm regardless of the underlying implementation status, making the tool available for testing and future feature support. The relevant libxl infrastructure and handler functions are already present and usable. Note: This does not imply full system suspend/resume support on Arm. The `xl suspend` command still does not work on Arm platforms. Signed-off-by: Mykola Kvach Acked-by: Anthony PERARD --- Changes in v16: - no chnages --- tools/include/libxl.h | 1 - tools/xl/xl.h | 4 ++-- tools/xl/xl_cmdtable.c | 4 ++-- tools/xl/xl_migrate.c | 2 +- tools/xl/xl_saverestore.c | 2 +- tools/xl/xl_vmcontrol.c | 12 ++++++------ 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tools/include/libxl.h b/tools/include/libxl.h index bc35e412da..14b9e4a859 100644 --- a/tools/include/libxl.h +++ b/tools/include/libxl.h @@ -1145,7 +1145,6 @@ typedef struct libxl__ctx libxl_ctx; * restoring or migrating a domain. In this case the related functions * should be expected to return failure. That is: * - libxl_domain_suspend - * - libxl_domain_resume * - libxl_domain_remus_start */ #if defined(__arm__) || defined(__aarch64__) diff --git a/tools/xl/xl.h b/tools/xl/xl.h index 9000df00de..63db30a6eb 100644 --- a/tools/xl/xl.h +++ b/tools/xl/xl.h @@ -65,7 +65,7 @@ static const char migrate_permission_to_go[]=3D "domain is yours, you are cleared to unpause"; static const char migrate_report[]=3D "my copy unpause results are as follows"; -#endif +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ =20 /* followed by one byte: * 0: everything went well, domain is running @@ -130,8 +130,8 @@ int main_migrate_receive(int argc, char **argv); int main_save(int argc, char **argv); int main_migrate(int argc, char **argv); int main_suspend(int argc, char **argv); +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ int main_resume(int argc, char **argv); -#endif int main_dump_core(int argc, char **argv); int main_pause(int argc, char **argv); int main_unpause(int argc, char **argv); diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c index 06a0039718..bcb2d233cc 100644 --- a/tools/xl/xl_cmdtable.c +++ b/tools/xl/xl_cmdtable.c @@ -198,12 +198,12 @@ const struct cmd_spec cmd_table[] =3D { "Suspend a domain to RAM", "", }, +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ { "resume", &main_resume, 0, 1, "Resume a domain from RAM", "", }, -#endif { "dump-core", &main_dump_core, 0, 1, "Core dump a domain", @@ -548,7 +548,7 @@ const struct cmd_spec cmd_table[] =3D { " checkpoint must be disabled.\n" "-p Use COLO userspace proxy." }, -#endif +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ { "devd", &main_devd, 0, 1, "Daemon that listens for devices and launches backends", diff --git a/tools/xl/xl_migrate.c b/tools/xl/xl_migrate.c index b8594f44a5..4b4a379aa1 100644 --- a/tools/xl/xl_migrate.c +++ b/tools/xl/xl_migrate.c @@ -767,7 +767,7 @@ int main_remus(int argc, char **argv) close(send_fd); return EXIT_FAILURE; } -#endif +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ =20 =20 /* diff --git a/tools/xl/xl_saverestore.c b/tools/xl/xl_saverestore.c index 953d791d1a..747094ec7b 100644 --- a/tools/xl/xl_saverestore.c +++ b/tools/xl/xl_saverestore.c @@ -270,7 +270,7 @@ int main_save(int argc, char **argv) return EXIT_SUCCESS; } =20 -#endif /* LIBXL_HAVE_NO_SUSPEND_RESUME */ +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ =20 =20 =20 diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c index c813732838..93766f631b 100644 --- a/tools/xl/xl_vmcontrol.c +++ b/tools/xl/xl_vmcontrol.c @@ -38,11 +38,6 @@ static void suspend_domain(uint32_t domid) libxl_domain_suspend_only(ctx, domid, NULL); } =20 -static void resume_domain(uint32_t domid) -{ - libxl_domain_resume(ctx, domid, 1, NULL); -} - int main_suspend(int argc, char **argv) { int opt; @@ -55,6 +50,12 @@ int main_suspend(int argc, char **argv) =20 return EXIT_SUCCESS; } +#endif /* !LIBXL_HAVE_NO_SUSPEND_RESUME */ + +static void resume_domain(uint32_t domid) +{ + libxl_domain_resume(ctx, domid, 1, NULL); +} =20 int main_resume(int argc, char **argv) { @@ -68,7 +69,6 @@ int main_resume(int argc, char **argv) =20 return EXIT_SUCCESS; } -#endif =20 static void pause_domain(uint32_t domid) { --=20 2.43.0 From nobody Mon Dec 15 13:34:14 2025 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=1765545779; cv=none; d=zohomail.com; s=zohoarc; b=eSpyxnAPpiFhapLdrGFI7kcoAtFrXvvgJ5GCeERSCbdGNcu/BXIXA8YpcxycXXR0QeyTOW4FbgtFAa2adXrCEOixA7t3ZaXwGsELL8nK+p+zQLSPOC1BCuhjAgDKhOlhh2C4ovCagt1ovMlju174bVTTgvuKpXp7ySQ+oCtxNK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765545779; 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=k/JxxBDY+KhwZWz0jMdNpGTqDW+EDXqjFu4woHI4vHE=; b=InuEh+SuZOQyv3P59YnqU1T7Hq92nFPgRKiMJjZe/QPvYPCiShKYggkhK4w6TPAL2qNQh584Li2dHPm6jAglWK/Y4G6ZH6wtX4A48+W9b0aehPKXv1p5Tut/GHfw9G0MC//zOqwZMpJXTxDo9KPOJjuq0ow3BOQxOZBc6F397yE= 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 1765545779334582.1918392517114; Fri, 12 Dec 2025 05:22:59 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1185385.1507572 (Exim 4.92) (envelope-from ) id 1vU36T-0000mo-6V; Fri, 12 Dec 2025 13:22:37 +0000 Received: by outflank-mailman (output) from mailman id 1185385.1507572; Fri, 12 Dec 2025 13:22:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36T-0000mh-2T; Fri, 12 Dec 2025 13:22:37 +0000 Received: by outflank-mailman (input) for mailman id 1185385; Fri, 12 Dec 2025 13:22:35 +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 1vU36R-0008Uq-Hm for xen-devel@lists.xenproject.org; Fri, 12 Dec 2025 13:22:35 +0000 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [2a00:1450:4864:20::52c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9f0bcfb2-d75d-11f0-b15b-2bf370ae4941; Fri, 12 Dec 2025 14:22:35 +0100 (CET) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-6492e25cd7eso1872107a12.0 for ; Fri, 12 Dec 2025 05:22:35 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-4.as6723.net. [185.5.253.4]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-649820f77fbsm5168260a12.19.2025.12.12.05.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 05:22:32 -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: 9f0bcfb2-d75d-11f0-b15b-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765545754; x=1766150554; 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=k/JxxBDY+KhwZWz0jMdNpGTqDW+EDXqjFu4woHI4vHE=; b=DNXwvC4jLM4vanJFth/ZnjL9qjzqtLyIuNvOn5eNmbf0UMcUTzSG6DE+1FRv4JA90p HDBhyk01sROPNFc76SavRbCD2zmVpNUouqC/6UuNSHlCErH/1zCG5/g39uXDsRzd3Yen tehBYr335T7B4DBQJ5axEy8CndrQO/wc5suve4ush9UvL/lUCoveqpdnKjoLN8jP3iX2 LQ0rPPW7A1dfid43Zamy5hHnTzRZkWwPqV3L9jUtLaIr7mX7iKsom9drwKgW7TUZGAoj 70RvWvWBjSyhW0WmHbXGvikuozqf2Vj7qFHwrZDWNDysf5vr6KLOt7U/ITjxJiDIDC+W k26g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765545754; x=1766150554; 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=k/JxxBDY+KhwZWz0jMdNpGTqDW+EDXqjFu4woHI4vHE=; b=IyWO5C6M8uc3y66oQM8/tkhXltKuzjEqdYfREyhy2DktwsGIubBGSnLTUps0ne7JaO nWXBxiBiH8M6t4GIPFyKIrkOjogA/0PLBPDVUgVi6Dli4azjA582Gt2gDXvhGFWXis0x uhh+XJlLAt2tHYbL1IPjiwQFg0Yt1lOpjBkU/6mCrjKIJP7dl6hB6G6EwJUuiInfXFR3 fbQSpkJxvzC2VeloEUoXc0e9kr2nDt6jmGzHnSm47AjhpwNwHpn0G0DIk6FO6tzxAhJ4 WBYFj+pv1nrE1k9BAV6iLMd71jiMcPGWKGJp10V3ob92Q0r4QLlXQp8UjgiZIaYP0c4J 4bAg== X-Gm-Message-State: AOJu0YzZXTu5gpadlAJ/9if0B2JQIC81x6BTXkIVy5G3KckUv1h/3RP+ xcig8DuU5YvwUFXtUOXsY9DPONImFKyNeU9UjJ1bKEdjEZT9p5OZ1Ka4F53gNl4N X-Gm-Gg: AY/fxX7mM7JU6XFW8jFoNA08/3zmdKemTmrSuCG6AEbKBIuSvRzLOdRpG1iudUkTR3l ry6e6b1fnX2G41QuS/+zmNooGjeqFu91PolkKsBLDHGGkj7JK3ZgGqh9Wm5f71hgyJ9uZtvJ4YO c3seGt0zuy1Bcmr3vZO0W9wRCEYa9Em0VK0GsUQVAitweHPS2ChGyKukI16Oi1VaZA0uAlJvcA2 BiEgFxt29lyNJ/OHmBeStfTVTM9nMDxB8GJSEW9E3myCNoVA9UTs4PJXhb3ljzuZWOnEpQQmF12 MS1JpBrzVl3VzdTu2ZU83BjufDYOPiEMIsrYgUeT1N/ZH1SEPToFJWb5okUu2Shavl9qmuG54Fc 5Hx8vMvGGUBC6NDYD1ctSmZyDj99jb/5+nWcPlO/RmLqqBFy4GsdQaJQ3UzuGuHGUoDUl2rAxOU qBpXgTobVpi5Ut8hbl0zb86vCmUlZE21kznauQJIjPqeYJKrkoX2A= X-Google-Smtp-Source: AGHT+IHW97mlKs9EpH2a0rHl3ZPaJyK7IC/0kwYJdly5+rJ0Mh+pxexntuj7EYdwZbQkAhbB0Vpdbw== X-Received: by 2002:a05:6402:254a:b0:647:9352:ce7 with SMTP id 4fb4d7f45d1cf-6499afaf5c4mr2131235a12.13.1765545753636; Fri, 12 Dec 2025 05:22:33 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Julien Grall Subject: [PATCH v16 3/4] SUPPORT.md: Document PSCI SYSTEM_SUSPEND support for guests Date: Fri, 12 Dec 2025 15:18:20 +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: 1765545780248158500 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach Add a new entry under the "Virtual Hardware, Hypervisor" section documenting support for the optional PSCI SYSTEM_SUSPEND function exposed to guests. This function is available via the virtual PSCI interface and allows guest domains (domUs) to initiate system suspend operations. The feature is currently marked as "Tech Preview". Signed-off-by: Mykola Kvach Acked-by: Julien Grall --- Changes in V16: - no changes. --- SUPPORT.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index d441bccf37..8e7ab7cb3e 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -962,8 +962,9 @@ Emulated PSCI interface exposed to guests. We support a= ll mandatory functions of PSCI 1.1. See below for the list of optional PSCI call implemented and their status. =20 - Status, Mandatory: Supported - Status, MIGRATE_INFO_TYPE: Supported + Status, Mandatory: Supported + Status, MIGRATE_INFO_TYPE: Supported + Status, SYSTEM_SUSPEND: Tech Preview =20 ## Virtual Hardware, QEMU =20 --=20 2.43.0 From nobody Mon Dec 15 13:34:14 2025 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=1765545784; cv=none; d=zohomail.com; s=zohoarc; b=Wl6MQjmOG0fFeJeMYFrpT/DQ9uIzxj94boHh087MwNi+EVCxeVn2jv1H4KdBUUSQBo1lOF/uuLl4ciJauQNqsAAD2gWvbncoK2If5xKHuWSuAs+ZAhBTr2Yl6b7fJAa/D91cF8zeifsaM1jvk9cwpZPq9YKAfhRXzZOqaUsb+rs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1765545784; 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=yDGYl4MwmHHOZvcQHRUCvu0R6OsEkqD5kONUFPAiJAw=; b=DBo43Tw7MCb11Bx5FaI3/2M8ZThDid2bG3LPItet1qwzwma3qRczqQ8NWyauPnZxc9EUf+YtS40EDNQZcXNNR0EfyaYbu1Ta6Mxevr7ps7GX+oiuC9Lm5aApfPdu6DzrCn21shXjT8SMn19F1VKSCgnrxPAAQ3yej3ppF1gxyrY= 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 176554578483173.31142074530976; Fri, 12 Dec 2025 05:23:04 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1185387.1507591 (Exim 4.92) (envelope-from ) id 1vU36V-0001Gc-KH; Fri, 12 Dec 2025 13:22:39 +0000 Received: by outflank-mailman (output) from mailman id 1185387.1507591; Fri, 12 Dec 2025 13:22:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36V-0001GT-HI; Fri, 12 Dec 2025 13:22:39 +0000 Received: by outflank-mailman (input) for mailman id 1185387; Fri, 12 Dec 2025 13:22:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vU36T-0000XM-Em for xen-devel@lists.xenproject.org; Fri, 12 Dec 2025 13:22:37 +0000 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [2a00:1450:4864:20::530]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9f853638-d75d-11f0-9cce-f158ae23cfc8; Fri, 12 Dec 2025 14:22:35 +0100 (CET) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-64979bee42aso1708755a12.0 for ; Fri, 12 Dec 2025 05:22:35 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-4.as6723.net. [185.5.253.4]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-649820f77fbsm5168260a12.19.2025.12.12.05.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 05:22:34 -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: 9f853638-d75d-11f0-9cce-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765545755; x=1766150555; 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=yDGYl4MwmHHOZvcQHRUCvu0R6OsEkqD5kONUFPAiJAw=; b=I+pOhUiSR6le9Q8CTIxXO417o7SX6ye+yqlL4pCROeerUXnieXVNH9/xpcLDJCUHop wfpWqGI7qR7F5+iB3ecwMMKm//DWx1Za7Er+tU0C2+Va2VQlKW1B9vSa+FeeHwz8JSUe yteOqA8fMpViW2oW8jVu0tiHUlgR8+N2ZVQrVJGr0wSkvinn6mlb1EmUfOaIEIxdI53w 8CrRJFN7LtA14vSPW4XlqrZ84r0buDuLISAH+BzM21zsQYY23e/0nooAgfOocASYl0cz H08HxT9OsGShIQw6LeG9QL/Qcin7PhGK+NkElIeJB21HCmILBT/wCvazm96HwpttjST/ h2Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765545755; x=1766150555; 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=yDGYl4MwmHHOZvcQHRUCvu0R6OsEkqD5kONUFPAiJAw=; b=TUovP2NydlEdxwab7j439Va0m+6XHjrQz0P7Yjc7leicqB++irR/VVwBPidXWT78ui 2wJUi3huu3nmrqVS7vgDb26vrwC1n0Sjghm7vyfF3L9MhunPiWU9Veq0oghNG0FqXMcG SYF+wiMWTqIZ5MdFLMJ2Acg/Xue0WvF1JOjZdf88h7Rg+w3MXom+KseFox5gvHQpTZVI de/jelo1qLRRotWrFekTtWQq1A2TQWRP93ut//GnxV/Jwv4SaBAZb80aRTo/q6tmijBZ MnECRxTrfZbSi89cE/U4beJY+OfOmsE0Hv+NU4sBdNzVWnr9+zjoI4VbufuECpgXDDrq iMnA== X-Gm-Message-State: AOJu0Yw3huBV+PHI7BlZNhhCx6EUrfiaAQnpuHMfLIk3fJ1VabhfjTs+ 2S4ZeLVXteErJCKASK2snpx6TYLHhYk0kvYX+diV4YsgCxp98pQ9ud3+ffbxUBJI X-Gm-Gg: AY/fxX5l7Yp+8IZxnWzHSuu7+og+BBc9SXa3aUjGBnfbZFo7poVL1yDsglm/HW8MJFl BHxos2s3GFhD6OfvjEHaGWSWStFUDrx1WQrUPi/tJUJAWlBVbkKEbSJG1a2T28P9nZJx6sqpSz3 bZNta0UH8p1a+oE3HbkTIxdm19Y1ecnwWJlMANWcbZanfTO7wkvYLF24GKvBleYdqp1HiTVT0bu JrjiSrtPwxMjUAAhz2KpWkGl3OJhv6WiJgzhlO8/AzmMA0nB++F5n88WcxzZtrQurq4k0sHsBhg XGlLjAAP6Ma5u0NB8h591P5VN5iVMRmcetwS1YsGUfWTHGjm3PiZ4diNEHxzHqq0HTZ0Um3WsxS XaRcG/gdAkodIFya37kvdpOPAzM4owd4stuOpq4ht3MvjWH5QoDkAym77N/0ENjOKe/SlIuNb3p skXz6viCFxDScHzKcRRH09udyfxIJaJjrOCRkdqQNEaC0TBKpw9f0= X-Google-Smtp-Source: AGHT+IHPoA+7SlbyI79X70bXXauxfU4pvexgeUSee3mEG4eYs8eIhbd3Lcy8ZlmOC4qy2+TQsEHf9g== X-Received: by 2002:a05:6402:2341:b0:647:b4cf:b4ff with SMTP id 4fb4d7f45d1cf-6499b1c27c0mr2279714a12.17.1765545754612; Fri, 12 Dec 2025 05:22:34 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Oleksii Kurochko , Community Manager Subject: [PATCH v16 4/4] CHANGELOG: Document guest suspend/resume to RAM support on Arm Date: Fri, 12 Dec 2025 15:18:21 +0200 Message-ID: <7cca9767665b9ab2e3e5cd28cdb61fda3018a7b5.1765533584.git.mykola_kvach@epam.com> 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: 1765545785968158500 Content-Type: text/plain; charset="utf-8" From: Mykola Kvach Mention the newly added support for guest suspend and resume to/from RAM via vPSCI on Arm platforms. This support is limited to non-hardware domain guests. Signed-off-by: Mykola Kvach Acked-by: Oleksii Kurochko --- Changes in v16: - cosmetic changes after review. --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aaf598623..724eeae454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachan= gelog.com/en/1.0.0/) ### Changed =20 ### Added + - On Arm: + - Support for guest suspend and resume to/from RAM via vPSCI. + Applies only to non-hardware domain guests. =20 ### Removed - On x86: --=20 2.43.0