Skip to content

Commit 6d07929

Browse files
committed
CA-422187: safer defaults for global claims
Xen may have already allocated some memory for the domain, and the overhead is only an estimate. A global claim failing is a hard failure, so instead use a more conservative estimate: `memory.build_start_mib`. This is similar to `required_host_free_mib`, but doesn't take ovearhead into account. Fixes: 060d792 ("CA-422188: either always use claims or never use claims") Signed-off-by: Edwin Török <[email protected]>
1 parent 89af93c commit 6d07929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ocaml/xenopsd/xc/domain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ let build_pre ~xc ~xs ~vcpus ~memory ~hard_affinity domid =
10631063
Xenops_server.cores_of_numa_affinity_policy pin ~vcpus
10641064
in
10651065
let memory =
1066-
Int64.(mul memory.required_host_free_mib (shift_left 1L 20))
1066+
Int64.(mul memory.build_start_mib (shift_left 1L 20))
10671067
in
10681068
match numa_placement domid ~vcpus ~cores ~memory affinity with
10691069
| None ->

0 commit comments

Comments
 (0)