[libvirt] [PATCH] Split out CCW address allocation
by Ján Tomko
Just code movement and rename.
---
src/conf/domain_addr.c | 153 ++++++++++++++++++++++++++++++++++++++++++
src/conf/domain_addr.h | 27 ++++++++
src/libvirt_private.syms | 6 ++
src/qemu/qemu_command.c | 170 ++---------------------------------------------
src/qemu/qemu_command.h | 10 +--
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domain.h | 4 +-
src/qemu/qemu_hotplug.c | 12 ++--
src/qemu/qemu_process.c | 2 +-
9 files changed, 205 insertions(+), 181 deletions(-)
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index eafab06..a756f12 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -564,3 +564,156 @@ virDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs,
addrs->lastFlags = flags;
return 0;
}
+
+
+static char*
+virDomainCCWAddressAsString(virDomainDeviceCCWAddressPtr addr)
+{
+ char *addrstr = NULL;
+
+ ignore_value(virAsprintf(&addrstr, "%x.%x.%04x",
+ addr->cssid,
+ addr->ssid,
+ addr->devno));
+ return addrstr;
+}
+
+static int
+virDomainCCWAddressIncrement(virDomainDeviceCCWAddressPtr addr)
+{
+ virDomainDeviceCCWAddress ccwaddr = *addr;
+
+ /* We are not touching subchannel sets and channel subsystems */
+ if (++ccwaddr.devno > VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO)
+ return -1;
+
+ *addr = ccwaddr;
+ return 0;
+}
+
+
+int
+virDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
+ virDomainCCWAddressSetPtr addrs,
+ bool autoassign)
+{
+ int ret = -1;
+ char *addr = NULL;
+
+ if (dev->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)
+ return 0;
+
+ if (!autoassign && dev->addr.ccw.assigned) {
+ if (!(addr = virDomainCCWAddressAsString(&dev->addr.ccw)))
+ goto cleanup;
+
+ if (virHashLookup(addrs->defined, addr)) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("The CCW devno '%s' is in use already "),
+ addr);
+ goto cleanup;
+ }
+ } else if (autoassign && !dev->addr.ccw.assigned) {
+ if (!(addr = virDomainCCWAddressAsString(&addrs->next)) < 0)
+ goto cleanup;
+
+ while (virHashLookup(addrs->defined, addr)) {
+ if (virDomainCCWAddressIncrement(&addrs->next) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("There are no more free CCW devnos."));
+ goto cleanup;
+ }
+ VIR_FREE(addr);
+ addr = virDomainCCWAddressAsString(&addrs->next);
+ }
+ dev->addr.ccw = addrs->next;
+ dev->addr.ccw.assigned = true;
+ } else {
+ return 0;
+ }
+
+ if (virHashAddEntry(addrs->defined, addr, addr) < 0)
+ goto cleanup;
+ else
+ addr = NULL; /* memory will be freed by hash table */
+
+ ret = 0;
+
+ cleanup:
+ VIR_FREE(addr);
+ return ret;
+}
+
+int
+virDomainCCWAddressAllocate(virDomainDefPtr def ATTRIBUTE_UNUSED,
+ virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
+ virDomainDeviceInfoPtr info,
+ void *data)
+{
+ return virDomainCCWAddressAssign(info, data, true);
+}
+
+int
+virDomainCCWAddressValidate(virDomainDefPtr def ATTRIBUTE_UNUSED,
+ virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
+ virDomainDeviceInfoPtr info,
+ void *data)
+{
+ return virDomainCCWAddressAssign(info, data, false);
+}
+
+int
+virDomainCCWAddressReleaseAddr(virDomainCCWAddressSetPtr addrs,
+ virDomainDeviceInfoPtr dev)
+{
+ char *addr;
+ int ret;
+
+ addr = virDomainCCWAddressAsString(&(dev->addr.ccw));
+ if (!addr)
+ return -1;
+
+ if ((ret = virHashRemoveEntry(addrs->defined, addr)) == 0 &&
+ dev->addr.ccw.cssid == addrs->next.cssid &&
+ dev->addr.ccw.ssid == addrs->next.ssid &&
+ dev->addr.ccw.devno < addrs->next.devno) {
+ addrs->next.devno = dev->addr.ccw.devno;
+ addrs->next.assigned = false;
+ }
+
+ VIR_FREE(addr);
+
+ return ret;
+}
+
+void virDomainCCWAddressSetFree(virDomainCCWAddressSetPtr addrs)
+{
+ if (!addrs)
+ return;
+
+ virHashFree(addrs->defined);
+ VIR_FREE(addrs);
+}
+
+virDomainCCWAddressSetPtr
+virDomainCCWAddressSetCreate(void)
+{
+ virDomainCCWAddressSetPtr addrs = NULL;
+
+ if (VIR_ALLOC(addrs) < 0)
+ goto error;
+
+ if (!(addrs->defined = virHashCreate(10, virHashValueFree)))
+ goto error;
+
+ /* must use cssid = 0xfe (254) for virtio-ccw devices */
+ addrs->next.cssid = 254;
+ addrs->next.ssid = 0;
+ addrs->next.devno = 0;
+ addrs->next.assigned = 0;
+ return addrs;
+
+ error:
+ virDomainCCWAddressSetFree(addrs);
+ return NULL;
+}
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index ddad34a..2c3468e 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -146,4 +146,31 @@ int virDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs,
virDomainPCIConnectFlags flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+struct _virDomainCCWAddressSet {
+ virHashTablePtr defined;
+ virDomainDeviceCCWAddress next;
+};
+typedef struct _virDomainCCWAddressSet virDomainCCWAddressSet;
+typedef virDomainCCWAddressSet *virDomainCCWAddressSetPtr;
+
+int virDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
+ virDomainCCWAddressSetPtr addrs,
+ bool autoassign)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+void virDomainCCWAddressSetFree(virDomainCCWAddressSetPtr addrs);
+int virDomainCCWAddressAllocate(virDomainDefPtr def,
+ virDomainDeviceDefPtr dev,
+ virDomainDeviceInfoPtr info,
+ void *data)
+ ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
+int virDomainCCWAddressValidate(virDomainDefPtr def,
+ virDomainDeviceDefPtr dev,
+ virDomainDeviceInfoPtr info,
+ void *data)
+ ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
+
+int virDomainCCWAddressReleaseAddr(virDomainCCWAddressSetPtr addrs,
+ virDomainDeviceInfoPtr dev)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+virDomainCCWAddressSetPtr virDomainCCWAddressSetCreate(void);
#endif /* __DOMAIN_ADDR_H__ */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ac56782..2a2b9c0 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -90,6 +90,12 @@ virInterfaceStateTypeToString;
# conf/domain_addr.h
+virDomainCCWAddressAllocate;
+virDomainCCWAddressAssign;
+virDomainCCWAddressReleaseAddr;
+virDomainCCWAddressSetCreate;
+virDomainCCWAddressSetFree;
+virDomainCCWAddressValidate;
virDomainPCIAddressAsString;
virDomainPCIAddressBusSetModel;
virDomainPCIAddressEnsureAddr;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2caee66..cc4b7ca 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1058,89 +1058,6 @@ qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)
return 0;
}
-/* S390 ccw bus support */
-
-struct _qemuDomainCCWAddressSet {
- virHashTablePtr defined;
- virDomainDeviceCCWAddress next;
-};
-
-static char*
-qemuCCWAddressAsString(virDomainDeviceCCWAddressPtr addr)
-{
- char *addrstr = NULL;
-
- ignore_value(virAsprintf(&addrstr, "%x.%x.%04x",
- addr->cssid,
- addr->ssid,
- addr->devno));
- return addrstr;
-}
-
-static int
-qemuCCWAdressIncrement(virDomainDeviceCCWAddressPtr addr)
-{
- virDomainDeviceCCWAddress ccwaddr = *addr;
-
- /* We are not touching subchannel sets and channel subsystems */
- if (++ccwaddr.devno > VIR_DOMAIN_DEVICE_CCW_MAX_DEVNO)
- return -1;
-
- *addr = ccwaddr;
- return 0;
-}
-
-
-int qemuDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
- qemuDomainCCWAddressSetPtr addrs,
- bool autoassign)
-{
- int ret = -1;
- char *addr = NULL;
-
- if (dev->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)
- return 0;
-
- if (!autoassign && dev->addr.ccw.assigned) {
- if (!(addr = qemuCCWAddressAsString(&dev->addr.ccw)))
- goto cleanup;
-
- if (virHashLookup(addrs->defined, addr)) {
- virReportError(VIR_ERR_XML_ERROR,
- _("The CCW devno '%s' is in use already "),
- addr);
- goto cleanup;
- }
- } else if (autoassign && !dev->addr.ccw.assigned) {
- if (!(addr = qemuCCWAddressAsString(&addrs->next)) < 0)
- goto cleanup;
-
- while (virHashLookup(addrs->defined, addr)) {
- if (qemuCCWAdressIncrement(&addrs->next) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("There are no more free CCW devnos."));
- goto cleanup;
- }
- VIR_FREE(addr);
- addr = qemuCCWAddressAsString(&addrs->next);
- }
- dev->addr.ccw = addrs->next;
- dev->addr.ccw.assigned = true;
- } else {
- return 0;
- }
-
- if (virHashAddEntry(addrs->defined, addr, addr) < 0)
- goto cleanup;
- else
- addr = NULL; /* memory will be freed by hash table */
-
- ret = 0;
-
- cleanup:
- VIR_FREE(addr);
- return ret;
-}
static void
qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
@@ -1187,79 +1104,6 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
def->rng->info.type = type;
}
-static int
-qemuDomainCCWAddressAllocate(virDomainDefPtr def ATTRIBUTE_UNUSED,
- virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
- virDomainDeviceInfoPtr info,
- void *data)
-{
- return qemuDomainCCWAddressAssign(info, data, true);
-}
-
-static int
-qemuDomainCCWAddressValidate(virDomainDefPtr def ATTRIBUTE_UNUSED,
- virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
- virDomainDeviceInfoPtr info,
- void *data)
-{
- return qemuDomainCCWAddressAssign(info, data, false);
-}
-
-static int
-qemuDomainCCWAddressReleaseAddr(qemuDomainCCWAddressSetPtr addrs,
- virDomainDeviceInfoPtr dev)
-{
- char *addr;
- int ret;
-
- addr = qemuCCWAddressAsString(&(dev->addr.ccw));
- if (!addr)
- return -1;
-
- if ((ret = virHashRemoveEntry(addrs->defined, addr)) == 0 &&
- dev->addr.ccw.cssid == addrs->next.cssid &&
- dev->addr.ccw.ssid == addrs->next.ssid &&
- dev->addr.ccw.devno < addrs->next.devno) {
- addrs->next.devno = dev->addr.ccw.devno;
- addrs->next.assigned = false;
- }
-
- VIR_FREE(addr);
-
- return ret;
-}
-
-void qemuDomainCCWAddressSetFree(qemuDomainCCWAddressSetPtr addrs)
-{
- if (!addrs)
- return;
-
- virHashFree(addrs->defined);
- VIR_FREE(addrs);
-}
-
-static qemuDomainCCWAddressSetPtr
-qemuDomainCCWAddressSetCreate(void)
-{
- qemuDomainCCWAddressSetPtr addrs = NULL;
-
- if (VIR_ALLOC(addrs) < 0)
- goto error;
-
- if (!(addrs->defined = virHashCreate(10, virHashValueFree)))
- goto error;
-
- /* must use cssid = 0xfe (254) for virtio-ccw devices */
- addrs->next.cssid = 254;
- addrs->next.ssid = 0;
- addrs->next.devno = 0;
- addrs->next.assigned = 0;
- return addrs;
-
- error:
- qemuDomainCCWAddressSetFree(addrs);
- return NULL;
-}
/*
* Three steps populating CCW devnos
@@ -1273,7 +1117,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
virDomainObjPtr obj)
{
int ret = -1;
- qemuDomainCCWAddressSetPtr addrs = NULL;
+ virDomainCCWAddressSetPtr addrs = NULL;
qemuDomainObjPrivatePtr priv = NULL;
if (STREQLEN(def->os.machine, "s390-ccw", 8) &&
@@ -1281,14 +1125,14 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
qemuDomainPrimeVirtioDeviceAddresses(
def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW);
- if (!(addrs = qemuDomainCCWAddressSetCreate()))
+ if (!(addrs = virDomainCCWAddressSetCreate()))
goto cleanup;
- if (virDomainDeviceInfoIterate(def, qemuDomainCCWAddressValidate,
+ if (virDomainDeviceInfoIterate(def, virDomainCCWAddressValidate,
addrs) < 0)
goto cleanup;
- if (virDomainDeviceInfoIterate(def, qemuDomainCCWAddressAllocate,
+ if (virDomainDeviceInfoIterate(def, virDomainCCWAddressAllocate,
addrs) < 0)
goto cleanup;
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_S390)) {
@@ -1301,7 +1145,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
priv = obj->privateData;
if (addrs) {
/* if this is the live domain object, we persist the CCW addresses*/
- qemuDomainCCWAddressSetFree(priv->ccwaddrs);
+ virDomainCCWAddressSetFree(priv->ccwaddrs);
priv->persistentAddrs = 1;
priv->ccwaddrs = addrs;
addrs = NULL;
@@ -1312,7 +1156,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
ret = 0;
cleanup:
- qemuDomainCCWAddressSetFree(addrs);
+ virDomainCCWAddressSetFree(addrs);
return ret;
}
@@ -1796,7 +1640,7 @@ qemuDomainReleaseDeviceAddress(virDomainObjPtr vm,
if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
STREQLEN(vm->def->os.machine, "s390-ccw", 8) &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW) &&
- qemuDomainCCWAddressReleaseAddr(priv->ccwaddrs, info) < 0)
+ virDomainCCWAddressReleaseAddr(priv->ccwaddrs, info) < 0)
VIR_WARN("Unable to release CCW address on %s",
NULLSTR(devstr));
else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index afbd6ff..cf51056 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -243,13 +243,9 @@ virDomainPCIAddressSetPtr qemuDomainPCIAddressSetCreate(virDomainDefPtr def,
unsigned int nbuses,
bool dryRun);
-int qemuAssignDevicePCISlots(virDomainDefPtr def,
- virQEMUCapsPtr qemuCaps,
- virDomainPCIAddressSetPtr addrs);
-
-int qemuDomainCCWAddressAssign(virDomainDeviceInfoPtr dev, qemuDomainCCWAddressSetPtr addrs,
- bool autoassign);
-void qemuDomainCCWAddressSetFree(qemuDomainCCWAddressSetPtr addrs);
+int qemuAssignDevicePCISlots(virDomainDefPtr def,
+ virQEMUCapsPtr qemuCaps,
+ virDomainPCIAddressSetPtr addrs);
int qemuAssignDeviceAliases(virDomainDefPtr def, virQEMUCapsPtr qemuCaps);
int qemuDomainNetVLAN(virDomainNetDefPtr def);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 7c4fc67..a57f26e 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -249,7 +249,7 @@ qemuDomainObjPrivateFree(void *data)
virCgroupFree(&priv->cgroup);
virDomainPCIAddressSetFree(priv->pciaddrs);
- qemuDomainCCWAddressSetFree(priv->ccwaddrs);
+ virDomainCCWAddressSetFree(priv->ccwaddrs);
virDomainChrSourceDefFree(priv->monConfig);
qemuDomainObjFreeJob(priv);
VIR_FREE(priv->vcpupids);
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 8615f74..79dce29 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -119,8 +119,6 @@ struct qemuDomainJobObj {
typedef void (*qemuDomainCleanupCallback)(virQEMUDriverPtr driver,
virDomainObjPtr vm);
-typedef struct _qemuDomainCCWAddressSet qemuDomainCCWAddressSet;
-typedef qemuDomainCCWAddressSet *qemuDomainCCWAddressSetPtr;
typedef struct _qemuDomainObjPrivate qemuDomainObjPrivate;
typedef qemuDomainObjPrivate *qemuDomainObjPrivatePtr;
@@ -145,7 +143,7 @@ struct _qemuDomainObjPrivate {
int *vcpupids;
virDomainPCIAddressSetPtr pciaddrs;
- qemuDomainCCWAddressSetPtr ccwaddrs;
+ virDomainCCWAddressSetPtr ccwaddrs;
int persistentAddrs;
virQEMUCapsPtr qemuCaps;
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 4590409..ca573c4 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -279,8 +279,8 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE)) {
if (disk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
- if (qemuDomainCCWAddressAssign(&disk->info, priv->ccwaddrs,
- !disk->info.addr.ccw.assigned) < 0)
+ if (virDomainCCWAddressAssign(&disk->info, priv->ccwaddrs,
+ !disk->info.addr.ccw.assigned) < 0)
goto error;
} else if (!disk->info.type ||
disk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
@@ -389,8 +389,8 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
if (virDomainPCIAddressEnsureAddr(priv->pciaddrs, &controller->info) < 0)
goto cleanup;
} else if (controller->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
- if (qemuDomainCCWAddressAssign(&controller->info, priv->ccwaddrs,
- !controller->info.addr.ccw.assigned) < 0)
+ if (virDomainCCWAddressAssign(&controller->info, priv->ccwaddrs,
+ !controller->info.addr.ccw.assigned) < 0)
goto cleanup;
}
releaseaddr = true;
@@ -933,8 +933,8 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
if (STREQLEN(vm->def->os.machine, "s390-ccw", 8) &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW)) {
net->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW;
- if (qemuDomainCCWAddressAssign(&net->info, priv->ccwaddrs,
- !net->info.addr.ccw.assigned) < 0)
+ if (virDomainCCWAddressAssign(&net->info, priv->ccwaddrs,
+ !net->info.addr.ccw.assigned) < 0)
goto cleanup;
} else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_S390))
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6af77c9..0b8155b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4448,7 +4448,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
virDomainPCIAddressSetFree(priv->pciaddrs);
priv->pciaddrs = NULL;
virDomainDefClearCCWAddresses(vm->def);
- qemuDomainCCWAddressSetFree(priv->ccwaddrs);
+ virDomainCCWAddressSetFree(priv->ccwaddrs);
priv->ccwaddrs = NULL;
}
--
1.8.5.5
10 years, 5 months
[libvirt] [PATCH] libxl: Use cooperative resume for migration
by Jason Andryuk
Migration code specifies the problematic non-cooperative resume mode
which is a known issue with Xen's libxl [1]. Instead, use the better
supported cooperative mode.
Without this, guests BUG() in xen_irq_resume after failing to bind
still-bound event channels.
[1] http://bugs.xenproject.org/xen/bug/30
---
src/libxl/libxl_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index a25edf0..53d961c 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -147,7 +147,7 @@ libxlDoMigrateSend(libxlDriverPrivatePtr driver,
xl_flags, NULL);
if (ret != 0) {
/* attempt to resume the domain on failure */
- if (libxl_domain_resume(priv->ctx, vm->def->id, 0, 0) != 0) {
+ if (libxl_domain_resume(priv->ctx, vm->def->id, 1, 0) != 0) {
VIR_DEBUG("Failed to resume domain following failed migration");
virDomainObjSetState(vm, VIR_DOMAIN_PAUSED,
VIR_DOMAIN_PAUSED_MIGRATION);
--
1.8.3.1
10 years, 5 months
[libvirt] [PATCH 0/4] Couple of nodeinfo enhancements
by Michal Privoznik
Look at the patches :P
Michal Privoznik (4):
nodeinfo: Introduce @arch to linuxNodeInfoCPUPopulate
virNodeParseNode: Propagate host architecture
nodeinfotest: Print error if cpuinfo file can't be opened
virNodeParseSocket: Take ARM into account
cfg.mk | 2 +-
src/nodeinfo.c | 199 +++++++++++----------
src/nodeinfopriv.h | 1 +
.../nodeinfodata/linux-armv6l-raspberrypi.cpuinfo | 12 ++
.../nodeinfodata/linux-armv6l-raspberrypi.expected | 1 +
.../linux-raspberrypi/cpu/cpu0/topology/core_id | 1 +
.../cpu/cpu0/topology/core_siblings | 1 +
.../cpu/cpu0/topology/core_siblings_list | 1 +
.../cpu/cpu0/topology/physical_package_id | 1 +
.../cpu/cpu0/topology/thread_siblings | 1 +
.../cpu/cpu0/topology/thread_siblings_list | 1 +
.../linux-raspberrypi/cpu/cpuidle/current_driver | 1 +
.../cpu/cpuidle/current_governor_ro | 1 +
.../nodeinfodata/linux-raspberrypi/cpu/kernel_max | 1 +
tests/nodeinfodata/linux-raspberrypi/cpu/offline | 1 +
tests/nodeinfodata/linux-raspberrypi/cpu/online | 1 +
tests/nodeinfodata/linux-raspberrypi/cpu/possible | 1 +
tests/nodeinfodata/linux-raspberrypi/cpu/present | 1 +
...86-test1.cpuinfo => linux-x86_64-test1.cpuinfo} | 0
...-test1.expected => linux-x86_64-test1.expected} | 0
...86-test2.cpuinfo => linux-x86_64-test2.cpuinfo} | 0
...-test2.expected => linux-x86_64-test2.expected} | 0
...86-test3.cpuinfo => linux-x86_64-test3.cpuinfo} | 0
...-test3.expected => linux-x86_64-test3.expected} | 0
...86-test4.cpuinfo => linux-x86_64-test4.cpuinfo} | 0
...-test4.expected => linux-x86_64-test4.expected} | 0
...86-test5.cpuinfo => linux-x86_64-test5.cpuinfo} | 0
...-test5.expected => linux-x86_64-test5.expected} | 0
...86-test6.cpuinfo => linux-x86_64-test6.cpuinfo} | 0
...-test6.expected => linux-x86_64-test6.expected} | 0
...86-test7.cpuinfo => linux-x86_64-test7.cpuinfo} | 0
...-test7.expected => linux-x86_64-test7.expected} | 0
...86-test8.cpuinfo => linux-x86_64-test8.cpuinfo} | 0
...-test8.expected => linux-x86_64-test8.expected} | 0
tests/nodeinfotest.c | 63 ++++---
35 files changed, 164 insertions(+), 127 deletions(-)
create mode 100644 tests/nodeinfodata/linux-armv6l-raspberrypi.cpuinfo
create mode 100644 tests/nodeinfodata/linux-armv6l-raspberrypi.expected
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpu0/topology/core_id
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpu0/topology/core_siblings
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpu0/topology/core_siblings_list
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpu0/topology/physical_package_id
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpu0/topology/thread_siblings
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpu0/topology/thread_siblings_list
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpuidle/current_driver
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/cpuidle/current_governor_ro
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/kernel_max
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/offline
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/online
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/possible
create mode 100644 tests/nodeinfodata/linux-raspberrypi/cpu/present
rename tests/nodeinfodata/{linux-x86-test1.cpuinfo => linux-x86_64-test1.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test1.expected => linux-x86_64-test1.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test2.cpuinfo => linux-x86_64-test2.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test2.expected => linux-x86_64-test2.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test3.cpuinfo => linux-x86_64-test3.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test3.expected => linux-x86_64-test3.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test4.cpuinfo => linux-x86_64-test4.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test4.expected => linux-x86_64-test4.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test5.cpuinfo => linux-x86_64-test5.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test5.expected => linux-x86_64-test5.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test6.cpuinfo => linux-x86_64-test6.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test6.expected => linux-x86_64-test6.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test7.cpuinfo => linux-x86_64-test7.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test7.expected => linux-x86_64-test7.expected} (100%)
rename tests/nodeinfodata/{linux-x86-test8.cpuinfo => linux-x86_64-test8.cpuinfo} (100%)
rename tests/nodeinfodata/{linux-x86-test8.expected => linux-x86_64-test8.expected} (100%)
--
1.8.5.5
10 years, 5 months
[libvirt] [PATCH] qemu: parse -device virtio-balloon
by Laine Stump
There are no options to parse here, and all three possible device
names have the same prefix ("virtio-balloon" with "-ccw", "-pci", or
"-device" appended), so it is fairly simple.
qemuParseCommandLineString() previously would always add a <memballoon
model='virtio'/> to every result (the comments erroneously say that it
is adding a <memballoon model='none'/>) This has been changed to add
model='none', and 84 test case xml's updated accordingly (so that
qemuxml2argvtest won't fail).
Now that the memballoon device is properly parsed, we can safely add a
test for properly ignoring -nodefconfig and -nodefaults. Rather than
adding an entire new test case for this (and memballoon), we just
randomly pick the clock-utc test and modify it slightly to fulfill the
purpose.
---
I don't necessarily have any love for the memory balloon driver, but
this ended up being necessary in order to prevent test failures after
fixing the patch here to not ignore unrecognized -device args:
https://www.redhat.com/archives/libvir-list/2014-June/msg00388.html
src/qemu/qemu_command.c | 8 +++++++-
tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args | 7 ++++---
tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml | 2 +-
.../qemuxml2argv-disk-drive-error-policy-enospace.xml | 2 +-
.../qemuxml2argv-disk-drive-error-policy-stop.xml | 2 +-
.../qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml | 2 +-
.../qemuxml2argv-disk-drive-network-nbd-export.xml | 2 +-
.../qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml | 2 +-
.../qemuxml2argv-disk-drive-network-rbd-ceph-env.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-migrate.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-user.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-nosharepages.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-smp.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.xml | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml | 2 +-
tests/qemuxml2argvtest.c | 2 +-
88 files changed, 97 insertions(+), 90 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2caee66..e1d7e1b 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -11353,6 +11353,12 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
virDomainHostdevDefFree(hostdev);
goto error;
}
+ } else if (STREQ(arg, "-device") && progargv[i + 1] &&
+ STRPREFIX(progargv[i + 1], "virtio-balloon")) {
+ WANT_VALUE();
+ if (VIR_ALLOC(def->memballoon) < 0)
+ goto error;
+ def->memballoon->model = VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO;
} else if (STREQ(arg, "-soundhw")) {
const char *start;
WANT_VALUE();
@@ -11657,7 +11663,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
virDomainMemballoonDefPtr memballoon;
if (VIR_ALLOC(memballoon) < 0)
goto error;
- memballoon->model = VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO;
+ memballoon->model = VIR_DOMAIN_MEMBALLOON_MODEL_NONE;
def->memballoon = memballoon;
}
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
index b5c37bb..b639821 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
@@ -24,6 +24,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
index e42f7ed..610321f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
@@ -30,6 +30,6 @@
<controller type='fdc' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
index 8124f34..f4ebc2e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
index 2acb71f..4e1f66b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args
index 57fc6e3..9ed48c1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.args
@@ -1,5 +1,6 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu -S -M \
-pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi -boot c -usb -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel \
-none
+pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi -boot c -usb -hda /dev/HostVG/QEMUGuest1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
index b1ee29c..dc2f851 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
@@ -29,6 +29,6 @@
<console type='pty'>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
index d8ff676..60b3168 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
@@ -29,6 +29,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
index 75b9cec..5d94ec0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
index 59ef29d..31d3702 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
@@ -29,6 +29,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
index 0c9bc08..3b06a97 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
@@ -29,6 +29,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
index 0b85fb1..779aa17 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
index 4bd8e24..481cc55 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
index 7fe9082..933feb4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
index f0e7df4..4cc449d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
index 0beda48..63fb2b0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
index 00730f7..dcac861 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
index 6ee75aa..0a93f00 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
index 92fcd8a..ab88224 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
index 83d5dd0..b78be46 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
index ded9cd1..14dd1ca 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
index 85fe2a9..a36b09c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
index 7c1fdb1..dce5f23 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
@@ -30,6 +30,6 @@
</disk>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml
index a6b13ab..1764259 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml
@@ -30,6 +30,6 @@
</disk>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml
index dd52c39..62b17ec 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml
index c3bfa34..0ba7a05 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml
index 8087f90..aaafa63 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml
index 0955fee..82aeaf1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
index e74b95f..6d18d72 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
index bba512e..37e9db5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
@@ -32,6 +32,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml
index 06e852d..bc9d8d0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml
@@ -33,6 +33,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
index bba512e..37e9db5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
@@ -32,6 +32,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
index d20ca3e..fc9ad16 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
@@ -30,6 +30,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
index 8bbd324..343767d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
@@ -36,6 +36,6 @@
<controller type='fdc' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
index edcd015..9674237 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
@@ -41,6 +41,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
index 730c4f3..74a30df 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
@@ -28,6 +28,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
index 3e2e550..458c55d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
@@ -40,6 +40,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
index 3baf97d..e0bad71 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
@@ -40,6 +40,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
index 4aa385c..0177654 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
@@ -29,6 +29,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
index 66ea35d..6bebd10 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
@@ -29,6 +29,6 @@
<video>
<model type='vga' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
index 0198930..694343f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-policy.xml
@@ -31,6 +31,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
index eda2e87..b35c2bd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
@@ -31,6 +31,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
index 2b13865..44df226 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
@@ -29,6 +29,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
index eda2e87..b35c2bd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
@@ -31,6 +31,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
index 11e5a7a..cfa61be 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-websocket.xml
@@ -24,6 +24,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
index 267876f..356ac36 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
@@ -31,6 +31,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
index 422127c..b9b5c14 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
@@ -28,6 +28,6 @@
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
</source>
</hostdev>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
index ee00634..5807eff 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
@@ -28,6 +28,6 @@
<address bus='14' device='6'/>
</source>
</hostdev>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml b/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml
index bb36fc0..5b80040 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml
@@ -24,6 +24,6 @@
<emulator>/usr/bin/qemu</emulator>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
index 0863737..5765a04 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
@@ -24,6 +24,6 @@
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='usb'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
index 03558dd..59d04eb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
@@ -24,6 +24,6 @@
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<input type='tablet' bus='usb'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
index a187aaa..32fb349 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
@@ -21,6 +21,6 @@
<emulator>/usr/bin/kvm</emulator>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml
index 5eb229f..37a9e22 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml
index 0dd5b39..b98f434 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
index 3a375fe..5fcc470 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
index 6fe8a85..5e1a101 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
@@ -26,6 +26,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
index b9313e0..80d8f0f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
@@ -26,6 +26,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
index f432732..5da5fa6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
@@ -27,6 +27,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
index cea52f8..8263642 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
@@ -26,6 +26,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
index 10c2d41..43a88ee 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
index 6fe8a85..5e1a101 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
@@ -26,6 +26,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
index 8ad6eb7..d616918 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
@@ -29,6 +29,6 @@
<target dev='nic02'/>
<model type='rtl8139'/>
</interface>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
index 6f00fe1..bc1a981 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
@@ -28,6 +28,6 @@
<script path='/etc/qemu-ifup'/>
<model type='rtl8139'/>
</interface>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
index 960b7aa..80330aa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
@@ -27,6 +27,6 @@
<mac address='00:11:22:33:44:55'/>
<model type='rtl8139'/>
</interface>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
index 195a3d9..5c0ef55 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
@@ -27,6 +27,6 @@
<mac address='00:11:22:33:44:55'/>
<model type='virtio'/>
</interface>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
index 3a375fe..5fcc470 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nosharepages.xml b/tests/qemuxml2argvdata/qemuxml2argv-nosharepages.xml
index 5e54cd0..c53b7c3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nosharepages.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nosharepages.xml
@@ -26,6 +26,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
index 60ea846..a3dfe9a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
@@ -28,6 +28,6 @@
<protocol type='raw'/>
<target port='0'/>
</parallel>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml
index 64b70f3..1f896f8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-disk.xml
@@ -36,6 +36,6 @@
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.xml
index d001ee7..9703bd4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-nvram.xml
@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu-system-ppc64</emulator>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
<nvram>
<address type='spapr-vio' reg='0x4000'/>
</nvram>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
index 29f84db..3e43132 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
@@ -23,7 +23,7 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
<qemu:commandline>
<qemu:arg value='-unknown'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
index 883a804..974b966 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
@@ -17,6 +17,6 @@
<emulator>/usr/bin/qemu</emulator>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
index a298b9d..4d400e1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
@@ -17,6 +17,6 @@
<emulator>/usr/bin/qemu</emulator>
<controller type='usb' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
index 138a83a..b40ca80 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
index 3a375fe..5fcc470 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
@@ -23,6 +23,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
index b1a7429..4c4de66 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
@@ -31,6 +31,6 @@
<source path='/dev/ttyS2'/>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
index 4335f43..e4b0396 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
@@ -31,6 +31,6 @@
<source path='/tmp/serial.log'/>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
index 4829285..8bce8f5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
@@ -33,6 +33,6 @@
<console type='pty'>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
index d2af760..1de2305 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
@@ -29,6 +29,6 @@
<console type='pty'>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
index 06ce154..5a667d7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
@@ -33,6 +33,6 @@
<protocol type='telnet'/>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
index 493f8a1..cc8bcfe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
@@ -33,6 +33,6 @@
<protocol type='raw'/>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
index d525965..8cc2f9c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
@@ -37,6 +37,6 @@
<source mode='connect' host='127.0.0.1' service='9998'/>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
index 8aa052d..6bb1ce9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
@@ -31,6 +31,6 @@
<source mode='connect' path='/tmp/serial.sock'/>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
index 12107d7..ea789ab 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
@@ -29,6 +29,6 @@
<console type='vc'>
<target type='serial' port='0'/>
</console>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
index 55bf16d..365e9df 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
@@ -26,6 +26,6 @@
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index 0bd1185..7349003 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -27,6 +27,6 @@
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
index 32d57e0..2bbb826 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
@@ -24,6 +24,6 @@
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<watchdog model='ib700' action='poweroff'/>
- <memballoon model='virtio'/>
+ <memballoon model='none'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 24d104e..803c3b8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -630,7 +630,7 @@ mymain(void)
DO_TEST_FAILURE("reboot-timeout-enabled", NONE);
DO_TEST("bios", QEMU_CAPS_DEVICE, QEMU_CAPS_SGA);
- DO_TEST("clock-utc", NONE);
+ DO_TEST("clock-utc", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE);
DO_TEST("clock-localtime", NONE);
DO_TEST("clock-localtime-basis-localtime", QEMU_CAPS_RTC);
DO_TEST("clock-variable", QEMU_CAPS_RTC);
--
1.9.3
10 years, 5 months
[libvirt] [libvirt-python][PATCH] Implement new virNodeGetFreePages API
by Michal Privoznik
The API expose information on host's free pages counts. For easier
access, in python this API returns a dictionary such as:
In [4]: conn.getFreePages([2048,1*1024*1024], -1, 5)
Out[4]:
{-1: {2048: 114, 1048576: 4},
0: {2048: 3, 1048576: 1},
1: {2048: 100, 1048576: 1},
2: {2048: 10, 1048576: 1},
3: {2048: 1, 1048576: 1}}
At the top level of the returned dictionary there's a pair of <NUMA
node> and another dictionary that contains detailed information on
each supported page size. The information then consists of fairs of
<page size> and <count of free pages>.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
generator.py | 1 +
libvirt-override-api.xml | 9 ++++
libvirt-override.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 117 insertions(+)
diff --git a/generator.py b/generator.py
index bdac877..03027c6 100755
--- a/generator.py
+++ b/generator.py
@@ -462,6 +462,7 @@ skip_impl = (
'virDomainMigrate3',
'virDomainMigrateToURI3',
'virConnectGetCPUModelNames',
+ 'virNodeGetFreePages',
)
lxc_skip_impl = (
diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml
index 935e04d..bbf0ab1 100644
--- a/libvirt-override-api.xml
+++ b/libvirt-override-api.xml
@@ -624,5 +624,14 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='flags' type='int' info='unused, pass 0'/>
</function>
+ <function name="virNodeGetFreePages" file='python'>
+ <info>Returns the number of available pages for a list of cells and page sizes</info>
+ <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
+ <arg name='pages' type='char *' info='list of desired page sizes'/>
+ <arg name='startCell' type='int' info='first cell in the list'/>
+ <arg name='maxCells' type='int' info='number of cell in the list'/>
+ <arg name='flags' type='int' info='unused, pass 0'/>
+ <return type='char *' info='the list available memory in the cells'/>
+ </function>
</symbols>
</api>
diff --git a/libvirt-override.c b/libvirt-override.c
index eb1d5e2..04fb4cd 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -7764,6 +7764,110 @@ libvirt_virDomainSetTime(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
}
#endif /* LIBVIR_CHECK_VERSION(1, 2, 5) */
+
+#if LIBVIR_CHECK_VERSION(1, 2, 6)
+static PyObject *
+libvirt_virNodeGetFreePages(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args) {
+ PyObject *py_retval = NULL;
+ PyObject *pyobj_conn;
+ PyObject *pyobj_pagesize;
+ PyObject *pyobj_counts = NULL;
+ virConnectPtr conn;
+ unsigned int *pages = NULL;
+ int startCell;
+ unsigned int cellCount;
+ unsigned int flags;
+ unsigned long long *counts = NULL;
+ int c_retval;
+ ssize_t pyobj_pagesize_size, i, j;
+
+ if (!PyArg_ParseTuple(args, (char *)"OOiii:virNodeGetFreePages",
+ &pyobj_conn, &pyobj_pagesize, &startCell,
+ &cellCount, &flags))
+ return NULL;
+
+ if (!PyList_Check(pyobj_pagesize)) {
+ PyErr_Format(PyExc_TypeError, "pagesize must be list");
+ return NULL;
+ }
+
+ if (cellCount == 0) {
+ PyErr_Format(PyExc_LookupError, "cellCount must not be zero");
+ return NULL;
+ }
+
+ conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
+
+ pyobj_pagesize_size = PyList_Size(pyobj_pagesize);
+ if (VIR_ALLOC_N(pages, pyobj_pagesize_size) < 0 ||
+ VIR_ALLOC_N(counts, pyobj_pagesize_size * cellCount) < 0 ||
+ !(pyobj_counts = PyDict_New()))
+ goto cleanup;
+
+ for (i = 0; i < pyobj_pagesize_size; i++) {
+ PyObject *tmp = PyList_GetItem(pyobj_pagesize, i);
+
+ if (libvirt_intUnwrap(tmp, &pages[i]) < 0)
+ goto cleanup;
+ }
+
+ LIBVIRT_BEGIN_ALLOW_THREADS;
+ c_retval = virNodeGetFreePages(conn,
+ pyobj_pagesize_size, pages,
+ startCell, cellCount,
+ counts, flags);
+ LIBVIRT_END_ALLOW_THREADS;
+
+ if (c_retval < 0) {
+ py_retval = VIR_PY_NONE;
+ goto cleanup;
+ }
+
+ for (i = 0; i < c_retval;) {
+ PyObject *per_node = NULL;
+ PyObject *node = NULL;
+
+ if (!(per_node = PyDict_New()) ||
+ !(node = libvirt_intWrap(startCell + i/pyobj_pagesize_size))) {
+ Py_XDECREF(per_node);
+ Py_XDECREF(node);
+ goto cleanup;
+ }
+
+ for (j = 0; j < pyobj_pagesize_size; j ++) {
+ PyObject *page = NULL;
+ PyObject *count = NULL;
+
+ if (!(page = libvirt_intWrap(pages[j])) ||
+ !(count = libvirt_intWrap(counts[i + j])) ||
+ PyDict_SetItem(per_node, page, count) < 0) {
+ Py_XDECREF(page);
+ Py_XDECREF(count);
+ Py_XDECREF(per_node);
+ Py_XDECREF(node);
+ goto cleanup;
+ }
+ }
+ i += pyobj_pagesize_size;
+
+ if (PyDict_SetItem(pyobj_counts, node, per_node) < 0) {
+ Py_XDECREF(per_node);
+ Py_XDECREF(node);
+ goto cleanup;
+ }
+ }
+
+ py_retval = pyobj_counts;
+ pyobj_counts = NULL;
+ cleanup:
+ Py_XDECREF(pyobj_counts);
+ VIR_FREE(pages);
+ VIR_FREE(counts);
+ return py_retval;
+}
+#endif /* LIBVIR_CHECK_VERSION(1, 2, 6) */
+
/************************************************************************
* *
* The registration stuff *
@@ -7945,6 +8049,9 @@ static PyMethodDef libvirtMethods[] = {
{(char *) "virDomainGetTime", libvirt_virDomainGetTime, METH_VARARGS, NULL},
{(char *) "virDomainSetTime", libvirt_virDomainSetTime, METH_VARARGS, NULL},
#endif /* LIBVIR_CHECK_VERSION(1, 2, 5) */
+#if LIBVIR_CHECK_VERSION(1, 2, 6)
+ {(char *) "virNodeGetFreePages", libvirt_virNodeGetFreePages, METH_VARARGS, NULL},
+#endif /* LIBVIR_CHECK_VERSION(1, 2, 6) */
{NULL, NULL, 0, NULL}
};
--
1.8.5.5
10 years, 5 months
[libvirt] [PATCHv2] outline of writing vbox driver
by Taowei
Define the vboxUniformedAPI struct to handle version conflict.
The previous version and introduction is in
https://www.redhat.com/archives/libvir-list/2014-June/msg00773.html
---
Diff to v1:
* fix some code style and spell problems
src/vbox/vbox_tmpl.c | 81 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 58 insertions(+), 23 deletions(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 4ba9ad7..ac91ff5 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -826,6 +826,62 @@ static PRUnichar *PRUnicharFromInt(int n) {
#endif /* !(VBOX_API_VERSION == 2002000) */
+/* Begin of vboxUniformedAPI */
+
+static void _pfnComInitialize(vboxGlobalData *data)
+{
+#if VBOX_XPCOMC_VERSION == 0x00010000U
+ data->pFuncs->pfnComInitialize(&data->vboxObj, &data->vboxSession);
+#else /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
+ data->pFuncs->pfnComInitialize(IVIRTUALBOX_IID_STR, &data->vboxObj, ISESSION_IID_STR, &data->vboxSession);
+#endif /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
+}
+
+static int
+_initializeFWatch(vboxGlobalData *data ATTRIBUTE_UNUSED)
+{
+#if (VBOX_XPCOMC_VERSION == 0x00010000U) || (VBOX_API_VERSION == 2002000)
+ /* No event queue functionality in 2.2.* as of now */
+ VIR_WARN("There is no fWatch initical in current version");
+#else /* (VBOX_XPCOMC_VERSION != 0x00010000U && VBOX_API_VERSION != 2002000) */
+ /* Initialize the fWatch needed for Event Callbacks */
+ data->fdWatch = -1;
+ data->pFuncs->pfnGetEventQueue(&data->vboxQueue);
+ if (data->vboxQueue == NULL) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("nsIEventQueue object is null"));
+ return -1;
+ }
+#endif /* (VBOX_XPCOMC_VERSION != 0x00010000U && VBOX_API_VERSION != 2002000) */
+ return 0;
+}
+
+typedef struct {
+ /* vbox API version */
+ uint32_t uVersion;
+ /* vbox APIs */
+ void (*pfnComInitialize)(vboxGlobalData *data);
+ int (*initializeFWatch)(vboxGlobalData *data);
+ /* vbox API features */
+ bool fWatchNeedInitialize;
+} vboxUniformedAPI;
+
+static vboxUniformedAPI vboxAPI = {
+ .uVersion = VBOX_API_VERSION,
+ .pfnComInitialize = _pfnComInitialize,
+ .initializeFWatch = _initializeFWatch,
+#if (VBOX_XPCOMC_VERSION == 0x00010000U) || (VBOX_API_VERSION == 2002000)
+ /* No event queue functionality in 2.2.* as of now */
+ .fWatchNeedInitialize = 0,
+#else /* (VBOX_XPCOMC_VERSION != 0x00010000U && VBOX_API_VERSION != 2002000) */
+ .fWatchNeedInitialize = 1,
+#endif /* (VBOX_XPCOMC_VERSION != 0x00010000U && VBOX_API_VERSION != 2002000) */
+};
+
+static vboxUniformedAPI *pVBoxAPI = &vboxAPI;
+
+/* End of vboxUniformedAPI and Begin of common codes */
+
static PRUnichar *
vboxSocketFormatAddrUtf16(vboxGlobalData *data, virSocketAddrPtr addr)
{
@@ -923,31 +979,10 @@ vboxInitialize(vboxGlobalData *data)
if (data->pFuncs == NULL)
goto cleanup;
-#if VBOX_XPCOMC_VERSION == 0x00010000U
- data->pFuncs->pfnComInitialize(&data->vboxObj, &data->vboxSession);
-#else /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
- data->pFuncs->pfnComInitialize(IVIRTUALBOX_IID_STR, &data->vboxObj,
- ISESSION_IID_STR, &data->vboxSession);
-
-# if VBOX_API_VERSION == 2002000
-
- /* No event queue functionality in 2.2.* as of now */
-
-# else /* !(VBOX_API_VERSION == 2002000) */
-
- /* Initial the fWatch needed for Event Callbacks */
- data->fdWatch = -1;
-
- data->pFuncs->pfnGetEventQueue(&data->vboxQueue);
+ pVBoxAPI->pfnComInitialize(data);
- if (data->vboxQueue == NULL) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("nsIEventQueue object is null"));
+ if (pVBoxAPI->fWatchNeedInitialize && pVBoxAPI->initializeFWatch(data) != 0)
goto cleanup;
- }
-
-# endif /* !(VBOX_API_VERSION == 2002000) */
-#endif /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
if (data->vboxObj == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
--
1.7.9.5
10 years, 5 months
[libvirt] [PATCH] outline of writing vbox driver
by Taowei
Define the vboxUniformedAPI struct to handle version conflicts.
The vboxInitialize is rewrited with the new mechanism. Other
functions would be rewriting in the same way.
Here, I still use template to generate functions in vboxUniformedAPI.
Though, these functions may change between different versions, but
not for every version. Using template could decrease the duplicated code.
For every new feature added by vbox, a flag would indicate whether this
feature is supported in current version. Calling for an unsupported
feature would lead to a VIR_WARN.
---
src/vbox/vbox_tmpl.c | 84 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 61 insertions(+), 23 deletions(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 1ed2729..4625805 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -826,6 +826,65 @@ static PRUnichar *PRUnicharFromInt(int n) {
#endif /* !(VBOX_API_VERSION == 2002000) */
+/* Begin of vboxUniformedAPI */
+
+#define UNUSED(expr) do { (void)(expr); } while (0)
+
+static void _pfnComInitialize(vboxGlobalData *data)
+{
+#if VBOX_XPCOMC_VERSION == 0x00010000U
+ data->pFuncs->pfnComInitialize(&data->vboxObj, &data->vboxSession);
+#else /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
+ data->pFuncs->pfnComInitialize(IVIRTUALBOX_IID_STR, &data->vboxObj, ISESSION_IID_STR, &data->vboxSession);
+#endif /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
+}
+
+#if (VBOX_XPCOMC_VERSION == 0x00010000U) || (VBOX_API_VERSION == 2002000)
+ #define FWATCH_NEED_INITICAL 0
+#else /* (VBOX_XPCOMC_VERSION != 0x00010000U && VBOX_API_VERSION != 2002000) */
+ #define FWATCH_NEED_INITICAL 1
+#endif /* (VBOX_XPCOMC_VERSION != 0x00010000U && VBOX_API_VERSION != 2002000) */
+
+static int _initicalFWatch(vboxGlobalData *data)
+{
+#if FWATCH_NEED_INITICAL == 0
+ /* No event queue functionality in 2.2.* as of now */
+ UNUSED(data);
+ VIR_WARN("There is no fWatch initical in current version");
+#else /* FWATCH_NEED_INITICAL != 0 */
+ /* Initial the fWatch needed for Event Callbacks */
+ data->fdWatch = -1;
+ data->pFuncs->pfnGetEventQueue(&data->vboxQueue);
+ if (data->vboxQueue == NULL) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("nsIEventQueue object is null"));
+ return -1;
+ }
+#endif /* FWATCH_NEED_INITICAL != 0 */
+ return 0;
+}
+
+typedef struct {
+ /* vbox API version */
+ uint32_t uVersion;
+ /* vbox APIs */
+ void (*pfnComInitialize)(vboxGlobalData *data);
+ int (*initicalFWatch)(vboxGlobalData *data);
+ /* vbox API features */
+ unsigned fWatchNeedInitical : 1;
+} vboxUniformedAPI;
+
+static vboxUniformedAPI vboxAPI = {
+ .uVersion = VBOX_API_VERSION,
+ .pfnComInitialize = _pfnComInitialize,
+ .initicalFWatch = _initicalFWatch,
+ .fWatchNeedInitical = FWATCH_NEED_INITICAL,
+};
+
+static vboxUniformedAPI *pVboxAPI = &vboxAPI;
+
+/* End of vboxUniformedAPI and Begin of common codes */
+
static PRUnichar *
vboxSocketFormatAddrUtf16(vboxGlobalData *data, virSocketAddrPtr addr)
{
@@ -923,31 +982,10 @@ vboxInitialize(vboxGlobalData *data)
if (data->pFuncs == NULL)
goto cleanup;
-#if VBOX_XPCOMC_VERSION == 0x00010000U
- data->pFuncs->pfnComInitialize(&data->vboxObj, &data->vboxSession);
-#else /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
- data->pFuncs->pfnComInitialize(IVIRTUALBOX_IID_STR, &data->vboxObj,
- ISESSION_IID_STR, &data->vboxSession);
-
-# if VBOX_API_VERSION == 2002000
-
- /* No event queue functionality in 2.2.* as of now */
-
-# else /* !(VBOX_API_VERSION == 2002000) */
+ pVboxAPI->pfnComInitialize(data);
- /* Initial the fWatch needed for Event Callbacks */
- data->fdWatch = -1;
-
- data->pFuncs->pfnGetEventQueue(&data->vboxQueue);
-
- if (data->vboxQueue == NULL) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("nsIEventQueue object is null"));
+ if (pVboxAPI->fWatchNeedInitical && pVboxAPI->initicalFWatch(data) != 0)
goto cleanup;
- }
-
-# endif /* !(VBOX_API_VERSION == 2002000) */
-#endif /* !(VBOX_XPCOMC_VERSION == 0x00010000U) */
if (data->vboxObj == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
--
1.7.9.5
10 years, 5 months
[libvirt] Fwd: [php PATCH] Fix compiler warnings after int to long conversion
by Michal Novotny
Hi Dawid,
thanks. I've managed to apply it, I've been having some issues with my
local git copy.
It's already applied in libvirt-php master branch.
Sorry for the noise and thanks again!
Michal
2014-06-19 0:05 GMT+02:00 Dawid Zamirski <dzamirski(a)dattobackup.com>:
On Wed, 2014-06-18 at 22:50 +0200, Michal Novotny wrote:
> > Hi Dawid,
> > thanks for the information. Well, please rebase to the latest commit
> > of my master branch and resend, thanks a lot!
> >
> >
> > Michal
> >
>
> Ok, now I'm puzzled. I've rebased the patch from clean master and the
> diff ended up identical to the original one. To double check, I've also
> successfully re-applied original mbox file on a fresh git clone, like
> this:
>
> git clone git://libvirt.org/libvirt-php
> git am
> ~/\[php_PATCH\]_Fix_compiler_warnings_after_int_to_long_conversion.mbox
> Applying: Fix compiler warnings after int to long conversion
>
> It seems that my original patch was correctly generated against remote's
> master due to:
>
> git send-email --no-chain-reply-to --annotate origin/master
>
> which means it was made against remote master branch, not my local copy
> that was "dirty".
>
> At this point, I'm not sure what else I can do on my end.
>
> Sorry for the noise with such a simple patch...
>
> Regards,
> Dawid
>
>
> >
> > 2014-06-18 22:05 GMT+02:00 Dawid Zamirski <dzamirski(a)dattobackup.com>:
> > Ugh, now I know what happened - my local master branch has
> > commits I
> > have not sent pull requests for yet so it wasn't in 100% in
> > sync with
> > remote. Do you want me to resend the patch to the ML?
> >
> > On Wed, 2014-06-18 at 16:02 -0400, Dawid Zamirski wrote:
> > > Hi Michal,
> > >
> > > I'm pretty sure I did git pull right before sending the
> > patch. Here's
> > > what I did exactly:
> > >
> > > On master branch:
> > >
> > > git pull
> > > git checkout -b parse-param-fix origin/master
> > > created original patch & commit
> > > git format-patch -1
> > > git send-email --no-chain-reply-to --annotate
> > 0001-Use-long-variable-type-for-zend_parse_parameters.patch
> > >
> > > then I've noticed the warnings (still on parse-param-fix
> > branch)
> > > create patch & commit
> > > git fetch --all
> > > git pull --rebase
> > > git send-email --no-chain-reply-to --annotate origin/master
> > >
> > > I guess that before starting the waring fix patch I should
> > have create a
> > > new local branch:
> > > git checkout master
> > > git pull
> > > git checkout -b warning-fix origin/master
> > >
> > > and then work from there.
> > >
> > > Regards,
> > > Dawid
> > >
> > >
> > > On Wed, 2014-06-18 at 21:28 +0200, Michal Novotny wrote:
> > > > Hi Dawid,
> > > >
> > > >
> > > > thanks for the patch, I'll apply it when I have time to do
> > so.
> > > > However, the patch is not critical as it's in the DPRINTF
> > debug macro
> > > > (for production environment you should disable the DEBUG
> > macro).
> > > >
> > > >
> > > > Also, please make sure you are you the latest git tree (by
> > running git
> > > > pull before writing the patch) as I'm having issues
> > applying some of
> > > > the patches cleanly.
> > > >
> > > >
> > > > Thanks,
> > > > Michal
> > > >
> > > >
> > > > 2014-06-18 21:09 GMT+02:00 Dawid Zamirski
> > <dzamirski(a)dattobackup.com>:
> > > > The previous patch [1] caused compiler warnings
> > after variable
> > > > types
> > > > were changed from int to long and this patch fixes
> > this.
> > > >
> > > > [1]
> > > >
> >
> https://www.redhat.com/archives/libvir-list/2014-June/msg00835.html
> > > > ---
> > > > src/libvirt-php.c | 8 ++++----
> > > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/src/libvirt-php.c b/src/libvirt-php.c
> > > > index 224943d..6d6fa81 100644
> > > > --- a/src/libvirt-php.c
> > > > +++ b/src/libvirt-php.c
> > > > @@ -3928,7 +3928,7 @@
> > > > PHP_FUNCTION(libvirt_domain_send_pointer_event)
> > > > RETURN_FALSE;
> > > > }
> > > >
> > > > - DPRINTF("%s: x = %d, y = %d, clicked = %d,
> > release = %
> > > > d, hostname = %s...\n", PHPFUNC, pos_x, pos_y,
> > clicked,
> > > > release, hostname);
> > > > + DPRINTF("%s: x = %d, y = %d, clicked = %d,
> > release = %
> > > > d, hostname = %s...\n", PHPFUNC, (int) pos_x,
> > (int) pos_y,
> > > > (int) clicked, release, hostname);
> > > > ret = vnc_send_pointer_event(hostname,
> > tmp, pos_x,
> > > > pos_y, clicked, release);
> > > > if (ret == 0) {
> > > > DPRINTF("%s: Pointer event result
> > is %d\n",
> > > > PHPFUNC, ret);
> > > > @@ -4428,7 +4428,7 @@
> > PHP_FUNCTION(libvirt_domain_new)
> > > > numNets = i;
> > > >
> > > > snprintf(tmpname, sizeof(tmpname), "%
> > s-install",
> > > > name);
> > > > - DPRINTF("%s: Name is '%s', memMB is %d,
> > maxmemMB is %d
> > > > \n", PHPFUNC, tmpname, memMB, maxmemMB);
> > > > + DPRINTF("%s: Name is '%s', memMB is %d,
> > maxmemMB is %d
> > > > \n", PHPFUNC, tmpname, (int) memMB, (int)
> > maxmemMB);
> > > > tmp = installation_get_xml(1,
> > > > conn->conn, tmpname,
> > memMB, maxmemMB,
> > > > NULL /* arch */, NULL, vcpus, iso_image,
> > > > vmDisks, numDisks,
> > vmNetworks,
> > > > numNets,
> > > > @@ -6272,7 +6272,7 @@
> > > > PHP_FUNCTION(libvirt_domain_snapshot_delete)
> > > > GET_SNAPSHOT_FROM_ARGS("r|l",&zsnapshot,
> > &flags);
> > > >
> > > > retval =
> > virDomainSnapshotDelete(snapshot->snapshot,
> > > > flags);
> > > > - DPRINTF("%s: virDomainSnapshotDelete(%p, %
> > d) returned
> > > > %d\n", PHPFUNC, snapshot->snapshot, flags,
> > retval);
> > > > + DPRINTF("%s: virDomainSnapshotDelete(%p, %
> > d) returned
> > > > %d\n", PHPFUNC, snapshot->snapshot, (int) flags,
> > retval);
> > > > if (retval == -1) RETURN_FALSE;
> > > > RETURN_TRUE;
> > > > }
> > > > @@ -6772,7 +6772,7 @@
> > > > PHP_FUNCTION(libvirt_storagevolume_delete)
> > > > GET_VOLUME_FROM_ARGS("r|
> > l",&zvolume,&flags);
> > > >
> > > > retval =
> > virStorageVolDelete(volume->volume, flags);
> > > > - DPRINTF("%s: virStorageVolDelete(%p, %d)
> > returned %d
> > > > \n", PHPFUNC, volume->volume, flags, retval);
> > > > + DPRINTF("%s: virStorageVolDelete(%p, %d)
> > returned %d
> > > > \n", PHPFUNC, volume->volume, (int) flags,
> > retval);
> > > > if (retval != 0) {
> > > > set_error_if_unset("Cannot delete
> > storage
> > > > volume" TSRMLS_CC);
> > > > RETURN_FALSE;
> > > > --
> > > > 1.9.3
> > > >
> > > > --
> > > > libvir-list mailing list
> > > > libvir-list(a)redhat.com
> > > >
> > https://www.redhat.com/mailman/listinfo/libvir-list
> > > >
> > > >
> > >
> > >
> >
> >
> >
> >
> >
>
>
>
10 years, 5 months
[libvirt] [PATCH 0/5] interface: clean up some things I noticed
by Laine Stump
These clean up several issues I noticed when revisiting the interface
parsing/formatting code as a result of Michal's addition of the <link>
element.
Laine Stump (5):
interface: allow reordering of elements in xml
interface: report link state for bonds and vlans too
interface: move parsing of bridge attributes into appropriate function
interface: clean up virInterfaceDefParseXML
interface: clean up virInterfaceDefDevFormat
docs/schemas/interface.rng | 292 +++++++++++++-----------
src/conf/interface_conf.c | 166 ++++++--------
tests/interfaceschemadata/bond.xml | 1 +
tests/interfaceschemadata/bridge-no-address.xml | 2 +-
tests/interfaceschemadata/bridge.xml | 2 +-
tests/interfaceschemadata/ethernet-dhcp.xml | 4 +-
tests/interfaceschemadata/vlan.xml | 1 +
7 files changed, 233 insertions(+), 235 deletions(-)
--
1.9.3
10 years, 5 months