SHA256
1
0
forked from pool/libvirt
libvirt/ff225538-libxl-autoballoon-setting.patch
James Fehlig f167ba3466 Accepting request 456194 from home:jfehlig:branches:Virtualization
- apparmor: don't fail on non-apparmor <seclabel>
  apparmor-errormsg-fix.patch, apparmor-alt-seclabel.patch
  bsc#1023436

- libxl: fix reporting of domain maximum memory
  ff225538-libxl-autoballoon-setting.patch,
  c89a6e78-libxl-physinfo-cleanup.patch,
  d2b77608-libxl-maxmem-fix.patch,
  79692c38-libxl-dom0-maxmem.patch
  bsc#1017762

- libxl: set disk format to raw if not specified and fix disk
  detach
  321a28c6-libxl-default-disk-format.patch,
  bd116810-libxl-fix-disk-detach.patch
  bsc#1003379

- libxl: fix timer configurations
  6e4759d0-libxl-timer-fix.patch,
  87df87e0-libxl-timer-tsc-emulate.patch,
  b4386fda-xenconfig-timer-fix.patch, d3970925-timer-tests.patch
  bsc#1019969

OBS-URL: https://build.opensuse.org/request/show/456194
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=583
2017-02-10 23:01:12 +00:00

33 lines
1.2 KiB
Diff

commit ff225538d42f8e50bbc2c1c74d0a882ebaa73cd4
Author: Jim Fehlig <jfehlig@suse.com>
Date: Mon Jan 30 11:43:15 2017 -0700
libxl: honor autoballoon setting in libxl.conf
libxlGetAutoballoonConf is supposed to honor user-specified
autoballoon setting in libxl.conf. As written, the user-specified
setting could be overwritten by the subsequent logic to check
dom0_mem parameter. If user-specified setting is present and
correct, accept it. Only fallback to checking Xen dom0_mem
command line parameter if user-specfied setting is not present.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
@@ -1381,8 +1381,11 @@ libxlGetAutoballoonConf(libxlDriverConfi
regex_t regex;
int res;
- if (virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon) < 0)
+ res = virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon);
+ if (res < 0)
return -1;
+ else if (res == 1)
+ return 0;
if ((res = regcomp(&regex,
"(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )",