|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] tools/ocaml: Fill arch_config for ARM in domain_getinfo{,list}()
commit 01b4b39e2eaf2991024190adcc0e015b3d77ec41
Author: Julian Vetter <julian.vetter@xxxxxxxxxx>
AuthorDate: Mon Jul 27 11:11:29 2026 +0200
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Jul 29 13:38:22 2026 +0100
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 <julian.vetter@xxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
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 de66f5989a..4a45a31c28 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -444,7 +444,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 */
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |