[libvirt] [PATCH v2] bhyve: Use virDomainObjListFindBy{UUID|ID}Ref
by John Ferlan
For bhyveDomObjFromDomain, bhyveDomainLookupByUUID, and
bhyveDomainLookupByID let's return a locked and referenced
@vm object so that callers can then use the common and more
consistent virDomainObjEndAPI in order to handle cleanup rather
than needing to know that the returned object is locked and
calling virObjectUnlock.
The LookupByName already returns the ref counted and locked object,
so this will make things more consistent.
For bhyveDomainUndefine and bhyveDomainDestroy since the
virDomainObjListRemove will return an unlocked object, we need to
relock before making the EndAPI call.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Patch 1:
https://www.redhat.com/archives/libvir-list/2018-March/msg00490.html
of the larger series:
https://www.redhat.com/archives/libvir-list/2018-March/msg00489.html
Changes since v1:
* From review, use virObjectLock after virDomainObjListRemove when
calling in a path that would have returned a reffed and locked
object since virDomainObjListRemove will return an unlocked, but
reffed object.
src/bhyve/bhyve_driver.c | 62 ++++++++++++++++++------------------------------
1 file changed, 23 insertions(+), 39 deletions(-)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 849d3abcd3..38e6442db7 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -168,7 +168,7 @@ bhyveDomObjFromDomain(virDomainPtr domain)
bhyveConnPtr privconn = domain->conn->privateData;
char uuidstr[VIR_UUID_STRING_BUFLEN];
- vm = virDomainObjListFindByUUID(privconn->domains, domain->uuid);
+ vm = virDomainObjListFindByUUIDRef(privconn->domains, domain->uuid);
if (!vm) {
virUUIDFormat(domain->uuid, uuidstr);
virReportError(VIR_ERR_NO_DOMAIN,
@@ -312,8 +312,7 @@ bhyveDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -338,8 +337,7 @@ bhyveDomainGetState(virDomainPtr domain,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -359,8 +357,7 @@ bhyveDomainGetAutostart(virDomainPtr domain, int *autostart)
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -423,8 +420,7 @@ bhyveDomainSetAutostart(virDomainPtr domain, int autostart)
cleanup:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -443,8 +439,7 @@ bhyveDomainIsActive(virDomainPtr domain)
ret = virDomainObjIsActive(obj);
cleanup:
- if (obj)
- virObjectUnlock(obj);
+ virDomainObjEndAPI(&obj);
return ret;
}
@@ -463,8 +458,7 @@ bhyveDomainIsPersistent(virDomainPtr domain)
ret = obj->persistent;
cleanup:
- if (obj)
- virObjectUnlock(obj);
+ virDomainObjEndAPI(&obj);
return ret;
}
@@ -484,8 +478,7 @@ bhyveDomainGetOSType(virDomainPtr dom)
goto cleanup;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -512,8 +505,7 @@ bhyveDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
virObjectUnref(caps);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -624,14 +616,13 @@ bhyveDomainUndefine(virDomainPtr domain)
vm->persistent = 0;
} else {
virDomainObjListRemove(privconn->domains, vm);
- vm = NULL;
+ virObjectLock(vm);
}
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(privconn->domainEventState, event);
return ret;
@@ -803,7 +794,7 @@ bhyveDomainLookupByUUID(virConnectPtr conn,
virDomainObjPtr vm;
virDomainPtr dom = NULL;
- vm = virDomainObjListFindByUUID(privconn->domains, uuid);
+ vm = virDomainObjListFindByUUIDRef(privconn->domains, uuid);
if (!vm) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
@@ -819,8 +810,7 @@ bhyveDomainLookupByUUID(virConnectPtr conn,
dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return dom;
}
@@ -857,7 +847,7 @@ bhyveDomainLookupByID(virConnectPtr conn,
virDomainObjPtr vm;
virDomainPtr dom = NULL;
- vm = virDomainObjListFindByID(privconn->domains, id);
+ vm = virDomainObjListFindByIDRef(privconn->domains, id);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN,
@@ -871,8 +861,7 @@ bhyveDomainLookupByID(virConnectPtr conn,
dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return dom;
}
@@ -913,8 +902,7 @@ bhyveDomainCreateWithFlags(virDomainPtr dom,
VIR_DOMAIN_EVENT_STARTED_BOOTED);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(privconn->domainEventState, event);
return ret;
@@ -1024,12 +1012,11 @@ bhyveDomainDestroy(virDomainPtr dom)
if (!vm->persistent) {
virDomainObjListRemove(privconn->domains, vm);
- vm = NULL;
+ virObjectLock(vm);
}
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(privconn->domainEventState, event);
return ret;
@@ -1056,8 +1043,7 @@ bhyveDomainShutdown(virDomainPtr dom)
ret = virBhyveProcessShutdown(vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -1100,8 +1086,7 @@ bhyveDomainOpenConsole(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -1143,7 +1128,7 @@ bhyveDomainSetMetadata(virDomainPtr dom,
cleanup:
virObjectUnref(caps);
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -1165,7 +1150,7 @@ bhyveDomainGetMetadata(virDomainPtr dom,
ret = virDomainObjGetMetadata(vm, type, uri, flags);
cleanup:
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -1548,8 +1533,7 @@ bhyveDomainHasManagedSaveImage(virDomainPtr domain, unsigned int flags)
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
--
2.13.6
6 years, 7 months
[libvirt] [RFC] add option to configure qcow2 cache sizes in domain xml
by Nikolay Shirokovskiy
Hi, all.
I want to add option to configure qcow2 cache size in domain xml. Looks like
this should be a driver option. As driver already has a lot of attributes and
even qcow2 has more then one cache I suggest something like this:
<driver type="qemu" type="qcow2">
<cache name="l2" size="1024" unit="KiB"/>
<cache name="refcount" size="256" unit="KiB"/>
</driver>
This looks compact but qcow2 has entry size option for cache which don't fit
nicely in this approach (you have to use same units for both values).
So may be this is better:
<driver type="qemu" type="qcow2">
<cache name="l2">
<size unit="KiB">1024</size>
<entrysize unit="KiB">4</entrysize>
</cache>
<cache name="refcount">
<size unit="KiB">256</size>
</cache>
</driver>
Or may be start specifying size and units in one attribute:
<driver type="qemu" type="qcow2">
<cache name="l2" size="1MiB" entrysize="4KiB"/>
<cache name="refcount" size="256KiB"/>
</driver>
Also qemu has a feature to specify only one value for caches so that qemu sets
l2 and refcount caches in hardcoded 4:1 ratio which is good for images with
default refcount_bits=16. On one hand this is nice to have in libvirt xml too
so that user can specify only one memory size. On another hand "there's no
strict need for both caches to cover the same amount of disk space" [1] and
assuming user tuning cache sizes know what he is doing we can live without
this option in libvirt xml. I tend to not to add this option to libvirt xml.
[1] qemu/docs/qcow2-cache.txt
Nikolay
6 years, 7 months
[libvirt] [PATCH] util: don't check for parallel iteration in hash-related functions
by Vincent Bernat
This is the responsability of the caller to apply the correct lock
before using these functions. Moreover, the use of a simple boolean
was still racy: two threads may check the boolean and "lock" it
simultaneously.
Users of functions from src/util/virhash.c have to be checked for
correctness. Lookups and iteration should hold a RO
lock. Modifications should hold a RW lock.
Most important uses seem to be covered. Callers have now a greater
responsability, notably the ability to execute some operations while
iterating were reliably forbidden before are now accepted.
---
src/util/virhash.c | 37 ----------------------
tests/virhashtest.c | 75 ---------------------------------------------
2 files changed, 112 deletions(-)
diff --git a/src/util/virhash.c b/src/util/virhash.c
index 0ffbfcce2c64..475c2b0281b2 100644
--- a/src/util/virhash.c
+++ b/src/util/virhash.c
@@ -41,12 +41,6 @@ VIR_LOG_INIT("util.hash");
/* #define DEBUG_GROW */
-#define virHashIterationError(ret) \
- do { \
- VIR_ERROR(_("Hash operation not allowed during iteration")); \
- return ret; \
- } while (0)
-
/*
* A single entry in the hash table
*/
@@ -66,10 +60,6 @@ struct _virHashTable {
uint32_t seed;
size_t size;
size_t nbElems;
- /* True iff we are iterating over hash entries. */
- bool iterating;
- /* Pointer to the current entry during iteration. */
- virHashEntryPtr current;
virHashDataFree dataFree;
virHashKeyCode keyCode;
virHashKeyEqual keyEqual;
@@ -339,9 +329,6 @@ virHashAddOrUpdateEntry(virHashTablePtr table, const void *name,
if ((table == NULL) || (name == NULL))
return -1;
- if (table->iterating)
- virHashIterationError(-1);
-
key = virHashComputeKey(table, name);
/* Check for duplicate entry */
@@ -551,9 +538,6 @@ virHashRemoveEntry(virHashTablePtr table, const void *name)
nextptr = table->table + virHashComputeKey(table, name);
for (entry = *nextptr; entry; entry = entry->next) {
if (table->keyEqual(entry->name, name)) {
- if (table->iterating && table->current != entry)
- virHashIterationError(-1);
-
if (table->dataFree)
table->dataFree(entry->payload, entry->name);
if (table->keyFree)
@@ -593,18 +577,11 @@ virHashForEach(virHashTablePtr table, virHashIterator iter, void *data)
if (table == NULL || iter == NULL)
return -1;
- if (table->iterating)
- virHashIterationError(-1);
-
- table->iterating = true;
- table->current = NULL;
for (i = 0; i < table->size; i++) {
virHashEntryPtr entry = table->table[i];
while (entry) {
virHashEntryPtr next = entry->next;
- table->current = entry;
ret = iter(entry->payload, entry->name, data);
- table->current = NULL;
if (ret < 0)
goto cleanup;
@@ -615,7 +592,6 @@ virHashForEach(virHashTablePtr table, virHashIterator iter, void *data)
ret = 0;
cleanup:
- table->iterating = false;
return ret;
}
@@ -643,11 +619,6 @@ virHashRemoveSet(virHashTablePtr table,
if (table == NULL || iter == NULL)
return -1;
- if (table->iterating)
- virHashIterationError(-1);
-
- table->iterating = true;
- table->current = NULL;
for (i = 0; i < table->size; i++) {
virHashEntryPtr *nextptr = table->table + i;
@@ -667,7 +638,6 @@ virHashRemoveSet(virHashTablePtr table,
}
}
}
- table->iterating = false;
return count;
}
@@ -723,23 +693,16 @@ void *virHashSearch(const virHashTable *ctable,
if (table == NULL || iter == NULL)
return NULL;
- if (table->iterating)
- virHashIterationError(NULL);
-
- table->iterating = true;
- table->current = NULL;
for (i = 0; i < table->size; i++) {
virHashEntryPtr entry;
for (entry = table->table[i]; entry; entry = entry->next) {
if (iter(entry->payload, entry->name, data)) {
- table->iterating = false;
if (name)
*name = table->keyCopy(entry->name);
return entry->payload;
}
}
}
- table->iterating = false;
return NULL;
}
diff --git a/tests/virhashtest.c b/tests/virhashtest.c
index 3b85b62c301d..a013bc716943 100644
--- a/tests/virhashtest.c
+++ b/tests/virhashtest.c
@@ -221,32 +221,6 @@ testHashRemoveForEachAll(void *payload ATTRIBUTE_UNUSED,
}
-const int testHashCountRemoveForEachForbidden = ARRAY_CARDINALITY(uuids);
-
-static int
-testHashRemoveForEachForbidden(void *payload ATTRIBUTE_UNUSED,
- const void *name,
- void *data)
-{
- virHashTablePtr hash = data;
- size_t i;
-
- for (i = 0; i < ARRAY_CARDINALITY(uuids_subset); i++) {
- if (STREQ(uuids_subset[i], name)) {
- int next = (i + 1) % ARRAY_CARDINALITY(uuids_subset);
-
- if (virHashRemoveEntry(hash, uuids_subset[next]) == 0) {
- VIR_TEST_VERBOSE(
- "\nentry \"%s\" should not be allowed to be removed",
- uuids_subset[next]);
- }
- break;
- }
- }
- return 0;
-}
-
-
static int
testHashRemoveForEach(const void *data)
{
@@ -311,53 +285,6 @@ testHashIter(void *payload ATTRIBUTE_UNUSED,
return 0;
}
-static int
-testHashForEachIter(void *payload ATTRIBUTE_UNUSED,
- const void *name ATTRIBUTE_UNUSED,
- void *data)
-{
- virHashTablePtr hash = data;
-
- if (virHashAddEntry(hash, uuids_new[0], NULL) == 0)
- VIR_TEST_VERBOSE("\nadding entries in ForEach should be forbidden");
-
- if (virHashUpdateEntry(hash, uuids_new[0], NULL) == 0)
- VIR_TEST_VERBOSE("\nupdating entries in ForEach should be forbidden");
-
- if (virHashSteal(hash, uuids_new[0]) != NULL)
- VIR_TEST_VERBOSE("\nstealing entries in ForEach should be forbidden");
-
- if (virHashSteal(hash, uuids_new[0]) != NULL)
- VIR_TEST_VERBOSE("\nstealing entries in ForEach should be forbidden");
-
- if (virHashForEach(hash, testHashIter, NULL) >= 0)
- VIR_TEST_VERBOSE("\niterating through hash in ForEach"
- " should be forbidden");
- return 0;
-}
-
-static int
-testHashForEach(const void *data ATTRIBUTE_UNUSED)
-{
- virHashTablePtr hash;
- int ret = -1;
-
- if (!(hash = testHashInit(0)))
- return -1;
-
- if (virHashForEach(hash, testHashForEachIter, hash)) {
- VIR_TEST_VERBOSE("\nvirHashForEach didn't go through all entries");
- goto cleanup;
- }
-
- ret = 0;
-
- cleanup:
- virHashFree(hash);
- return ret;
-}
-
-
static int
testHashRemoveSetIter(const void *payload ATTRIBUTE_UNUSED,
const void *name,
@@ -628,9 +555,7 @@ mymain(void)
DO_TEST("Remove", Remove);
DO_TEST_DATA("Remove in ForEach", RemoveForEach, Some);
DO_TEST_DATA("Remove in ForEach", RemoveForEach, All);
- DO_TEST_DATA("Remove in ForEach", RemoveForEach, Forbidden);
DO_TEST("Steal", Steal);
- DO_TEST("Forbidden ops in ForEach", ForEach);
DO_TEST("RemoveSet", RemoveSet);
DO_TEST("Search", Search);
DO_TEST("GetItems", GetItems);
--
2.17.0
6 years, 7 months
[libvirt] [PATCH] libxl: add support for memballoon device
by Jim Fehlig
All Xen PV and HVM with PV driver support a memory balloon device,
which cannot be disabled through the toolstack. Model the device
in the libxl driver, similar to the recently removed xend-based
driver.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Apologies for the large amount of test file churn...
src/libxl/libxl_conf.c | 26 ++++++++++++++++++++++
src/libxl/libxl_domain.c | 10 +++++++++
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 1 +
.../sexpr2xml-disk-block-shareable.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 1 +
.../sexpr2xml-disk-drv-blktap-qcow.xml | 1 +
.../sexpr2xml-disk-drv-blktap-raw.xml | 1 +
.../sexpr2xml-disk-drv-blktap2-raw.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 1 +
.../sexpr2xml-fv-serial-dev-2-ports.xml | 1 +
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 1 +
.../sexpr2xml-fv-serial-tcp-telnet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 1 +
.../sexpr2xml-pv-bootloader-cmdline.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 1 +
.../sexpr2xml-pv-vfb-new-vncdisplay.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 1 +
.../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 1 +
tests/xlconfigdata/test-channel-pty.xml | 1 +
tests/xlconfigdata/test-channel-unix.xml | 1 +
.../test-disk-positional-parms-full.xml | 1 +
.../test-disk-positional-parms-partial.xml | 1 +
tests/xlconfigdata/test-disk-qed.xml | 1 +
...est-fullvirt-direct-kernel-boot-bogus-extra.xml | 1 +
.../test-fullvirt-direct-kernel-boot-extra.xml | 1 +
.../test-fullvirt-direct-kernel-boot.xml | 1 +
tests/xlconfigdata/test-fullvirt-hpet-timer.xml | 1 +
tests/xlconfigdata/test-fullvirt-multi-timer.xml | 1 +
tests/xlconfigdata/test-fullvirt-multiserial.xml | 1 +
tests/xlconfigdata/test-fullvirt-multiusb.xml | 1 +
.../test-fullvirt-nestedhvm-disabled.xml | 1 +
tests/xlconfigdata/test-fullvirt-nestedhvm.xml | 1 +
tests/xlconfigdata/test-fullvirt-nohap.xml | 1 +
tests/xlconfigdata/test-fullvirt-ovmf.xml | 1 +
tests/xlconfigdata/test-fullvirt-tsc-timer.xml | 1 +
tests/xlconfigdata/test-fullvirt-vnuma.xml | 1 +
tests/xlconfigdata/test-new-disk.xml | 1 +
.../test-paravirt-cmdline-bogus-extra-root.xml | 1 +
.../test-paravirt-cmdline-extra-root.xml | 1 +
tests/xlconfigdata/test-paravirt-cmdline.xml | 1 +
tests/xlconfigdata/test-paravirt-maxvcpus.xml | 1 +
tests/xlconfigdata/test-rbd-multihost-noauth.xml | 1 +
tests/xlconfigdata/test-spice-features.xml | 1 +
tests/xlconfigdata/test-spice.xml | 1 +
tests/xlconfigdata/test-usb.xml | 1 +
tests/xlconfigdata/test-usbctrl.xml | 1 +
tests/xlconfigdata/test-vif-multi-ip.xml | 1 +
tests/xlconfigdata/test-vif-rate.xml | 1 +
tests/xlconfigdata/test-vif-typename.xml | 1 +
tests/xmconfigdata/test-disk-drv-blktap-raw.xml | 1 +
tests/xmconfigdata/test-disk-drv-blktap2-raw.xml | 1 +
tests/xmconfigdata/test-escape-paths.xml | 1 +
.../xmconfigdata/test-fullvirt-default-feature.xml | 1 +
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 1 +
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 1 +
tests/xmconfigdata/test-fullvirt-localtime.xml | 1 +
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 1 +
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 1 +
tests/xmconfigdata/test-fullvirt-nohap.xml | 1 +
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-file.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-null.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 1 +
.../test-fullvirt-serial-tcp-telnet.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 1 +
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 1 +
tests/xmconfigdata/test-fullvirt-sound.xml | 1 +
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 1 +
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 1 +
tests/xmconfigdata/test-fullvirt-utc.xml | 1 +
tests/xmconfigdata/test-no-source-cdrom.xml | 1 +
tests/xmconfigdata/test-paravirt-maxvcpus.xml | 1 +
tests/xmconfigdata/test-paravirt-net-e1000.xml | 1 +
tests/xmconfigdata/test-paravirt-net-vifname.xml | 1 +
.../test-paravirt-new-pvfb-vncdisplay.xml | 1 +
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 1 +
tests/xmconfigdata/test-paravirt-vcpu.xml | 1 +
tests/xmconfigdata/test-pci-devs.xml | 1 +
114 files changed, 148 insertions(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 0ed914e4f..ed477330d 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -626,6 +626,32 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
return -1;
}
+ /* only the 'xen' balloon device model is supported */
+ if (def->memballoon) {
+ int model = def->memballoon->model;
+
+ switch ((virDomainMemballoonModel)model) {
+ case VIR_DOMAIN_MEMBALLOON_MODEL_XEN:
+ break;
+ case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unsupported balloon device model '%s'"),
+ virDomainMemballoonModelTypeToString(model));
+ return -1;
+ case VIR_DOMAIN_MEMBALLOON_MODEL_NONE:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ "%s",
+ _("balloon device cannot be disabled"));
+ return -1;
+ case VIR_DOMAIN_MEMBALLOON_MODEL_LAST:
+ default:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unexpected balloon device model '%d'"),
+ model);
+ return -1;
+ }
+ }
+
return 0;
}
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index e76740247..ef9a90267 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -413,6 +413,16 @@ libxlDomainDefPostParse(virDomainDefPtr def,
def->features[VIR_DOMAIN_FEATURE_ACPI] = VIR_TRISTATE_SWITCH_ON;
}
+ /* add implicit balloon device */
+ if (def->memballoon == NULL) {
+ virDomainMemballoonDefPtr memballoon;
+ if (VIR_ALLOC(memballoon) < 0)
+ return -1;
+
+ memballoon->model = VIR_DOMAIN_MEMBALLOON_MODEL_XEN;
+ def->memballoon = memballoon;
+ }
+
return 0;
}
diff --git a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml
index 4b9f535fc..5524af8e2 100644
--- a/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-boot-grub.xml
@@ -24,5 +24,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml
index af43a106a..c9ab2df51 100644
--- a/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml
@@ -32,5 +32,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-curmem.xml b/tests/sexpr2xmldata/sexpr2xml-curmem.xml
index 28c71e5d1..a976986a1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-curmem.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-curmem.xml
@@ -38,5 +38,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
index e458b75a8..9f757efa2 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
@@ -30,5 +30,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml
index 756a21124..edca58241 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-block.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-block.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml
index d3781f737..80f6dd205 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml
index 5952b9d9e..71e7c40b6 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml
index 86093272b..bd244bbc3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap2-raw.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml
index 3af99e0f6..48fee3611 100644
--- a/tests/sexpr2xmldata/sexpr2xml-disk-file.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-disk-file.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
index 04495090d..8eaacc86d 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
@@ -53,5 +53,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
index 9179cfe5b..8ed2261fc 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
@@ -46,5 +46,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
index a9e677e84..5e176bf91 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
@@ -49,5 +49,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
index d53f4a640..826301182 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
@@ -49,5 +49,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml
index a4f15b654..afb903068 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml
@@ -29,5 +29,6 @@
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
index 9c162273b..2d390b52a 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
@@ -46,5 +46,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
index 44289a14a..5edf0ce26 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
@@ -47,5 +47,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
index bcd5ce802..eccab787b 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
@@ -51,5 +51,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
index f5cbb9d6e..79e9e69c3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
@@ -58,5 +58,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
index 35ee75679..111db35b1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
index 7e38e7f2e..40d1c6e62 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
index b5e5af9c8..60d5d8e9e 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
@@ -52,5 +52,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
index 6e5cce454..55a4e9e0b 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
index 66452b385..78ddea603 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
@@ -52,5 +52,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
index 1f5e0c965..112830ac7 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
@@ -52,5 +52,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
index 12334294b..ab2450469 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
index 29feada21..b6afd9b31 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
index ad3cd3dbc..cdc05bc52 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
index b7a337100..0fa40e95d 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
index b527fc29d..def03321a 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
@@ -48,5 +48,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
index b527fc29d..def03321a 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
@@ -48,5 +48,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
index 1a11f92fa..ded0aa853 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
@@ -47,5 +47,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
index a92b7d5fb..48ce7cebf 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
@@ -47,5 +47,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
index 1f595014f..1ae44a1d3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
@@ -46,5 +46,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
index 1f595014f..1ae44a1d3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
@@ -46,5 +46,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml
index 1f595014f..1ae44a1d3 100644
--- a/tests/sexpr2xmldata/sexpr2xml-fv.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml
@@ -46,5 +46,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml
index b06a41280..c97eeb0a1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-net-bridged.xml
@@ -31,5 +31,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml
index a184c990a..ba9a0b2f1 100644
--- a/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-net-e1000.xml
@@ -32,5 +32,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml
index 758dde64b..db15b9ddb 100644
--- a/tests/sexpr2xmldata/sexpr2xml-net-routed.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-net-routed.xml
@@ -31,5 +31,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
index 2a4e774b7..975318294 100644
--- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
@@ -52,5 +52,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml
index 72b7c5750..ab46fb917 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pci-devs.xml
@@ -37,5 +37,6 @@
<address domain='0x0000' bus='0x01' slot='0x13' function='0x0'/>
</source>
</hostdev>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml
index 519d02d57..b2b63bc54 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader-cmdline.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
index b3e97c4d7..dac1f924b 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
@@ -24,5 +24,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
index 31e18edc6..124bd6f37 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml
index d66509a33..876a02746 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml
index f45ead655..e2dbfab36 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new-vncdisplay.xml
@@ -31,5 +31,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
index bbabc50fd..3fd66c45e 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
@@ -31,5 +31,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml
index 7dd473dd4..f2d316c6f 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml
@@ -36,5 +36,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv.xml b/tests/sexpr2xmldata/sexpr2xml-pv.xml
index 3af99e0f6..48fee3611 100644
--- a/tests/sexpr2xmldata/sexpr2xml-pv.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-pv.xml
@@ -25,5 +25,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml
index 5466823b9..463d3598b 100644
--- a/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml
+++ b/tests/sexpr2xmldata/sexpr2xml-vif-rate.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-channel-pty.xml b/tests/xlconfigdata/test-channel-pty.xml
index 17d0c6708..d1ffb86a1 100644
--- a/tests/xlconfigdata/test-channel-pty.xml
+++ b/tests/xlconfigdata/test-channel-pty.xml
@@ -29,5 +29,6 @@
</channel>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-channel-unix.xml b/tests/xlconfigdata/test-channel-unix.xml
index 8f4eaa2b4..e7102d23b 100644
--- a/tests/xlconfigdata/test-channel-unix.xml
+++ b/tests/xlconfigdata/test-channel-unix.xml
@@ -30,5 +30,6 @@
</channel>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.xml b/tests/xlconfigdata/test-disk-positional-parms-full.xml
index 1bc5b436e..bb04ca710 100644
--- a/tests/xlconfigdata/test-disk-positional-parms-full.xml
+++ b/tests/xlconfigdata/test-disk-positional-parms-full.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.xml b/tests/xlconfigdata/test-disk-positional-parms-partial.xml
index 52b21dc59..14f4a72ae 100644
--- a/tests/xlconfigdata/test-disk-positional-parms-partial.xml
+++ b/tests/xlconfigdata/test-disk-positional-parms-partial.xml
@@ -60,5 +60,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-disk-qed.xml b/tests/xlconfigdata/test-disk-qed.xml
index 230382dd5..90c0a97ae 100644
--- a/tests/xlconfigdata/test-disk-qed.xml
+++ b/tests/xlconfigdata/test-disk-qed.xml
@@ -41,5 +41,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
index 3738c8e79..8946b1d8c 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.xml
@@ -51,5 +51,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
index 3738c8e79..8946b1d8c 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.xml
@@ -51,5 +51,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml
index 3738c8e79..8946b1d8c 100644
--- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml
+++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.xml
@@ -51,5 +51,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-hpet-timer.xml b/tests/xlconfigdata/test-fullvirt-hpet-timer.xml
index e3d2c4c8b..7da464c0f 100644
--- a/tests/xlconfigdata/test-fullvirt-hpet-timer.xml
+++ b/tests/xlconfigdata/test-fullvirt-hpet-timer.xml
@@ -60,5 +60,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-multi-timer.xml b/tests/xlconfigdata/test-fullvirt-multi-timer.xml
index 3e7c68caa..9f600755f 100644
--- a/tests/xlconfigdata/test-fullvirt-multi-timer.xml
+++ b/tests/xlconfigdata/test-fullvirt-multi-timer.xml
@@ -61,5 +61,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-multiserial.xml b/tests/xlconfigdata/test-fullvirt-multiserial.xml
index 1a7cc8438..120677a46 100644
--- a/tests/xlconfigdata/test-fullvirt-multiserial.xml
+++ b/tests/xlconfigdata/test-fullvirt-multiserial.xml
@@ -60,5 +60,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.xml b/tests/xlconfigdata/test-fullvirt-multiusb.xml
index fcd14e975..bb7beaa1d 100644
--- a/tests/xlconfigdata/test-fullvirt-multiusb.xml
+++ b/tests/xlconfigdata/test-fullvirt-multiusb.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.xml b/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.xml
index 58b63384d..9a0df958e 100644
--- a/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.xml
+++ b/tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.xml
@@ -57,5 +57,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-nestedhvm.xml b/tests/xlconfigdata/test-fullvirt-nestedhvm.xml
index 8c02e7a20..a311314d8 100644
--- a/tests/xlconfigdata/test-fullvirt-nestedhvm.xml
+++ b/tests/xlconfigdata/test-fullvirt-nestedhvm.xml
@@ -55,5 +55,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-nohap.xml b/tests/xlconfigdata/test-fullvirt-nohap.xml
index e57e28bc2..4f4942fcd 100644
--- a/tests/xlconfigdata/test-fullvirt-nohap.xml
+++ b/tests/xlconfigdata/test-fullvirt-nohap.xml
@@ -58,5 +58,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-ovmf.xml b/tests/xlconfigdata/test-fullvirt-ovmf.xml
index ca902e68c..4efdac58b 100644
--- a/tests/xlconfigdata/test-fullvirt-ovmf.xml
+++ b/tests/xlconfigdata/test-fullvirt-ovmf.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-tsc-timer.xml b/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
index 0816f96f3..6ffcf960f 100644
--- a/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
+++ b/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
@@ -60,5 +60,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-fullvirt-vnuma.xml b/tests/xlconfigdata/test-fullvirt-vnuma.xml
index 5368b0d9c..fe1904e87 100644
--- a/tests/xlconfigdata/test-fullvirt-vnuma.xml
+++ b/tests/xlconfigdata/test-fullvirt-vnuma.xml
@@ -77,5 +77,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-new-disk.xml b/tests/xlconfigdata/test-new-disk.xml
index 1bc5b436e..bb04ca710 100644
--- a/tests/xlconfigdata/test-new-disk.xml
+++ b/tests/xlconfigdata/test-new-disk.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.xml b/tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.xml
index fdf84c37a..c5758e4bb 100644
--- a/tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.xml
+++ b/tests/xlconfigdata/test-paravirt-cmdline-bogus-extra-root.xml
@@ -30,5 +30,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-paravirt-cmdline-extra-root.xml b/tests/xlconfigdata/test-paravirt-cmdline-extra-root.xml
index fdf84c37a..c5758e4bb 100644
--- a/tests/xlconfigdata/test-paravirt-cmdline-extra-root.xml
+++ b/tests/xlconfigdata/test-paravirt-cmdline-extra-root.xml
@@ -30,5 +30,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-paravirt-cmdline.xml b/tests/xlconfigdata/test-paravirt-cmdline.xml
index fdf84c37a..c5758e4bb 100644
--- a/tests/xlconfigdata/test-paravirt-cmdline.xml
+++ b/tests/xlconfigdata/test-paravirt-cmdline.xml
@@ -30,5 +30,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-paravirt-maxvcpus.xml b/tests/xlconfigdata/test-paravirt-maxvcpus.xml
index 275f47b48..ae48ae15b 100644
--- a/tests/xlconfigdata/test-paravirt-maxvcpus.xml
+++ b/tests/xlconfigdata/test-paravirt-maxvcpus.xml
@@ -26,5 +26,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.xml b/tests/xlconfigdata/test-rbd-multihost-noauth.xml
index ef9bd178a..847c7c44b 100644
--- a/tests/xlconfigdata/test-rbd-multihost-noauth.xml
+++ b/tests/xlconfigdata/test-rbd-multihost-noauth.xml
@@ -51,5 +51,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-spice-features.xml b/tests/xlconfigdata/test-spice-features.xml
index 81757607c..6d95afb1f 100644
--- a/tests/xlconfigdata/test-spice-features.xml
+++ b/tests/xlconfigdata/test-spice-features.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-spice.xml b/tests/xlconfigdata/test-spice.xml
index 32cad2721..2737698ce 100644
--- a/tests/xlconfigdata/test-spice.xml
+++ b/tests/xlconfigdata/test-spice.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-usb.xml b/tests/xlconfigdata/test-usb.xml
index 7b5853db1..5bac73b96 100644
--- a/tests/xlconfigdata/test-usb.xml
+++ b/tests/xlconfigdata/test-usb.xml
@@ -31,5 +31,6 @@
<address bus='1' device='3'/>
</source>
</hostdev>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-usbctrl.xml b/tests/xlconfigdata/test-usbctrl.xml
index 3c03f37e7..5e0346fa5 100644
--- a/tests/xlconfigdata/test-usbctrl.xml
+++ b/tests/xlconfigdata/test-usbctrl.xml
@@ -27,5 +27,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-vif-multi-ip.xml b/tests/xlconfigdata/test-vif-multi-ip.xml
index 7e831cf1b..2e72d9637 100644
--- a/tests/xlconfigdata/test-vif-multi-ip.xml
+++ b/tests/xlconfigdata/test-vif-multi-ip.xml
@@ -44,5 +44,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-vif-rate.xml b/tests/xlconfigdata/test-vif-rate.xml
index 3ab74883a..73ed43f43 100644
--- a/tests/xlconfigdata/test-vif-rate.xml
+++ b/tests/xlconfigdata/test-vif-rate.xml
@@ -57,5 +57,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xlconfigdata/test-vif-typename.xml b/tests/xlconfigdata/test-vif-typename.xml
index 8e1e98885..1c0435428 100644
--- a/tests/xlconfigdata/test-vif-typename.xml
+++ b/tests/xlconfigdata/test-vif-typename.xml
@@ -41,5 +41,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-disk-drv-blktap-raw.xml b/tests/xmconfigdata/test-disk-drv-blktap-raw.xml
index b8a1eafdd..fb0cdac7f 100644
--- a/tests/xmconfigdata/test-disk-drv-blktap-raw.xml
+++ b/tests/xmconfigdata/test-disk-drv-blktap-raw.xml
@@ -28,5 +28,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml b/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml
index b47ee3eb1..8e2764aa8 100644
--- a/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml
+++ b/tests/xmconfigdata/test-disk-drv-blktap2-raw.xml
@@ -28,5 +28,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml
index 91d2b7c81..712cc8679 100644
--- a/tests/xmconfigdata/test-escape-paths.xml
+++ b/tests/xmconfigdata/test-escape-paths.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.xml b/tests/xmconfigdata/test-fullvirt-default-feature.xml
index e89047191..b900ee0cf 100644
--- a/tests/xmconfigdata/test-fullvirt-default-feature.xml
+++ b/tests/xmconfigdata/test-fullvirt-default-feature.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml
index e89047191..b900ee0cf 100644
--- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml
+++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
index d33a3f940..fae684f21 100644
--- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
+++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml
index fcc7dbcc3..ccb8f1a87 100644
--- a/tests/xmconfigdata/test-fullvirt-localtime.xml
+++ b/tests/xmconfigdata/test-fullvirt-localtime.xml
@@ -48,5 +48,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml
index 5049c05f2..cc5c6658f 100644
--- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml
+++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml
@@ -48,5 +48,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
index 6756960bf..62253645a 100644
--- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
+++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
@@ -48,5 +48,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-nohap.xml b/tests/xmconfigdata/test-fullvirt-nohap.xml
index a92d5c047..bbd177a11 100644
--- a/tests/xmconfigdata/test-fullvirt-nohap.xml
+++ b/tests/xmconfigdata/test-fullvirt-nohap.xml
@@ -49,5 +49,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
index 82464449c..f99e90979 100644
--- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
+++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
@@ -53,5 +53,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml
index 2c2573783..ccaa761d8 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-file.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml
index 026f8da83..0010cf100 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-null.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
index d9ef787a6..a2ce6f224 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml
index 8a5af9331..8485ae216 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
index ddb1fd89d..5163e0f54 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
@@ -54,5 +54,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
index a43333b47..760e57df4 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
@@ -58,5 +58,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
index 5222ea12b..517f9ddfb 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
@@ -58,5 +58,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml
index 9862d4ff1..eee7365ae 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml
@@ -58,5 +58,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml
index 2ff799241..1b0f5a6e9 100644
--- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml
+++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml
@@ -56,5 +56,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml
index 67c762eba..f13c920a5 100644
--- a/tests/xmconfigdata/test-fullvirt-sound.xml
+++ b/tests/xmconfigdata/test-fullvirt-sound.xml
@@ -50,5 +50,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml
index 1ef30cf51..2c855cd35 100644
--- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml
+++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml
@@ -49,5 +49,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml
index d29e8f6c1..e82ffdca1 100644
--- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml
+++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml
@@ -49,5 +49,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml
index 6756960bf..62253645a 100644
--- a/tests/xmconfigdata/test-fullvirt-utc.xml
+++ b/tests/xmconfigdata/test-fullvirt-utc.xml
@@ -48,5 +48,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml
index 52f7775fe..5d0f3bd68 100644
--- a/tests/xmconfigdata/test-no-source-cdrom.xml
+++ b/tests/xmconfigdata/test-no-source-cdrom.xml
@@ -53,5 +53,6 @@
<video>
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-maxvcpus.xml b/tests/xmconfigdata/test-paravirt-maxvcpus.xml
index 1ad652c4d..ce66503dc 100644
--- a/tests/xmconfigdata/test-paravirt-maxvcpus.xml
+++ b/tests/xmconfigdata/test-paravirt-maxvcpus.xml
@@ -28,5 +28,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-net-e1000.xml b/tests/xmconfigdata/test-paravirt-net-e1000.xml
index dd5dffdf5..7b7112dcf 100644
--- a/tests/xmconfigdata/test-paravirt-net-e1000.xml
+++ b/tests/xmconfigdata/test-paravirt-net-e1000.xml
@@ -35,5 +35,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-net-vifname.xml b/tests/xmconfigdata/test-paravirt-net-vifname.xml
index 32006f967..36333c8d6 100644
--- a/tests/xmconfigdata/test-paravirt-net-vifname.xml
+++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml
@@ -36,5 +36,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml
index b55cadd7c..b7fc9f723 100644
--- a/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml
+++ b/tests/xmconfigdata/test-paravirt-new-pvfb-vncdisplay.xml
@@ -34,5 +34,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-new-pvfb.xml b/tests/xmconfigdata/test-paravirt-new-pvfb.xml
index ffc00559f..60604a20a 100644
--- a/tests/xmconfigdata/test-paravirt-new-pvfb.xml
+++ b/tests/xmconfigdata/test-paravirt-new-pvfb.xml
@@ -34,5 +34,6 @@
<video>
<model type='xen' vram='4096' heads='1' primary='yes'/>
</video>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-paravirt-vcpu.xml b/tests/xmconfigdata/test-paravirt-vcpu.xml
index 1ad652c4d..ce66503dc 100644
--- a/tests/xmconfigdata/test-paravirt-vcpu.xml
+++ b/tests/xmconfigdata/test-paravirt-vcpu.xml
@@ -28,5 +28,6 @@
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
+ <memballoon model='xen'/>
</devices>
</domain>
diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml
index f39b1494e..f50e1947f 100644
--- a/tests/xmconfigdata/test-pci-devs.xml
+++ b/tests/xmconfigdata/test-pci-devs.xml
@@ -65,5 +65,6 @@
<address domain='0x0000' bus='0x01' slot='0x13' function='0x0'/>
</source>
</hostdev>
+ <memballoon model='xen'/>
</devices>
</domain>
--
2.16.3
6 years, 7 months
[libvirt] [PATCH v2 0/1] Fix qcow2 fully allocated filesystem objects.
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
When tools like virt-install request to create a fully allocated
filesystem object storage by setting the parameter sparse=no, libvirt
doesn't allow that to happen for qcow2 formatted files.
Regardless of its XML instuction request libvirt always targets its
filesystem object storage with preallocation=metadata if format=qcow2
is in effect. This results in sparse files which could cause problems
since total image storage potentially can overrun actual filesystem
available space.
Changes from v1:
* Fix XML target sparse setting and apply for qcow2.
* Bring the test change under same PATCH.
Wim ten Have (1):
storage: extend preallocation flags support for qemu-img
src/conf/storage_conf.c | 3 +++
src/storage/storage_util.c | 10 ++++++++--
.../qcow2-nocapacity-convert-prealloc.argv | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
--
2.14.3
6 years, 7 months
[libvirt] [PATCH V2 0/8] Remove the legacy xen driver
by Jim Fehlig
Long overdue removal the old xen driver. The first 3 patches move existing
tests to WITH_LIBXL since we'll want to continue supporting conversion of
the various xen config formats. The remain patches remove the cruft.
Patch8, new to V2, updates the Xen driver page.
Jim Fehlig (8):
tests: move xml2sexpr tests to WITH_LIBXL
tests: move sexpr2xml tests to WITH_LIBXL
tests: move xmconfig tests to WITH_LIBXL
Remove xencaps tests and data files
Remove the xend driver
docs: remove mention of legacy Xen driver
spec: remove legacy xen driver
docs: update Xen driver information
configure.ac | 7 +-
docs/architecture.html.in | 28 +-
docs/bugs.html.in | 3 +-
docs/drvxen.html.in | 91 +-
docs/uri.html.in | 74 -
docs/windows.html.in | 2 +-
libvirt.spec.in | 57 +-
m4/virt-driver-xen.m4 | 142 -
po/POTFILES.in | 7 -
src/Makefile.am | 1 -
src/xen/Makefile.inc.am | 67 -
src/xen/block_stats.c | 355 ---
src/xen/block_stats.h | 38 -
src/xen/xen_driver.c | 2845 -----------------
src/xen/xen_driver.h | 204 --
src/xen/xen_hypervisor.c | 3125 -------------------
src/xen/xen_hypervisor.h | 142 -
src/xen/xen_inotify.c | 447 ---
src/xen/xen_inotify.h | 33 -
src/xen/xend_internal.c | 3221 --------------------
src/xen/xend_internal.h | 213 --
src/xen/xm_internal.c | 1484 ---------
src/xen/xm_internal.h | 105 -
src/xen/xs_internal.c | 920 ------
src/xen/xs_internal.h | 101 -
tests/Makefile.am | 59 +-
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 1 -
.../sexpr2xml-disk-block-shareable.xml | 1 -
tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 3 +-
.../sexpr2xml-disk-drv-blktap-qcow.xml | 1 -
.../sexpr2xml-disk-drv-blktap-raw.xml | 1 -
.../sexpr2xml-disk-drv-blktap2-raw.xml | 1 -
tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 7 +-
.../sexpr2xml-fv-serial-dev-2-ports.xml | 7 +-
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 7 +-
.../sexpr2xml-fv-serial-tcp-telnet.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-fv.xml | 7 +-
tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 6 +-
tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 5 +-
.../sexpr2xml-pv-bootloader-cmdline.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 3 +-
.../sexpr2xml-pv-vfb-new-vncdisplay.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 3 +-
.../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-vif-rate.xml | 7 +-
tests/sexpr2xmltest.c | 35 +-
tests/testutilsxen.c | 64 -
tests/testutilsxen.h | 2 -
tests/vircapstest.c | 34 -
tests/virdrivermoduletest.c | 3 -
tests/virschematest.c | 3 +-
tests/xencapsdata/xen-i686-pae-hvm.caps | 1 -
tests/xencapsdata/xen-i686-pae-hvm.cpuinfo | 37 -
tests/xencapsdata/xen-i686-pae-hvm.xml | 49 -
tests/xencapsdata/xen-i686-pae.caps | 1 -
tests/xencapsdata/xen-i686-pae.cpuinfo | 18 -
tests/xencapsdata/xen-i686-pae.xml | 32 -
tests/xencapsdata/xen-i686.caps | 1 -
tests/xencapsdata/xen-i686.cpuinfo | 18 -
tests/xencapsdata/xen-i686.xml | 29 -
tests/xencapsdata/xen-ia64-be-hvm.caps | 1 -
tests/xencapsdata/xen-ia64-be-hvm.cpuinfo | 29 -
tests/xencapsdata/xen-ia64-be-hvm.xml | 45 -
tests/xencapsdata/xen-ia64-be.caps | 1 -
tests/xencapsdata/xen-ia64-be.cpuinfo | 29 -
tests/xencapsdata/xen-ia64-be.xml | 29 -
tests/xencapsdata/xen-ia64-hvm.caps | 1 -
tests/xencapsdata/xen-ia64-hvm.cpuinfo | 29 -
tests/xencapsdata/xen-ia64-hvm.xml | 41 -
tests/xencapsdata/xen-ia64.caps | 1 -
tests/xencapsdata/xen-ia64.cpuinfo | 29 -
tests/xencapsdata/xen-ia64.xml | 26 -
tests/xencapsdata/xen-ppc64.caps | 1 -
tests/xencapsdata/xen-ppc64.cpuinfo | 0
tests/xencapsdata/xen-ppc64.xml | 26 -
tests/xencapsdata/xen-x86_64-hvm.caps | 1 -
tests/xencapsdata/xen-x86_64-hvm.cpuinfo | 47 -
tests/xencapsdata/xen-x86_64-hvm.xml | 61 -
tests/xencapsdata/xen-x86_64.caps | 1 -
tests/xencapsdata/xen-x86_64.cpuinfo | 47 -
tests/xencapsdata/xen-x86_64.xml | 29 -
tests/xencapstest.c | 224 --
tests/xmconfigdata/test-disk-drv-blktap-raw.xml | 3 +-
tests/xmconfigdata/test-disk-drv-blktap2-raw.xml | 3 +-
tests/xmconfigdata/test-escape-paths.xml | 11 +-
.../xmconfigdata/test-fullvirt-default-feature.xml | 9 +-
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 9 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 9 +-
tests/xmconfigdata/test-fullvirt-localtime.xml | 9 +-
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 9 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 9 +-
tests/xmconfigdata/test-fullvirt-nohap.xml | 9 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-file.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-null.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 9 +-
.../test-fullvirt-serial-tcp-telnet.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 9 +-
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 9 +-
tests/xmconfigdata/test-fullvirt-sound.xml | 9 +-
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 9 +-
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 9 +-
tests/xmconfigdata/test-fullvirt-utc.xml | 9 +-
tests/xmconfigdata/test-no-source-cdrom.xml | 9 +-
tests/xmconfigdata/test-paravirt-maxvcpus.xml | 5 +-
tests/xmconfigdata/test-paravirt-net-e1000.xml | 5 +-
tests/xmconfigdata/test-paravirt-net-vifname.xml | 5 +-
.../test-paravirt-new-pvfb-vncdisplay.xml | 5 +-
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 5 +-
tests/xmconfigdata/test-paravirt-vcpu.xml | 5 +-
tests/xmconfigdata/test-pci-devs.xml | 11 +-
tests/xmconfigtest.c | 22 +-
tests/xml2sexprdata/xml2sexpr-escape.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-net-rate.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 2 +-
.../xml2sexpr-fv-serial-dev-2-ports.sexpr | 2 +-
.../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 2 +-
.../xml2sexpr-fv-serial-tcp-telnet.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-fv.sexpr | 2 +-
tests/xml2sexprtest.c | 7 +-
171 files changed, 317 insertions(+), 15060 deletions(-)
delete mode 100644 m4/virt-driver-xen.m4
delete mode 100644 src/xen/Makefile.inc.am
delete mode 100644 src/xen/block_stats.c
delete mode 100644 src/xen/block_stats.h
delete mode 100644 src/xen/xen_driver.c
delete mode 100644 src/xen/xen_driver.h
delete mode 100644 src/xen/xen_hypervisor.c
delete mode 100644 src/xen/xen_hypervisor.h
delete mode 100644 src/xen/xen_inotify.c
delete mode 100644 src/xen/xen_inotify.h
delete mode 100644 src/xen/xend_internal.c
delete mode 100644 src/xen/xend_internal.h
delete mode 100644 src/xen/xm_internal.c
delete mode 100644 src/xen/xm_internal.h
delete mode 100644 src/xen/xs_internal.c
delete mode 100644 src/xen/xs_internal.h
delete mode 100644 tests/xencapsdata/xen-i686-pae-hvm.caps
delete mode 100644 tests/xencapsdata/xen-i686-pae-hvm.cpuinfo
delete mode 100644 tests/xencapsdata/xen-i686-pae-hvm.xml
delete mode 100644 tests/xencapsdata/xen-i686-pae.caps
delete mode 100644 tests/xencapsdata/xen-i686-pae.cpuinfo
delete mode 100644 tests/xencapsdata/xen-i686-pae.xml
delete mode 100644 tests/xencapsdata/xen-i686.caps
delete mode 100644 tests/xencapsdata/xen-i686.cpuinfo
delete mode 100644 tests/xencapsdata/xen-i686.xml
delete mode 100644 tests/xencapsdata/xen-ia64-be-hvm.caps
delete mode 100644 tests/xencapsdata/xen-ia64-be-hvm.cpuinfo
delete mode 100644 tests/xencapsdata/xen-ia64-be-hvm.xml
delete mode 100644 tests/xencapsdata/xen-ia64-be.caps
delete mode 100644 tests/xencapsdata/xen-ia64-be.cpuinfo
delete mode 100644 tests/xencapsdata/xen-ia64-be.xml
delete mode 100644 tests/xencapsdata/xen-ia64-hvm.caps
delete mode 100644 tests/xencapsdata/xen-ia64-hvm.cpuinfo
delete mode 100644 tests/xencapsdata/xen-ia64-hvm.xml
delete mode 100644 tests/xencapsdata/xen-ia64.caps
delete mode 100644 tests/xencapsdata/xen-ia64.cpuinfo
delete mode 100644 tests/xencapsdata/xen-ia64.xml
delete mode 100644 tests/xencapsdata/xen-ppc64.caps
delete mode 100644 tests/xencapsdata/xen-ppc64.cpuinfo
delete mode 100644 tests/xencapsdata/xen-ppc64.xml
delete mode 100644 tests/xencapsdata/xen-x86_64-hvm.caps
delete mode 100644 tests/xencapsdata/xen-x86_64-hvm.cpuinfo
delete mode 100644 tests/xencapsdata/xen-x86_64-hvm.xml
delete mode 100644 tests/xencapsdata/xen-x86_64.caps
delete mode 100644 tests/xencapsdata/xen-x86_64.cpuinfo
delete mode 100644 tests/xencapsdata/xen-x86_64.xml
delete mode 100644 tests/xencapstest.c
--
2.16.3
6 years, 7 months
[libvirt] [PATCH v6 0/9] Add setting CPU features (CPUID) with libxenlight driver.
by Marek Marczykowski-Górecki
Add support for CPUID setting based on <cpu> element. Since libxl format
support only adjusting specific bits over host CPU, only
mode='host-passthrough' is supported - other values are rejected (including
default 'custom'). This will break some configurations working before (bare
<cpu> element with for example NUMA configuration), but libxl driver never
supported full 'custom' mode - it was silently ignored, which might lead to
some unexpected effects.
Since mode='host-passthrough' is now necessary to specify CPU options, do not
enable nested HVM feature by mere presence of this element, require also
enabling it in libxl.conf. Nested HVM is still in "preview" state, so better be
explicit here.
v2 of this patch series:
https://www.redhat.com/archives/libvir-list/2017-July/msg00050.html
v3 of this patch series:
https://www.redhat.com/archives/libvir-list/2017-December/msg00314.html
v4 of this patch series:
https://www.redhat.com/archives/libvir-list/2018-February/msg00504.html
v5 of this patch series:
https://www.redhat.com/archives/libvir-list/2018-March/msg00796.html
Marek Marczykowski-Górecki (9):
libxl: fix libxlDriverConfigDispose for partially constructed object
libxl: pass driver config to libxlMakeDomBuildInfo
libxl: warn about ignored CPU mode=custom
libxl: do not enable nested HVM unless global nested_hvm option enabled
xenconfig: do not override def->cpu if already set elsewhere
libxl: add support for CPUID features policy
tests: check CPU features handling in libxl driver
xenconfig: add CPUID handling to domXML <-> xl.cfg conversion
tests: add test case for CPUID in xenconfig driver
src/libxl/libvirtd_libxl.aug | 2 +-
src/libxl/libxl.conf | 8 +-
src/libxl/libxl_conf.c | 66 +++-
src/libxl/libxl_conf.h | 6 +-
src/libxl/libxl_domain.c | 2 +-
src/libxl/test_libvirtd_libxl.aug.in | 1 +-
src/xenconfig/xen_xl.c | 236 ++++++++++++++--
src/xenconfig/xen_xl.h | 2 +-
tests/libxlxml2domconfigdata/fullvirt-cpuid.json | 64 ++++-
tests/libxlxml2domconfigdata/fullvirt-cpuid.xml | 37 +++-
tests/libxlxml2domconfigtest.c | 27 +-
tests/virmocklibxl.c | 25 ++-
tests/xlconfigdata/test-fullvirt-cpuid.cfg | 25 ++-
tests/xlconfigdata/test-fullvirt-cpuid.xml | 35 ++-
tests/xlconfigtest.c | 1 +-
15 files changed, 492 insertions(+), 45 deletions(-)
create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.json
create mode 100644 tests/libxlxml2domconfigdata/fullvirt-cpuid.xml
create mode 100644 tests/xlconfigdata/test-fullvirt-cpuid.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-cpuid.xml
base-commit: 6ce3acc129bfdbe7fd02bcb8bbe8af6d13903684
--
git-series 0.9.1
6 years, 7 months
[libvirt] [dbus PATCH v2 00/11] Some code move to have functions sorted
by Katerina Koukiou
Better do it now before the projects grows more.
Katerina Koukiou (11):
APIs should appear in alphabetical order: Move Active property
APIs should appear in alphabetical order: Move Autostart property
APIs should appear in alphabetical order: Move Id property
APIs should appear in alphabetical order: Move UUID property
APIs should appear in alphabetical order: Move Create method
APIs should appear in alphabetical order: Move Destroy method
APIs should appear in alphabetical order: Move GetStats method
APIs should appear in alphabetical order: Move Resume method
APIs should appear in alphabetical order: Move Undefine method
APIs should appear in alphabetical order: Move Shutdown method
APIs should appear in alphabetical order: Move ListDomains method
data/org.libvirt.Connect.xml | 12 +--
data/org.libvirt.Domain.xml | 54 +++++------
src/connect.c | 82 ++++++++--------
src/domain.c | 220 +++++++++++++++++++++----------------------
test/test_connect.py | 24 ++---
test/test_domain.py | 46 ++++-----
6 files changed, 219 insertions(+), 219 deletions(-)
--
2.15.0
6 years, 7 months
[libvirt] [qemu RFC] qapi: add "firmware.json"
by Laszlo Ersek
Add a schema that describes the properties of virtual machine firmware.
Each firmware executable installed on a host system should come with a
JSON file that conforms to this schema, and informs the management
applications about the firmware's properties.
In addition, a configuration directory with symlinks to the JSON files
should exist, with the symlinks carefully named to reflect a priority
order. Management applications can then search this directory in priority
order for the first firmware executable that satisfies their search
criteria. The found JSON file provides the management layer with domain
configuration bits that are required to run the firmware binary.
Cc: "Daniel P. Berrange" <berrange(a)redhat.com>
Cc: Alexander Graf <agraf(a)suse.de>
Cc: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
Cc: David Gibson <dgibson(a)redhat.com>
Cc: Eric Blake <eblake(a)redhat.com>
Cc: Gary Ching-Pang Lin <glin(a)suse.com>
Cc: Gerd Hoffmann <kraxel(a)redhat.com>
Cc: Kashyap Chamarthy <kchamart(a)redhat.com>
Cc: Markus Armbruster <armbru(a)redhat.com>
Cc: Michael Roth <mdroth(a)linux.vnet.ibm.com>
Cc: Michal Privoznik <mprivozn(a)redhat.com>
Cc: Peter Krempa <pkrempa(a)redhat.com>
Cc: Peter Maydell <peter.maydell(a)linaro.org>
Cc: Thomas Huth <thuth(a)redhat.com>
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
Notes:
Folks on the CC list, please try to see if the suggested schema is
flexible enough to describe the virtual firmware(s) that you are
familiar with. Thanks!
Makefile | 9 ++
Makefile.objs | 4 +
qapi/firmware.json | 343 ++++++++++++++++++++++++++++++++++++++++++++++++++
qapi/qapi-schema.json | 1 +
qmp.c | 5 +
.gitignore | 4 +
6 files changed, 366 insertions(+)
create mode 100644 qapi/firmware.json
diff --git a/Makefile b/Makefile
index 727ef118f3d9..e088e3c1b39f 100644
--- a/Makefile
+++ b/Makefile
@@ -97,6 +97,7 @@ GENERATED_FILES += qapi/qapi-types-block.h qapi/qapi-types-block.c
GENERATED_FILES += qapi/qapi-types-char.h qapi/qapi-types-char.c
GENERATED_FILES += qapi/qapi-types-common.h qapi/qapi-types-common.c
GENERATED_FILES += qapi/qapi-types-crypto.h qapi/qapi-types-crypto.c
+GENERATED_FILES += qapi/qapi-types-firmware.h qapi/qapi-types-firmware.c
GENERATED_FILES += qapi/qapi-types-introspect.h qapi/qapi-types-introspect.c
GENERATED_FILES += qapi/qapi-types-migration.h qapi/qapi-types-migration.c
GENERATED_FILES += qapi/qapi-types-misc.h qapi/qapi-types-misc.c
@@ -115,6 +116,7 @@ GENERATED_FILES += qapi/qapi-visit-block.h qapi/qapi-visit-block.c
GENERATED_FILES += qapi/qapi-visit-char.h qapi/qapi-visit-char.c
GENERATED_FILES += qapi/qapi-visit-common.h qapi/qapi-visit-common.c
GENERATED_FILES += qapi/qapi-visit-crypto.h qapi/qapi-visit-crypto.c
+GENERATED_FILES += qapi/qapi-visit-firmware.h qapi/qapi-visit-firmware.c
GENERATED_FILES += qapi/qapi-visit-introspect.h qapi/qapi-visit-introspect.c
GENERATED_FILES += qapi/qapi-visit-migration.h qapi/qapi-visit-migration.c
GENERATED_FILES += qapi/qapi-visit-misc.h qapi/qapi-visit-misc.c
@@ -132,6 +134,7 @@ GENERATED_FILES += qapi/qapi-commands-block.h qapi/qapi-commands-block.c
GENERATED_FILES += qapi/qapi-commands-char.h qapi/qapi-commands-char.c
GENERATED_FILES += qapi/qapi-commands-common.h qapi/qapi-commands-common.c
GENERATED_FILES += qapi/qapi-commands-crypto.h qapi/qapi-commands-crypto.c
+GENERATED_FILES += qapi/qapi-commands-firmware.h qapi/qapi-commands-firmware.c
GENERATED_FILES += qapi/qapi-commands-introspect.h qapi/qapi-commands-introspect.c
GENERATED_FILES += qapi/qapi-commands-migration.h qapi/qapi-commands-migration.c
GENERATED_FILES += qapi/qapi-commands-misc.h qapi/qapi-commands-misc.c
@@ -149,6 +152,7 @@ GENERATED_FILES += qapi/qapi-events-block.h qapi/qapi-events-block.c
GENERATED_FILES += qapi/qapi-events-char.h qapi/qapi-events-char.c
GENERATED_FILES += qapi/qapi-events-common.h qapi/qapi-events-common.c
GENERATED_FILES += qapi/qapi-events-crypto.h qapi/qapi-events-crypto.c
+GENERATED_FILES += qapi/qapi-events-firmware.h qapi/qapi-events-firmware.c
GENERATED_FILES += qapi/qapi-events-introspect.h qapi/qapi-events-introspect.c
GENERATED_FILES += qapi/qapi-events-migration.h qapi/qapi-events-migration.c
GENERATED_FILES += qapi/qapi-events-misc.h qapi/qapi-events-misc.c
@@ -581,6 +585,7 @@ qapi-modules = $(SRC_PATH)/qapi/qapi-schema.json $(SRC_PATH)/qapi/common.json \
$(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
$(SRC_PATH)/qapi/char.json \
$(SRC_PATH)/qapi/crypto.json \
+ $(SRC_PATH)/qapi/firmware.json \
$(SRC_PATH)/qapi/introspect.json \
$(SRC_PATH)/qapi/migration.json \
$(SRC_PATH)/qapi/misc.json \
@@ -600,6 +605,7 @@ qapi/qapi-types-block.c qapi/qapi-types-block.h \
qapi/qapi-types-char.c qapi/qapi-types-char.h \
qapi/qapi-types-common.c qapi/qapi-types-common.h \
qapi/qapi-types-crypto.c qapi/qapi-types-crypto.h \
+qapi/qapi-types-firmware.c qapi/qapi-types-firmware.h \
qapi/qapi-types-introspect.c qapi/qapi-types-introspect.h \
qapi/qapi-types-migration.c qapi/qapi-types-migration.h \
qapi/qapi-types-misc.c qapi/qapi-types-misc.h \
@@ -618,6 +624,7 @@ qapi/qapi-visit-block.c qapi/qapi-visit-block.h \
qapi/qapi-visit-char.c qapi/qapi-visit-char.h \
qapi/qapi-visit-common.c qapi/qapi-visit-common.h \
qapi/qapi-visit-crypto.c qapi/qapi-visit-crypto.h \
+qapi/qapi-visit-firmware.c qapi/qapi-visit-firmware.h \
qapi/qapi-visit-introspect.c qapi/qapi-visit-introspect.h \
qapi/qapi-visit-migration.c qapi/qapi-visit-migration.h \
qapi/qapi-visit-misc.c qapi/qapi-visit-misc.h \
@@ -635,6 +642,7 @@ qapi/qapi-commands-block.c qapi/qapi-commands-block.h \
qapi/qapi-commands-char.c qapi/qapi-commands-char.h \
qapi/qapi-commands-common.c qapi/qapi-commands-common.h \
qapi/qapi-commands-crypto.c qapi/qapi-commands-crypto.h \
+qapi/qapi-commands-firmware.c qapi/qapi-commands-firmware.h \
qapi/qapi-commands-introspect.c qapi/qapi-commands-introspect.h \
qapi/qapi-commands-migration.c qapi/qapi-commands-migration.h \
qapi/qapi-commands-misc.c qapi/qapi-commands-misc.h \
@@ -652,6 +660,7 @@ qapi/qapi-events-block.c qapi/qapi-events-block.h \
qapi/qapi-events-char.c qapi/qapi-events-char.h \
qapi/qapi-events-common.c qapi/qapi-events-common.h \
qapi/qapi-events-crypto.c qapi/qapi-events-crypto.h \
+qapi/qapi-events-firmware.c qapi/qapi-events-firmware.h \
qapi/qapi-events-introspect.c qapi/qapi-events-introspect.h \
qapi/qapi-events-migration.c qapi/qapi-events-migration.h \
qapi/qapi-events-misc.c qapi/qapi-events-misc.h \
diff --git a/Makefile.objs b/Makefile.objs
index c6c9b8fc2177..6ed4e0010b10 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -9,6 +9,7 @@ util-obj-y += qapi/qapi-types-block.o
util-obj-y += qapi/qapi-types-char.o
util-obj-y += qapi/qapi-types-common.o
util-obj-y += qapi/qapi-types-crypto.o
+util-obj-y += qapi/qapi-types-firmware.o
util-obj-y += qapi/qapi-types-introspect.o
util-obj-y += qapi/qapi-types-migration.o
util-obj-y += qapi/qapi-types-misc.o
@@ -27,6 +28,7 @@ util-obj-y += qapi/qapi-visit-block.o
util-obj-y += qapi/qapi-visit-char.o
util-obj-y += qapi/qapi-visit-common.o
util-obj-y += qapi/qapi-visit-crypto.o
+util-obj-y += qapi/qapi-visit-firmware.o
util-obj-y += qapi/qapi-visit-introspect.o
util-obj-y += qapi/qapi-visit-migration.o
util-obj-y += qapi/qapi-visit-misc.o
@@ -44,6 +46,7 @@ util-obj-y += qapi/qapi-events-block.o
util-obj-y += qapi/qapi-events-char.o
util-obj-y += qapi/qapi-events-common.o
util-obj-y += qapi/qapi-events-crypto.o
+util-obj-y += qapi/qapi-events-firmware.o
util-obj-y += qapi/qapi-events-introspect.o
util-obj-y += qapi/qapi-events-migration.o
util-obj-y += qapi/qapi-events-misc.o
@@ -139,6 +142,7 @@ common-obj-y += qapi/qapi-commands-block.o
common-obj-y += qapi/qapi-commands-char.o
common-obj-y += qapi/qapi-commands-common.o
common-obj-y += qapi/qapi-commands-crypto.o
+common-obj-y += qapi/qapi-commands-firmware.o
common-obj-y += qapi/qapi-commands-introspect.o
common-obj-y += qapi/qapi-commands-migration.o
common-obj-y += qapi/qapi-commands-misc.o
diff --git a/qapi/firmware.json b/qapi/firmware.json
new file mode 100644
index 000000000000..f267240f44dd
--- /dev/null
+++ b/qapi/firmware.json
@@ -0,0 +1,343 @@
+# -*- Mode: Python -*-
+
+##
+# = Firmware
+##
+
+##
+# @FirmwareDevice:
+#
+# Defines the device types that a firmware file can be mapped into.
+#
+# @memory: The firmware file is to be mapped into memory.
+#
+# @kernel: The firmware file is to be loaded like a Linux kernel. This is
+# similar to @memory but may imply additional processing that is
+# specific to the target architecture.
+#
+# @flash: The firmware file is to be mapped into a pflash chip.
+#
+# Since: 2.13
+##
+{ 'enum' : 'FirmwareDevice',
+ 'data' : [ 'memory', 'kernel', 'flash' ] }
+
+##
+# @FirmwareAccess:
+#
+# Defines the possible permissions for a given access mode to a device that
+# maps a firmware file.
+#
+# @denied: The access is denied.
+#
+# @permitted: The access is permitted.
+#
+# @restricted-to-secure-context: The access is permitted for guest code that
+# runs in a secure context; otherwise the access
+# is denied. The definition of "secure context"
+# is specific to the target architecture.
+#
+# Since: 2.13
+##
+{ 'enum' : 'FirmwareAccess',
+ 'data' : [ 'denied', 'permitted', 'restricted-to-secure-context' ] }
+
+##
+# @FirmwareMapping:
+#
+# Collects the mapping device type and the access permissions to that device
+# for system firmware and for NVRAM slots.
+#
+# @device: The system firmware or the NVRAM slot must reside in a device of
+# this type.
+#
+# @read: Permission for the guest to read the device that maps the firmware
+# file. If the field is missing, @permitted is assumed.
+#
+# @write: Permission for the guest to write the device that maps the firmware
+# file. If the field is missing, @permitted is assumed.
+#
+# @execute: Permission for the guest to execute code from the device that maps
+# the firmware file. If the field is missing, @permitted is assumed.
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareMapping',
+ 'data' : { 'device' : 'FirmwareDevice',
+ '*read' : 'FirmwareAccess',
+ '*write' : 'FirmwareAccess',
+ '*execute' : 'FirmwareAccess' } }
+
+##
+# @FirmwareFile:
+#
+# Gathers the common traits of system firmware executables and NVRAM templates.
+#
+# @pathname: absolute pathname of the firmware file on the host filesystem
+#
+# @description: human-readable description of the firmware file
+#
+# @tags: a list of machine-readable strings providing additional information
+#
+# @format: If the @FirmwareDevice that this @FirmwareFile is mapped into is
+# @flash, then @format describes the block format of the drive that
+# backs the device. Otherwise, this field should be 'raw' or absent.
+# If the field is missing, 'raw' is assumed.
+#
+# Since: 2.13
+##
+{ 'struct' : 'FirmwareFile',
+ 'data' : { 'pathname' : 'str',
+ '*description' : 'str',
+ '*tags' : [ 'str' ],
+ '*format' : 'str' } }
+
+##
+# @NVRAMSlot:
+#
+# Defines the mapping properties of an NVRAM slot, and associates compatible
+# NVRAM templates with the NVRAM slot.
+#
+# @slot-id: The numeric identifier of the NVRAM slot. The interpretation of
+# @slot-id is specific to the target architecture and the chosen
+# system firmware.
+#
+# @nvram-map: the mapping requirements of this NVRAM slot
+#
+# @templates: A non-empty list of @FirmwareFile elements. Any @FirmwareFile
+# identified by this list as an NVRAM template can be copied to
+# create an actual NVRAM file, and the NVRAM file can be mapped
+# into the NVRAM slot identified by @slot-id, subject to the
+# mapping requirements in @nvram-map.
+#
+# Since: 2.13
+##
+{ 'struct' : 'NVRAMSlot',
+ 'data' : { 'slot-id' : 'uint64',
+ 'nvram-map' : 'FirmwareMapping',
+ 'templates' : [ 'FirmwareFile' ] } }
+
+##
+# @SystemFirmwareType:
+#
+# Lists system firmware types commonly used with QEMU virtual machines.
+#
+# @bios: The system firmware was built from the SeaBIOS project.
+#
+# @slof: The system firmware was built from the Slimline Open Firmware project.
+#
+# @uboot: The system firmware was built from the U-Boot project.
+#
+# @uefi: The system firmware was built from the edk2 (EFI Development Kit II)
+# project.
+#
+# Since: 2.13
+##
+{ 'enum' : 'SystemFirmwareType',
+ 'data' : [ 'bios', 'slof', 'uboot', 'uefi' ] }
+
+##
+# @SystemFirmware:
+#
+# Describes a system firmware binary and any NVRAM slots that it requires.
+#
+# @executable: Identifies the platform firmware executable.
+#
+# @type: The type by which the system firmware is commonly known. This is the
+# main search key by which management software looks up a system
+# firmware image for a new domain.
+#
+# @targets: a non-empty list of target architectures that are capable of
+# executing the system firmware
+#
+# @sysfw-map: the mapping requirements of the system firmware binary
+#
+# @nvram-slots: A list of NVRAM slots that are required by the system firmware.
+# The @slot-id field must be unique across the list. Importantly,
+# if any @FirmwareAccess is @restricted-to-secure-context in
+# @sysfw-map or in any @nvram-map in @nvram-slots, then (a) the
+# virtual machine configuration is required to emulate the secure
+# code execution context (as defined for @targets), and (b) the
+# virtual machine configuration is required to actually restrict
+# the access in question to the secure execution context.
+#
+# @supports-uefi-secure-boot: Whether the system firmware implements the
+# software interfaces for UEFI Secure Boot, as
+# defined in the UEFI specification. If the field
+# is missing, its assumed value is 'false'.
+#
+# @supports-amd-sev: Whether the system firmware supports running under AMD
+# Secure Encrypted Virtualization, as specified in the AMD64
+# Architecture Programmer's Manual. If the field is missing,
+# its assumed value is 'false'.
+#
+# @supports-acpi-s3: Whether the system firmware supports S3 sleep (suspend to
+# RAM), as defined in the ACPI specification. If the field
+# is missing, its assumed value is 'false'.
+#
+# @supports-acpi-s4: Whether the system firmware supports S4 hibernation
+# (suspend to disk), as defined in the ACPI specification.
+# If the field is missing, its assumed value is 'false'.
+#
+# Since: 2.13
+#
+# Examples:
+#
+# {
+# "executable": {
+# "pathname": "/usr/share/seabios/bios-256k.bin",
+# "description": "SeaBIOS",
+# "tags": [
+# "CONFIG_ROM_SIZE=256"
+# ]
+# },
+# "type": "bios",
+# "targets": [
+# "i386",
+# "x86_64"
+# ],
+# "sysfw-map": {
+# "device": "memory",
+# "write": "denied"
+# },
+# "supports-acpi-s3": true,
+# "supports-acpi-s4": true
+# }
+#
+# {
+# "executable": {
+# "pathname": "/usr/share/OVMF/OVMF_CODE.secboot.fd",
+# "description": "OVMF with Secure Boot and SMM-protected varstore",
+# "tags": [
+# "FD_SIZE_4MB",
+# "IA32X64",
+# "SECURE_BOOT_ENABLE",
+# "SMM_REQUIRE"
+# ]
+# },
+# "type": "uefi",
+# "targets": [
+# "x86_64"
+# ],
+# "sysfw-map": {
+# "device": "flash",
+# "write": "denied"
+# },
+# "nvram-slots": [
+# {
+# "slot-id": 1,
+# "nvram-map" : {
+# "device": "flash",
+# "write": "restricted-to-secure-context"
+# },
+# "templates": [
+# {
+# "pathname": "/usr/share/OVMF/OVMF_VARS.fd",
+# "description": "empty varstore template"
+# },
+# {
+# "pathname": "/usr/share/OVMF/OVMF_VARS.secboot.fd",
+# "description": "varstore template with the Microsoft certificates enrolled for Secure Boot",
+# "tags": [
+# "mscerts"
+# ]
+# }
+# ]
+# }
+# ],
+# "supports-uefi-secure-boot": true,
+# "supports-amd-sev": true,
+# "supports-acpi-s3": true
+# }
+#
+# {
+# "executable": {
+# "pathname": "/usr/share/AAVMF/AAVMF_CODE.fd",
+# "description": "ARM64 UEFI firmware",
+# "tags": [
+# "AARCH64"
+# ]
+# },
+# "type": "uefi",
+# "targets": [
+# "aarch64"
+# ],
+# "sysfw-map": {
+# "device": "flash",
+# "write": "denied"
+# },
+# "nvram-slots": [
+# {
+# "slot-id": 1,
+# "nvram-map" : {
+# "device": "flash"
+# },
+# "templates": [
+# {
+# "pathname": "/usr/share/AAVMF/AAVMF_VARS.fd",
+# "description": "empty varstore template"
+# }
+# ]
+# }
+# ]
+# }
+#
+# {
+# "executable": {
+# "pathname": "/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd",
+# "description": "32-bit OVMF with unprotected varstore and no Secure Boot",
+# "tags": [
+# "FD_SIZE_2MB",
+# "IA32"
+# ]
+# },
+# "type": "uefi",
+# "targets": [
+# "i386",
+# "x86_64"
+# ],
+# "sysfw-map": {
+# "device": "flash",
+# "write": "denied"
+# },
+# "nvram-slots": [
+# {
+# "slot-id": 1,
+# "nvram-map" : {
+# "device": "flash"
+# },
+# "templates": [
+# {
+# "pathname": "/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd",
+# "description": "empty varstore template"
+# }
+# ]
+# }
+# ],
+# "supports-acpi-s3": true
+# }
+##
+{ 'struct' : 'SystemFirmware',
+ 'data' : { 'executable' : 'FirmwareFile',
+ 'type' : 'SystemFirmwareType',
+ 'targets' : [ 'str' ],
+ 'sysfw-map' : 'FirmwareMapping',
+ '*nvram-slots' : [ 'NVRAMSlot' ],
+ '*supports-uefi-secure-boot' : 'bool',
+ '*supports-amd-sev' : 'bool',
+ '*supports-acpi-s3' : 'bool',
+ '*supports-acpi-s4' : 'bool' } }
+
+##
+# @x-check-firmware:
+#
+# Accept a @SystemFirmware object and do nothing, successfully. This command
+# can be used in the QMP shell to validate @SystemFirmware JSON against the
+# schema, and to pretty print it.
+#
+# @sysfw: ignored
+#
+# Since: 2.13
+##
+{ 'command' : 'x-check-firmware',
+ 'data' : { 'sysfw' : 'SystemFirmware' } }
diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
index 25bce78352b8..2d6339ca8c99 100644
--- a/qapi/qapi-schema.json
+++ b/qapi/qapi-schema.json
@@ -92,4 +92,5 @@
{ 'include': 'transaction.json' }
{ 'include': 'trace.json' }
{ 'include': 'introspect.json' }
+{ 'include': 'firmware.json' }
{ 'include': 'misc.json' }
diff --git a/qmp.c b/qmp.c
index f72261667f92..fc9df5c9b05b 100644
--- a/qmp.c
+++ b/qmp.c
@@ -34,6 +34,7 @@
#include "qapi/qapi-commands-block-core.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-commands-ui.h"
+#include "qapi/qapi-commands-firmware.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qobject-input-visitor.h"
@@ -781,3 +782,7 @@ void qmp_x_oob_test(bool lock, Error **errp)
qemu_sem_post(&x_oob_test_sem);
}
}
+
+void qmp_x_check_firmware(SystemFirmware *sysfw, Error **errp)
+{
+}
diff --git a/.gitignore b/.gitignore
index 4055e12ee85d..1d8d1066d3d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@
/qapi/qapi-commands-char.[ch]
/qapi/qapi-commands-common.[ch]
/qapi/qapi-commands-crypto.[ch]
+/qapi/qapi-commands-firmware.[ch]
/qapi/qapi-commands-introspect.[ch]
/qapi/qapi-commands-migration.[ch]
/qapi/qapi-commands-misc.[ch]
@@ -52,6 +53,7 @@
/qapi/qapi-events-char.[ch]
/qapi/qapi-events-common.[ch]
/qapi/qapi-events-crypto.[ch]
+/qapi/qapi-events-firmware.[ch]
/qapi/qapi-events-introspect.[ch]
/qapi/qapi-events-migration.[ch]
/qapi/qapi-events-misc.[ch]
@@ -70,6 +72,7 @@
/qapi/qapi-types-char.[ch]
/qapi/qapi-types-common.[ch]
/qapi/qapi-types-crypto.[ch]
+/qapi/qapi-types-firmware.[ch]
/qapi/qapi-types-introspect.[ch]
/qapi/qapi-types-migration.[ch]
/qapi/qapi-types-misc.[ch]
@@ -87,6 +90,7 @@
/qapi/qapi-visit-char.[ch]
/qapi/qapi-visit-common.[ch]
/qapi/qapi-visit-crypto.[ch]
+/qapi/qapi-visit-firmware.[ch]
/qapi/qapi-visit-introspect.[ch]
/qapi/qapi-visit-migration.[ch]
/qapi/qapi-visit-misc.[ch]
--
2.14.1.3.gb7cf6e02401b
6 years, 7 months
[libvirt] [PATCH v2 0/9] Be consistent with vir*Obj*Remove* APIs
by John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2018-March/msg01295.html
NB: This can wait until 4.2.0 is release, but I figured I'd post this
now just to put it on the radar and of course in hopes that someone
will look during the idle moment or two before the release.
Changes since v1:
Short story: Rework the processing of the code
Longer story:
In his review Erik noted that there's a "fire dance" when processing
the vir*Obj*Remove APIs of requiring a locked object upon entry, then
adding a reference to that object, unlocking the object, locking the
list to which it is contained, and then relocking the object.
So it took some time to think about it and during one lengthy meeting
today I had the aha moment that the *Remove API's could take the same
key (e.g., uuid or name) used to Add or Find the object and use it for
the Remove API. This allows the Remove API to not require a locked (and
reffed) object upon entry and perform the lock dance, remove the object,
and return just just a reffed object forcing the caller to know to Unref
object.
Instead, let's simplify things. The *Remove API can take the key, Find
the object in the list, remove it from the hash tables, and dispose of
the object. In essence the antecedent to the Add or AssignDef API's
taking a def, creating an object, and adding it the object to the hash
table(s). If there are two *Remove threads competing, one will win and
perform the removal, while the other will call *Remove, but won't find
the object in the hash table, and just return none the wiser.
And yes, I think this can also work for the Domain code, but it's going
to take a few patch series to get there as that code is not consistent
between consumers.
John Ferlan (9):
secret: Rework LoadAllConfigs
secret: Alter virSecretObjListRemove processing
interface: Alter virInterfaceObjListRemove processing
nodedev: Alter virNodeDeviceObjListRemove processing
conf: Clean up virStoragePoolObjLoad error processing
storage: Clean up storagePoolCreateXML error processing
test: Clean up testStoragePoolCreateXML error processing
conf: Move virStoragePoolObjRemove closer to AssignDef
storagepool: Alter virStoragePoolObjRemove processing
src/conf/virinterfaceobj.c | 26 +++++++----
src/conf/virinterfaceobj.h | 2 +-
src/conf/virnodedeviceobj.c | 29 +++++++-----
src/conf/virnodedeviceobj.h | 2 +-
src/conf/virsecretobj.c | 58 +++++++++++-------------
src/conf/virsecretobj.h | 2 +-
src/conf/virstorageobj.c | 92 +++++++++++++++++++++++---------------
src/conf/virstorageobj.h | 2 +-
src/node_device/node_device_hal.c | 16 ++++---
src/node_device/node_device_udev.c | 13 ++++--
src/secret/secret_driver.c | 15 ++++---
src/storage/storage_driver.c | 65 +++++++++++++++------------
src/test/test_driver.c | 78 +++++++++++++++++---------------
13 files changed, 225 insertions(+), 175 deletions(-)
--
2.13.6
6 years, 7 months