From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>,
Anthony PERARD <anthony.perard@vates.tech>,
Juergen Gross <jgross@suse.com>
Subject: [PATCH v2 3/3] tools/libxl: Add support for Viridian stimer direct mode
Date: Fri, 4 Sep 2026 15:15:16 +0100 [thread overview]
Message-ID: <20260904141516.367862-4-ross.lagerwall@citrix.com> (raw)
In-Reply-To: <20260904141516.367862-1-ross.lagerwall@citrix.com>
Add support to libxl for using the stimer enlightenments in direct mode.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
New in v2, since the new Viridian flag was added.
docs/man/xl.cfg.5.pod.in | 5 +++++
tools/include/libxl.h | 6 ++++++
tools/libs/light/libxl_types.idl | 1 +
tools/libs/light/libxl_x86.c | 5 +++++
4 files changed, 17 insertions(+)
diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in
index d34951edb98d..784e926c9990 100644
--- a/docs/man/xl.cfg.5.pod.in
+++ b/docs/man/xl.cfg.5.pod.in
@@ -2496,6 +2496,11 @@ ticks and hence enabling this group will ensure that ticks will be
consistent with use of an enlightened time source (B<time_ref_count> or
B<reference_tsc>).
+=item B<stimer>
+
+This set is the same as the B<stimer> set but additionally supports
+using synthetic timers in direct mode.
+
=item B<hcall_ipi>
This set incorporates use of a hypercall for interprocessor interrupts.
diff --git a/tools/include/libxl.h b/tools/include/libxl.h
index 7c098edab663..5475530a5002 100644
--- a/tools/include/libxl.h
+++ b/tools/include/libxl.h
@@ -381,6 +381,12 @@
*/
#define LIBXL_HAVE_VIRIDIAN_HCALL_IPI 1
+/*
+ * LIBXL_HAVE_VIRIDIAN_STIMER_DIRECT indicates that the 'stimer_direct' value
+ * is present in the viridian enlightenment enumeration.
+ */
+#define LIBXL_HAVE_VIRIDIAN_STIMER_DIRECT 1
+
/*
* LIBXL_HAVE_BUILDINFO_HVM_ACPI_LAPTOP_SLATE indicates that
* libxl_domain_build_info has the u.hvm.acpi_laptop_slate field.
diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_types.idl
index a7893460f013..95075f04fe45 100644
--- a/tools/libs/light/libxl_types.idl
+++ b/tools/libs/light/libxl_types.idl
@@ -260,6 +260,7 @@ libxl_viridian_enlightenment = Enumeration("viridian_enlightenment", [
(10, "ex_processor_masks"),
(11, "no_vp_limit"),
(12, "cpu_hotplug"),
+ (13, "stimer_direct"),
])
libxl_hdtype = Enumeration("hdtype", [
diff --git a/tools/libs/light/libxl_x86.c b/tools/libs/light/libxl_x86.c
index 60d4e8661c93..9e8b48372d63 100644
--- a/tools/libs/light/libxl_x86.c
+++ b/tools/libs/light/libxl_x86.c
@@ -389,6 +389,11 @@ static int hvm_set_viridian_features(libxl__gc *gc, uint32_t domid,
if (libxl_bitmap_test(&enlightenments, LIBXL_VIRIDIAN_ENLIGHTENMENT_CPU_HOTPLUG))
mask |= HVMPV_cpu_hotplug;
+ if (libxl_bitmap_test(&enlightenments,
+ LIBXL_VIRIDIAN_ENLIGHTENMENT_STIMER_DIRECT))
+ mask |= HVMPV_time_ref_count | HVMPV_synic | HVMPV_stimer |
+ HVMPV_stimer_direct;
+
if (mask != 0 &&
xc_hvm_param_set(CTX->xch,
domid,
--
2.53.0
next prev parent reply other threads:[~2026-09-04 14:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 14:15 [PATCH v2 0/3] Viridian changes for Hyper-V as a guest Ross Lagerwall
2026-09-04 14:15 ` [PATCH v2 1/3] x86/viridian: Workaround Hyper-V GP fault writing to MSR Ross Lagerwall
2026-09-04 14:53 ` Roger Pau Monné
2026-09-08 9:26 ` Ross Lagerwall
2026-09-04 14:15 ` [PATCH v2 2/3] x86/viridian: Implement synthetic timer direct mode Ross Lagerwall
2026-09-04 15:15 ` Roger Pau Monné
2026-09-07 8:57 ` Jan Beulich
2026-09-09 10:59 ` Ross Lagerwall
2026-09-07 9:02 ` Jan Beulich
2026-09-04 14:15 ` Ross Lagerwall [this message]
2026-09-04 23:20 ` [PATCH v2 3/3] tools/libxl: Add support for Viridian stimer " Tu Dinh
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=20260904141516.367862-4-ross.lagerwall@citrix.com \
--to=ross.lagerwall@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jgross@suse.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.