From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Julian Vetter <julian.vetter@vates.tech>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Andrii Sultanov <andriy.sultanov@vates.tech>,
Guillaume Thouvenin <guillaume.thouvenin@vates.tech>,
Oleksii Kurochko <oleksii.kurochko@gmail.com>
Subject: [PATCH 2/2] tools/ocaml: Fill arch_config for ARM in domain_getinfo{,list}()
Date: Tue, 28 Jul 2026 16:48:30 +0100 [thread overview]
Message-ID: <20260728154830.67734-3-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <20260728154830.67734-1-andrew.cooper3@citrix.com>
From: Julian Vetter <julian.vetter@vates.tech>
Add the missing ARM logic, populating xen_arm_arch_domainconfig
from the raw xc_domaininfo_t the same way the x86 branch does for
xen_x86_arch_domainconfig.
Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Andrii Sultanov <andriy.sultanov@vates.tech>
CC: Guillaume Thouvenin <guillaume.thouvenin@vates.tech>
CC: Julian Vetter <julian.vetter@vates.tech>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
tools/ocaml/libs/xc/xenctrl_stubs.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
index 441e1d83cfec..fb983709066f 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -444,9 +444,21 @@ static value alloc_domaininfo(xc_domaininfo_t * info)
Store_field(result, 15, tmp);
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__arm__) || defined(__aarch64__)
- tag = 1; /* tag x86 */
+ tag = 0; /* tag ARM */
+
+ /* xen_arm_arch_domainconfig */
+ arch_config = caml_alloc_tuple(3);
+ Field(arch_config, 0) = Val_int(info->arch_config.gic_version);
+ Field(arch_config, 1) = Val_int(info->arch_config.nr_spis);
+
+ tmp = caml_copy_int32(info->arch_config.clock_frequency);
+ Field(arch_config, 2) = tmp;
+
+#elif defined(__i386__) || defined(__x86_64__)
+
+ tag = 1; /* tag x86 */
/*
* emulation_flags: x86_arch_emulation_flags list;
--
2.39.5
next prev parent reply other threads:[~2026-07-28 15:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 15:48 [PATCH for-4.22 0/2] tools/ocaml: Fixes to Xenctrl.domain_getinfo{,list}() Andrew Cooper
2026-07-28 15:48 ` [PATCH 1/2] tools/ocaml: Fix crash in Xenctrl.domain_getinfo{,list} on ARM Andrew Cooper
2026-07-29 6:03 ` Jan Beulich
2026-07-29 8:51 ` Andrew Cooper
2026-07-29 11:46 ` Teddy Astie
2026-07-29 11:57 ` Andrew Cooper
2026-07-28 15:48 ` Andrew Cooper [this message]
2026-07-28 15:52 ` [PATCH 2/2] tools/ocaml: Fill arch_config for ARM in domain_getinfo{,list}() Jan Beulich
2026-07-28 15:53 ` Andrew Cooper
2026-07-29 11:49 ` Teddy Astie
2026-07-28 15:50 ` [PATCH for-4.22 0/2] tools/ocaml: Fixes to Xenctrl.domain_getinfo{,list}() Oleksii Kurochko
2026-07-28 19:36 ` Andrew Cooper
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=20260728154830.67734-3-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=andriy.sultanov@vates.tech \
--cc=guillaume.thouvenin@vates.tech \
--cc=julian.vetter@vates.tech \
--cc=oleksii.kurochko@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.