From: Anthony PERARD <anthony@xenproject.org>
To: Mykola Kvach <xakep.amatop@gmail.com>
Cc: xen-devel@lists.xenproject.org,
Mykola Kvach <mykola_kvach@epam.com>,
Anthony PERARD <anthony.perard@vates.tech>,
Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH v6 2/4] tools/xl: Allow compilation of 'xl resume' command on Arm
Date: Thu, 24 Jul 2025 16:00:48 +0200 [thread overview]
Message-ID: <aII8kN1fmrLKb8ek@l14> (raw)
In-Reply-To: <48ea1dfb5bbcbc993332acb8508060d7cba342fc.1753349109.git.mykola_kvach@epam.com>
On Thu, Jul 24, 2025 at 12:40:57PM +0300, Mykola Kvach wrote:
> From: Mykola Kvach <mykola_kvach@epam.com>
>
> 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 ACPI S3 suspend/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.
>
> The macro `LIBXL_HAVE_NO_SUSPEND_RESUME` has been renamed to
> `LIBXL_HAVE_NO_SUSPEND` to better reflect the updated semantics.
>
> 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 <mykola_kvach@epam.com>
> ---
> Changes in v6:
> - Renamed macro from LIBXL_HAVE_NO_SUSPEND_RESUME to LIBXL_HAVE_NO_SUSPEND
> to better reflect the scope of this change
> - Applied cosmetic changes based on review feedback
> ---
> tools/include/libxl.h | 5 ++---
> tools/xl/xl.h | 10 +++++-----
> tools/xl/xl_cmdtable.c | 8 ++++----
> tools/xl/xl_migrate.c | 4 ++--
> tools/xl/xl_saverestore.c | 4 ++--
> tools/xl/xl_vmcontrol.c | 14 +++++++-------
> 6 files changed, 22 insertions(+), 23 deletions(-)
>
> diff --git a/tools/include/libxl.h b/tools/include/libxl.h
> index d6b6e5d2dd..632264912a 100644
> --- a/tools/include/libxl.h
> +++ b/tools/include/libxl.h
> @@ -1128,17 +1128,16 @@ typedef struct libxl__ctx libxl_ctx;
> #define LIBXL_HAVE_SIGCHLD_SHARING 1
>
> /*
> - * LIBXL_HAVE_NO_SUSPEND_RESUME
> + * LIBXL_HAVE_NO_SUSPEND
> *
> * Is this is defined then the platform has no support for saving,
> * 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__)
> -#define LIBXL_HAVE_NO_SUSPEND_RESUME 1
> +#define LIBXL_HAVE_NO_SUSPEND 1
> #endif
I'm sorry, if you remove LIBXL_HAVE_NO_SUSPEND_RESUME, you have to
implement all the function listed. I'm pretty sure `libvirt` isn't going
to build (on arm) if you remove that macro... Actually, libvirt is going
to build, it's going to expect migration to work, and probably allow to
try to migrate Arm VMs instead of bailing out early.
I wonder what this LIBXL_HAVE_NO_SUSPEND_RESUME is for, since you don't
make any changes to libxl (tools/libs/light), but only to program that
make use of it.
Looking at 3ac3817762d1 ("xl: suppress suspend/resume functions on platforms which do not support it.")
https://xenbits.xenproject.org/gitweb/?p=xen.git;a=commitdiff;h=3ac3817762d1a8b39fa45998ec8c40cabfcfc802
it seems the real purpose was just an hint that migrate/suspend/saving
aren't going to work on that platform.
Looks like `xl resume` is a fairly new command which only makes use if
libxl_domain_resume outside of migration, but the macro
LIBXL_HAVE_NO_SUSPEND_RESUME was mostly a hint that migration doesn't
work.
So I think moving the `xl resume` command out of
LIBXL_HAVE_NO_SUSPEND_RESUME would be good enough for this patch,
without touching libxl.h.
Cheers,
--
Anthony PERARD
next prev parent reply other threads:[~2025-07-24 14:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-24 9:40 [PATCH v6 0/4] Enable guest suspend/resume support on ARM via vPSCI Mykola Kvach
2025-07-24 9:40 ` [PATCH v6 1/4] xen/arm: Implement PSCI SYSTEM_SUSPEND call for guests Mykola Kvach
[not found] ` <21a902ca-47ae-4243-a6f1-ee401c8bf4b4@suse.com>
[not found] ` <e1f3b49e-da03-48a4-8fa1-be2e87542852@citrix.com>
2025-07-24 11:59 ` Jan Beulich
2025-07-24 9:40 ` [PATCH v6 2/4] tools/xl: Allow compilation of 'xl resume' command on Arm Mykola Kvach
2025-07-24 14:00 ` Anthony PERARD [this message]
2025-07-24 16:40 ` Mykola Kvach
2025-07-24 9:40 ` [PATCH v6 3/4] SUPPORT.md: Document PSCI SYSTEM_SUSPEND support for guests Mykola Kvach
2025-07-24 9:40 ` [PATCH v6 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=aII8kN1fmrLKb8ek@l14 \
--to=anthony@xenproject.org \
--cc=anthony.perard@vates.tech \
--cc=jgross@suse.com \
--cc=mykola_kvach@epam.com \
--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.