From 1b917fef1a54e2844e097402f4dfd1cc27e3e7cf Mon Sep 17 00:00:00 2001 From: Julian Vetter Date: Mon, 27 Jul 2026 11:11:29 +0200 Subject: [PATCH] tools/ocaml: Fill arch_config for ARM in domain_getinfo{,list}() 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. Fixes: 9d683b5e375d ("tools/ocaml: Expose arch_config in domaininfo") Fixes: 81838c9067ab ("ocaml: fix arm build") Signed-off-by: Julian Vetter Signed-off-by: Andrew Cooper Reviewed-by: Teddy Astie Release-Acked-by: Oleksii Kurochko (cherry picked from commit 01b4b39e2eaf2991024190adcc0e015b3d77ec41) --- tools/ocaml/libs/xc/xenctrl_stubs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index 4b8ba5b004..ce93bc65f0 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -431,7 +431,19 @@ 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 = 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 */