]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
libxl: fix "xl mem-set" regression from 0c029c4da2
authorJan Beulich <JBeulich@suse.com>
Wed, 22 Apr 2015 12:02:16 +0000 (13:02 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 May 2015 14:16:11 +0000 (15:16 +0100)
commitf5b43e95facdc17f925cb56a8963cd4531074034
tree1c00223b2b02db58591ecdc1faed241ab2829a0d
parentab373fcac40a50fcb35cf7a6ccd0243d7cd18ee0
libxl: fix "xl mem-set" regression from 0c029c4da2

Said commit ("libxl_set_memory_target: retain the same maxmem offset on
top of the current target") caused a regression for "xl mem-set"
against Dom0: While prior to creation of the first domain this works,
the first domain creation involving ballooning breaks. Due to "enforce"
not being set in the domain creation case, and due to Dom0's initial
->max_pages (in the hypervisor) being UINT_MAX, the calculation of
"memorykb" in the first "xl mem-set" adusting the target upwards
subsequent to domain creation and termination may cause an overflow,
resulting in Dom0's maximum getting to a very small value. This small
maximum will the make the subsequent setting of the PoD target fail.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_domain.c
tools/libxl/libxl.c