Skip to content

Commit 6b9b789

Browse files
committed
CA-85168: xapi deal with memory values in bytes, xenops in KiB
Signed-off-by: Thomas Gazagnaire <[email protected]>
1 parent d9cfc92 commit 6b9b789

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ocaml/xapi/xapi_xenops.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ let manage_dom0 dbg =
11411141
(* Tell xenopsd to manage domain 0 *)
11421142
let uuid = Xapi_inventory.lookup Xapi_inventory._control_domain_uuid in
11431143
let di = Vmopshelpers.with_xc (fun xc -> Xenctrl.domain_getinfo xc 0) in
1144-
let memory_actual_kib = Xenctrl.pages_to_kib (Int64.of_nativeint di.Xenctrl.total_memory_pages) in
1144+
let memory_actual_bytes = Xenctrl.pages_to_kib Int64.(mul (of_nativeint di.Xenctrl.total_memory_pages) 1024L) in
11451145
let open Vm in
11461146
if not(vm_exists_in_xenopsd dbg uuid)
11471147
then begin
@@ -1159,9 +1159,9 @@ let manage_dom0 dbg =
11591159
};
11601160
suppress_spurious_page_faults = false;
11611161
machine_address_size = None;
1162-
memory_static_max = memory_actual_kib;
1163-
memory_dynamic_max = memory_actual_kib;
1164-
memory_dynamic_min = memory_actual_kib;
1162+
memory_static_max = memory_actual_bytes;
1163+
memory_dynamic_max = memory_actual_bytes;
1164+
memory_dynamic_min = memory_actual_bytes;
11651165
vcpu_max = 0;
11661166
vcpus = 0;
11671167
scheduler_params = { priority = None; affinity = [] };

0 commit comments

Comments
 (0)