From nobody Fri Dec 12 19:30:15 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=1764756059; cv=none; d=zohomail.com; s=zohoarc; b=WTpECMO8IUeEwytM5ctTvRHqqPLqlSxSsf4LClwmFj1qprsRFo6+1tH+HzSQPQC8sOv98iuk7RZgkHFqiR5iA5V9LLQ9i8DghNbn6fFlvuA5mZnopAJB+59lbY4OhhW4l41eoQcaEzIGZ3IMp9fW4mCns1ZIFPgxaL5fU2UK/kw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764756059; 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=nLsHT/7UQMO7e6XL24sydV+TIgZIA2Vb3cpc3ckDtxc=; b=HBy/lK8mxoVocKBbdV6Di4RESc7IfHyfQcRsIgyGEblNqrC+GOMWgCe57SROv/YlyB602w07HFA1E32f9p14wRWgQcpyO7B1m0dotxexN1VhA5GPOI4okjIW9muYTpcb0kgWlnB8jOItEs6YAd3+kwhvHWOhRJk+wcQXgtFB0j0= 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 176475605754073.93424625535454; Wed, 3 Dec 2025 02:00:57 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1176557.1501018 (Exim 4.92) (envelope-from ) id 1vQjev-00040x-2f; Wed, 03 Dec 2025 10:00:29 +0000 Received: by outflank-mailman (output) from mailman id 1176557.1501018; Wed, 03 Dec 2025 10:00:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vQjeu-00040q-TZ; Wed, 03 Dec 2025 10:00:28 +0000 Received: by outflank-mailman (input) for mailman id 1176557; Wed, 03 Dec 2025 10:00:27 +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 1vQjet-0003xM-CK for xen-devel@lists.xenproject.org; Wed, 03 Dec 2025 10:00:27 +0000 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [2a00:1450:4864:20::52a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e3555432-d02e-11f0-9d1a-b5c5bf9af7f9; Wed, 03 Dec 2025 11:00:25 +0100 (CET) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-64149f78c0dso9943203a12.3 for ; Wed, 03 Dec 2025 02:00:25 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-211.as6723.net. [185.5.253.211]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-647510615c0sm18190969a12.30.2025.12.03.02.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 02:00:23 -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: e3555432-d02e-11f0-9d1a-b5c5bf9af7f9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764756024; x=1765360824; 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=nLsHT/7UQMO7e6XL24sydV+TIgZIA2Vb3cpc3ckDtxc=; b=VCHhVUsSh0gMaofNoH8/+TC8xZ+idCUc+UDp6rPCysbFka8BGHIXEfJA5fLNFNWMIb gogoaI293/tdIZyRrjA8ENxxJiQ4YLNWmNjQ1LbxuFFAzxvFxeMjsnoWuwEIYyrV7T0f BE2ks3whtF8RRxxEmB0GG/pS4YEDP86LzGWBTlFTRjSYQU/t7gs/ECH5WYEWlWGdb6rL ay8t7BEZvSDiFWpowVAj6dnd5RaiawsI6L3nPalUsFfMN2IahG0DIDo/4z+ooPauSH3E 8VjrwjppqEwNJZldpOfmy4cjvX/tVDiA0AKInPDrDw1gHGNIzGnWOHb866GGUYTiCvGP wSSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764756024; x=1765360824; 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=nLsHT/7UQMO7e6XL24sydV+TIgZIA2Vb3cpc3ckDtxc=; b=Awt5E0luilgyMGPkXs+1uWLX1YEPNqkInaeVADs+W8xh/42rzF54iZX2w7WWKb3MZz G4MOgu4hzdFSj1v/1yYY72V7EenbdTaN7Qg2MQUuN991JElktu/SmlVmdliL9MX+QWjv pR4h9HhR/M5REQ5QCIRWbdqFN1zVBV7Bg201MowBVbfL3Mcv+jkadYioymFV9f9zyxko H/Zpkw9EoAoRX0w8XhzGGFB3cPNd+egMwUlq3tRphM6R7Zka0nEz4P9b0NfFg9r9uDKJ P5floEdOuw9txEq2JGpcNIwoe1P0CYo2V130kcRgv6kdqMkTKGjyTOu4vHXVyVy8NTZe 9ISw== X-Gm-Message-State: AOJu0YyEDVopjNQZOQewrKVJZG/AYQg0R0MuVhpgqPaYB9imlrVB8H5Z LNBzYKtJlMQde2n93EpnpCzRw9zct8fgVuntq+VRH/eos/SWDjnbFdeLX7c1H+PO X-Gm-Gg: ASbGncugx2c0nZhyqBK7W8GrxltmwVzv79F5GubOohuXvN3/v+27YbCx5evx9kVykkY L1C1Tm6O0q9T2XGv/yqL1Fu1PNaDXc0a6Q1wXanSRM9b9qwzDkmFrkbKPcoc9EEXs1r4ArgLvr8 pFZYarvZ2TeWGTgZ4+P6XVNBsDxyhTx6XqKWq/bDonM7t2mcVv27JUEh88SwLuJx/rYNDqKYy6e NuBQ/32OvyD2cD0Ck8BaYaFOST4dMVAFr9ryNHyLjhgUQDGSPIn1qeQVx3qXWichz62sgClCIpU c6KgpAq03xbh3iKkz1yNs4ANrmwHcbHYdVLJgVerXhRf1kICXDRtl1iArVEFjlFyFvanHbirTtF z8Gkprg5XNTNJOJinzi0aYBBPKfqMi9o7byu12RCGmUJezCvMBKMLb8N0ctN5anOCLp7tePXYZ4 Cpjfy2N3vQmQa9O3Q+AT6bGU6FVtUuVJL9afPApcOm3Lajeg== X-Google-Smtp-Source: AGHT+IEGo5ME6EwHvRNsyvEd0xxwAuQKVK2DvplPv2NEV/CKKXfA6WAqntWD2aIRn2vD9asNWBNqVg== X-Received: by 2002:a05:6402:26c3:b0:643:8301:d136 with SMTP id 4fb4d7f45d1cf-6479c47fe11mr1213607a12.19.1764756023824; Wed, 03 Dec 2025 02:00:23 -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 v15 1/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests Date: Wed, 3 Dec 2025 11:57:04 +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: 1764756060538019200 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. 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 V15: - add forward declaration of vcpu and domain structures to asm/suspend.h - minor fixes after review --- xen/arch/arm/domain.c | 41 +++++++++ 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 | 5 ++ xen/include/xen/suspend.h | 25 ++++++ 9 files changed, 202 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 ab78444335..f4ae33d6c7 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" @@ -880,6 +884,43 @@ 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 ) + printk("%pd: Failed to resume domain (ret %d)\n", d, 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 af3e168374..e637cb4de0 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 3b6e9471c4..33f33f2838 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1363,6 +1364,9 @@ void domain_resume(struct domain *d) =20 spin_lock(&d->shutdown_lock); =20 + if ( arch_domain_resume(d) ) + goto fail; + d->is_shutting_down =3D d->is_shut_down =3D 0; d->shutdown_code =3D SHUTDOWN_CODE_INVALID; =20 @@ -1373,6 +1377,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 Fri Dec 12 19:30:15 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=1764757332; cv=none; d=zohomail.com; s=zohoarc; b=DZz706aT995geS2ITaSBkpGm24gvJTL0P2YZX5FfHoBuxA/t82aoM0Rzp8YODrzGcY9JOPcqb+uqzWPf9Fp7m9/DGrlBdhsxkZ8kbtJ6Bgclzh7qFZATJHWjiiYU938xmJ1nriW1U31F5YmdnxMydcx38dOlAdqSZSmPV7v7k2A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764757332; 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=aadf3ko+I/c1Yg3RWCNNDblN+tC0Sr7zOTobR7NNsys=; b=K8CN/mCzaiwWPE7Ls4ShmBqchSrh3FPMQn0yeOF2IH8pcgEwyWiT6I+M7xDgUgPIQv64dLl4lycMjXL+6h+SGZA5m5J33nkI0/VNbzWZWkeahhzS2PZaJoFPxwRwBa8vdQRdYsuaPSgExYwCfHK+CuKzAqlfJg/LCeiqVwmwr5E= 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 17647573322701006.0945300159419; Wed, 3 Dec 2025 02:22:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1176558.1501023 (Exim 4.92) (envelope-from ) id 1vQjev-000466-Af; Wed, 03 Dec 2025 10:00:29 +0000 Received: by outflank-mailman (output) from mailman id 1176558.1501023; Wed, 03 Dec 2025 10:00:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vQjev-000433-5D; Wed, 03 Dec 2025 10:00:29 +0000 Received: by outflank-mailman (input) for mailman id 1176558; Wed, 03 Dec 2025 10:00:27 +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 1vQjet-0003xW-R9 for xen-devel@lists.xenproject.org; Wed, 03 Dec 2025 10:00:27 +0000 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [2a00:1450:4864:20::532]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e3bb2761-d02e-11f0-980a-7dc792cee155; Wed, 03 Dec 2025 11:00:25 +0100 (CET) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-64162c04f90so12009464a12.0 for ; Wed, 03 Dec 2025 02:00:25 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-211.as6723.net. [185.5.253.211]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-647510615c0sm18190969a12.30.2025.12.03.02.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 02:00:24 -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: e3bb2761-d02e-11f0-980a-7dc792cee155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764756025; x=1765360825; 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=aadf3ko+I/c1Yg3RWCNNDblN+tC0Sr7zOTobR7NNsys=; b=fOxl6yX3bOxfJ7nvs7mVnGeq2X6ErnN9Je8TlxfEtZCl9zzHS58Rlm6SjL5Wc/fXk9 1IiPbC04iMqKXg7ulEvcE7IpsK27pAhmm4LWYmMqPGF/HCiWiyjioIYdcBN8VWu9cXY/ h01n38Lc6CHf9W8Be42boiND2gDmOzJYL50YC3QIS38O8mW6NXRgGGAIL2BR40vZi1x7 l0ZtbbeKEPwKlFXWF9EW4NqCBRsEa/axoNVHlW0xMioonjxH6559rEAJmrexXhbr4gNF LzULhtIz3kYQwNMtrH8+5XOR2ajco5j4pGPrrSluNmKup6mwuLfLZW25Cz/UVjhBdpCe M5Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764756025; x=1765360825; 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=aadf3ko+I/c1Yg3RWCNNDblN+tC0Sr7zOTobR7NNsys=; b=d4z2vvD19w/3xTB+bRw5/Sms9ZV0bRYo/Cr49IeiNaQXmSFSNS1Uba5m+38qqRfdRV hFg90FBV3QFk8mvuE9+njFplxjc/PHxOsdjWOaM/jeN/RoBy14+MC3A5d5vqX6FWPwLF W9T3la44nartYJtKOyVAvBAqtmUKqJQzoFlvE+PfhEj1QJRExzOrXXpsS/60o7hOv9c7 GDSgg7SfpfSgXG9y+nsJ3B7JJEjWCBpE/VZJGdKKbra6ZIEB4jZDtx0yz3pumVKbsRMi Wa21/teIeTDMHTDPBn4dk7wlcJcb8KzsJo0Sly4RqX5RH9YVjBu5LIQCq+Y4XQ0sO/Cw KuhA== X-Gm-Message-State: AOJu0YwO5/imDco+kdCdES0R5mJnjaBp/2vgd6eUZtmONKgy5hN4XplT LGw4i2J2dIDF1YEkmO1imcSwk0aS/ITCxpb32wSYufSjex5LK4jJMwSzHhymsWjM X-Gm-Gg: ASbGncuxOR5ImlrTosWt9gFPjXOt2FIVCFXZMWW5508n3X1egbJGwhoz14TguygXVwB kcKWFI4mRQyc4DDAQP8Jr8fgzB9/RVhnWG7KfcfyE0YHQI9p82Q5P8rppgKA8pXT5bp2aoqFLWT R0bT3gpc7hvLWiQHFOAxEdAxJ4gJfB0u3POrmyP8VpuBPxBgA08c5s8LplNdjnvm90lQNnTwWCR nR7erzwSeDhVzOd62BpYqUwsrky08U9Ur/kSxvk3D61cGQn9g9CAopK/1wC5bTI4pxU/l7hLdeG ZPNmfuNSk8UtSI09VmnMJwTnOFim+yV/lIzw5aU4ut7EUeSh65nU/6y+eIgooutS8CVMVKo3iq5 xOKRLrc8B7Zdkt0dq2/z/osqtUlzYqfzDF/S47Alb3RM4Ysgf57/4sa5gFDA2JSM6aPd03Cn05W E9T27pROPoYR6MrECUrOF+taTcNMOM099IEw7QcODzp0ZnqA== X-Google-Smtp-Source: AGHT+IEPKN9ig1SmVj1r8aKUz0n3VdZ1BtKrDstgoQy287j01bQoX3YsT6ulbwJFZvNqLbpgmaa/Ig== X-Received: by 2002:a05:6402:1473:b0:640:947e:70ce with SMTP id 4fb4d7f45d1cf-6479c4431b5mr1258903a12.5.1764756024703; Wed, 03 Dec 2025 02:00:24 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Anthony PERARD , Juergen Gross Subject: [PATCH v15 2/4] tools/xl: Allow compilation of 'xl resume' command on Arm Date: Wed, 3 Dec 2025 11:57:05 +0200 Message-ID: <0518a53a9e20f37a275ac9e507c2b8be8b2a809c.1764755558.git.xakep.amatop@gmail.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: 1764757334003019200 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 v15: - 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 Fri Dec 12 19:30:15 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=1764756049; cv=none; d=zohomail.com; s=zohoarc; b=ZsfYMYeLmkhKXuL5YxRh735F+doMu7JC9zKaLYfmlwHfAVix5UQHOXSPTiHC0cbEkUhgbAWEbShqb041KKlcODZNUPGiJd8fOnqXDJmJ6Yd+1pdvlhT1kfoAkH2qs7NiRZQ5OdtaTyAPsPxo3hrlFXRJcyBGCa5WF4U7oJVbH5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764756049; 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=nXdf7WuWMyXQpmMPvQ2wyLtkzf1aXZKEnXZRs84dpyw=; b=GJ8Jzn6xQJvCsXgMODAO1T5BxLElJQi5PrnYczS8I9qXEpubcZHDu7HpM9tbJ3mW+vyrtR1KKdAs1Art9HDi/8cKm5prGKhzf/eUPhoci8WZaQauK1MZ2xRJmPCd+cKnaX9FozCT0PDimpx1v3f+yPwVx9APA+Rrr5GKPO7umPw= 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 1764756049283593.1987635438206; Wed, 3 Dec 2025 02:00:49 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1176560.1501053 (Exim 4.92) (envelope-from ) id 1vQjex-0004ob-32; Wed, 03 Dec 2025 10:00:31 +0000 Received: by outflank-mailman (output) from mailman id 1176560.1501053; Wed, 03 Dec 2025 10:00:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vQjew-0004ns-Td; Wed, 03 Dec 2025 10:00:30 +0000 Received: by outflank-mailman (input) for mailman id 1176560; Wed, 03 Dec 2025 10:00:29 +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 1vQjev-0003xW-6g for xen-devel@lists.xenproject.org; Wed, 03 Dec 2025 10:00:29 +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 e4a1ad3a-d02e-11f0-980a-7dc792cee155; Wed, 03 Dec 2025 11:00:27 +0100 (CET) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-64162c04f90so12009517a12.0 for ; Wed, 03 Dec 2025 02:00:27 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-211.as6723.net. [185.5.253.211]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-647510615c0sm18190969a12.30.2025.12.03.02.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 02:00:25 -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: e4a1ad3a-d02e-11f0-980a-7dc792cee155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764756026; x=1765360826; 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=nXdf7WuWMyXQpmMPvQ2wyLtkzf1aXZKEnXZRs84dpyw=; b=l2OndIrhi+lYpgMfWItPzwvkUve7BalYca9B1CVaXQe0A5j8s78TrJ573TlJYW8mnZ vF+GDKfXjQhM8o2F4wUWhPYJiyCMs91F/JGfvKzyjYyZmbQP/6ndo5jiW+YrN81TRMze h2Wx7EzfrcQ5BEINIe8iI4ivS1DsMTzhZBzTkuxWRmRZppRxhPw6IYfrcOZW8uhhHKQZ fUhvNauErPvgB6CsdEVtXP/dEM6pRfjwpRIp5v9PTMbpT6fBwQ8ttHFLTIHluAloEurI Ks5lEs28e+HvyRn2UVBlziEAAqSQThN/F+BMCng8V3+EgB8ce3ICp9Kf7/uZWC2sVL0q C1Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764756026; x=1765360826; 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=nXdf7WuWMyXQpmMPvQ2wyLtkzf1aXZKEnXZRs84dpyw=; b=bfduIFE0zkoALnFVBeMLiNjkiQHMWSYcIYWCLx0uSI04Jv5T1+lzz2cuzaCGyRWZeY zknX+5SvesHqq5fz0nzfK7Yi7z+RGOuA9o1FP3qKxgSOQwAHtkTUipx6vhcBSjeByUue CN5YqPpzMBwjSBdhFiJBIhNeUi9GBqqy+1cBj8R/CYzmaRxmQjBgcAweHO0YI8iFUkq/ MwEUdnbJuUc7zITm5U3WTir/PxabaQo6V0gSpburQ5jg9iZtL92UU+aLeC0JUViN7gZ5 cSuuGpPxPuqWH+fC3fB+xNWITb72ia+KD08pZPS57I18/2HdrfpzghxcdDVEEPlAirM2 PZfA== X-Gm-Message-State: AOJu0YzD799t2QP+0vq8zlj9/C4+IWCrhN9TsOB058El+8vdO2gq67jf bYHb79yoOnaCvZU6gbMzLIQEbC6lfmKj3lpeiVNVd4vaCpmBnBVqPndgA06A6a9x X-Gm-Gg: ASbGncvHOnwp8s/OYHpLGDuFr07LEPZv6+R65zoIu4pfqSsvjpmwbM9lgnqwntqEkIk C1Hh7KyTzQHgPaC1SOjmjYM504u8r161NQvDXotISo0Z6Ac3VAEZXX4p4ypfGmsqAI8OIaXX7WQ 0ZRfZ5tPjNWkqcZULS7Adn6Ky3+MvsswB7T/77kFq97WfTbAsogJbQjiOk80+u63Hzxv5WXPwRU GNpaOxW+XMVE4lSTINbH+3tN8yPUf6RH+uelHlbTTFPJlci/xCIqXs6fkBEdIt7KlefyJ8L9vkD hZ/m/wDWRrLZ/ydhUo7XSjPWaIfq/2nHb/GXgXlADXV8SKczy+G96jowljE2akhT/L3tqmduEjK bq1t+tTKmPlFYcdKGzPFI4lX2XHuxquT9/E5Ya+2azJJTJoNBpNBmvSWvaqTg9CG0vB7BR3J0b4 jP1t9czcPHxQNbTuxNnJP2vRt/ozRAjCx7/2JK0kpWb1qs3Q== X-Google-Smtp-Source: AGHT+IHN9WVLht4jgbNWDLGX4jppGZHfv1eLrOxJM+UkFra0ijDkGDuRMIp1r+Ddoxf/rDGyn0IOxw== X-Received: by 2002:a05:6402:2687:b0:640:c8b7:f2bd with SMTP id 4fb4d7f45d1cf-6479c51971fmr1062217a12.29.1764756026191; Wed, 03 Dec 2025 02:00:26 -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 v15 3/4] SUPPORT.md: Document PSCI SYSTEM_SUSPEND support for guests Date: Wed, 3 Dec 2025 11:57:06 +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: 1764756050445019201 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 V15: - 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 Fri Dec 12 19:30:15 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=1764756057; cv=none; d=zohomail.com; s=zohoarc; b=dwxn9Cg4MGxqBqUwE/LOBbzaFFeYck4MVEwYB9N3gJHsZ9+l6mUC5KgKOq1+9rlRS2WMdcI230rYWwHfPNHVDIR8RqJEGw8xcQ8qW7BpkaoFum54Gue6/swnZ9JMmzlc4vR6iRJ78rSgz7TX6ESQDk4lHGqfAQYDi9aSYPuaGjQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764756057; 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=s5UVLmBmvgKxs7oTb1qCk8tDRMlakYOYuX5/F17a/uQ=; b=H1+q6iMQFkT5orsiS8ni78K9SCdjhUSVZiOaD1lWx8uA3XnRVLmseCXv2jF7ADaheAb3NCZYCke0nteuSu1CoYAbPoVyP6Uj0Xzi6uONQZS5MY8oD5EDI9V4P59N3Zy6vvsYUES+EsIIU5p9laGHyf451F3Qg376vyXtYe6AguM= 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 1764756057604152.87335928930383; Wed, 3 Dec 2025 02:00:57 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1176559.1501032 (Exim 4.92) (envelope-from ) id 1vQjev-0004Ho-SW; Wed, 03 Dec 2025 10:00:29 +0000 Received: by outflank-mailman (output) from mailman id 1176559.1501032; Wed, 03 Dec 2025 10:00:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vQjev-0004Ex-LE; Wed, 03 Dec 2025 10:00:29 +0000 Received: by outflank-mailman (input) for mailman id 1176559; Wed, 03 Dec 2025 10:00:28 +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 1vQjeu-0003xM-Pm for xen-devel@lists.xenproject.org; Wed, 03 Dec 2025 10:00:28 +0000 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [2a00:1450:4864:20::52a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e53c472a-d02e-11f0-9d1a-b5c5bf9af7f9; Wed, 03 Dec 2025 11:00:28 +0100 (CET) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-640a0812658so4284256a12.0 for ; Wed, 03 Dec 2025 02:00:28 -0800 (PST) Received: from EPUAKYIW02F7.. (pool185-5-253-211.as6723.net. [185.5.253.211]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-647510615c0sm18190969a12.30.2025.12.03.02.00.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 02:00:26 -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: e53c472a-d02e-11f0-9d1a-b5c5bf9af7f9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764756027; x=1765360827; 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=s5UVLmBmvgKxs7oTb1qCk8tDRMlakYOYuX5/F17a/uQ=; b=ThFUqNI2JZsqJ8uQw0G47UgWipRo4mZl+8EbnxH/zXWWN/1ozTpipw4qK8AryZ2xBo 6NT2EV7Q4ymtnDhoWZO8gsTvKtVfKTDjvE98ee1Eds11jfjP37MxUDIbxSOoZ9H70DBd kzYcIn8GYIzjsifszlNvb0AOevOEDcCZ1iWtg8ASi3HTWKl4QB+X5ybbdu8BWxic5qP8 6TVy27ucs6dx9bwoWtboKLnWwmsjd23ENnITmkYNGzlUKeH11K7MRW6BYvwXdWaFyYnm 6sFxU1iGyoL7qa9jsTevUiUA5yveb0PPXUYVE+5QHqMecprop/r8N2hqmPvlcp+dGuAL BZJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764756027; x=1765360827; 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=s5UVLmBmvgKxs7oTb1qCk8tDRMlakYOYuX5/F17a/uQ=; b=HpZxGcV4W48U+d7n/snxH4lpoar+71B+KEQQHCE0vtmW1w3QAqP5hi0UdUdwCjOIUQ PIFqrHn6xxyNtgB36nnjZ0/IMbqsBEWqtAqK9fmdWPGG9L06lgoAMpzq8u/+QPjvsbgx Shq900GlPTgDzN4U2Tb0n7BVb3asN4hmy29CLtP0AloGxDySlXTHQgrRaHWuVKZExRkf MotFEH1uDNtRQp06lXFG2WFNnpC9HBRK1rhYBp4jrPRGJbF+WovQYvNhMphQhZftHt1W sLITQZhSDmGooTstBlkR9cvvr676CqcUP/fzHyICEezLwtjFk8gr+7bhJtj7IKwodbmj nOaA== X-Gm-Message-State: AOJu0YzlkxkusJKAf5hjHNlMPo3SjjEUCTZ3x9rwzNSjSIjsAts9cbA1 Dt1HzVVe7AkwKsbmonbMiqnaFuFNOP/l2SYV3kwzXDop3yC902/jPi5GGUn65Z3x X-Gm-Gg: ASbGncsBvrDjSi9zmgJmzHBb8LKhRXoQJzXQoGZot3jWGrdk052eVOWJpoh72KjPqDb xLVUm9SLLOv9dEi+iW6KUBMyh6lcOW4Xi+623dwqWxheXZofsNA7TT0FGn94OXMU48MZoc+X7lu 5f4H5yJnmz4htRvpJBdns76KvkFYaBQagKARkapsuP/s0EH3vhAGqGl3hgp4oZdfZ1nRkHWWR0F 9FDTy9mCsC8Itp0Ol2F01M/6WebVwcBW9v7pGLQAN7+D6rxHNAa7ALz+7H9qcDvVr+Ez7BMX7RA soWqwxZ6XYx7X9TqAMFYBN+sX/H1dGYWPLoasE9Ya4uTJd2TWJiieBxgWPkiJdcwdI1dvNeGrQ4 N0/hGiqXb1qsv/6/tGqfmbL+bAJxtvCumwVk6M5Xc0tqmg0eNljj10wcXWC5AYNBzuxh7pfna2J b+9XBamBX3DMKI0ncXkBOpnKqmWuQcW2f/WeYulbdXbwAzBuLCEqYtdjRu X-Google-Smtp-Source: AGHT+IE4Ukb6uX0vF6c5uedNAyGgvE09ZzPx5FI8z/XX5GVbKvAoTMzktZobsuDRXNOCTMBTiXbB/A== X-Received: by 2002:a05:6402:50cc:b0:640:a50b:609 with SMTP id 4fb4d7f45d1cf-6479c48ab45mr1432568a12.16.1764756027323; Wed, 03 Dec 2025 02:00:27 -0800 (PST) From: Mykola Kvach To: xen-devel@lists.xenproject.org Cc: Mykola Kvach , Oleksii Kurochko , Community Manager Subject: [PATCH v15 4/4] CHANGELOG: Document guest suspend/resume to RAM support on Arm Date: Wed, 3 Dec 2025 11:57:07 +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: 1764756058330019200 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 --- Changes in v15: - no changes. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index adaad5ee89..18757d6677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepac= hangelog.com/en/1.0.0/) =20 ### Added =20 + - On Arm: + - Support for guest suspend and resume to/from RAM via vPSCI. + Applies only to non-hardware domain guests. + ### Removed =20 ## [4.21.0](https://xenbits.xenproject.org/gitweb/?p=3Dxen.git;a=3Dshortlo= g;h=3DRELEASE-4.21.0) - 2025-11-19 --=20 2.43.0