[libvirt] [PATCH] Prefer C style comments over C++ ones
by Matthias Bolte
Pure cosmetic change.
---
daemon/libvirtd.c | 4 ++--
daemon/remote.c | 4 ++--
src/conf/nwfilter_conf.c | 22 +++++++++++-----------
src/conf/nwfilter_conf.h | 2 +-
src/conf/storage_conf.c | 4 ++--
src/lxc/lxc_container.c | 6 +++---
src/nwfilter/nwfilter_ebiptables_driver.c | 6 +++---
src/nwfilter/nwfilter_ebiptables_driver.h | 2 +-
src/nwfilter/nwfilter_gentech_driver.c | 12 ++++++------
src/nwfilter/nwfilter_learnipaddr.c | 10 +++++-----
src/opennebula/one_conf.c | 4 ++--
src/opennebula/one_driver.c | 6 +++---
src/openvz/openvz_conf.c | 2 +-
src/openvz/openvz_driver.c | 8 ++++----
src/remote/remote_driver.c | 14 +++++++-------
src/test/test_driver.c | 2 +-
src/util/macvtap.c | 14 +++++++-------
src/util/macvtap.h | 2 +-
src/vmx/vmx.c | 29 +++++++----------------------
src/xen/xen_hypervisor.c | 2 +-
src/xen/xend_internal.c | 8 ++++----
src/xen/xs_internal.c | 10 +++++-----
src/xenapi/xenapi_driver.c | 1 -
src/xenapi/xenapi_driver_private.h | 2 +-
24 files changed, 80 insertions(+), 96 deletions(-)
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index afc5c08..f4b3327 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -614,7 +614,7 @@ static int qemudListenUnix(struct qemud_server *server,
return -1;
}
-// See: http://people.redhat.com/drepper/userapi-ipv6.html
+/* See: http://people.redhat.com/drepper/userapi-ipv6.html */
static int
remoteMakeSockets (int *fds, int max_fds, int *nfds_r, const char *node, const char *service)
{
@@ -1152,7 +1152,7 @@ remoteCheckDN (const char *dname)
/* Print the client's DN. */
DEBUG(_("remoteCheckDN: failed: client DN is %s"), dname);
- return 0; // Not found.
+ return 0; /* Not found. */
}
static int
diff --git a/daemon/remote.c b/daemon/remote.c
index 9dba325..aa6a1a4 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -790,7 +790,7 @@ remoteDispatchDomainGetSchedulerParameters (struct qemud_server *server ATTRIBUT
goto oom;
for (i = 0; i < nparams; ++i) {
- // remoteDispatchClientRequest will free this:
+ /* remoteDispatchClientRequest will free this: */
ret->params.params_val[i].field = strdup (params[i].field);
if (ret->params.params_val[i].field == NULL)
goto oom;
@@ -2511,7 +2511,7 @@ remoteDispatchDomainGetMemoryParameters(struct qemud_server *server
goto oom;
for (i = 0; i < nparams; ++i) {
- // remoteDispatchClientRequest will free this:
+ /* remoteDispatchClientRequest will free this: */
ret->params.params_val[i].field = strdup(params[i].field);
if (ret->params.params_val[i].field == NULL)
goto oom;
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index dbb72b2..a5703cb 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -428,11 +428,11 @@ typedef bool (*valueFormatter)(virBufferPtr buf,
typedef struct _virXMLAttr2Struct virXMLAttr2Struct;
struct _virXMLAttr2Struct
{
- const char *name; // attribute name
+ const char *name; /* attribute name */
enum attrDatatype datatype;
- int dataIdx; // offset of the hasXYZ boolean
- valueValidator validator; // beyond-standard checkers
- valueFormatter formatter; // beyond-standard formatter
+ int dataIdx; /* offset of the hasXYZ boolean */
+ valueValidator validator; /* beyond-standard checkers */
+ valueFormatter formatter; /* beyond-standard formatter */
size_t maxstrlen;
};
@@ -1494,7 +1494,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node,
case DATATYPE_STRING:
if (!validator) {
- // not supported
+ /* not supported */
rc = -1;
break;
}
@@ -2314,7 +2314,7 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
err = cb.err;
if (err) {
- cb.step = STEP_TEAR_NEW; // rollback
+ cb.step = STEP_TEAR_NEW; /* rollback */
cb.err = 0;
for (i = 0; i < nCallbackDriver; i++)
@@ -2322,7 +2322,7 @@ virNWFilterTriggerVMFilterRebuild(virConnectPtr conn)
virNWFilterDomainFWUpdateCB,
&cb);
} else {
- cb.step = STEP_TEAR_OLD; // switch over
+ cb.step = STEP_TEAR_OLD; /* switch over */
for (i = 0; i < nCallbackDriver; i++)
callbackDrvArray[i]->vmFilterRebuild(conn,
@@ -2345,7 +2345,7 @@ virNWFilterTestUnassignDef(virConnectPtr conn,
virNWFilterLockFilterUpdates();
nwfilter->wantRemoved = 1;
- // trigger the update on VMs referencing the filter
+ /* trigger the update on VMs referencing the filter */
if (virNWFilterTriggerVMFilterRebuild(conn))
rc = 1;
@@ -2385,7 +2385,7 @@ virNWFilterObjAssignDef(virConnectPtr conn,
if ((nwfilter = virNWFilterObjFindByName(nwfilters, def->name))) {
virNWFilterLockFilterUpdates();
nwfilter->newDef = def;
- // trigger the update on VMs referencing the filter
+ /* trigger the update on VMs referencing the filter */
if (virNWFilterTriggerVMFilterRebuild(conn)) {
nwfilter->newDef = NULL;
virNWFilterUnlockFilterUpdates();
@@ -2454,7 +2454,7 @@ virNWFilterObjLoad(virConnectPtr conn,
return NULL;
}
- VIR_FREE(nwfilter->configFile); // for driver reload
+ VIR_FREE(nwfilter->configFile); /* for driver reload */
nwfilter->configFile = strdup(path);
if (nwfilter->configFile == NULL) {
virReportOOMError();
@@ -2685,7 +2685,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
asHex = true;
case DATATYPE_IPMASK:
case DATATYPE_IPV6MASK:
- // display all masks in CIDR format
+ /* display all masks in CIDR format */
case DATATYPE_UINT8:
virBufferVSprintf(buf, asHex ? "0x%x" : "%d",
item->u.u8);
diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h
index b21f5b9..8f8383f 100644
--- a/src/conf/nwfilter_conf.h
+++ b/src/conf/nwfilter_conf.h
@@ -84,7 +84,7 @@ enum virNWFilterEntryItemFlags {
# define ENTRY_GET_NEG_SIGN(data) \
((((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_IS_NEG) ? "!" : "")
-// datatypes appearing in rule attributes
+/* datatypes appearing in rule attributes */
enum attrDatatype {
DATATYPE_UINT16 = (1 << 0),
DATATYPE_UINT8 = (1 << 1),
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index 0c37dc6..6e3fe0e 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -1435,14 +1435,14 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools,
return NULL;
}
- VIR_FREE(pool->configFile); // for driver reload
+ VIR_FREE(pool->configFile); /* for driver reload */
pool->configFile = strdup(path);
if (pool->configFile == NULL) {
virReportOOMError();
virStoragePoolDefFree(def);
return NULL;
}
- VIR_FREE(pool->autostartLink); // for driver reload
+ VIR_FREE(pool->autostartLink); /* for driver reload */
pool->autostartLink = strdup(autostartLink);
if (pool->autostartLink == NULL) {
virReportOOMError();
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 7013667..876bc62 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -281,7 +281,7 @@ error_out:
}
-//_syscall2(int, pivot_root, char *, newroot, const char *, oldroot)
+/*_syscall2(int, pivot_root, char *, newroot, const char *, oldroot)*/
extern int pivot_root(const char * new_root,const char * put_old);
static int lxcContainerChildMountSort(const void *a, const void *b)
@@ -526,7 +526,7 @@ static int lxcContainerMountNewFS(virDomainDefPtr vmDef)
char *src;
if (STREQ(vmDef->fss[i]->dst, "/"))
continue;
- // XXX fix
+ /* XXX fix */
if (vmDef->fss[i]->type != VIR_DOMAIN_FS_TYPE_MOUNT)
continue;
@@ -650,7 +650,7 @@ static int lxcContainerSetupExtraMounts(virDomainDefPtr vmDef)
return -1;
}
for (i = 0 ; i < vmDef->nfss ; i++) {
- // XXX fix to support other mount types
+ /* XXX fix to support other mount types */
if (vmDef->fss[i]->type != VIR_DOMAIN_FS_TYPE_MOUNT)
continue;
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c
index 91a9159..1b8730d 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -997,7 +997,7 @@ iptablesHandleIpHdr(virBufferPtr buf,
if (HAS_ENTRY_ITEM(&ipHdr->dataConnlimitAbove)) {
if (directionIn) {
- // only support for limit in outgoing dir.
+ /* only support for limit in outgoing dir. */
*skipRule = true;
} else {
if (printDataType(vars,
@@ -3320,7 +3320,7 @@ ebiptablesApplyNewRules(virConnectPtr conn ATTRIBUTE_UNUSED,
if (chains_out & (1 << VIR_NWFILTER_CHAINSUFFIX_IPv6))
ebtablesCreateTmpSubChain(&buf, 0, ifname, L3_PROTO_IPV6_IDX, 1);
- // keep arp,rarp as last
+ /* keep arp,rarp as last */
if (chains_in & (1 << VIR_NWFILTER_CHAINSUFFIX_ARP))
ebtablesCreateTmpSubChain(&buf, 1, ifname, L3_PROTO_ARP_IDX, 1);
if (chains_out & (1 << VIR_NWFILTER_CHAINSUFFIX_ARP))
@@ -3503,7 +3503,7 @@ ebiptablesTearOldRules(virConnectPtr conn ATTRIBUTE_UNUSED,
int cli_status;
virBuffer buf = VIR_BUFFER_INITIALIZER;
- // switch to new iptables user defined chains
+ /* switch to new iptables user defined chains */
if (iptables_cmd_path) {
iptablesUnlinkRootChains(iptables_cmd_path, &buf, ifname);
iptablesRemoveRootChains(iptables_cmd_path, &buf, ifname);
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.h b/src/nwfilter/nwfilter_ebiptables_driver.h
index 5ee826e..ff3de3c 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.h
+++ b/src/nwfilter/nwfilter_ebiptables_driver.h
@@ -36,7 +36,7 @@ typedef ebiptablesRuleInst *ebiptablesRuleInstPtr;
struct _ebiptablesRuleInst {
char *commandTemplate;
enum virNWFilterChainSuffixType neededProtocolChain;
- char chainprefix; // I for incoming, O for outgoing
+ char chainprefix; /* I for incoming, O for outgoing */
unsigned int priority;
enum RuleType ruleType;
};
diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index 4361c8a..e64c3ec 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -363,7 +363,7 @@ _virNWFilterInstantiateRec(virConnectPtr conn,
break;
}
- // create a temporary hashmap for depth-first tree traversal
+ /* create a temporary hashmap for depth-first tree traversal */
virNWFilterHashTablePtr tmpvars =
virNWFilterCreateVarsFrom(inc->params,
vars);
@@ -433,7 +433,7 @@ virNWFilterDetermineMissingVarsRec(virConnectPtr conn,
virNWFilterRuleDefPtr rule = filter->filterEntries[i]->rule;
virNWFilterIncludeDefPtr inc = filter->filterEntries[i]->include;
if (rule) {
- // check all variables of this rule
+ /* check all variables of this rule */
for (j = 0; j < rule->nvars; j++) {
if (!virHashLookup(vars->hashTable, rule->vars[j])) {
virNWFilterHashTablePut(missing_vars, rule->vars[j],
@@ -454,7 +454,7 @@ virNWFilterDetermineMissingVarsRec(virConnectPtr conn,
break;
}
- // create a temporary hashmap for depth-first tree traversal
+ /* create a temporary hashmap for depth-first tree traversal */
virNWFilterHashTablePtr tmpvars =
virNWFilterCreateVarsFrom(inc->params,
vars);
@@ -879,10 +879,10 @@ virNWFilterInstantiateFilterLate(virConnectPtr conn,
true,
&foundNewFilter);
if (rc) {
- //something went wrong... 'DOWN' the interface
+ /* something went wrong... 'DOWN' the interface */
if (ifaceCheck(false, ifname, NULL, ifindex) != 0 ||
ifaceDown(ifname)) {
- // assuming interface disappeared...
+ /* assuming interface disappeared... */
_virNWFilterTeardownFilter(ifname);
}
}
@@ -1033,7 +1033,7 @@ virNWFilterDomainFWUpdateCB(void *payload,
net,
&skipIface);
if (cb->err == 0 && skipIface == true) {
- // filter tree unchanged -- no update needed
+ /* filter tree unchanged -- no update needed */
cb->err = virHashAddEntry(cb->skipInterfaces,
net->ifname,
(void *)~0);
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 15473fb..c593481 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -538,7 +538,7 @@ learnIPAddressThread(void *arg)
if (memcmp(ether_hdr->ether_shost,
req->macaddr,
VIR_MAC_BUFLEN) == 0) {
- // packets from the VM
+ /* packets from the VM */
if (etherType == ETHERTYPE_IP &&
(header.len >= ethHdrSize +
@@ -546,9 +546,9 @@ learnIPAddressThread(void *arg)
struct iphdr *iphdr = (struct iphdr*)(packet +
ethHdrSize);
vmaddr = iphdr->saddr;
- // skip mcast addresses (224.0.0.0 - 239.255.255.255),
- // class E (240.0.0.0 - 255.255.255.255, includes eth.
- // bcast) and zero address in DHCP Requests
+ /* skip mcast addresses (224.0.0.0 - 239.255.255.255),
+ * class E (240.0.0.0 - 255.255.255.255, includes eth.
+ * bcast) and zero address in DHCP Requests */
if ( (ntohl(vmaddr) & 0xe0000000) == 0xe0000000 ||
vmaddr == 0) {
vmaddr = 0;
@@ -575,7 +575,7 @@ learnIPAddressThread(void *arg)
} else if (memcmp(ether_hdr->ether_dhost,
req->macaddr,
VIR_MAC_BUFLEN) == 0) {
- // packets to the VM
+ /* packets to the VM */
if (etherType == ETHERTYPE_IP &&
(header.len >= ethHdrSize +
sizeof(struct iphdr))) {
diff --git a/src/opennebula/one_conf.c b/src/opennebula/one_conf.c
index 60afca5..9f0ed26 100644
--- a/src/opennebula/one_conf.c
+++ b/src/opennebula/one_conf.c
@@ -191,7 +191,7 @@ char* xmlOneTemplate(virDomainDefPtr def)
}
/* set Disks & NICS */
for (i=0 ; i < def->ndisks ; i++) {
- // missing source is only allowed at cdrom and floppy
+ /* missing source is only allowed at cdrom and floppy */
if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
virBufferVSprintf(&buf, "DISK=[ type = disk,\n"
"\tsource = \"%s\",\n",
@@ -269,7 +269,7 @@ char* xmlOneTemplate(virDomainDefPtr def)
virBufferAddLit(&buf," ]\n");
}
- else //graphics.type==VIR_DOMAIN_GRAPHICS_TYPE_SDL
+ else /* graphics.type==VIR_DOMAIN_GRAPHICS_TYPE_SDL */
virBufferAddLit(&buf,"GRAPHICS = [\n type = \"sdl\" ]\n");
}
diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c
index 4febb46..6945f91 100644
--- a/src/opennebula/one_driver.c
+++ b/src/opennebula/one_driver.c
@@ -333,7 +333,7 @@ static int oneDomainGetInfo(virDomainPtr dom,
} else {
char vm_info[257];
c_oneVmInfo(vm->pid,vm_info,256);
- //State:
+ /* State: */
char* cptr = strstr(vm_info,"STATE");
cptr = index(cptr, ':');
cptr++;
@@ -357,13 +357,13 @@ static int oneDomainGetInfo(virDomainPtr dom,
default:
break;
};
- //Memory:
+ /* Memory: */
cptr=strstr(vm_info,"MEMORY");
cptr=index(cptr,':');
cptr++;
vm->def->mem.cur_balloon = atoi(cptr);
- //run time:
+ /* run time: */
cptr=strstr(vm_info,"START TIME");
cptr=index(cptr,':');
cptr++;
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index a729f59..dae66a5 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -287,7 +287,7 @@ openvzReadNetworkConf(virDomainDefPtr def,
} else if (STRPREFIX(p, "mac=")) {
p += 4;
len = next - p;
- if (len != 17) { //should be 17
+ if (len != 17) { /* should be 17 */
openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Wrong length MAC address"));
goto error;
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index fc6ae29..1dde004 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -714,7 +714,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
virBuffer buf = VIR_BUFFER_INITIALIZER;
int veid = openvzGetVEID(vpsid);
- //--netif_add ifname[,mac,host_ifname,host_mac]
+ /* --netif_add ifname[,mac,host_ifname,host_mac] */
ADD_ARG_LIT("--netif_add") ;
/* if user doesn't specify guest interface name,
@@ -765,12 +765,12 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
VIR_FREE(opt);
} else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET &&
net->data.ethernet.ipaddr != NULL) {
- //--ipadd ip
+ /* --ipadd ip */
ADD_ARG_LIT("--ipadd") ;
ADD_ARG_LIT(net->data.ethernet.ipaddr) ;
}
- //TODO: processing NAT and physical device
+ /* TODO: processing NAT and physical device */
if (prog[0] != NULL) {
ADD_ARG_LIT("--save");
@@ -882,7 +882,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
goto cleanup;
}
- //TODO: set quota
+ /* TODO: set quota */
if (openvzSetDefinedUUID(strtoI(vm->def->name), vm->def->uuid) < 0) {
openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 840e481..1a91f85 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -589,7 +589,7 @@ doRemoteOpen (virConnectPtr conn,
/*FALLTHROUGH*/
case trans_tcp: {
- // http://people.redhat.com/drepper/userapi-ipv6.html
+ /* http://people.redhat.com/drepper/userapi-ipv6.html */
struct addrinfo *res, *r;
struct addrinfo hints;
int saved_errno = EINVAL;
@@ -656,8 +656,8 @@ doRemoteOpen (virConnectPtr conn,
tcp_connected:
freeaddrinfo (res);
- // NB. All versioning is done by the RPC headers, so we don't
- // need to worry (at this point anyway) about versioning.
+ /* NB. All versioning is done by the RPC headers, so we don't
+ * need to worry (at this point anyway) about versioning. */
break;
}
@@ -748,8 +748,8 @@ doRemoteOpen (virConnectPtr conn,
if (command == NULL)
goto out_of_memory;
- // Generate the final command argv[] array.
- // ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL]
+ /* Generate the final command argv[] array.
+ * ssh [-p $port] [-l $username] $hostname $netcat -U $sockname [NULL] */
if (VIR_ALLOC_N(cmd_argv, nr_args) < 0)
goto out_of_memory;
@@ -2444,7 +2444,7 @@ remoteDomainSetMemoryParameters (virDomainPtr domain,
do_error = 0;
for (i = 0; i < nparams; ++i) {
- // call() will free this:
+ /* call() will free this: */
args.params.params_val[i].field = strdup (params[i].field);
if (args.params.params_val[i].field == NULL) {
virReportOOMError();
@@ -3773,7 +3773,7 @@ remoteDomainSetSchedulerParameters (virDomainPtr domain,
do_error = 0;
for (i = 0; i < nparams; ++i) {
- // call() will free this:
+ /* call() will free this: */
args.params.params_val[i].field = strdup (params[i].field);
if (args.params.params_val[i].field == NULL) {
virReportOOMError();
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index caf823b..15e90c8 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -538,7 +538,7 @@ static int testOpenDefault(virConnectPtr conn) {
memmove(&privconn->nodeInfo, &defaultNodeInfo, sizeof(defaultNodeInfo));
- // Numa setup
+ /* Numa setup */
privconn->numCells = 2;
for (u = 0; u < 2; ++u) {
privconn->cells[u].numCpus = 8;
diff --git a/src/util/macvtap.c b/src/util/macvtap.c
index 96df301..019441c 100644
--- a/src/util/macvtap.c
+++ b/src/util/macvtap.c
@@ -436,7 +436,7 @@ int openTap(const char *ifname,
}
while (1) {
- // may need to wait for udev to be done
+ /* may need to wait for udev to be done */
tapfd = open(tapname, O_RDWR);
if (tapfd < 0 && retries > 0) {
retries--;
@@ -1232,7 +1232,7 @@ doPortProfileOpCommon(bool nltarget_kernel,
status == PORT_VDP_RESPONSE_SUCCESS) {
break;
} else if (status == PORT_PROFILE_RESPONSE_INPROGRESS) {
- // keep trying...
+ /* keep trying... */
} else {
virReportSystemError(EINVAL,
_("error %d during port-profile setlink on "
@@ -1384,11 +1384,11 @@ getPhysfn(const char *linkdev,
if (virtfn) {
- // XXX: if linkdev is SR-IOV VF, then set vf = VF index
- // XXX: and set linkdev = PF device
- // XXX: need to use get_physical_function_linux() or
- // XXX: something like that to get PF
- // XXX: device and figure out VF index
+ /* XXX: if linkdev is SR-IOV VF, then set vf = VF index */
+ /* XXX: and set linkdev = PF device */
+ /* XXX: need to use get_physical_function_linux() or */
+ /* XXX: something like that to get PF */
+ /* XXX: device and figure out VF index */
rc = 1;
diff --git a/src/util/macvtap.h b/src/util/macvtap.h
index 3ae2c24..54205c7 100644
--- a/src/util/macvtap.h
+++ b/src/util/macvtap.h
@@ -47,7 +47,7 @@ struct _virVirtualPortProfileParams {
union {
struct {
uint8_t managerID;
- uint32_t typeID; // 24 bit valid
+ uint32_t typeID; /* 24 bit valid */
uint8_t typeIDVersion;
unsigned char instanceID[VIR_UUID_BUFLEN];
} virtPort8021Qbg;
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 2f574fc..9f4d5fb 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1097,7 +1097,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def,
controller = def->controllers[i];
if (controller->type != VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
- // skip non-SCSI controllers
+ /* skip non-SCSI controllers */
continue;
}
@@ -1114,7 +1114,7 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def,
}
if (! controllerHasDisksAttached) {
- // skip SCSI controllers without attached disks
+ /* skip SCSI controllers without attached disks */
continue;
}
@@ -1122,8 +1122,8 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def,
ctx->autodetectSCSIControllerModel != NULL) {
count = 0;
- // try to autodetect the SCSI controller model by collecting
- // SCSI controller model of all disks attached to this controller
+ /* try to autodetect the SCSI controller model by collecting
+ * SCSI controller model of all disks attached to this controller */
for (k = 0; k < def->ndisks; ++k) {
disk = def->disks[k];
@@ -1139,8 +1139,8 @@ virVMXGatherSCSIControllers(virVMXContext *ctx, virDomainDefPtr def,
}
}
- // autodetection fails when the disks attached to one controller
- // have inconsistent SCSI controller models
+ /* autodetection fails when the disks attached to one controller
+ * have inconsistent SCSI controller models */
for (k = 0; k < count; ++k) {
if (autodetectedModels[k] != autodetectedModels[0]) {
VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
@@ -1379,7 +1379,7 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx)
def->maxvcpus = def->vcpus = numvcpus;
/* vmx:sched.cpu.affinity -> def:cpumask */
- // VirtualMachine:config.cpuAffinity.affinitySet
+ /* NOTE: maps to VirtualMachine:config.cpuAffinity.affinitySet */
if (virVMXGetConfigString(conf, "sched.cpu.affinity", &sched_cpu_affinity,
true) < 0) {
goto cleanup;
@@ -1856,21 +1856,6 @@ virVMXParseSCSIController(virConfPtr conf, int controller, bool *present,
-/*
-struct _virDomainDiskDef {
- int type; // partly done
- int device; // done
- int bus; // done
- char *src; // done
- char *dst; // done
- char *driverName; // done
- char *driverType;
- int cachemode; // done
- unsigned int readonly : 1;
- unsigned int shared : 1;
- int slotnum;
-};*/
-
int
virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
int device, int busType, int controllerOrBus, int unit,
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 229ef3d..4a0924f 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -2313,7 +2313,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
1, 1) == NULL)
goto no_memory;
- // In Xen 3.1.0, APIC is always on and can't be toggled
+ /* In Xen 3.1.0, APIC is always on and can't be toggled */
if (virCapabilitiesAddGuestFeature(guest,
"apic",
1,
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 00fcbf2..cd30336 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -795,7 +795,7 @@ xenDaemonOpen_tcp(virConnectPtr conn, const char *host, const char *port)
priv->addrlen = 0;
memset(&priv->addr, 0, sizeof(priv->addr));
- // http://people.redhat.com/drepper/userapi-ipv6.html
+ /* http://people.redhat.com/drepper/userapi-ipv6.html */
memset (&hints, 0, sizeof hints);
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_ADDRCONFIG;
@@ -1895,7 +1895,7 @@ xenDaemonParseSxprGraphicsNew(virConnectPtr conn,
port = xenStoreDomainGetVNCPort(conn, def->id);
xenUnifiedUnlock(priv);
- // Didn't find port entry in xenstore
+ /* Didn't find port entry in xenstore */
if (port == -1) {
const char *str = sexpr_node(node, "device/vfb/vncdisplay");
int val;
@@ -3215,7 +3215,7 @@ xenDaemonDomainDumpXML(virDomainPtr domain, int flags, const char *cpus)
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
if (domain->id < 0 && priv->xendConfigVersion < 3) {
- // fall-through to the next driver to handle
+ /* fall-through to the next driver to handle */
return(NULL);
}
@@ -4380,7 +4380,7 @@ xenDaemonDomainSetAutostart(virDomainPtr domain,
goto error;
}
- // Change the autostart value in place, then define the new sexpr
+ /* Change the autostart value in place, then define the new sexpr */
VIR_FREE(autonode->u.s.car->u.value);
autonode->u.s.car->u.value = (autostart ? strdup("start")
: strdup("ignore"));
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index 2693b6e..7fff560 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -1078,11 +1078,11 @@ int xenStoreDomainGetUUID(virConnectPtr conn,
snprintf(prop, 199, "/local/domain/%d/vm", id);
prop[199] = 0;
- // This will return something like
- // /vm/00000000-0000-0000-0000-000000000000
+ /* This will return something like
+ * /vm/00000000-0000-0000-0000-000000000000 */
uuidstr = xs_read(priv->xshandle, 0, prop, &len);
- // remove "/vm/"
+ /* remove "/vm/" */
ret = virUUIDParse(uuidstr + 4, uuid);
VIR_FREE(uuidstr);
@@ -1305,7 +1305,7 @@ retry:
}
nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
if (nread != new_domain_cnt) {
- // mismatch. retry this read
+ /* mismatch. retry this read */
VIR_FREE(new_domids);
goto retry;
}
@@ -1388,7 +1388,7 @@ retry:
}
nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
if (nread != new_domain_cnt) {
- // mismatch. retry this read
+ /* mismatch. retry this read */
VIR_FREE(new_domids);
goto retry;
}
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index fffa617..aac112b 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1918,7 +1918,6 @@ int
call_func(const void *data, size_t len, void *user_handle,
void *result_handle, xen_result_func result_func)
{
- //(void)user_handle;
struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle;
#ifdef PRINT_XML
printf("\n\n---Data to server: -----------------------\n");
diff --git a/src/xenapi/xenapi_driver_private.h b/src/xenapi/xenapi_driver_private.h
index 2e96771..cfcaa75 100644
--- a/src/xenapi/xenapi_driver_private.h
+++ b/src/xenapi/xenapi_driver_private.h
@@ -27,7 +27,7 @@
# include <xen/api/xen_common.h>
# include "virterror_internal.h"
-//# define PRINT_XML
+/*# define PRINT_XML*/
# define VIR_FROM_THIS VIR_FROM_XENAPI
# define LIBVIRT_MODELNAME_LEN (32)
# define xenapiSessionErrorHandler(conn, errNum, buf) \
--
1.7.0.4
14 years, 2 months
[libvirt] [PATCH] Add VIR_DIV_UP to divide memory or storage request sizes with round up
by Matthias Bolte
Use it in all places where a memory or storage request size is converted
to a larger granularity. This avoids requesting too small memory or storage
sizes that could result from the truncation done by a simple division.
This extends the round up fix in 6002e0406c338668ea0ecbfeb6c1ef20a8b67efe
to the whole codebase.
Instead of reporting errors for odd values in the VMX code round them up.
Update the QEMU Argv tests accordingly as the original memory size 219200
isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change
it to 219100 and 219136. Use two different values intentionally to make
sure that rounding up works.
Update virsh.pod accordingly, as rounding down and rejecting are replaced
by rounding up.
---
src/esx/esx_driver.c | 6 +-
src/esx/esx_storage_driver.c | 3 +-
src/internal.h | 3 +
src/opennebula/one_conf.c | 2 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_monitor_text.c | 2 +-
src/storage/storage_backend.c | 5 +-
src/storage/storage_backend_logical.c | 5 +--
src/vbox/vbox_tmpl.c | 11 +++--
src/vmx/vmx.c | 57 ++++++--------------
src/xen/xend_internal.c | 7 ++-
src/xen/xm_internal.c | 4 +-
.../qemuxml2argv-balloon-device-auto.xml | 4 +-
.../qemuxml2argv-balloon-device.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml | 4 +-
.../qemuxml2argv-boot-menu-disable.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-boot-network.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml | 4 +-
.../qemuxml2argv-channel-guestfwd.xml | 4 +-
.../qemuxml2argv-channel-virtio-auto.xml | 4 +-
.../qemuxml2argv-channel-virtio.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-clock-france.xml | 4 +-
.../qemuxml2argv-clock-localtime.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml | 4 +-
.../qemuxml2argv-clock-variable.xml | 4 +-
.../qemuxml2argv-console-compat-auto.xml | 4 +-
.../qemuxml2argv-console-compat-chardev.xml | 4 +-
.../qemuxml2argv-console-compat.xml | 4 +-
.../qemuxml2argv-console-virtio.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml | 4 +-
.../qemuxml2argv-cpu-topology1.xml | 4 +-
.../qemuxml2argv-cpu-topology2.xml | 4 +-
.../qemuxml2argv-cpu-topology3.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml | 4 +-
.../qemuxml2argv-disk-cdrom-empty.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml | 4 +-
.../qemuxml2argv-disk-drive-boot-cdrom.xml | 4 +-
.../qemuxml2argv-disk-drive-boot-disk.xml | 4 +-
.../qemuxml2argv-disk-drive-cache-v1-none.xml | 4 +-
.../qemuxml2argv-disk-drive-cache-v1-wb.xml | 4 +-
.../qemuxml2argv-disk-drive-cache-v1-wt.xml | 4 +-
.../qemuxml2argv-disk-drive-cache-v2-none.xml | 4 +-
.../qemuxml2argv-disk-drive-cache-v2-wb.xml | 4 +-
.../qemuxml2argv-disk-drive-cache-v2-wt.xml | 4 +-
...muxml2argv-disk-drive-error-policy-enospace.xml | 4 +-
.../qemuxml2argv-disk-drive-error-policy-stop.xml | 4 +-
.../qemuxml2argv-disk-drive-fat.xml | 4 +-
.../qemuxml2argv-disk-drive-fmt-qcow.xml | 4 +-
.../qemuxml2argv-disk-drive-network-nbd.xml | 4 +-
.../qemuxml2argv-disk-drive-network-rbd.xml | 4 +-
.../qemuxml2argv-disk-drive-network-sheepdog.xml | 4 +-
.../qemuxml2argv-disk-drive-readonly-disk.xml | 4 +-
.../qemuxml2argv-disk-drive-readonly-no-device.xml | 4 +-
.../qemuxml2argv-disk-drive-shared.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml | 4 +-
.../qemuxml2argv-disk-scsi-device-auto.xml | 4 +-
.../qemuxml2argv-disk-scsi-device.xml | 4 +-
.../qemuxml2argv-disk-usb-device.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml | 4 +-
.../qemuxml2argv-floppy-drive-fat.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml | 4 +-
.../qemuxml2argv-graphics-sdl-fullscreen.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 4 +-
.../qemuxml2argv-graphics-spice.xml | 4 +-
.../qemuxml2argv-graphics-vnc-sasl.xml | 4 +-
.../qemuxml2argv-graphics-vnc-socket.xml | 4 +-
.../qemuxml2argv-graphics-vnc-tls.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 4 +-
.../qemuxml2argv-hostdev-pci-address-device.xml | 4 +-
.../qemuxml2argv-hostdev-pci-address.xml | 4 +-
.../qemuxml2argv-hostdev-usb-address-device.xml | 4 +-
.../qemuxml2argv-hostdev-usb-address.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml | 4 +-
.../qemuxml2argv-input-usbmouse.xml | 4 +-
.../qemuxml2argv-input-usbtablet.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml | 4 +-
.../qemuxml2argv-machine-aliases1.xml | 4 +-
.../qemuxml2argv-machine-aliases2.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-memtune.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-migrate.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-minimal.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml | 4 +-
.../qemuxml2argv-misc-no-reboot.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml | 4 +-
.../qemuxml2argv-net-eth-ifname.xml | 4 +-
.../qemuxml2argv-net-eth-names.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.xml | 4 +-
.../qemuxml2argv-net-virtio-device.xml | 4 +-
.../qemuxml2argv-net-virtio-netdev.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml | 4 +-
.../qemuxml2argv-nographics-vga.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-nographics.xml | 4 +-
.../qemuxml2argv-parallel-tcp-chardev.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml | 4 +-
.../qemuxml2argv-qemu-ns-no-env.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml | 4 +-
.../qemuxml2argv-restore-v2-fd.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml | 4 +-
.../qemuxml2argv-serial-dev-chardev.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml | 4 +-
.../qemuxml2argv-serial-file-chardev.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-serial-file.xml | 4 +-
.../qemuxml2argv-serial-many-chardev.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-serial-many.xml | 4 +-
.../qemuxml2argv-serial-pty-chardev.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml | 4 +-
.../qemuxml2argv-serial-tcp-chardev.xml | 4 +-
.../qemuxml2argv-serial-tcp-telnet-chardev.xml | 4 +-
.../qemuxml2argv-serial-tcp-telnet.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml | 4 +-
.../qemuxml2argv-serial-udp-chardev.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml | 4 +-
.../qemuxml2argv-serial-unix-chardev.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-serial-unix.xml | 4 +-
.../qemuxml2argv-serial-vc-chardev.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-smbios.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 4 +-
.../qemuxml2argvdata/qemuxml2argv-sound-device.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.xml | 4 +-
.../qemuxml2argv-watchdog-device.xml | 4 +-
.../qemuxml2argv-watchdog-dump.xml | 4 +-
tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml | 4 +-
.../qemuxml2xmlout-balloon-device-auto.xml | 4 +-
.../qemuxml2xmlout-channel-virtio-auto.xml | 4 +-
.../qemuxml2xmlout-console-compat-auto.xml | 4 +-
.../qemuxml2xmlout-console-virtio.xml | 4 +-
.../qemuxml2xmlout-disk-scsi-device-auto.xml | 4 +-
tools/virsh.pod | 16 +++---
141 files changed, 309 insertions(+), 326 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 2799487..61c2371 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2060,7 +2060,7 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
}
spec->memoryMB->value =
- memory / 1024; /* Scale from kilobytes to megabytes */
+ VIR_DIV_UP(memory, 1024); /* Scale from kilobytes to megabytes */
if (esxVI_ReconfigVM_Task(priv->primary, virtualMachine->obj, spec,
&task) < 0 ||
@@ -2117,7 +2117,7 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
}
spec->memoryAllocation->limit->value =
- memory / 1024; /* Scale from kilobytes to megabytes */
+ VIR_DIV_UP(memory, 1024); /* Scale from kilobytes to megabytes */
if (esxVI_ReconfigVM_Task(priv->primary, virtualMachine->obj, spec,
&task) < 0 ||
@@ -4448,7 +4448,7 @@ esxDomainSetMemoryParameters(virDomainPtr domain, virMemoryParameterPtr params,
}
spec->memoryAllocation->reservation->value =
- params[i].value.ul / 1024; /* Scale from kilobytes to megabytes */
+ VIR_DIV_UP(params[i].value.ul, 1024); /* Scale from kilobytes to megabytes */
} else {
ESX_ERROR(VIR_ERR_INVALID_ARG, _("Unknown field '%s'"),
params[i].field);
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 12c8f5e..136a90b 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -1106,7 +1106,8 @@ esxStorageVolumeCreateXML(virStoragePoolPtr pool, const char *xmldesc,
*/
virtualDiskSpec->adapterType = (char *)"busLogic";
- virtualDiskSpec->capacityKb->value = def->capacity / 1024; /* Scale from byte to kilobyte */
+ virtualDiskSpec->capacityKb->value =
+ VIR_DIV_UP(def->capacity, 1024); /* Scale from byte to kilobyte */
if (esxVI_CreateVirtualDisk_Task
(priv->primary, datastorePath, priv->primary->datacenter->_reference,
diff --git a/src/internal.h b/src/internal.h
index 038b862..11ba45f 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -231,4 +231,7 @@
} \
} while (0)
+/* divide value by size, rounding up */
+# define VIR_DIV_UP(value, size) (((value) + (size) - 1) / (size))
+
#endif /* __VIR_INTERNAL_H__ */
diff --git a/src/opennebula/one_conf.c b/src/opennebula/one_conf.c
index 0b0a08a..60afca5 100644
--- a/src/opennebula/one_conf.c
+++ b/src/opennebula/one_conf.c
@@ -175,7 +175,7 @@ char* xmlOneTemplate(virDomainDefPtr def)
"by libvirt\nNAME = %s\nCPU = %d\nMEMORY = %ld\n",
def->name,
def->maxvcpus,
- (def->mem.max_balloon)/1024);
+ VIR_DIV_UP(def->mem.max_balloon, 1024));
/*Optional Booting OpenNebula Information:*/
if (def->os.kernel) {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c0ec00b..a0f86a3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2667,7 +2667,7 @@ qemuBuildCommandLine(virConnectPtr conn,
* is not supported, then they're out of luck anyway
*/
virCommandAddArg(cmd, "-m");
- virCommandAddArgFormat(cmd, "%lu", def->mem.max_balloon / 1024);
+ virCommandAddArgFormat(cmd, "%lu", VIR_DIV_UP(def->mem.max_balloon, 1024));
if (def->mem.hugepage_backed) {
if (!driver->hugetlbfs_mount) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 4cf87fe..6d0ba4c 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -852,7 +852,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
* 'newmem' is in KB, QEMU monitor works in MB, and we all wish
* we just worked in bytes with unsigned long long everywhere.
*/
- if (virAsprintf(&cmd, "balloon %lu", (newmem / 1024)) < 0) {
+ if (virAsprintf(&cmd, "balloon %lu", VIR_DIV_UP(newmem, 1024)) < 0) {
virReportOOMError();
return -1;
}
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index bfe1172..2eede74 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -725,7 +725,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
}
/* Size in KB */
- if (virAsprintf(&size, "%lluK", vol->capacity / 1024) < 0) {
+ if (virAsprintf(&size, "%lluK", VIR_DIV_UP(vol->capacity, 1024)) < 0) {
virReportOOMError();
goto cleanup;
}
@@ -870,7 +870,8 @@ virStorageBackendCreateQcowCreate(virConnectPtr conn ATTRIBUTE_UNUSED,
}
/* Size in MB - yes different units to qemu-img :-( */
- if (virAsprintf(&size, "%llu", vol->capacity / 1024 / 1024) < 0) {
+ if (virAsprintf(&size, "%llu",
+ VIR_DIV_UP(vol->capacity, (1024 * 1024))) < 0) {
virReportOOMError();
return -1;
}
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 389ecd7..ead35cb 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -604,10 +604,7 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
cmdargv = cmdargvsnap;
}
- unsigned long long int capacity;
- capacity = (vol->capacity + 1023) /1024;
-
- snprintf(size, sizeof(size)-1, "%lluK", capacity);
+ snprintf(size, sizeof(size)-1, "%lluK", VIR_DIV_UP(vol->capacity, 1024));
size[sizeof(size)-1] = '\0';
vol->type = VIR_STORAGE_VOL_BLOCK;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 77b43f8..b5cde1f 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1784,7 +1784,8 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) {
rc = data->vboxSession->vtbl->GetMachine(data->vboxSession, &machine);
if (NS_SUCCEEDED(rc) && machine) {
- rc = machine->vtbl->SetMemorySize(machine, memory / 1024);
+ rc = machine->vtbl->SetMemorySize(machine,
+ VIR_DIV_UP(memory, 1024));
if (NS_SUCCEEDED(rc)) {
machine->vtbl->SaveSettings(machine);
ret = 0;
@@ -4398,7 +4399,8 @@ vboxAttachVideo(virDomainDefPtr def, IMachine *machine)
{
if ((def->nvideos == 1) &&
(def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_VBOX)) {
- machine->vtbl->SetVRAMSize(machine, def->videos[0]->vram / 1024);
+ machine->vtbl->SetVRAMSize(machine,
+ VIR_DIV_UP(def->videos[0]->vram, 1024));
machine->vtbl->SetMonitorCount(machine, def->videos[0]->heads);
if (def->videos[0]->accel) {
machine->vtbl->SetAccelerate3DEnabled(machine,
@@ -4771,7 +4773,8 @@ static virDomainPtr vboxDomainDefineXML(virConnectPtr conn, const char *xml) {
goto cleanup;
}
- rc = machine->vtbl->SetMemorySize(machine, def->mem.cur_balloon / 1024);
+ rc = machine->vtbl->SetMemorySize(machine,
+ VIR_DIV_UP(def->mem.cur_balloon, 1024));
if (NS_FAILED(rc)) {
vboxError(VIR_ERR_INTERNAL_ERROR,
_("could not set the memory size of the domain to: %lu Kb, "
@@ -8072,7 +8075,7 @@ static virStorageVolPtr vboxStorageVolCreateXML(virStoragePoolPtr pool,
rc = data->vboxObj->vtbl->CreateHardDisk(data->vboxObj, hddFormatUtf16, hddNameUtf16, &hardDisk);
if (NS_SUCCEEDED(rc)) {
IProgress *progress = NULL;
- PRUint64 logicalSize = def->capacity / 1024 / 1024;
+ PRUint64 logicalSize = VIR_DIV_UP(def->capacity, 1024 * 1024);
PRUint32 variant = HardDiskVariant_Standard;
if (def->capacity == def->allocation)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 44c014f..2f574fc 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2818,7 +2818,7 @@ virVMXParseSVGA(virConfPtr conf, virDomainVideoDefPtr *def)
goto cleanup;
}
- (*def)->vram = svga_vramSize / 1024; /* Scale from bytes to kilobytes */
+ (*def)->vram = VIR_DIV_UP(svga_vramSize, 1024); /* Scale from bytes to kilobytes */
result = 0;
@@ -2849,6 +2849,7 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
char *preliminaryDisplayName = NULL;
char *displayName = NULL;
char *annotation = NULL;
+ unsigned long max_balloon;
bool scsi_present[4] = { false, false, false, false };
int scsi_virtualDev[4] = { -1, -1, -1, -1 };
bool floppy_present[2] = { false, false };
@@ -2940,46 +2941,24 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
}
/* def:mem.max_balloon -> vmx:memsize */
- if (def->mem.max_balloon <= 0 || def->mem.max_balloon % 4096 != 0) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML entry 'memory' to be an unsigned "
- "integer (multiple of 4096) but found %lld"),
- (unsigned long long)def->mem.max_balloon);
- goto cleanup;
- }
+ /* max-memory must be a multiple of 4096 kilobyte */
+ max_balloon = VIR_DIV_UP(def->mem.max_balloon, 4096) * 4096;
- /* Scale from kilobytes to megabytes */
- virBufferVSprintf(&buffer, "memsize = \"%d\"\n",
- (int)(def->mem.max_balloon / 1024));
+ virBufferVSprintf(&buffer, "memsize = \"%lu\"\n",
+ max_balloon / 1024); /* Scale from kilobytes to megabytes */
/* def:mem.cur_balloon -> vmx:sched.mem.max */
- if (def->mem.cur_balloon < def->mem.max_balloon) {
- if (def->mem.cur_balloon <= 0 || def->mem.cur_balloon % 1024 != 0) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML entry 'currentMemory' to be an "
- "unsigned integer (multiple of 1024) but found %llu"),
- (unsigned long long)def->mem.cur_balloon);
- goto cleanup;
- }
-
- /* Scale from kilobytes to megabytes */
- virBufferVSprintf(&buffer, "sched.mem.max = \"%d\"\n",
- (int)(def->mem.cur_balloon / 1024));
+ if (def->mem.cur_balloon < max_balloon) {
+ virBufferVSprintf(&buffer, "sched.mem.max = \"%lu\"\n",
+ VIR_DIV_UP(def->mem.cur_balloon,
+ 1024)); /* Scale from kilobytes to megabytes */
}
/* def:mem.min_guarantee -> vmx:sched.mem.minsize */
if (def->mem.min_guarantee > 0) {
- if (def->mem.min_guarantee % 1024 != 0) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
- _("Expecting domain XML entry 'memtune/min_guarantee' to "
- "be an unsigned integer (multiple of 1024) but found %llu"),
- (unsigned long long)def->mem.min_guarantee);
- goto cleanup;
- }
-
- /* Scale from kilobytes to megabytes */
- virBufferVSprintf(&buffer, "sched.mem.minsize = \"%d\"\n",
- (int)(def->mem.min_guarantee / 1024));
+ virBufferVSprintf(&buffer, "sched.mem.minsize = \"%lu\"\n",
+ VIR_DIV_UP(def->mem.min_guarantee,
+ 1024)); /* Scale from kilobytes to megabytes */
}
/* def:maxvcpus -> vmx:numvcpus */
@@ -3733,6 +3712,8 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChrDefPtr def,
int
virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
{
+ unsigned long long vram;
+
if (def->type != VIR_DOMAIN_VIDEO_TYPE_VMVGA) {
VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported video device type '%s'"),
@@ -3744,11 +3725,7 @@ virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
* For Windows guests the VRAM size should be a multiple of 64 kilobyte.
* See http://kb.vmware.com/kb/1003 and http://kb.vmware.com/kb/1001558
*/
- if (def->vram % 64 != 0) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Video device VRAM size must be a multiple of 64 kilobyte"));
- return -1;
- }
+ vram = VIR_DIV_UP(def->vram, 64) * 64;
if (def->heads > 1) {
VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -3757,7 +3734,7 @@ virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
}
virBufferVSprintf(buffer, "svga.vramSize = \"%lld\"\n",
- def->vram * 1024LL); /* Scale from kilobytes to bytes */
+ vram * 1024); /* kilobyte to byte */
return 0;
}
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 44d5a22..00fcbf2 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -3111,7 +3111,7 @@ xenDaemonDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
if (domain->id < 0 && priv->xendConfigVersion < 3)
return(-1);
- snprintf(buf, sizeof(buf), "%lu", memory >> 10);
+ snprintf(buf, sizeof(buf), "%lu", VIR_DIV_UP(memory, 1024));
return xend_op(domain->conn, domain->name, "op", "maxmem_set", "memory",
buf, NULL);
}
@@ -3148,7 +3148,7 @@ xenDaemonDomainSetMemory(virDomainPtr domain, unsigned long memory)
if (domain->id < 0 && priv->xendConfigVersion < 3)
return(-1);
- snprintf(buf, sizeof(buf), "%lu", memory >> 10);
+ snprintf(buf, sizeof(buf), "%lu", VIR_DIV_UP(memory, 1024));
return xend_op(domain->conn, domain->name, "op", "mem_target_set",
"target", buf, NULL);
}
@@ -5778,7 +5778,8 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferAddLit(&buf, "(vm ");
virBufferEscapeSexpr(&buf, "(name '%s')", def->name);
virBufferVSprintf(&buf, "(memory %lu)(maxmem %lu)",
- def->mem.cur_balloon/1024, def->mem.max_balloon/1024);
+ VIR_DIV_UP(def->mem.cur_balloon, 1024),
+ VIR_DIV_UP(def->mem.max_balloon, 1024));
virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
either 32, or 64 on a platform where long is big enough. */
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index bfb6698..865805c 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -2336,10 +2336,10 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
if (xenXMConfigSetString(conf, "uuid", uuid) < 0)
goto no_memory;
- if (xenXMConfigSetInt(conf, "maxmem", def->mem.max_balloon / 1024) < 0)
+ if (xenXMConfigSetInt(conf, "maxmem", VIR_DIV_UP(def->mem.max_balloon, 1024)) < 0)
goto no_memory;
- if (xenXMConfigSetInt(conf, "memory", def->mem.cur_balloon / 1024) < 0)
+ if (xenXMConfigSetInt(conf, "memory", VIR_DIV_UP(def->mem.cur_balloon, 1024)) < 0)
goto no_memory;
if (xenXMConfigSetInt(conf, "vcpus", def->maxvcpus) < 0)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml
index 26c9b25..9315621 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml
index 274eb8b..8ac3c09 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-balloon-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
index 410e6f9..14ccd23 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
index ad8bae2..db3a94f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
index ceb109c..bc1da8a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
index 48f27aa..44ca0fa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
index b1b7721..d3f3369 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
index eabbe87..ba8a9b2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
index af19b3b..6ce846d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bootloader.xml
@@ -1,8 +1,8 @@
<domain type='kvm'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<bootloader>/usr/bin/pygrub</bootloader>
<os>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
index b3c56b1..b1d5281 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
index afd73f4..c127d84 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
index 2dbb596..f612c02 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
index 8794492..017ef39 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
index 786d0c7..ed746c1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
index 41818d2..9f52cca 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-variable.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
index f0e875e..bd19988 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
index 611ddb8..0bf52f4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
index 9591c87..9011522 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
index fd72421..259af4a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
index 53d3a8d..d6db442 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact1.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
index cd2a506..831291a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-exact2.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
index 2a163d6..1a2bef6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum1.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
index b3baed7..795baca 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-minimum2.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
index 55f6b3c..3dee11f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-strict1.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
index ca336b8..6b37207 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology1.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
index 3308965..9f09e81 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology2.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
index ca336b8..6b37207 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-topology3.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>6</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
index d893736..f6d7633 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
index 1b18d61..bc40d16 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
index 061b196..2fd2e6a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
index 0994a49..434cd7e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
index 9762f5a..452cb82 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
index 0b2f512..3f60871 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
index a438086..6a4e8e3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
index 29012a8..5f351f5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
index 0b2f512..da07d5e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
index a438086..8c30aec 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
index 29012a8..a9e0c33 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
index b3e6de9..f9a56ab 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
index a486502..6d99607 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
index a3491e7..d473711 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
index f2643bb..cc88ef5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
index 863165d..c0255a8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
index 118d890..e920db1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
index 5313d75..83d6c4e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
index 1f193c9..c0cf6a4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
index 1f193c9..c0cf6a4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-no-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
index 27e741a..8dcf4b7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
index c0a4a08..6c2a18d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
index 14f85cc..3b28a34 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
index df50a27..a7e55b0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
index a250940..530c0a6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml
index 6d35eea..7ad35e3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
index 79ab654..0a9adef 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
index a8aae71..eef9a1b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
index a3dd4c6..c940847 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
index ec74bdd..ceee0b8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
index 9072ead..62b12bc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-fs9p.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
index 06b0539..4e11a28 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
index 16fd3ba..cf5aaa9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 15a22f3..fc9f3fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
index a07f87b..eb6be7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
index d6ad72b..19c9213 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
index a07f87b..eb6be7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
index a07f87b..eb6be7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml
index 711e3f8..4ef8af4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest2</name>
<uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
index 0347eee..a88ada4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest2</name>
<uuid>c7a5fdbd-edaf-9466-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml
index da2562e..04dc7da 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
index 4391bf1..c224291 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
index 8ed7490..78bf4e1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<memoryBacking>
<hugepages/>
</memoryBacking>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
index b76a895..b9aff61 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
index a878f8c..18d5cb5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
index 0ea00c1..8a5fcd7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-xen.xml
@@ -1,8 +1,8 @@
<domain type='kvm'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<bootloader>/foo</bootloader>
<os>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
index 9f3fc85..a969f8c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases1.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
index c57e64c..424179e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml
@@ -1,8 +1,8 @@
<domain type='kvm'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml b/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
index 9f713f0..37b5c88 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memtune.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<memtune>
<hard_limit>512000</hard_limit>
<soft_limit>128000</soft_limit>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
index 8a13e47..2f13d46 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
index c8e87b0..d5f8d2f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
index bb4f5f0..b06493f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
index c8e87b0..d5f8d2f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
index 516957f..a638e06 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
index 7875d0c..74db024 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
index 5d410b3..d5c4b36 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
index ffc4a2c..540808d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
index e521796..572f3cc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
index e521796..5f2b12c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
index 9b9c059..ec930b3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
index 1093901..328f81e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
index 1093901..5c50ecc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
index 60087f1..0d9dd98 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
@@ -1,8 +1,8 @@
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml
index c48c248..c5020a0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns.xml
@@ -1,8 +1,8 @@
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
index ed91e37..99e81ae 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
index 5d24986..ea5a3f8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
index cc0ab43..41f473a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
index 98bc4ef..9a3e197 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
index 3e60e98..975d81e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
index b121c5c..d6116e8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
index 1d042f1..e68ad79 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
index 611ddb8..57d1b74 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
index 9591c87..19dd131 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
index 286417e..cd43384 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
index 5aeceb0..14bead4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
index 5bf6a08..ad5a038 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
index 304792e..45ad585 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
index 2c44738..12622d4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
index e4fe4fd..8697f5a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
index 2c07e94..4ed72aa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
index 61dff3f..4685ad4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
index 5b39736..fe1fdad 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc-chardev.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
index 36bd622..6100332 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml b/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml
index 23ec1a7..9f0ea7b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<sysinfo type='smbios'>
<bios>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
index 975f873..cba15dc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu current='1'>2</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index fbca4fe..0f5df4d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index d34e0b3..57cabb4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml
index 2dfc37e..48e969f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-device.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml
index 4314ec4..d7c1f84 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog-dump.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
index 804dfd8..06da70b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
index ed91e37..479a1d9 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
index ea79fba..a52ea8e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
index 9591c87..9011522 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
index 431dd34..b64c7e5 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
index a250940..530c0a6 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
@@ -1,8 +1,8 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory>219200</memory>
- <currentMemory>219200</currentMemory>
+ <memory>219136</memory>
+ <currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tools/virsh.pod b/tools/virsh.pod
index c00cc8a..441ca8a 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -576,9 +576,9 @@ XEN_CREDIT scheduler and are now I<DEPRECATED>.
Immediately change the current memory allocation for an active guest domain.
Some hypervisors require a larger granularity than kilobytes, and requests
-that are not an even multiple will either be rounded down or rejected. For
-example, vSphere/ESX rejects the parameter unless the kB argument is evenly
-divisible by 1024 (that is, the kB argument happens to represent megabytes).
+that are not an even multiple will be rounded up. For example, vSphere/ESX
+rounds the parameter up unless the kB argument is evenly divisible by 1024
+(that is, the kB argument happens to represent megabytes).
For Xen, you can only adjust the memory of a running domain if the domain is
paravirtualized or running the PV balloon driver.
@@ -594,11 +594,11 @@ Change the maximum memory allocation limit for an inactive guest domain.
This command works for at least the Xen and vSphere/ESX hypervisors,
but not for QEMU/KVM.
-Some hypervisors require a larger granularity than kilobytes, rounding down
-or rejecting requests that are not an even multiple of the desired amount.
-vSphere/ESX is one of these, requiring the parameter to be evenly divisible
-by 4MB. For vSphere/ESX, 263168 (257MB) would be rejected because it's not
-a multiple of 4MB, while 266240 (260MB) is valid.
+Some hypervisors require a larger granularity than kilobytes, rounding up
+requests that are not an even multiple of the desired amount. vSphere/ESX
+is one of these, requiring the parameter to be evenly divisible by 4MB. For
+vSphere/ESX, 263168 (257MB) would be rounded up because it's not a multiple
+of 4MB, while 266240 (260MB) is valid without rounding.
Note, to change the maximum memory allocation for a QEMU/KVM guest domain,
use the virsh B<edit> command instead to update its XML <memory> element.
--
1.7.0.4
14 years, 2 months
[libvirt] [PATCH] qemu: fix augeas support for vnc_auto_unix_socket
by Eric Blake
Fixes test failure that was overlooked after commit 1e1f7a8950.
* daemon/Makefile.am (check-local): Let 'make check' fail on error.
* daemon/test_libvirtd.aug: Move qemu-specific option...
* src/qemu/test_libvirtd_qemu.aug: ...into correct test.
* src/qemu/libvirtd_qemu.aug: Parse new option.
---
Followup to https://www.redhat.com/archives/libvir-list/2011-January/msg01171.html
daemon/Makefile.am | 5 +++--
daemon/test_libvirtd.aug | 6 ------
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/test_libvirtd_qemu.aug | 4 ++++
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 3ffb7be..cdf0f75 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -301,8 +301,9 @@ libvirtd.init: libvirtd.init.in $(top_builddir)/config.status
mv $@-t $@
check-local:
- test -x '$(AUGPARSE)' \
- && '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug || :
+ $(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
+ '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug; \
+ fi
else
diff --git a/daemon/test_libvirtd.aug b/daemon/test_libvirtd.aug
index 31fa643..5f8b644 100644
--- a/daemon/test_libvirtd.aug
+++ b/daemon/test_libvirtd.aug
@@ -271,9 +271,6 @@ log_filters=\"a\"
# Auditing:
audit_level = 2
-
-# VNC socket
-vnc_auto_unix_socket = 1
"
test Libvirtd.lns get conf =
@@ -552,6 +549,3 @@ vnc_auto_unix_socket = 1
{ "#empty" }
{ "#comment" = "Auditing:" }
{ "audit_level" = "2" }
- { "#empty" }
- { "#comment" = "VNC socket:" }
- { "vnc_auto_unix_socket" = "1" }
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index 2f37015..affd74e 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -23,6 +23,7 @@ module Libvirtd_qemu =
(* Config entry grouped by function - same order as example config *)
let vnc_entry = str_entry "vnc_listen"
+ | bool_entry "vnc_auto_unix_socket"
| bool_entry "vnc_tls"
| str_entry "vnc_tls_x509_cert_dir"
| bool_entry "vnc_tls_x509_verify"
diff --git a/src/qemu/test_libvirtd_qemu.aug b/src/qemu/test_libvirtd_qemu.aug
index b4d8833..8e477f5 100644
--- a/src/qemu/test_libvirtd_qemu.aug
+++ b/src/qemu/test_libvirtd_qemu.aug
@@ -109,6 +109,8 @@ vnc_allow_host_audio = 1
clear_emulator_capabilities = 0
allow_disk_format_probing = 1
+
+vnc_auto_unix_socket = 1
"
test Libvirtd_qemu.lns get conf =
@@ -228,3 +230,5 @@ allow_disk_format_probing = 1
{ "clear_emulator_capabilities" = "0" }
{ "#empty" }
{ "allow_disk_format_probing" = "1" }
+{ "#empty" }
+{ "vnc_auto_unix_socket" = "1" }
--
1.7.3.5
14 years, 2 months
[libvirt] [PATCH v2] virsh: added --all flag to freecell command
by Michal Privoznik
This will iterate over all NUMA nodes, showing
free memory for each and sum at the end.
Existing default behavior is not changed.
---
tools/virsh.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 63 insertions(+), 12 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index cd54174..505ae85 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2273,36 +2273,87 @@ static const vshCmdInfo info_freecell[] = {
static const vshCmdOptDef opts_freecell[] = {
{"cellno", VSH_OT_INT, 0, N_("NUMA cell number")},
+ {"all", VSH_OT_BOOL, 0, N_("show free memory for all NUMA cells")},
{NULL, 0, 0, NULL}
};
static int
cmdFreecell(vshControl *ctl, const vshCmd *cmd)
{
+ int func_ret = FALSE;
int ret;
int cell, cell_given;
unsigned long long memory;
+ unsigned long long *nodes = NULL;
+ int all_given;
+ virNodeInfo info;
+
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
cell = vshCommandOptInt(cmd, "cellno", &cell_given);
- if (!cell_given) {
- memory = virNodeGetFreeMemory(ctl->conn);
- if (memory == 0)
- return FALSE;
+ all_given = vshCommandOptBool(cmd, "all");
+
+ if (all_given && cell_given) {
+ vshError(ctl, "%s", _("--cellno and --all are mutually exclusive. "
+ "Please choose only one."));
+ goto cleanup;
+ }
+
+ if (all_given) {
+ if (virNodeGetInfo(ctl->conn, &info) < 0) {
+ vshError(ctl, "%s", _("failed to get NUMA nodes count"));
+ goto cleanup;
+ }
+
+ if (!info.nodes) {
+ vshError(ctl, "%s", _("no NUMA nodes present"));
+ goto cleanup;
+ }
+
+ if (VIR_ALLOC_N(nodes, info.nodes) < 0) {
+ vshError(ctl, "%s", _("could not allocate memory"));
+ goto cleanup;
+ }
+
+ ret = virNodeGetCellsFreeMemory(ctl->conn, nodes, 0, info.nodes);
+ if (ret != info.nodes) {
+ vshError(ctl, "%s", _("could not get information about "
+ "all NUMA nodes"));
+ goto cleanup;
+ }
+
+ memory = 0;
+ for (cell = 0; cell < info.nodes; cell++) {
+ vshPrint(ctl, "%5d: %10llu kB\n", cell, (nodes[cell]/1024));
+ memory += nodes[cell];
+ }
+
+ vshPrintExtra(ctl, "--------------------\n");
+ vshPrintExtra(ctl, "%5s: %10llu kB\n",_("Total"), memory/1024);
} else {
- ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
- if (ret != 1)
- return FALSE;
+ if (!cell_given) {
+ memory = virNodeGetFreeMemory(ctl->conn);
+ if (memory == 0)
+ goto cleanup;
+ } else {
+ ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
+ if (ret != 1)
+ goto cleanup;
+ }
+
+ if (cell == -1)
+ vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
+ else
+ vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
}
- if (cell == -1)
- vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
- else
- vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
+ func_ret = TRUE;
- return TRUE;
+cleanup:
+ VIR_FREE(nodes);
+ return func_ret;
}
/*
--
1.7.3.5
14 years, 2 months
[libvirt] [PATCH] esx: Don't try to change max-memory of an active domain
by Matthias Bolte
Report an VIR_ERR_OPERATION_INVALID error in that case instead of letting
the SOAP call fail with an VIR_ERR_INTERNAL_ERROR error.
---
src/esx/esx_driver.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 26f029c..2799487 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2027,7 +2027,9 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
{
int result = -1;
esxPrivate *priv = domain->conn->privateData;
+ esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *virtualMachine = NULL;
+ esxVI_VirtualMachinePowerState powerState;
esxVI_VirtualMachineConfigSpec *spec = NULL;
esxVI_ManagedObjectReference *task = NULL;
esxVI_TaskInfoState taskInfoState;
@@ -2037,10 +2039,22 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
return -1;
}
- if (esxVI_LookupVirtualMachineByUuidAndPrepareForTask
- (priv->primary, domain->uuid, NULL, &virtualMachine,
+ if (esxVI_String_AppendValueToList(&propertyNameList,
+ "runtime.powerState") < 0 ||
+ esxVI_LookupVirtualMachineByUuidAndPrepareForTask
+ (priv->primary, domain->uuid, propertyNameList, &virtualMachine,
priv->autoAnswer) < 0 ||
- esxVI_VirtualMachineConfigSpec_Alloc(&spec) < 0 ||
+ esxVI_GetVirtualMachinePowerState(virtualMachine, &powerState) < 0) {
+ goto cleanup;
+ }
+
+ if (powerState != esxVI_VirtualMachinePowerState_PoweredOff) {
+ ESX_ERROR(VIR_ERR_OPERATION_INVALID, "%s",
+ _("Domain is not powered off"));
+ goto cleanup;
+ }
+
+ if (esxVI_VirtualMachineConfigSpec_Alloc(&spec) < 0 ||
esxVI_Long_Alloc(&spec->memoryMB) < 0) {
goto cleanup;
}
@@ -2067,6 +2081,7 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
result = 0;
cleanup:
+ esxVI_String_Free(&propertyNameList);
esxVI_ObjectContent_Free(&virtualMachine);
esxVI_VirtualMachineConfigSpec_Free(&spec);
esxVI_ManagedObjectReference_Free(&task);
--
1.7.0.4
14 years, 2 months
[libvirt] [PATCH 00/11] Integration of lock managers in QEMU driver (v2)
by Daniel P. Berrange
This is a second iteration of the patches from
https://www.redhat.com/archives/libvir-list/2010-November/msg00975.html
Since the last posting quite alot of dev & testing has been done.
The main changes are:
- There is now a <lease> element in the XML to allow locking
against resources not otherwise in the XML
- The 'sanlock' plugin implementation is now in-tree
- The 'lock_driver.h' header is now longer publically installed.
All lock manager impls must be in-tree. This prevents closed
source plugins, and more importantly allows full integration
of error reporting
- Improved virCommand handshake to allow error message to be
passed back to libvirtd
This version is now actually tested with sanlock and works for
initial VM startup at least, successfully preventing QEMU being
started more than once for a given config.
Still todo:
- Merge this series with the huge RPC series
- Wire up a fcntl based plugin
- Integration with migration workflow
14 years, 2 months
[libvirt] [PATCH] virsh: added --all flag to freecell command
by Michal Privoznik
This will iterate over all NUMA nodes, showing
free memory for each and sum at the end.
Existing default behavior is not changed.
---
tools/virsh.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 61 insertions(+), 12 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index cd54174..1ddc7cf 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2273,36 +2273,85 @@ static const vshCmdInfo info_freecell[] = {
static const vshCmdOptDef opts_freecell[] = {
{"cellno", VSH_OT_INT, 0, N_("NUMA cell number")},
+ {"all", VSH_OT_BOOL, 0, N_("show free memory for all NUMA cells")},
{NULL, 0, 0, NULL}
};
static int
cmdFreecell(vshControl *ctl, const vshCmd *cmd)
{
+ int func_ret = FALSE;
int ret;
int cell, cell_given;
unsigned long long memory;
+ unsigned long long *nodes = NULL;
+ int all_given;
+ virNodeInfo info;
+
if (!vshConnectionUsability(ctl, ctl->conn))
return FALSE;
cell = vshCommandOptInt(cmd, "cellno", &cell_given);
- if (!cell_given) {
- memory = virNodeGetFreeMemory(ctl->conn);
- if (memory == 0)
- return FALSE;
+ all_given = vshCommandOptBool(cmd, "all");
+
+ if (all_given && cell_given) {
+ vshError(ctl, "%s", _("--cellno and --all are mutual exclusive. Please choose only one."));
+ goto cleanup;
+ }
+
+ if (all_given) {
+ if (virNodeGetInfo(ctl->conn, &info) < 0) {
+ vshError(ctl, "%s", _("failed to get NUMA nodes count"));
+ goto cleanup;
+ }
+
+ if (!info.nodes) {
+ vshError(ctl, "%s", _("no NUMA nodes presented"));
+ goto cleanup;
+ }
+
+ if (VIR_ALLOC_N(nodes, info.nodes) < 0) {
+ vshError(ctl, "%s", _("could not allocate memory"));
+ goto cleanup;
+ }
+
+ ret = virNodeGetCellsFreeMemory(ctl->conn, nodes, 0, info.nodes);
+ if (ret != info.nodes) {
+ vshError(ctl, "%s", _("could not get information about all NUMA nodes"));
+ goto cleanup;
+ }
+
+ memory = 0;
+ for (cell = 0; cell < info.nodes; cell++) {
+ vshPrint(ctl, "%d: %llu kB\n", cell, (nodes[cell]/1024));
+ memory += nodes[cell];
+ }
+
+ vshPrintExtra(ctl, "--------------------\n");
+ vshPrintExtra(ctl, "%s %llu kB\n",_("Total"), memory/1024);
} else {
- ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
- if (ret != 1)
- return FALSE;
+ if (!cell_given) {
+ memory = virNodeGetFreeMemory(ctl->conn);
+ if (memory == 0)
+ goto cleanup;
+ } else {
+ ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
+ if (ret != 1)
+ goto cleanup;
+ }
+
+ if (cell == -1)
+ vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
+ else
+ vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
}
- if (cell == -1)
- vshPrint(ctl, "%s: %llu kB\n", _("Total"), (memory/1024));
- else
- vshPrint(ctl, "%d: %llu kB\n", cell, (memory/1024));
+ func_ret = TRUE;
- return TRUE;
+cleanup:
+ VIR_FREE(nodes);
+ return func_ret;
}
/*
--
1.7.3.5
14 years, 2 months
[libvirt] [PATCH 2/3] cgroup: Implement blkio.weight tuning API.
by Gui Jianfeng
Implement blkio.weight tuning API.
Signed-off-by: Gui Jianfeng <guijianfeng(a)cn.fujitsu.com>
---
src/libvirt_private.syms | 2 ++
src/util/cgroup.c | 36 ++++++++++++++++++++++++++++++++++++
src/util/cgroup.h | 3 +++
3 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 2ce4bed..97b9851 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -77,6 +77,8 @@ virCgroupMounted;
virCgroupRemove;
virCgroupSetCpuShares;
virCgroupSetFreezerState;
+virCgroupSetWeight;
+virCgroupGetWeight;
virCgroupSetMemory;
virCgroupSetMemoryHardLimit;
virCgroupSetMemorySoftLimit;
diff --git a/src/util/cgroup.c b/src/util/cgroup.c
index 309f4e9..a3d3f29 100644
--- a/src/util/cgroup.c
+++ b/src/util/cgroup.c
@@ -851,6 +851,42 @@ int virCgroupForDomain(virCgroupPtr driver ATTRIBUTE_UNUSED,
#endif
/**
+ * virCgroupSetWeight:
+ *
+ * @group: The cgroup to change io weight for
+ * @weight: The Weight for this cgroup
+ *
+ * Returns: 0 on success
+ */
+int virCgroupSetWeight(virCgroupPtr group, unsigned long weight)
+{
+ return virCgroupSetValueU64(group,
+ VIR_CGROUP_CONTROLLER_BLKIO,
+ "blkio.weight",
+ weight);
+}
+
+/**
+ * virCgroupGetWeight:
+ *
+ * @group: The cgroup to get weight for
+ * @Weight: Pointer to returned weight
+ *
+ * Returns: 0 on success
+ */
+int virCgroupGetWeight(virCgroupPtr group, unsigned long *weight)
+{
+ long long unsigned int __weight;
+ int ret;
+ ret = virCgroupGetValueU64(group,
+ VIR_CGROUP_CONTROLLER_BLKIO,
+ "blkio.weight", &__weight);
+ if (ret == 0)
+ *weight = (unsigned long) __weight;
+ return ret;
+}
+
+/**
* virCgroupSetMemory:
*
* @group: The cgroup to change memory for
diff --git a/src/util/cgroup.h b/src/util/cgroup.h
index 67b1299..99c1cfe 100644
--- a/src/util/cgroup.h
+++ b/src/util/cgroup.h
@@ -41,6 +41,9 @@ int virCgroupForDomain(virCgroupPtr driver,
int virCgroupAddTask(virCgroupPtr group, pid_t pid);
+int virCgroupSetWeight(virCgroupPtr group, unsigned long weight);
+int virCgroupGetWeight(virCgroupPtr group, unsigned long *weight);
+
int virCgroupSetMemory(virCgroupPtr group, unsigned long long kb);
int virCgroupGetMemoryUsage(virCgroupPtr group, unsigned long *kb);
--
1.7.1
14 years, 2 months
[libvirt] [PATCH 0/3] qemu aio mode per disk
by Eric Blake
I've taken the patch that Matthias Dahl originally posted _months_
ago:
https://www.redhat.com/archives/libvir-list/2010-April/msg00888.html
and updated it by splitting into three patches, adding more testsuite
coverage, improving documentation, and altering the names slightly.
The end result is that you use:
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' io='native'/>
...
</disk>
</devices>
as the way to request qemu -drive ...,aio=native
Let's get this reviewed and in, rather than dragging our feet
for a few more months :)
Eric Blake (1):
qemu aio: enable support
Matthias Dahl (2):
qemu aio: add XML parsing
qemu aio: parse aio support from qemu -help
AUTHORS | 1 +
docs/formatdomain.html.in | 40 +++++++++++++++++----
docs/schemas/domain.rng | 11 ++++++
src/conf/domain_conf.c | 25 +++++++++++++
src/conf/domain_conf.h | 10 +++++
src/libvirt_private.syms | 3 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 3 +-
src/qemu/qemu_command.c | 17 +++++++++
tests/qemuhelptest.c | 12 ++++--
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args | 1 +
tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml | 33 +++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 1 +
14 files changed, 149 insertions(+), 12 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-aio.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
--
1.7.3.4
14 years, 2 months
[libvirt] l10n/i18n ~ po files and their cycle
by Zdenek Styblik
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I somehow dared to open 'po/cs.po' file and it made me wonder what's the
life cycle of these files. Especially this file seems to be somehow
"shifted", because translations don't even match to their English
counterpart.
I doubt anybody is using Czech translation for libvirt and to be honest,
I would be enormously surprised if someone, anyone, did.
To save myself time, let's ask somewhat obvious. How to use translation?
Is LC_LANG going to do the trick?
Thanks for answers ~ yeh, I'm actually interested into the very first
question of mine - the life cycle of .po files :o)
Thanks,
Z.
- --
Zdenek Styblik
Net/Linux admin
OS TurnovFree.net
email: stybla(a)turnovfree.net
jabber: stybla(a)jabber.turnovfree.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0/GlkACgkQ8MreUbSH7ilzzgCff1ixlPxXusi6YvlaLQK4MXgf
kQEAoK11Axh+iOldlXZucmd7ti9W5PgJ
=dh3C
-----END PGP SIGNATURE-----
14 years, 2 months