From e3b4ca21b2039e23215eeb0b18097d7edcccc13b Mon Sep 17 00:00:00 2001 From: Taku Izumi Date: Fri, 8 Apr 2011 14:07:27 +0900 Subject: [PATCH] maxmem: introduces VIR_DOMAIN_MEM_MAXIMUM flag This patch introduces VIR_DOMAIN_MEM_MAXIMUM flag. Signed-off-by: Taku Izumi --- include/libvirt/libvirt.h.in | 1 + src/libvirt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index d7654120d1..04b7fbf2c8 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -857,6 +857,7 @@ typedef enum { VIR_DOMAIN_MEM_CURRENT = 0, /* affect current domain state */ VIR_DOMAIN_MEM_LIVE = (1 << 0), /* affect active domain */ VIR_DOMAIN_MEM_CONFIG = (1 << 1), /* affect next boot */ + VIR_DOMAIN_MEM_MAXIMUM = (1 << 2), /* affect Max rather than current */ } virDomainMemoryModFlags; diff --git a/src/libvirt.c b/src/libvirt.c index abde7db80b..4a396955ba 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -2832,6 +2832,8 @@ error: * (that is, @flags is VIR_DOMAIN_MEM_CURRENT), then an inactive domain * modifies persistent setup, while an active domain is hypervisor-dependent * on whether just live or both live and persistent state is changed. + * If VIR_DOMAIN_MEM_MAXIMUM is set, the change affects domain's maximum memory + * size rather than current memory size. * Not all hypervisors can support all flag combinations. * * Returns 0 in case of success, -1 in case of failure. -- GitLab