]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/ocaml: Add missing ocaml bindings for altp2m_opts
authorPetr Beneš <w1benny@gmail.com>
Thu, 1 Aug 2024 07:37:32 +0000 (09:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 1 Aug 2024 07:37:32 +0000 (09:37 +0200)
Fixes: 0291089f6ea8 ("xen: enable altp2m at create domain domctl")
Signed-off-by: Petr Beneš <w1benny@gmail.com>
Acked-by: Christian Lindig <christian.lindig@cloud.com>
tools/ocaml/libs/xc/xenctrl.ml
tools/ocaml/libs/xc/xenctrl.mli
tools/ocaml/libs/xc/xenctrl_stubs.c

index 55923857ec0a593ebd73ff60a25b8bdf34873c94..2690f9a92316b812ad3d3ff0e1c36823070adb4a 100644 (file)
@@ -85,6 +85,7 @@ type domctl_create_config =
     max_grant_frames: int;
     max_maptrack_frames: int;
     max_grant_version: int;
+    altp2m_opts: int32;
     vmtrace_buf_kb: int32;
     cpupool_id: int32;
     arch: arch_domainconfig;
index 9b4b45db3a6d0d2a2ffd6f5b0f8cb26b1479a86a..febbe1f6ae3f10c5abe45eaa3c06a8a67d9ba268 100644 (file)
@@ -77,6 +77,7 @@ type domctl_create_config = {
   max_grant_frames: int;
   max_maptrack_frames: int;
   max_grant_version: int;
+  altp2m_opts: int32;
   vmtrace_buf_kb: int32;
   cpupool_id: int32;
   arch: arch_domainconfig;
index e86c4558028c3dfd421fa16d83573e6e17394308..a529080129601072b1743e7d31a4aa338b986bf7 100644 (file)
@@ -210,9 +210,10 @@ CAMLprim value stub_xc_domain_create(value xch_val, value wanted_domid, value co
 #define VAL_MAX_GRANT_FRAMES    Field(config, 6)
 #define VAL_MAX_MAPTRACK_FRAMES Field(config, 7)
 #define VAL_MAX_GRANT_VERSION   Field(config, 8)
-#define VAL_VMTRACE_BUF_KB      Field(config, 9)
-#define VAL_CPUPOOL_ID          Field(config, 10)
-#define VAL_ARCH                Field(config, 11)
+#define VAL_ALTP2M_OPTS         Field(config, 9)
+#define VAL_VMTRACE_BUF_KB      Field(config, 10)
+#define VAL_CPUPOOL_ID          Field(config, 11)
+#define VAL_ARCH                Field(config, 12)
 
        uint32_t domid = Int_val(wanted_domid);
        uint64_t vmtrace_size = Int32_val(VAL_VMTRACE_BUF_KB);
@@ -230,6 +231,7 @@ CAMLprim value stub_xc_domain_create(value xch_val, value wanted_domid, value co
                .max_maptrack_frames = Int_val(VAL_MAX_MAPTRACK_FRAMES),
                .grant_opts =
                    XEN_DOMCTL_GRANT_version(Int_val(VAL_MAX_GRANT_VERSION)),
+               .altp2m_opts = Int32_val(VAL_ALTP2M_OPTS),
                .vmtrace_size = vmtrace_size,
                .cpupool_id = Int32_val(VAL_CPUPOOL_ID),
        };
@@ -288,6 +290,7 @@ CAMLprim value stub_xc_domain_create(value xch_val, value wanted_domid, value co
 #undef VAL_ARCH
 #undef VAL_CPUPOOL_ID
 #undef VAL_VMTRACE_BUF_KB
+#undef VAL_ALTP2M_OPTS
 #undef VAL_MAX_GRANT_VERSION
 #undef VAL_MAX_MAPTRACK_FRAMES
 #undef VAL_MAX_GRANT_FRAMES