From: Jan Beulich <jbeulich@suse.com>
To: Mykola Kvach <xakep.amatop@gmail.com>
Cc: "Mykola Kvach" <mykola_kvach@epam.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Roger Pau Monné" <roger.pau@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v9 1/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests
Date: Mon, 18 Aug 2025 12:15:10 +0200 [thread overview]
Message-ID: <5bf9b184-70fb-4698-a01e-e8cbcb05935f@suse.com> (raw)
In-Reply-To: <205b2b354ff1d34d0e9ec4777ca3c94492f6d9d1.1755506449.git.mykola_kvach@epam.com>
On 18.08.2025 10:49, Mykola Kvach wrote:
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -90,6 +90,16 @@ static void ctxt_switch_from(struct vcpu *p)
> if ( is_idle_vcpu(p) )
> return;
>
> + /* Arch timer */
> + p->arch.cntkctl = READ_SYSREG(CNTKCTL_EL1);
> + virt_timer_save(p);
> +
> + /* VGIC */
> + gic_save_state(p);
> +
> + if ( test_bit(_VPF_suspended, &p->pause_flags) )
> + return;
As I had to look at the Arm side uses of the new bit to at least try to
follow the comment further down, I came across this. And now I wonder:
Why would one of the pause flags need special casing here?
> @@ -1360,13 +1357,33 @@ void domain_resume(struct domain *d)
>
> for_each_vcpu ( d, v )
> {
> + /*
> + * No need to conditionally clear _VPF_suspended here:
> + * - This bit is only set on Arm64, and only after a successful suspend.
> + * - domain_resume_nopause() may also be called from paths other than
> + * the suspend/resume flow, such as "soft-reset" actions (e.g.,
> + * on_poweroff), as part of the Xenstore control/shutdown protocol.
> + * These require guest acknowledgement to complete the operation.
> + * So clearing the bit unconditionally is safe.
> + */
> + clear_bit(_VPF_suspended, &v->pause_flags);
Seeing that you set this bit for a single vCPU in a domain only, I wonder why
it needs to be a per-vCPU flag.
Apart from this, with the comment I still fear I wouldn't feel capable of
ack-ing this, as there's too much Arm-only interaction in here. It's not even
clear whether this could easily be re-used by another port.
Jan
next prev parent reply other threads:[~2025-08-18 10:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 8:49 [PATCH v9 0/4] Enable guest suspend/resume support on ARM via vPSCI Mykola Kvach
2025-08-18 8:49 ` [PATCH v9 1/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests Mykola Kvach
2025-08-18 10:15 ` Jan Beulich [this message]
2025-08-18 12:43 ` Mykola Kvach
2025-08-18 12:58 ` Jan Beulich
2025-08-22 23:30 ` Volodymyr Babchuk
2025-08-26 9:08 ` Mykola Kvach
2025-08-23 21:26 ` Julien Grall
2025-08-26 9:09 ` Mykola Kvach
2025-08-26 9:26 ` Julien Grall
2025-08-26 9:48 ` Mykola Kvach
2025-08-18 8:49 ` [PATCH v9 2/4] tools/xl: Allow compilation of 'xl resume' command on Arm Mykola Kvach
2025-08-18 8:49 ` [PATCH v9 3/4] SUPPORT.md: Document PSCI SYSTEM_SUSPEND support for guests Mykola Kvach
2025-08-23 21:31 ` Julien Grall
2025-08-26 9:09 ` Mykola Kvach
2025-08-18 8:49 ` [PATCH v9 4/4] CHANGELOG: Document guest suspend/resume to RAM support on Arm Mykola Kvach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5bf9b184-70fb-4698-a01e-e8cbcb05935f@suse.com \
--to=jbeulich@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=mykola_kvach@epam.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xakep.amatop@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.