From da9b3211231bb8b5e2aeaa60cb700d9fef61ac55 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Wed, 26 Jan 2011 17:39:04 +0000 Subject: [PATCH] [CA-46591] Prevents build_pre from overwriting xen_maxmem. Signed-off-by: Jonathan Knowles Previously, during a VM.resume, both of the following functions would overwrite xen_maxmem: 1. transfer_reservation_to_domain: xen_maxmex := reservation 2. build_pre: xen_maxmem := static_max However, only the first assignment was correct. All domain creation operations trigger the transfer_reservation_to_domain function. Therefore it is safe to remove the second, faulty assignment. --- ocaml/xenops/domain.ml | 1 - 1 file changed, 1 deletion(-) diff --git a/ocaml/xenops/domain.ml b/ocaml/xenops/domain.ml index 3c9b8c31..fbc1c6d6 100644 --- a/ocaml/xenops/domain.ml +++ b/ocaml/xenops/domain.ml @@ -415,7 +415,6 @@ let build_pre ~xc ~xs ~vcpus ~xen_max_mib ~shadow_mib ~required_host_free_mib do Xc.domain_setvmxassist xc domid use_vmxassist; Xc.domain_max_vcpus xc domid vcpus; - Xc.domain_setmaxmem xc domid (Memory.kib_of_mib xen_max_mib); Xc.domain_set_memmap_limit xc domid (Memory.kib_of_mib xen_max_mib); Xc.shadow_allocation_set xc domid shadow_mib; create_channels ~xc domid -- 2.39.5