From: Jonathan Knowles Date: Wed, 26 Jan 2011 17:39:04 +0000 (+0000) Subject: [CA-46591] Prevents build_pre from overwriting xen_maxmem. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=da9b3211231bb8b5e2aeaa60cb700d9fef61ac55;p=xcp%2Fxen-api.git [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. --- 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