@@ -86,6 +86,7 @@ type domctl_create_config =
max_maptrack_frames: int;
max_grant_version: int;
altp2m_opts: int32;
+ altp2m_count: int32;
vmtrace_buf_kb: int32;
cpupool_id: int32;
arch: arch_domainconfig;
@@ -78,6 +78,7 @@ type domctl_create_config = {
max_maptrack_frames: int;
max_grant_version: int;
altp2m_opts: int32;
+ altp2m_count: int32;
vmtrace_buf_kb: int32;
cpupool_id: int32;
arch: arch_domainconfig;
@@ -211,13 +211,22 @@ CAMLprim value stub_xc_domain_create(value xch_val, value wanted_domid, value co
#define VAL_MAX_MAPTRACK_FRAMES Field(config, 7)
#define VAL_MAX_GRANT_VERSION Field(config, 8)
#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)
+#define VAL_ALTP2M_COUNT Field(config, 10)
+#define VAL_VMTRACE_BUF_KB Field(config, 11)
+#define VAL_CPUPOOL_ID Field(config, 12)
+#define VAL_ARCH Field(config, 13)
uint32_t domid = Int_val(wanted_domid);
+ uint32_t altp2m_opts = Int32_val(VAL_ALTP2M_OPTS);
+ uint32_t altp2m_nr = Int32_val(VAL_ALTP2M_COUNT);
uint64_t vmtrace_size = Int32_val(VAL_VMTRACE_BUF_KB);
+ if ( altp2m_opts != (uint16_t)altp2m_opts )
+ caml_invalid_argument("altp2m_opts");
+
+ if ( altp2m_nr != (uint16_t)altp2m_nr )
+ caml_invalid_argument("altp2m_count");
+
vmtrace_size = ROUNDUP(vmtrace_size << 10, XC_PAGE_SHIFT);
if ( vmtrace_size != (uint32_t)vmtrace_size )
caml_invalid_argument("vmtrace_buf_kb");
@@ -232,7 +241,8 @@ CAMLprim value stub_xc_domain_create(value xch_val, value wanted_domid, value co
.grant_opts =
XEN_DOMCTL_GRANT_version(Int_val(VAL_MAX_GRANT_VERSION)),
.altp2m = {
- .opts = Int32_val(VAL_ALTP2M_OPTS),
+ .opts = altp2m_opts,
+ .nr = altp2m_nr,
},
.vmtrace_size = vmtrace_size,
.cpupool_id = Int32_val(VAL_CPUPOOL_ID),
@@ -292,6 +302,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_COUNT
#undef VAL_ALTP2M_OPTS
#undef VAL_MAX_GRANT_VERSION
#undef VAL_MAX_MAPTRACK_FRAMES