Devel
Threads by month
- ----- 2026 -----
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- 49 participants
- 40230 discussions
26 May '16
This patch fixes an issue where screenshot API call was failing when
the esx/vcenter password contains special characters such as
apostrophee. The reason for failures was that passwords were escaped
for XML and stored in esxVI_Context which was then passed to raw CURL API
calls where the password must be passed in original form to
authenticate successfully. So this patch addresses this by storing
original passwords in the esxVI_Context struct and escape only for
esxVI_Login call.
---
src/esx/esx_driver.c | 22 ++++------------------
src/esx/esx_vi.c | 13 ++++++++++++-
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 00d0e0a..031c666 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -617,7 +617,6 @@ esxConnectToHost(esxPrivate *priv,
int result = -1;
char ipAddress[NI_MAXHOST] = "";
char *username = NULL;
- char *unescapedPassword = NULL;
char *password = NULL;
char *url = NULL;
esxVI_String *propertyNameList = NULL;
@@ -647,18 +646,13 @@ esxConnectToHost(esxPrivate *priv,
}
}
- unescapedPassword = virAuthGetPassword(conn, auth, "esx", username, conn->uri->server);
+ password = virAuthGetPassword(conn, auth, "esx", username, conn->uri->server);
- if (!unescapedPassword) {
+ if (!password) {
virReportError(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
goto cleanup;
}
- password = esxUtil_EscapeForXml(unescapedPassword);
-
- if (!password)
- goto cleanup;
-
if (virAsprintf(&url, "%s://%s:%d/sdk", priv->parsedUri->transport,
conn->uri->server, conn->uri->port) < 0)
goto cleanup;
@@ -705,7 +699,6 @@ esxConnectToHost(esxPrivate *priv,
cleanup:
VIR_FREE(username);
- VIR_FREE(unescapedPassword);
VIR_FREE(password);
VIR_FREE(url);
esxVI_String_Free(&propertyNameList);
@@ -726,7 +719,6 @@ esxConnectToVCenter(esxPrivate *priv,
int result = -1;
char ipAddress[NI_MAXHOST] = "";
char *username = NULL;
- char *unescapedPassword = NULL;
char *password = NULL;
char *url = NULL;
@@ -752,18 +744,13 @@ esxConnectToVCenter(esxPrivate *priv,
}
}
- unescapedPassword = virAuthGetPassword(conn, auth, "esx", username, hostname);
+ password = virAuthGetPassword(conn, auth, "esx", username, hostname);
- if (!unescapedPassword) {
+ if (!password) {
virReportError(VIR_ERR_AUTH_FAILED, "%s", _("Password request failed"));
goto cleanup;
}
- password = esxUtil_EscapeForXml(unescapedPassword);
-
- if (!password)
- goto cleanup;
-
if (virAsprintf(&url, "%s://%s:%d/sdk", priv->parsedUri->transport,
hostname, conn->uri->port) < 0)
goto cleanup;
@@ -799,7 +786,6 @@ esxConnectToVCenter(esxPrivate *priv,
cleanup:
VIR_FREE(username);
- VIR_FREE(unescapedPassword);
VIR_FREE(password);
VIR_FREE(url);
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index bf6f228..872cb7d 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -996,6 +996,8 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
const char *ipAddress, const char *username,
const char *password, esxUtil_ParsedUri *parsedUri)
{
+ char *escapedPassword = NULL;
+
if (!ctx || !url || !ipAddress || !username ||
!password || ctx->url || ctx->service || ctx->curl) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument"));
@@ -1107,7 +1109,16 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
if (ctx->productLine == esxVI_ProductLine_VPX)
ctx->hasSessionIsActive = true;
- if (esxVI_Login(ctx, username, password, NULL, &ctx->session) < 0 ||
+ escapedPassword = esxUtil_EscapeForXml(password);
+
+ if (!escapedPassword) {
+ VIR_FREE(escapedPassword);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Failed to escape password for XML"));
+ return -1;
+ }
+
+ if (esxVI_Login(ctx, username, escapedPassword, NULL, &ctx->session) < 0 ||
esxVI_BuildSelectSetCollection(ctx) < 0) {
return -1;
}
--
2.7.4
3
3
This is identical to type='bridge', but without the "connect to a
bridge" part, so it can be handled by using the same functions (and
often even the same cases in switch statements), after renaming
virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap()
and enhancing it to skip bridge-related items when brname == NULL.
To be truly useful, we need to support setting the ip address on the
host side veth as well as guest side veth (already supported for
type='bridge'), as well as setting the peer address for both.
The <script> element isn't supported in this patch because I have no
need for it. I'd rather add it after determining it's needed rather
than adding it for no reason and than being required to support it
forever.
---
I wrote this mostly so that I could experiment with setting the peer
addresses of both sides of the veth pair to see what was usable and
what we needed to support in terms of setting IP addresses. I had
intended to post this patch along with patches to re-enable the peer
address setting patches that I reverted just before 1.3.4 was
released, but decided that having lxc <interface type='ethernet'>
already in might help in any discussion we had about that (since it
gives everyone a working example where libvirt has control of both the
host-side and guest-side interface config.
This will of course be much more useful once the IP addresses can be
set from within libvirt, but all code that is here will remain and, as
I said above, it provides a useful platform for experimentation.
src/lxc/lxc_controller.c | 4 +-
src/lxc/lxc_driver.c | 16 ++++---
src/lxc/lxc_native.c | 15 +++----
src/lxc/lxc_process.c | 36 +++++++--------
src/lxc/lxc_process.h | 6 +--
tests/lxcconf2xmldata/lxcconf2xml-ethernet.config | 44 ++++++++++++++++++
tests/lxcconf2xmldata/lxcconf2xml-ethernet.xml | 54 +++++++++++++++++++++++
tests/lxcconf2xmltest.c | 1 +
tests/lxcxml2xmldata/lxc-ethernet.xml | 42 ++++++++++++++++++
tests/lxcxml2xmltest.c | 1 +
10 files changed, 181 insertions(+), 38 deletions(-)
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-ethernet.config
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-ethernet.xml
create mode 100644 tests/lxcxml2xmldata/lxc-ethernet.xml
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 0304354..25f28ea 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2015 Red Hat, Inc.
+ * Copyright (C) 2010-2016 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
* lxc_controller.c: linux container process controller
@@ -371,6 +371,7 @@ static int virLXCControllerGetNICIndexes(virLXCControllerPtr ctrl)
switch (ctrl->def->nets[i]->type) {
case VIR_DOMAIN_NET_TYPE_BRIDGE:
case VIR_DOMAIN_NET_TYPE_NETWORK:
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
if (ctrl->def->nets[i]->ifname == NULL)
continue;
if (virNetDevGetIndex(ctrl->def->nets[i]->ifname,
@@ -386,7 +387,6 @@ static int virLXCControllerGetNICIndexes(virLXCControllerPtr ctrl)
break;
case VIR_DOMAIN_NET_TYPE_USER:
- case VIR_DOMAIN_NET_TYPE_ETHERNET:
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
case VIR_DOMAIN_NET_TYPE_SERVER:
case VIR_DOMAIN_NET_TYPE_CLIENT:
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index a226850..f811053 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2015 Red Hat, Inc.
+ * Copyright (C) 2010-2016 Red Hat, Inc.
* Copyright IBM Corp. 2008
*
* lxc_driver.c: linux container driver functions
@@ -4225,15 +4225,15 @@ lxcDomainAttachDeviceNetLive(virConnectPtr conn,
_("No bridge name specified"));
goto cleanup;
}
- if (!(veth = virLXCProcessSetupInterfaceBridged(vm->def,
- net,
- brname)))
+ if (!(veth = virLXCProcessSetupInterfaceTap(vm->def, net, brname)))
goto cleanup;
} break;
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
+ if (!(veth = virLXCProcessSetupInterfaceTap(vm->def, net, NULL)))
+ goto cleanup;
+ break;
case VIR_DOMAIN_NET_TYPE_DIRECT: {
- if (!(veth = virLXCProcessSetupInterfaceDirect(conn,
- vm->def,
- net)))
+ if (!(veth = virLXCProcessSetupInterfaceDirect(conn, vm->def, net)))
goto cleanup;
} break;
default:
@@ -4270,6 +4270,7 @@ lxcDomainAttachDeviceNetLive(virConnectPtr conn,
switch (actualType) {
case VIR_DOMAIN_NET_TYPE_BRIDGE:
case VIR_DOMAIN_NET_TYPE_NETWORK:
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
ignore_value(virNetDevVethDelete(veth));
break;
@@ -4695,6 +4696,7 @@ lxcDomainDetachDeviceNetLive(virDomainObjPtr vm,
switch (actualType) {
case VIR_DOMAIN_NET_TYPE_BRIDGE:
case VIR_DOMAIN_NET_TYPE_NETWORK:
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
if (virNetDevVethDelete(detach->ifname) < 0) {
virDomainAuditNet(vm, detach, NULL, "detach", false);
goto cleanup;
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 31ffce7..0bea32e 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -360,14 +360,13 @@ lxcCreateNetDef(const char *type,
net->mac = macAddr;
if (STREQ(type, "veth")) {
- if (!linkdev)
- goto error;
-
- net->type = VIR_DOMAIN_NET_TYPE_BRIDGE;
-
- if (VIR_STRDUP(net->data.bridge.brname, linkdev) < 0)
- goto error;
-
+ if (linkdev) {
+ net->type = VIR_DOMAIN_NET_TYPE_BRIDGE;
+ if (VIR_STRDUP(net->data.bridge.brname, linkdev) < 0)
+ goto error;
+ } else {
+ net->type = VIR_DOMAIN_NET_TYPE_ETHERNET;
+ }
} else if (STREQ(type, "macvlan")) {
net->type = VIR_DOMAIN_NET_TYPE_DIRECT;
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 8981d9a..f8a0c32 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -256,9 +256,9 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver,
}
-char *virLXCProcessSetupInterfaceBridged(virDomainDefPtr vm,
- virDomainNetDefPtr net,
- const char *brname)
+char *virLXCProcessSetupInterfaceTap(virDomainDefPtr vm,
+ virDomainNetDefPtr net,
+ const char *brname)
{
char *ret = NULL;
char *parentVeth;
@@ -277,13 +277,15 @@ char *virLXCProcessSetupInterfaceBridged(virDomainDefPtr vm,
if (virNetDevSetMAC(containerVeth, &net->mac) < 0)
goto cleanup;
- if (vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) {
- if (virNetDevOpenvswitchAddPort(brname, parentVeth, &net->mac,
- vm->uuid, vport, virDomainNetGetActualVlan(net)) < 0)
- goto cleanup;
- } else {
- if (virNetDevBridgeAddPort(brname, parentVeth) < 0)
- goto cleanup;
+ if (brname) {
+ if (vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) {
+ if (virNetDevOpenvswitchAddPort(brname, parentVeth, &net->mac, vm->uuid,
+ vport, virDomainNetGetActualVlan(net)) < 0)
+ goto cleanup;
+ } else {
+ if (virNetDevBridgeAddPort(brname, parentVeth) < 0)
+ goto cleanup;
+ }
}
if (virNetDevSetOnline(parentVeth, true) < 0)
@@ -546,20 +548,18 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
_("No bridge name specified"));
goto cleanup;
}
- if (!(veth = virLXCProcessSetupInterfaceBridged(def,
- net,
- brname)))
+ if (!(veth = virLXCProcessSetupInterfaceTap(def, net, brname)))
goto cleanup;
} break;
-
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
+ if (!(veth = virLXCProcessSetupInterfaceTap(def, net, NULL)))
+ goto cleanup;
+ break;
case VIR_DOMAIN_NET_TYPE_DIRECT:
- if (!(veth = virLXCProcessSetupInterfaceDirect(conn,
- def,
- net)))
+ if (!(veth = virLXCProcessSetupInterfaceDirect(conn, def, net)))
goto cleanup;
break;
- case VIR_DOMAIN_NET_TYPE_ETHERNET:
case VIR_DOMAIN_NET_TYPE_USER:
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
case VIR_DOMAIN_NET_TYPE_SERVER:
diff --git a/src/lxc/lxc_process.h b/src/lxc/lxc_process.h
index b6c8083..fcb50a8 100644
--- a/src/lxc/lxc_process.h
+++ b/src/lxc/lxc_process.h
@@ -47,9 +47,9 @@ void virLXCProcessAutostartAll(virLXCDriverPtr driver);
int virLXCProcessReconnectAll(virLXCDriverPtr driver,
virDomainObjListPtr doms);
-char *virLXCProcessSetupInterfaceBridged(virDomainDefPtr vm,
- virDomainNetDefPtr net,
- const char *brname);
+char *virLXCProcessSetupInterfaceTap(virDomainDefPtr vm,
+ virDomainNetDefPtr net,
+ const char *brname);
char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn,
virDomainDefPtr def,
virDomainNetDefPtr net);
diff --git a/tests/lxcconf2xmldata/lxcconf2xml-ethernet.config b/tests/lxcconf2xmldata/lxcconf2xml-ethernet.config
new file mode 100644
index 0000000..d39917d
--- /dev/null
+++ b/tests/lxcconf2xmldata/lxcconf2xml-ethernet.config
@@ -0,0 +1,44 @@
+# Template used to create this container: opensuse
+# Template script checksum (SHA-1): 27307e0a95bd81b2c0bd82d6f87fdbe83be075ef
+
+lxc.network.type = veth
+lxc.network.flags = up
+lxc.network.hwaddr = 02:00:15:8f:05:c1
+lxc.network.name = eth0
+lxc.network.ipv4 = 192.168.122.2/24
+lxc.network.ipv4.gateway = 192.168.122.1
+lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596/64
+lxc.network.ipv6.gateway = 2003:db8:1:0:214:1234:fe0b:3595
+
+#remove next line if host DNS configuration should not be available to container
+lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
+lxc.mount.entry = sysfs sys sysfs defaults 0 0
+lxc.mount.entry = tmpfs run tmpfs size=8m,mode=0755,nodev,nosuid 0 0
+lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,ro 0 0
+lxc.rootfs = /var/lib/lxc/migrate_test/rootfs
+lxc.utsname = migrate_test
+lxc.arch = x86
+lxc.autodev=1
+lxc.tty = 2
+lxc.pts = 1024
+lxc.cap.drop = sys_module mac_admin mac_override mknod
+
+# When using LXC with apparmor, uncomment the next line to run unconfined:
+#lxc.aa_profile = unconfined
+
+lxc.cgroup.devices.deny = a
+# /dev/null and zero
+lxc.cgroup.devices.allow = c 1:3 rwm
+lxc.cgroup.devices.allow = c 1:5 rwm
+# consoles
+lxc.cgroup.devices.allow = c 5:1 rwm
+lxc.cgroup.devices.allow = c 5:0 rwm
+lxc.cgroup.devices.allow = c 4:0 rwm
+lxc.cgroup.devices.allow = c 4:1 rwm
+# /dev/{,u}random
+lxc.cgroup.devices.allow = c 1:9 rwm
+lxc.cgroup.devices.allow = c 1:8 rwm
+lxc.cgroup.devices.allow = c 136:* rwm
+lxc.cgroup.devices.allow = c 5:2 rwm
+# rtc
+lxc.cgroup.devices.allow = c 254:0 rwm
diff --git a/tests/lxcconf2xmldata/lxcconf2xml-ethernet.xml b/tests/lxcconf2xmldata/lxcconf2xml-ethernet.xml
new file mode 100644
index 0000000..24b017a
--- /dev/null
+++ b/tests/lxcconf2xmldata/lxcconf2xml-ethernet.xml
@@ -0,0 +1,54 @@
+<domain type='lxc'>
+ <name>migrate_test</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>65536</memory>
+ <currentMemory unit='KiB'>65536</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686'>exe</type>
+ <init>/sbin/init</init>
+ </os>
+ <features>
+ <capabilities policy='allow'>
+ <mac_admin state='off'/>
+ <mac_override state='off'/>
+ <mknod state='off'/>
+ <sys_module state='off'/>
+ </capabilities>
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/libexec/libvirt_lxc</emulator>
+ <filesystem type='mount' accessmode='passthrough'>
+ <source dir='/var/lib/lxc/migrate_test/rootfs'/>
+ <target dir='/'/>
+ </filesystem>
+ <filesystem type='ram' accessmode='passthrough'>
+ <source usage='8192' units='KiB'/>
+ <target dir='/run'/>
+ </filesystem>
+ <filesystem type='mount' accessmode='passthrough'>
+ <source dir='/etc/resolv.conf'/>
+ <target dir='/etc/resolv.conf'/>
+ <readonly/>
+ </filesystem>
+ <interface type='ethernet'>
+ <mac address='02:00:15:8f:05:c1'/>
+ <ip address='192.168.122.2' family='ipv4' prefix='24'/>
+ <ip address='2003:db8:1:0:214:1234:fe0b:3596' family='ipv6' prefix='64'/>
+ <route family='ipv4' address='0.0.0.0' gateway='192.168.122.1'/>
+ <route family='ipv6' address='::' gateway='2003:db8:1:0:214:1234:fe0b:3595'/>
+ <guest dev='eth0'/>
+ <link state='up'/>
+ </interface>
+ <console type='pty'>
+ <target type='lxc' port='0'/>
+ </console>
+ <console type='pty'>
+ <target type='lxc' port='1'/>
+ </console>
+ </devices>
+</domain>
diff --git a/tests/lxcconf2xmltest.c b/tests/lxcconf2xmltest.c
index 83895cd..7a0893e 100644
--- a/tests/lxcconf2xmltest.c
+++ b/tests/lxcconf2xmltest.c
@@ -119,6 +119,7 @@ mymain(void)
DO_TEST("cputune", false);
DO_TEST("cpusettune", false);
DO_TEST("blkiotune", false);
+ DO_TEST("ethernet", false);
virObjectUnref(xmlopt);
virObjectUnref(caps);
diff --git a/tests/lxcxml2xmldata/lxc-ethernet.xml b/tests/lxcxml2xmldata/lxc-ethernet.xml
new file mode 100644
index 0000000..6c4a739
--- /dev/null
+++ b/tests/lxcxml2xmldata/lxc-ethernet.xml
@@ -0,0 +1,42 @@
+<domain type='lxc'>
+ <name>8675309</name>
+ <uuid>e21987a5-e98e-9c99-0e35-803e4d9ad1fe</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <resource>
+ <partition>/machine</partition>
+ </resource>
+ <os>
+ <type arch='x86_64'>exe</type>
+ <init>/sbin/init</init>
+ </os>
+ <idmap>
+ <uid start='0' target='100000' count='100000'/>
+ <gid start='0' target='100000' count='100000'/>
+ </idmap>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/libexec/libvirt_lxc</emulator>
+ <filesystem type='mount' accessmode='passthrough'>
+ <source dir='/mach/8675309'/>
+ <target dir='/'/>
+ </filesystem>
+ <interface type='ethernet'>
+ <mac address='00:16:3e:0f:ef:8a'/>
+ <ip address='192.168.122.12' family='ipv4' prefix='24'/>
+ <ip address='192.168.122.13' family='ipv4' prefix='24'/>
+ <route family='ipv4' address='0.0.0.0' gateway='192.168.122.1'/>
+ <route family='ipv4' address='192.168.124.0' prefix='24' gateway='192.168.124.1'/>
+ <target dev='veth0'/>
+ <guest dev='eth2'/>
+ </interface>
+ <console type='pty'>
+ <target type='lxc' port='0'/>
+ </console>
+ </devices>
+ <seclabel type='none'/>
+</domain>
diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c
index fec0142..001aa8d 100644
--- a/tests/lxcxml2xmltest.c
+++ b/tests/lxcxml2xmltest.c
@@ -94,6 +94,7 @@ mymain(void)
DO_TEST("idmap");
DO_TEST("capabilities");
DO_TEST("sharenet");
+ DO_TEST("ethernet");
DO_TEST_FULL("filesystem-root", 0, false,
VIR_DOMAIN_DEF_PARSE_SKIP_OSTYPE_CHECKS);
--
2.5.5
4
15
Patches 1 and 2 just shuffle a couple of existing functions. Patch 3
gets to the point.
v1->v2 changes are explained in patch 3.
Laine Stump (3):
conf/qemu: make IS_USB2_CONTROLLER globally available
conf: make virDomainControllerFindUnusedIndex() more generally usable
conf: permit auto-assignment of controller indexes
docs/formatdomain.html.in | 7 +-
docs/schemas/domaincommon.rng | 8 +-
src/conf/domain_conf.c | 128 ++++++++++++++---
src/conf/domain_conf.h | 10 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_domain_address.c | 7 -
src/qemu/qemu_driver.c | 5 +-
src/qemu/qemu_hotplug.c | 8 ++
tests/qemuxml2argvdata/qemuxml2argv-autoindex.args | 53 +++++++
tests/qemuxml2argvdata/qemuxml2argv-autoindex.xml | 54 ++++++++
tests/qemuxml2argvtest.c | 9 ++
.../qemuxml2xmlout-autoindex.xml | 153 +++++++++++++++++++++
tests/qemuxml2xmltest.c | 10 +-
13 files changed, 421 insertions(+), 32 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-autoindex.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-autoindex.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-autoindex.xml
--
2.5.5
2
5
25 May '16
While refreshing and testing my series to add domain capabilities
and UEFI support to the libxl driver [1], I realized it would be
useful to support the '--with-loader-nvram' configure option as
well. This would allow users/packagers to specify system-provided
firmwares instead of those provided by the Xen installation.
Instead of copying code from the qemu driver, I decided to create
a virFirmware object containing the firmware name (loader) and
associated nvram, along with a few operations on the object. Patch1
introduces the object in src/util/virfirmware.[ch] and switches
the qemu driver to use. The patch could be split along those lines,
but I thought it would be review-friendly to see the movement of
code in a single patch. But it can be split if preferred.
Patch2 adds virFirmware to the libxl driver config. It is unused
in this series, but if this approach is aggreable it will be used
when rebasing the domain capabilities series.
Note that currently Xen does not support storage for non-volitile
variables for UEFI firmware (OVMF), so 'nvram' will be unused for
the time being. Adding a 'nvram' option to libxl.conf can be
deferred until support is added to Xen. But even with this
limitation, folks are using UEFI + HVM guests with xl/libxl and
would like to do the same with libvirt.
Patch1 is a lot of code movement to avoid copying
virQEMUDriverConfigLoaderNVRAMParse (and eventually
virQEMUDriverConfigNVRAMParse). But I've complained about copy/paste
in some of my recent reviews and shouldn't be doing the same in
my own patches :-).
[1] https://www.redhat.com/archives/libvir-list/2016-April/msg01358.html
Jim Fehlig (2):
driver config: Introduce virFirmware object
libxl: add default firmwares to driver config object
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/libvirt_private.syms | 6 ++
src/libxl/libxl_conf.c | 21 +++++++
src/libxl/libxl_conf.h | 4 ++
src/qemu/qemu_capabilities.c | 22 +++----
src/qemu/qemu_capabilities.h | 5 +-
src/qemu/qemu_conf.c | 127 ++++++----------------------------------
src/qemu/qemu_conf.h | 7 +--
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_process.c | 6 +-
src/util/virfirmware.c | 135 +++++++++++++++++++++++++++++++++++++++++++
src/util/virfirmware.h | 51 ++++++++++++++++
tests/domaincapstest.c | 3 +-
14 files changed, 260 insertions(+), 131 deletions(-)
create mode 100644 src/util/virfirmware.c
create mode 100644 src/util/virfirmware.h
--
2.1.4
2
9
On 05/22/2016 09:34 PM, Chun Yan Liu wrote:
>
>>>> On 5/17/2016 at 11:46 PM, in message
> <2fa0cb6f-ea83-d6f3-18f8-51a671574205(a)laine.org>, Laine Stump <laine(a)laine.org>
> wrote:
>> On 05/16/2016 06:05 PM, Jim Fehlig wrote:
>>> Chun Yan Liu wrote:
>>>>>>> On 5/14/2016 at 07:47 AM, in message <5736677D.8030209(a)suse.com>, Jim Fehlig
>>>> <jfehlig(a)suse.com> wrote:
>>>>> On 05/13/2016 12:21 AM, Chunyan Liu wrote:
>>>>>> Add .domainInterfaceAddresses so that user can have a way to
>>>>>> get domain interface address by 'virsh domifaddr'. Currently
>>>>>> it only supports '--source lease'.
>>>>>>
>>>>>> Signed-off: Chunyan Liu <cyliu(a)suse.com>
>>>>>> ---
>>>>>> src/libxl/libxl_driver.c | 140
>>>>> +++++++++++++++++++++++++++++++++++++++++++++++
>>>>>> 1 file changed, 140 insertions(+)
>>>>>>
>>>>>> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
>>>>>> index 062d6f8..f2bd6fa 100644
>>>>>> --- a/src/libxl/libxl_driver.c
>>>>>> +++ b/src/libxl/libxl_driver.c
>>>>>> @@ -5425,6 +5425,145 @@ static int libxlNodeGetSecurityModel(virConnectPtr
>>>>> conn,
>>>>>> return 0;
>>>>>> }
>>>>>>
>>>>>> +static int
>>>>>> +libxlGetDHCPInterfaces(virDomainPtr dom,
>>>>>> + virDomainObjPtr vm,
>>>>>> + virDomainInterfacePtr **ifaces)
>>>>>> +{
>>>>>> + int rv = -1;
>>>>>> + int n_leases = 0;
>>>>>> + size_t i, j;
>>>>>> + size_t ifaces_count = 0;
>>>>>> + virNetworkPtr network = NULL;
>>>>>> + char macaddr[VIR_MAC_STRING_BUFLEN];
>>>>>> + virDomainInterfacePtr iface = NULL;
>>>>>> + virNetworkDHCPLeasePtr *leases = NULL;
>>>>>> + virDomainInterfacePtr *ifaces_ret = NULL;
>>>>>> +
>>>>>> + if (!dom->conn->networkDriver ||
>>>>>> + !dom->conn->networkDriver->networkGetDHCPLeases) {
>>>>>> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
>>>>>> + _("Network driver does not support DHCP lease
>>>>> query"));
>>>>>> + return -1;
>>>>>> + }
>>>>>> +
>>>>>> + for (i = 0; i < vm->def->nnets; i++) {
>>>>>> + if (vm->def->nets[i]->type != VIR_DOMAIN_NET_TYPE_NETWORK)
>>>>>> + continue;
>>>>>> +
>>>>>> + virMacAddrFormat(&(vm->def->nets[i]->mac), macaddr);
>>>>>> + virObjectUnref(network);
>>>>>> + network = virNetworkLookupByName(dom->conn,
>>>>>> +
>> vm->def->nets[i]->data.network.name);
>>>>>> +
>>>>>> + if ((n_leases = virNetworkGetDHCPLeases(network, macaddr,
>>>>>> + &leases, 0)) < 0)
>>>>>> + goto error;
>>>>>> +
>>>>>> + if (n_leases) {
>>>>>> + if (VIR_EXPAND_N(ifaces_ret, ifaces_count, 1) < 0)
>>>>>> + goto error;
>>>>>> +
>>>>>> + if (VIR_ALLOC(ifaces_ret[ifaces_count - 1]) < 0)
>>>>>> + goto error;
>>>>>> +
>>>>>> + iface = ifaces_ret[ifaces_count - 1];
>>>>>> + /* Assuming each lease corresponds to a separate IP */
>>>>>> + iface->naddrs = n_leases;
>>>>>> +
>>>>>> + if (VIR_ALLOC_N(iface->addrs, iface->naddrs) < 0)
>>>>>> + goto error;
>>>>>> +
>>>>>> + if (VIR_STRDUP(iface->name, vm->def->nets[i]->ifname) < 0)
>>>>>> + goto cleanup;
>>>>>> +
>>>>>> + if (VIR_STRDUP(iface->hwaddr, macaddr) < 0)
>>>>>> + goto cleanup;
>>>>>> + }
>>>>>> +
>>>>>> + for (j = 0; j < n_leases; j++) {
>>>>>> + virNetworkDHCPLeasePtr lease = leases[j];
>>>>>> + virDomainIPAddressPtr ip_addr = &iface->addrs[j];
>>>>>> +
>>>>>> + if (VIR_STRDUP(ip_addr->addr, lease->ipaddr) < 0)
>>>>>> + goto cleanup;
>>>>>> +
>>>>>> + ip_addr->type = lease->type;
>>>>>> + ip_addr->prefix = lease->prefix;
>>>>>> + }
>>>>>> +
>>>>>> + for (j = 0; j < n_leases; j++)
>>>>>> + virNetworkDHCPLeaseFree(leases[j]);
>>>>>> +
>>>>>> + VIR_FREE(leases);
>>>>>> + }
>>>>>> +
>>>>>> + *ifaces = ifaces_ret;
>>>>>> + ifaces_ret = NULL;
>>>>>> + rv = ifaces_count;
>>>>>> +
>>>>>> + cleanup:
>>>>>> + virObjectUnref(network);
>>>>>> + if (leases) {
>>>>>> + for (i = 0; i < n_leases; i++)
>>>>>> + virNetworkDHCPLeaseFree(leases[i]);
>>>>>> + }
>>>>>> + VIR_FREE(leases);
>>>>>> +
>>>>>> + return rv;
>>>>>> +
>>>>>> + error:
>>>>>> + if (ifaces_ret) {
>>>>>> + for (i = 0; i < ifaces_count; i++)
>>>>>> + virDomainInterfaceFree(ifaces_ret[i]);
>>>>>> + }
>>>>>> + VIR_FREE(ifaces_ret);
>>>>>> +
>>>>>> + goto cleanup;
>>>>>> +}
>>>>>
>>>>> It's unfortunate this is a copy-paste from the qemu driver. The code is not
>>>>> trivial and any bug fixes in one copy could be missed in the other. A lot
>> of
>>>>> the
>>>>> function is domain related, so probably can't be abstracted further to the
>>>>> network code. Have you considered approaches that allow the drivers to
>> share
>>>>> this code?
>>>> Well, it can be extracted and placed in bridge_driver.c as
>> networkGetDHCPInterfaces,
>>>> but I don't know if that is acceptable?
>>> Hmm, maybe something like networkGetDHCPLeasesAll() is a better name.
>> Regardless
>>> of the name, I see that other functions in bridge_driver.c take a
>>> virDomainDefPtr, so maybe extracting the code to bridge_driver.c is
>> acceptable.
>>
>> Well, I don't really *like* the way that those network*() functions are
>> implemented (just by exporting a symbol, implying that any hypervisor
>> driver that uses them must directly link the bridge driver in, rather
>> than being able to load an alternative), but that was the most expedient
>> way of handling the need at the time, and nobody complained about it,
>> so... :-)
>>
>> Definitely duplication of code is bad (I say that although I do it a lot
>> myself!). And if a function is all about "doing something with a network
>> device / connection" and it will need access to the network object, I
>> think the network driver is the place to have it. *AND* if it's
>> something that's not needed directly in the public API, then making it
>> available as a public API call is a bad idea (since you're then stuck
>> with it forever).
>>
>> However, I don't know that I like the idea of a function in the network
>> driver that is trawling through the virDomainDef object. It may seem
>> like a fine distinction - returning the lease info for a single
>> interface vs. returning the lease info for all interfaces in the domain,
>> but it does take the co-mingling between the network and hypervisor
>> drivers to a new level. Yes, it's true that there are already functions
>> that are part of this "backend super double secret network API" (watch
>> Animal House and you'll understand the reference) that take a
>> virDomainDefPtr as an argument; but they only use it to format the
>> domain XML and send it to the network hook script. Technically there's
>> nothing preventing a function in the network driver from accessing every
>> attribute of the domain, or even modifying it :-O, that doesn't mean we
>> should do it though.
>>
>> I'm trying to completely recall a vague memory of something similar to
>> this that happened in the past - something that was needed in multiple
>> hypervisors (which would imply that it should live either in util or
>> conf), but that also needed to call a network function (or maybe some
>> other driver, I forget). When trying to maintain some sort of separation
>> and rules of engagement between the various components, there tend to be
>> cases that just don't fit within the mold.
>>
>> In this case, I'm wondering if maybe the duplication can be reduced by
>> creating a function in conf (either domain_conf.c or one of its
>> subsidiaries) that takes a *function as an argument and calls that
>> function for each interface. Something like this:
>>
>> int
>> virDomainGetDHCPInterfaces(virDomainDefPtr def,
>> virDomainDefGetDHCPLeasesCB getLeases,
>> virDomainInterfacePtr **ifaces)
>> {
>>
>> for (i = 0; i < def->nnets; i++) {
>> virDomainNetDefPtr net = def->nets[i];
>>
>> if (virDomainNetDefGetActualType(net) !=
>> VIR_DOMAIN_NET_TYPE_NETWORK)
>> continue;
>> if ((n_leases = getLeases(net->data.network.name, net->mac,
>> &leases)) < 0) {
>> OH NOES!!!!!
>> goto error;
>> if (n_leases) {
>> bobloblawlawblog.com ....
>> }
>>
>> etc etc.
>> }
>>
>> various cleanup stuff etc.
>>
>> }
>>
>> The function getLeases would be a thin (if any) wrapper around a
>> function in the network driver called networkGetDHCPLeases(). The
>> toplevel function in qemu and libxl would then be simple a bit of glue
>> followed by a call to virDomainGetDHCPInterfaces() with a pointer to the
>> appropriate getLeases function.
>>
>> This way we would eliminate almost all of the duplicate code (most would
>> go into domain_conf.c, and a bit into bridge_driver.c) without needing
>> to teach the network driver about the internal workings of a domain def.
>>
>> Does that make any sense?
> Had a look at this and tried, seems hard to put into domain_conf.c:
> except for the vm->def->nets, almost all the other things are called
> from src/libvirt-domain.c or src/libvirt-network.c, not only the
> getLeases cb of a specific network, but even the virDomainInterfacePtr
> itself is defined in libvirt-domain.h and also its Free function (in case of
> error, virNetworkDHCPLeaseFree and virDomainInterfaceFree are also
> needed). Ideas?
Hrm, maybe just go with the small amount of copied code? :-)
When originally looking at the patch, I thought it might be quite disruptive to
factor it out into something that could be used by both drivers. Unless others
have a clever idea, I'm leaning towards pushing this patch as is.
Regards,
Jim
2
2
Windows uses this BLOB for activation purposes.
https://bugzilla.redhat.com/show_bug.cgi?id=1327537
In v2:
* make <table> a subelement of <acpi>
* minor documentation fixes
* comma-escape the value on QEMU command line
* mention that this option was added in 2009
Ján Tomko (3):
conf: add <acpi><table> to <os>
qemu: format SLIC ACPI table command line
security: label the slic_table
docs/formatdomain.html.in | 8 ++++
docs/schemas/domaincommon.rng | 18 +++++++++
src/conf/domain_conf.c | 46 ++++++++++++++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 7 ++++
src/security/security_dac.c | 5 +++
src/security/security_selinux.c | 5 +++
src/security/virt-aa-helper.c | 4 ++
.../qemuxml2argvdata/qemuxml2argv-acpi-table.args | 19 +++++++++
tests/qemuxml2argvdata/qemuxml2argv-acpi-table.xml | 30 ++++++++++++++
tests/qemuxml2argvtest.c | 2 +
.../qemuxml2xmlout-acpi-table.xml | 34 ++++++++++++++++
tests/qemuxml2xmltest.c | 3 ++
13 files changed, 182 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-acpi-table.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-acpi-table.xml
--
2.7.3
2
8
25 May '16
ESX will refuse to attach VMDKS that have buslogic adatper type to 64bit
VMs whereas lsilogic works fine both 32bit and 64bit VMs.
---
src/esx/esx_storage_backend_vmfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c
index d03d33a..a1a660b 100644
--- a/src/esx/esx_storage_backend_vmfs.c
+++ b/src/esx/esx_storage_backend_vmfs.c
@@ -966,9 +966,9 @@ esxStorageVolCreateXML(virStoragePoolPtr pool,
/*
* FIXME: The adapter type is a required parameter, but there is no
* way to let the user specify it in the volume XML config. Therefore,
- * default to 'busLogic' here.
+ * default to 'lsilogic' here.
*/
- virtualDiskSpec->adapterType = (char *)"busLogic";
+ virtualDiskSpec->adapterType = (char *)"lsilogic";
virtualDiskSpec->capacityKb->value =
VIR_DIV_UP(def->target.capacity, 1024); /* Scale from byte to kilobyte */
--
2.7.4
2
1
[libvirt] [PATCH v2] qemucapstest: replace caps-1.6.50 with updated caps-1.7.0
by Pavel Hrdina 25 May '16
by Pavel Hrdina 25 May '16
25 May '16
The qemu-1.6.50 is a beta before the new minor version, let's replace it with
the release qemu-1.7.0.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml | 78 -
tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 78 +
tests/domaincapstest.c | 2 +-
.../caps_1.6.50.x86_64.replies | 2848 -----------------
tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml | 197 --
.../qemucapabilitiesdata/caps_1.7.0.x86_64.replies | 3195 ++++++++++++++++++++
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 200 ++
tests/qemucapabilitiestest.c | 2 +-
8 files changed, 3475 insertions(+), 3125 deletions(-)
delete mode 100644 tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml
create mode 100644 tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.6.50.x86_64.replies
delete mode 100644 tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
diff --git a/tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml b/tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml
deleted file mode 100644
index 161d0ab..0000000
--- a/tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<domainCapabilities>
- <path>/usr/bin/qemu-system-x86_64</path>
- <domain>kvm</domain>
- <machine>pc-i440fx-1.7</machine>
- <arch>x86_64</arch>
- <vcpu max='255'/>
- <os supported='yes'>
- <loader supported='yes'>
- <value>/usr/share/AAVMF/AAVMF_CODE.fd</value>
- <value>/usr/share/OVMF/OVMF_CODE.fd</value>
- <enum name='type'>
- <value>rom</value>
- <value>pflash</value>
- </enum>
- <enum name='readonly'>
- <value>yes</value>
- <value>no</value>
- </enum>
- </loader>
- </os>
- <devices>
- <disk supported='yes'>
- <enum name='diskDevice'>
- <value>disk</value>
- <value>cdrom</value>
- <value>floppy</value>
- <value>lun</value>
- </enum>
- <enum name='bus'>
- <value>ide</value>
- <value>fdc</value>
- <value>scsi</value>
- <value>virtio</value>
- <value>usb</value>
- </enum>
- </disk>
- <graphics supported='yes'>
- <enum name='type'>
- <value>sdl</value>
- <value>vnc</value>
- <value>spice</value>
- </enum>
- </graphics>
- <video supported='yes'>
- <enum name='modelType'>
- <value>vga</value>
- <value>cirrus</value>
- <value>vmvga</value>
- <value>qxl</value>
- </enum>
- </video>
- <hostdev supported='yes'>
- <enum name='mode'>
- <value>subsystem</value>
- </enum>
- <enum name='startupPolicy'>
- <value>default</value>
- <value>mandatory</value>
- <value>requisite</value>
- <value>optional</value>
- </enum>
- <enum name='subsysType'>
- <value>usb</value>
- <value>pci</value>
- <value>scsi</value>
- </enum>
- <enum name='capsType'/>
- <enum name='pciBackend'>
- <value>default</value>
- <value>kvm</value>
- <value>vfio</value>
- </enum>
- </hostdev>
- </devices>
- <features>
- <gic supported='no'/>
- </features>
-</domainCapabilities>
diff --git a/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
new file mode 100644
index 0000000..161d0ab
--- /dev/null
+++ b/tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml
@@ -0,0 +1,78 @@
+<domainCapabilities>
+ <path>/usr/bin/qemu-system-x86_64</path>
+ <domain>kvm</domain>
+ <machine>pc-i440fx-1.7</machine>
+ <arch>x86_64</arch>
+ <vcpu max='255'/>
+ <os supported='yes'>
+ <loader supported='yes'>
+ <value>/usr/share/AAVMF/AAVMF_CODE.fd</value>
+ <value>/usr/share/OVMF/OVMF_CODE.fd</value>
+ <enum name='type'>
+ <value>rom</value>
+ <value>pflash</value>
+ </enum>
+ <enum name='readonly'>
+ <value>yes</value>
+ <value>no</value>
+ </enum>
+ </loader>
+ </os>
+ <devices>
+ <disk supported='yes'>
+ <enum name='diskDevice'>
+ <value>disk</value>
+ <value>cdrom</value>
+ <value>floppy</value>
+ <value>lun</value>
+ </enum>
+ <enum name='bus'>
+ <value>ide</value>
+ <value>fdc</value>
+ <value>scsi</value>
+ <value>virtio</value>
+ <value>usb</value>
+ </enum>
+ </disk>
+ <graphics supported='yes'>
+ <enum name='type'>
+ <value>sdl</value>
+ <value>vnc</value>
+ <value>spice</value>
+ </enum>
+ </graphics>
+ <video supported='yes'>
+ <enum name='modelType'>
+ <value>vga</value>
+ <value>cirrus</value>
+ <value>vmvga</value>
+ <value>qxl</value>
+ </enum>
+ </video>
+ <hostdev supported='yes'>
+ <enum name='mode'>
+ <value>subsystem</value>
+ </enum>
+ <enum name='startupPolicy'>
+ <value>default</value>
+ <value>mandatory</value>
+ <value>requisite</value>
+ <value>optional</value>
+ </enum>
+ <enum name='subsysType'>
+ <value>usb</value>
+ <value>pci</value>
+ <value>scsi</value>
+ </enum>
+ <enum name='capsType'/>
+ <enum name='pciBackend'>
+ <value>default</value>
+ <value>kvm</value>
+ <value>vfio</value>
+ </enum>
+ </hostdev>
+ </devices>
+ <features>
+ <gic supported='no'/>
+ </features>
+</domainCapabilities>
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 3436197..670f4fb 100644
--- a/tests/domaincapstest.c
+++ b/tests/domaincapstest.c
@@ -286,7 +286,7 @@ mymain(void)
#if WITH_QEMU
- DO_TEST_QEMU("1.6.50", "caps_1.6.50",
+ DO_TEST_QEMU("1.7.0", "caps_1.7.0",
"/usr/bin/qemu-system-x86_64", NULL,
"x86_64", VIR_DOMAIN_VIRT_KVM);
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.replies b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.replies
deleted file mode 100644
index d23249c..0000000
--- a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.replies
+++ /dev/null
@@ -1,2848 +0,0 @@
-{
- "QMP": {
- "version": {
- "qemu": {
- "micro": 50,
- "minor": 6,
- "major": 1
- },
- "package": ""
- },
- "capabilities": [
- ]
- }
-}
-
-{
- "return": {
- },
- "id": "libvirt-1"
-}
-
-{
- "return": {
- "qemu": {
- "micro": 50,
- "minor": 6,
- "major": 1
- },
- "package": ""
- },
- "id": "libvirt-2"
-}
-
-{
- "return": {
- "arch": "x86_64"
- },
- "id": "libvirt-3"
-}
-
-{
- "return": [
- {
- "name": "query-rx-filter"
- },
- {
- "name": "chardev-remove"
- },
- {
- "name": "chardev-add"
- },
- {
- "name": "query-tpm-types"
- },
- {
- "name": "query-tpm-models"
- },
- {
- "name": "query-tpm"
- },
- {
- "name": "query-target"
- },
- {
- "name": "query-cpu-definitions"
- },
- {
- "name": "query-machines"
- },
- {
- "name": "device-list-properties"
- },
- {
- "name": "qom-list-types"
- },
- {
- "name": "change-vnc-password"
- },
- {
- "name": "nbd-server-stop"
- },
- {
- "name": "nbd-server-add"
- },
- {
- "name": "nbd-server-start"
- },
- {
- "name": "qom-get"
- },
- {
- "name": "qom-set"
- },
- {
- "name": "qom-list"
- },
- {
- "name": "query-block-jobs"
- },
- {
- "name": "query-balloon"
- },
- {
- "name": "query-migrate-capabilities"
- },
- {
- "name": "migrate-set-capabilities"
- },
- {
- "name": "query-migrate"
- },
- {
- "name": "query-command-line-options"
- },
- {
- "name": "query-uuid"
- },
- {
- "name": "query-name"
- },
- {
- "name": "query-spice"
- },
- {
- "name": "query-vnc"
- },
- {
- "name": "query-mice"
- },
- {
- "name": "query-status"
- },
- {
- "name": "query-kvm"
- },
- {
- "name": "query-pci"
- },
- {
- "name": "query-cpus"
- },
- {
- "name": "query-blockstats"
- },
- {
- "name": "query-block"
- },
- {
- "name": "query-chardev"
- },
- {
- "name": "query-events"
- },
- {
- "name": "query-commands"
- },
- {
- "name": "query-version"
- },
- {
- "name": "human-monitor-command"
- },
- {
- "name": "qmp_capabilities"
- },
- {
- "name": "add_client"
- },
- {
- "name": "expire_password"
- },
- {
- "name": "set_password"
- },
- {
- "name": "block_set_io_throttle"
- },
- {
- "name": "block_passwd"
- },
- {
- "name": "query-fdsets"
- },
- {
- "name": "remove-fd"
- },
- {
- "name": "add-fd"
- },
- {
- "name": "closefd"
- },
- {
- "name": "getfd"
- },
- {
- "name": "set_link"
- },
- {
- "name": "balloon"
- },
- {
- "name": "drive-mirror"
- },
- {
- "name": "blockdev-snapshot-delete-internal-sync"
- },
- {
- "name": "blockdev-snapshot-internal-sync"
- },
- {
- "name": "blockdev-snapshot-sync"
- },
- {
- "name": "transaction"
- },
- {
- "name": "block-job-complete"
- },
- {
- "name": "block-job-resume"
- },
- {
- "name": "block-job-pause"
- },
- {
- "name": "block-job-cancel"
- },
- {
- "name": "block-job-set-speed"
- },
- {
- "name": "drive-backup"
- },
- {
- "name": "block-commit"
- },
- {
- "name": "block-stream"
- },
- {
- "name": "block_resize"
- },
- {
- "name": "netdev_del"
- },
- {
- "name": "netdev_add"
- },
- {
- "name": "dump-guest-memory"
- },
- {
- "name": "client_migrate_info"
- },
- {
- "name": "migrate_set_downtime"
- },
- {
- "name": "migrate_set_speed"
- },
- {
- "name": "query-migrate-cache-size"
- },
- {
- "name": "migrate-set-cache-size"
- },
- {
- "name": "migrate_cancel"
- },
- {
- "name": "migrate"
- },
- {
- "name": "xen-set-global-dirty-log"
- },
- {
- "name": "xen-save-devices-state"
- },
- {
- "name": "ringbuf-read"
- },
- {
- "name": "ringbuf-write"
- },
- {
- "name": "inject-nmi"
- },
- {
- "name": "pmemsave"
- },
- {
- "name": "memsave"
- },
- {
- "name": "cpu-add"
- },
- {
- "name": "cpu"
- },
- {
- "name": "send-key"
- },
- {
- "name": "device_del"
- },
- {
- "name": "device_add"
- },
- {
- "name": "system_powerdown"
- },
- {
- "name": "system_reset"
- },
- {
- "name": "system_wakeup"
- },
- {
- "name": "cont"
- },
- {
- "name": "stop"
- },
- {
- "name": "screendump"
- },
- {
- "name": "change"
- },
- {
- "name": "eject"
- },
- {
- "name": "quit"
- }
- ],
- "id": "libvirt-4"
-}
-
-{
- "return": {
- "fd": 10,
- "fdset-id": 0
- },
- "id": "libvirt-5"
-}
-
-{
- "id": "libvirt-6",
- "error": {
- "class": "GenericError",
- "desc": "Parameter 'top' is missing"
- }
-}
-
-{
- "return": [
- {
- "name": "BLOCK_IMAGE_CORRUPTED"
- },
- {
- "name": "GUEST_PANICKED"
- },
- {
- "name": "SPICE_MIGRATE_COMPLETED"
- },
- {
- "name": "BALLOON_CHANGE"
- },
- {
- "name": "WAKEUP"
- },
- {
- "name": "SUSPEND_DISK"
- },
- {
- "name": "SUSPEND"
- },
- {
- "name": "NIC_RX_FILTER_CHANGED"
- },
- {
- "name": "DEVICE_TRAY_MOVED"
- },
- {
- "name": "DEVICE_DELETED"
- },
- {
- "name": "BLOCK_JOB_READY"
- },
- {
- "name": "BLOCK_JOB_ERROR"
- },
- {
- "name": "BLOCK_JOB_CANCELLED"
- },
- {
- "name": "BLOCK_JOB_COMPLETED"
- },
- {
- "name": "SPICE_DISCONNECTED"
- },
- {
- "name": "SPICE_INITIALIZED"
- },
- {
- "name": "SPICE_CONNECTED"
- },
- {
- "name": "WATCHDOG"
- },
- {
- "name": "RTC_CHANGE"
- },
- {
- "name": "BLOCK_IO_ERROR"
- },
- {
- "name": "VNC_DISCONNECTED"
- },
- {
- "name": "VNC_INITIALIZED"
- },
- {
- "name": "VNC_CONNECTED"
- },
- {
- "name": "RESUME"
- },
- {
- "name": "STOP"
- },
- {
- "name": "POWERDOWN"
- },
- {
- "name": "RESET"
- },
- {
- "name": "SHUTDOWN"
- }
- ],
- "id": "libvirt-7"
-}
-
-{
- "return": [
- {
- "name": "virtio-blk-device"
- },
- {
- "name": "ib700"
- },
- {
- "name": "ICH9 LPC"
- },
- {
- "name": "port92"
- },
- {
- "name": "i6300esb"
- },
- {
- "name": "kvm-pci-assign"
- },
- {
- "name": "virtio-scsi-device"
- },
- {
- "name": "apic"
- },
- {
- "name": "pc-testdev"
- },
- {
- "name": "fusbh200-ehci-usb"
- },
- {
- "name": "virtio-scsi-pci"
- },
- {
- "name": "usb-ehci"
- },
- {
- "name": "exynos4210-ehci-usb"
- },
- {
- "name": "xlnx,ps7-usb"
- },
- {
- "name": "virtio-balloon-pci"
- },
- {
- "name": "virtio-net-pci"
- },
- {
- "name": "ich9-usb-ehci2"
- },
- {
- "name": "ich9-ahci"
- },
- {
- "name": "ich9-usb-ehci1"
- },
- {
- "name": "isa-ide"
- },
- {
- "name": "ICH9 SMB"
- },
- {
- "name": "piix4-usb-uhci"
- },
- {
- "name": "vt82c686b-usb-uhci"
- },
- {
- "name": "i82558b"
- },
- {
- "name": "i82558a"
- },
- {
- "name": "isa-fdc"
- },
- {
- "name": "isabus-bridge"
- },
- {
- "name": "sb16"
- },
- {
- "name": "i2c-bus"
- },
- {
- "name": "piix3-ide"
- },
- {
- "name": "ioapic"
- },
- {
- "name": "pci-bridge"
- },
- {
- "name": "HDA"
- },
- {
- "name": "am53c974"
- },
- {
- "name": "hpet"
- },
- {
- "name": "vmmouse"
- },
- {
- "name": "i82801b11-bridge"
- },
- {
- "name": "nvme"
- },
- {
- "name": "lsi53c810"
- },
- {
- "name": "vmxnet3"
- },
- {
- "name": "isa-cirrus-vga"
- },
- {
- "name": "dc390"
- },
- {
- "name": "vmware-svga"
- },
- {
- "name": "smbus-eeprom"
- },
- {
- "name": "i82801"
- },
- {
- "name": "ccid-card-passthru"
- },
- {
- "name": "fw_cfg"
- },
- {
- "name": "x86_64-cpu"
- },
- {
- "name": "piix3-usb-uhci"
- },
- {
- "name": "usb-audio"
- },
- {
- "name": "virtio-9p-device"
- },
- {
- "name": "i82557c"
- },
- {
- "name": "i82557b"
- },
- {
- "name": "i82557a"
- },
- {
- "name": "IndustryPack"
- },
- {
- "name": "qxl"
- },
- {
- "name": "pvscsi"
- },
- {
- "name": "rtl8139"
- },
- {
- "name": "isa-applesmc"
- },
- {
- "name": "xen-platform"
- },
- {
- "name": "container"
- },
- {
- "name": "virtio-mmio"
- },
- {
- "name": "vfio-pci"
- },
- {
- "name": "cfi.pflash01"
- },
- {
- "name": "usb-kbd"
- },
- {
- "name": "ich9-usb-uhci5"
- },
- {
- "name": "isa-vga"
- },
- {
- "name": "pci-testdev"
- },
- {
- "name": "usb-tablet"
- },
- {
- "name": "vmport"
- },
- {
- "name": "virtio-rng-pci"
- },
- {
- "name": "kvmvapic"
- },
- {
- "name": "usb-bt-dongle"
- },
- {
- "name": "sysbus-fdc"
- },
- {
- "name": "piix4-ide"
- },
- {
- "name": "xen-pci-passthrough"
- },
- {
- "name": "e1000"
- },
- {
- "name": "AC97"
- },
- {
- "name": "ich9-usb-uhci6"
- },
- {
- "name": "ipoctal232"
- },
- {
- "name": "mch"
- },
- {
- "name": "mc146818rtc"
- },
- {
- "name": "ivshmem"
- },
- {
- "name": "usb-ccid"
- },
- {
- "name": "sysbus-ahci"
- },
- {
- "name": "kvmclock"
- },
- {
- "name": "i82562"
- },
- {
- "name": "hda-output"
- },
- {
- "name": "pci-serial-4x"
- },
- {
- "name": "ccid-bus"
- },
- {
- "name": "i82559er"
- },
- {
- "name": "virtio-balloon-device"
- },
- {
- "name": "megasas"
- },
- {
- "name": "i8042"
- },
- {
- "name": "intel-hda"
- },
- {
- "name": "hda-duplex"
- },
- {
- "name": "virtio-serial-pci"
- },
- {
- "name": "ne2k_pci"
- },
- {
- "name": "ich9-usb-uhci2"
- },
- {
- "name": "ich9-usb-uhci3"
- },
- {
- "name": "virtconsole"
- },
- {
- "name": "ich9-usb-uhci4"
- },
- {
- "name": "isa-parallel"
- },
- {
- "name": "pci-serial"
- },
- {
- "name": "ich9-usb-uhci1"
- },
- {
- "name": "PCI"
- },
- {
- "name": "adlib"
- },
- {
- "name": "SUNW,fdtwo"
- },
- {
- "name": "ide-cd"
- },
- {
- "name": "isa-debugcon"
- },
- {
- "name": "usb-bot"
- },
- {
- "name": "i82551"
- },
- {
- "name": "i82550"
- },
- {
- "name": "isa-serial"
- },
- {
- "name": "PCIE"
- },
- {
- "name": "kvm-ioapic"
- },
- {
- "name": "nec-usb-xhci"
- },
- {
- "name": "System"
- },
- {
- "name": "kvm-apic"
- },
- {
- "name": "ich9-intel-hda"
- },
- {
- "name": "virtio-net-device"
- },
- {
- "name": "q35-pcihost"
- },
- {
- "name": "usb-wacom-tablet"
- },
- {
- "name": "PIIX4_PM"
- },
- {
- "name": "kvm-i8259"
- },
- {
- "name": "xen-apic"
- },
- {
- "name": "scsi-cd"
- },
- {
- "name": "pci-ohci"
- },
- {
- "name": "i440FX"
- },
- {
- "name": "usb-braille"
- },
- {
- "name": "virtserialport"
- },
- {
- "name": "pci-serial-2x"
- },
- {
- "name": "icc-bridge"
- },
- {
- "name": "xio3130-downstream"
- },
- {
- "name": "rng-random"
- },
- {
- "name": "hda-micro"
- },
- {
- "name": "scsi-disk"
- },
- {
- "name": "vhost-scsi"
- },
- {
- "name": "lsi53c895a"
- },
- {
- "name": "SCSI"
- },
- {
- "name": "pcnet"
- },
- {
- "name": "scsi-generic"
- },
- {
- "name": "pvpanic"
- },
- {
- "name": "virtio-serial-device"
- },
- {
- "name": "virtio-serial-bus"
- },
- {
- "name": "vhost-scsi-pci"
- },
- {
- "name": "usb-bus"
- },
- {
- "name": "ne2k_isa"
- },
- {
- "name": "IDE"
- },
- {
- "name": "ccid-card-emulated"
- },
- {
- "name": "tegra2-ehci-usb"
- },
- {
- "name": "usb-net"
- },
- {
- "name": "virtio-mmio-bus"
- },
- {
- "name": "usb-hub"
- },
- {
- "name": "i440FX-pcihost"
- },
- {
- "name": "usb-mouse"
- },
- {
- "name": "ISA"
- },
- {
- "name": "cs4231a"
- },
- {
- "name": "usb-serial"
- },
- {
- "name": "scsi-block"
- },
- {
- "name": "isa-i8259"
- },
- {
- "name": "sga"
- },
- {
- "name": "isa-debug-exit"
- },
- {
- "name": "virtio-rng-device"
- },
- {
- "name": "qemu-console"
- },
- {
- "name": "ioh3420"
- },
- {
- "name": "ES1370"
- },
- {
- "name": "PIIX3"
- },
- {
- "name": "isa-pcspk"
- },
- {
- "name": "ide-hd"
- },
- {
- "name": "rng-egd"
- },
- {
- "name": "cirrus-vga"
- },
- {
- "name": "kvm-pit"
- },
- {
- "name": "virtio-9p-pci"
- },
- {
- "name": "xen-pvdevice"
- },
- {
- "name": "icc-bus"
- },
- {
- "name": "ide-drive"
- },
- {
- "name": "x3130-upstream"
- },
- {
- "name": "virtio-pci-bus"
- },
- {
- "name": "qxl-vga"
- },
- {
- "name": "usb-uas"
- },
- {
- "name": "virtio-blk-pci"
- },
- {
- "name": "sysbus-ohci"
- },
- {
- "name": "esp"
- },
- {
- "name": "piix3-ide-xen"
- },
- {
- "name": "i82559c"
- },
- {
- "name": "i82559b"
- },
- {
- "name": "i82559a"
- },
- {
- "name": "scsi-hd"
- },
- {
- "name": "PIIX3-xen"
- },
- {
- "name": "usb-storage"
- },
- {
- "name": "isa-pit"
- },
- {
- "name": "tpci200"
- },
- {
- "name": "gus"
- },
- {
- "name": "VGA"
- }
- ],
- "id": "libvirt-8"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "scsi",
- "type": "on/off"
- },
- {
- "name": "config-wce",
- "type": "on/off"
- },
- {
- "name": "serial",
- "type": "string"
- },
- {
- "name": "secs",
- "type": "uint32"
- },
- {
- "name": "heads",
- "type": "uint32"
- },
- {
- "name": "cyls",
- "type": "uint32"
- },
- {
- "name": "discard_granularity",
- "type": "uint32"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "opt_io_size",
- "type": "uint32"
- },
- {
- "name": "min_io_size",
- "type": "uint16"
- },
- {
- "name": "physical_block_size",
- "type": "blocksize"
- },
- {
- "name": "logical_block_size",
- "type": "blocksize"
- },
- {
- "name": "drive",
- "type": "drive"
- },
- {
- "name": "event_idx",
- "type": "on/off"
- },
- {
- "name": "indirect_desc",
- "type": "on/off"
- },
- {
- "name": "x-data-plane",
- "type": "on/off"
- },
- {
- "name": "vectors",
- "type": "uint32"
- },
- {
- "name": "ioeventfd",
- "type": "on/off"
- },
- {
- "name": "class",
- "type": "hex32"
- }
- ],
- "id": "libvirt-9"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "tx",
- "type": "string"
- },
- {
- "name": "x-txburst",
- "type": "int32"
- },
- {
- "name": "x-txtimer",
- "type": "uint32"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "netdev",
- "type": "netdev"
- },
- {
- "name": "vlan",
- "type": "vlan"
- },
- {
- "name": "mac",
- "type": "macaddr"
- },
- {
- "name": "mq",
- "type": "on/off"
- },
- {
- "name": "ctrl_guest_offloads",
- "type": "on/off"
- },
- {
- "name": "ctrl_mac_addr",
- "type": "on/off"
- },
- {
- "name": "ctrl_rx_extra",
- "type": "on/off"
- },
- {
- "name": "ctrl_vlan",
- "type": "on/off"
- },
- {
- "name": "ctrl_rx",
- "type": "on/off"
- },
- {
- "name": "ctrl_vq",
- "type": "on/off"
- },
- {
- "name": "status",
- "type": "on/off"
- },
- {
- "name": "mrg_rxbuf",
- "type": "on/off"
- },
- {
- "name": "host_ufo",
- "type": "on/off"
- },
- {
- "name": "host_ecn",
- "type": "on/off"
- },
- {
- "name": "host_tso6",
- "type": "on/off"
- },
- {
- "name": "host_tso4",
- "type": "on/off"
- },
- {
- "name": "guest_ufo",
- "type": "on/off"
- },
- {
- "name": "guest_ecn",
- "type": "on/off"
- },
- {
- "name": "guest_tso6",
- "type": "on/off"
- },
- {
- "name": "guest_tso4",
- "type": "on/off"
- },
- {
- "name": "gso",
- "type": "on/off"
- },
- {
- "name": "guest_csum",
- "type": "on/off"
- },
- {
- "name": "csum",
- "type": "on/off"
- },
- {
- "name": "any_layout",
- "type": "on/off"
- },
- {
- "name": "event_idx",
- "type": "on/off"
- },
- {
- "name": "indirect_desc",
- "type": "on/off"
- },
- {
- "name": "vectors",
- "type": "uint32"
- },
- {
- "name": "ioeventfd",
- "type": "on/off"
- }
- ],
- "id": "libvirt-10"
-}
-
-{
- "return": [
- {
- "name": "ioeventfd",
- "type": "on/off"
- },
- {
- "name": "vectors",
- "type": "uint32"
- }
- ],
- "id": "libvirt-11"
-}
-
-{
- "id": "libvirt-12",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-blk-ccw' not found"
- }
-}
-
-{
- "id": "libvirt-13",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-net-ccw' not found"
- }
-}
-
-{
- "id": "libvirt-14",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-scsi-ccw' not found"
- }
-}
-
-{
- "id": "libvirt-15",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-blk-s390' not found"
- }
-}
-
-{
- "id": "libvirt-16",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-net-s390' not found"
- }
-}
-
-{
- "id": "libvirt-17",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'pci-assign' not found"
- }
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "configfd",
- "type": "string"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "share_intx",
- "type": "on/off"
- },
- {
- "name": "prefer_msi",
- "type": "on/off"
- },
- {
- "name": "host",
- "type": "pci-host-devaddr"
- }
- ],
- "id": "libvirt-18"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "x-vga",
- "type": "on/off"
- },
- {
- "name": "x-intx-mmap-timeout-ms",
- "type": "uint32"
- },
- {
- "name": "host",
- "type": "pci-host-devaddr"
- }
- ],
- "id": "libvirt-19"
-}
-
-{
- "return": [
- {
- "name": "lun",
- "type": "uint32"
- },
- {
- "name": "scsi-id",
- "type": "uint32"
- },
- {
- "name": "channel",
- "type": "uint32"
- },
- {
- "name": "wwn",
- "type": "hex64"
- },
- {
- "name": "dpofua",
- "type": "on/off"
- },
- {
- "name": "removable",
- "type": "on/off"
- },
- {
- "name": "product",
- "type": "string"
- },
- {
- "name": "vendor",
- "type": "string"
- },
- {
- "name": "serial",
- "type": "string"
- },
- {
- "name": "ver",
- "type": "string"
- },
- {
- "name": "discard_granularity",
- "type": "uint32"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "opt_io_size",
- "type": "uint32"
- },
- {
- "name": "min_io_size",
- "type": "uint16"
- },
- {
- "name": "physical_block_size",
- "type": "blocksize"
- },
- {
- "name": "logical_block_size",
- "type": "blocksize"
- },
- {
- "name": "drive",
- "type": "drive"
- }
- ],
- "id": "libvirt-20"
-}
-
-{
- "return": [
- {
- "name": "unit",
- "type": "uint32"
- },
- {
- "name": "model",
- "type": "string"
- },
- {
- "name": "serial",
- "type": "string"
- },
- {
- "name": "wwn",
- "type": "hex64"
- },
- {
- "name": "ver",
- "type": "string"
- },
- {
- "name": "discard_granularity",
- "type": "uint32"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "opt_io_size",
- "type": "uint32"
- },
- {
- "name": "min_io_size",
- "type": "uint16"
- },
- {
- "name": "physical_block_size",
- "type": "blocksize"
- },
- {
- "name": "logical_block_size",
- "type": "blocksize"
- },
- {
- "name": "drive",
- "type": "drive"
- }
- ],
- "id": "libvirt-21"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "s4_val",
- "type": "uint8"
- },
- {
- "name": "disable_s4",
- "type": "uint8"
- },
- {
- "name": "disable_s3",
- "type": "uint8"
- },
- {
- "name": "smb_io_base",
- "type": "uint32"
- }
- ],
- "id": "libvirt-22"
-}
-
-{
- "id": "libvirt-23",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'usb-redir' not found"
- }
-}
-
-{
- "id": "libvirt-24",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'usb-host' not found"
- }
-}
-
-{
- "return": [
- {
- "name": "lun",
- "type": "uint32"
- },
- {
- "name": "scsi-id",
- "type": "uint32"
- },
- {
- "name": "channel",
- "type": "uint32"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "drive",
- "type": "drive"
- }
- ],
- "id": "libvirt-25"
-}
-
-{
- "return": [
- {
- "name": "pci-hole64-size",
- "type": "size"
- }
- ],
- "id": "libvirt-26"
-}
-
-{
- "return": [
- {
- "name": "pci-hole64-size",
- "type": "size"
- },
- {
- "name": "MCFG",
- "type": "uint64"
- }
- ],
- "id": "libvirt-27"
-}
-
-{
- "return": [
- {
- "name": "full-path",
- "type": "on/off"
- },
- {
- "name": "serial",
- "type": "string"
- },
- {
- "name": "port",
- "type": "string"
- },
- {
- "name": "removable",
- "type": "on/off"
- },
- {
- "name": "discard_granularity",
- "type": "uint32"
- },
- {
- "name": "bootindex",
- "type": "int32"
- },
- {
- "name": "opt_io_size",
- "type": "uint32"
- },
- {
- "name": "min_io_size",
- "type": "uint16"
- },
- {
- "name": "physical_block_size",
- "type": "blocksize"
- },
- {
- "name": "logical_block_size",
- "type": "blocksize"
- },
- {
- "name": "drive",
- "type": "drive"
- }
- ],
- "id": "libvirt-28"
-}
-
-{
- "return": [
- {
- "name": "lost_tick_policy",
- "type": "LostTickPolicy"
- },
- {
- "name": "iobase",
- "type": "hex32"
- }
- ],
- "id": "libvirt-29"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "mmio",
- "type": "on/off"
- },
- {
- "name": "vgamem_mb",
- "type": "uint32"
- }
- ],
- "id": "libvirt-30"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "vgamem_mb",
- "type": "uint32"
- }
- ],
- "id": "libvirt-31"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "surfaces",
- "type": "int32"
- },
- {
- "name": "vgamem_mb",
- "type": "uint32"
- },
- {
- "name": "vram64_size_mb",
- "type": "uint32"
- },
- {
- "name": "vram_size_mb",
- "type": "uint32"
- },
- {
- "name": "ram_size_mb",
- "type": "uint32"
- },
- {
- "name": "cmdlog",
- "type": "uint32"
- },
- {
- "name": "guestdebug",
- "type": "uint32"
- },
- {
- "name": "debug",
- "type": "uint32"
- },
- {
- "name": "revision",
- "type": "uint32"
- },
- {
- "name": "vram_size",
- "type": "uint32"
- },
- {
- "name": "ram_size",
- "type": "uint32"
- }
- ],
- "id": "libvirt-32"
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "surfaces",
- "type": "int32"
- },
- {
- "name": "vgamem_mb",
- "type": "uint32"
- },
- {
- "name": "vram64_size_mb",
- "type": "uint32"
- },
- {
- "name": "vram_size_mb",
- "type": "uint32"
- },
- {
- "name": "ram_size_mb",
- "type": "uint32"
- },
- {
- "name": "cmdlog",
- "type": "uint32"
- },
- {
- "name": "guestdebug",
- "type": "uint32"
- },
- {
- "name": "debug",
- "type": "uint32"
- },
- {
- "name": "revision",
- "type": "uint32"
- },
- {
- "name": "vram_size",
- "type": "uint32"
- },
- {
- "name": "ram_size",
- "type": "uint32"
- }
- ],
- "id": "libvirt-33"
-}
-
-{
- "id": "libvirt-34",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-gpu-pci' not found"
- }
-}
-
-{
- "id": "libvirt-35",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'ICH9-LPC' not found"
- }
-}
-
-{
- "return": [
- {
- "name": "command_serr_enable",
- "type": "on/off"
- },
- {
- "name": "multifunction",
- "type": "on/off"
- },
- {
- "name": "rombar",
- "type": "uint32"
- },
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "addr",
- "type": "pci-devfn"
- },
- {
- "name": "class",
- "type": "hex32"
- },
- {
- "name": "event_idx",
- "type": "on/off"
- },
- {
- "name": "indirect_desc",
- "type": "on/off"
- }
- ],
- "id": "libvirt-36"
-}
-
-{
- "id": "libvirt-37",
- "error": {
- "class": "DeviceNotFound",
- "desc": "Device 'virtio-balloon-ccw' not found"
- }
-}
-
-{
- "return": [
- ],
- "id": "libvirt-38"
-}
-
-{
- "return": [
- {
- "name": "msi",
- "type": "on/off"
- },
- {
- "name": "msix",
- "type": "on/off"
- },
- {
- "name": "intrs",
- "type": "uint32"
- },
- {
- "name": "slots",
- "type": "uint32"
- },
- {
- "name": "2",
- "type": "uint32"
- },
- {
- "name": "p3",
- "type": "uint32"
- }
- ]
-}
-
-{
- "return": [
- {
- "name": "xenpv",
- "cpu-max": 1
- },
- {
- "name": "pc-q35-1.4",
- "cpu-max": 255
- },
- {
- "name": "pc-q35-1.5",
- "cpu-max": 255
- },
- {
- "name": "pc-q35-1.6",
- "cpu-max": 255
- },
- {
- "name": "pc-q35-1.7",
- "cpu-max": 255,
- "alias": "q35"
- },
- {
- "name": "xenfv",
- "cpu-max": 128
- },
- {
- "name": "isapc",
- "cpu-max": 1
- },
- {
- "name": "pc-0.10",
- "cpu-max": 255
- },
- {
- "name": "pc-0.11",
- "cpu-max": 255
- },
- {
- "name": "pc-0.12",
- "cpu-max": 255
- },
- {
- "name": "pc-0.13",
- "cpu-max": 255
- },
- {
- "name": "pc-0.14",
- "cpu-max": 255
- },
- {
- "name": "pc-0.15",
- "cpu-max": 255
- },
- {
- "name": "pc-1.0",
- "cpu-max": 255
- },
- {
- "name": "pc-1.1",
- "cpu-max": 255
- },
- {
- "name": "pc-1.2",
- "cpu-max": 255
- },
- {
- "name": "pc-1.3",
- "cpu-max": 255
- },
- {
- "name": "pc-i440fx-1.4",
- "cpu-max": 255
- },
- {
- "name": "pc-i440fx-1.5",
- "cpu-max": 255
- },
- {
- "name": "pc-i440fx-1.6",
- "cpu-max": 255
- },
- {
- "name": "pc-i440fx-1.7",
- "is-default": true,
- "cpu-max": 255,
- "alias": "pc"
- },
- {
- "name": "none",
- "cpu-max": 1
- }
- ],
- "id": "libvirt-39"
-}
-
-{
- "return": [
- {
- "name": "Opteron_G5"
- },
- {
- "name": "Opteron_G4"
- },
- {
- "name": "Opteron_G3"
- },
- {
- "name": "Opteron_G2"
- },
- {
- "name": "Opteron_G1"
- },
- {
- "name": "Haswell"
- },
- {
- "name": "SandyBridge"
- },
- {
- "name": "Westmere"
- },
- {
- "name": "Nehalem"
- },
- {
- "name": "Penryn"
- },
- {
- "name": "Conroe"
- },
- {
- "name": "n270"
- },
- {
- "name": "athlon"
- },
- {
- "name": "pentium3"
- },
- {
- "name": "pentium2"
- },
- {
- "name": "pentium"
- },
- {
- "name": "486"
- },
- {
- "name": "coreduo"
- },
- {
- "name": "kvm32"
- },
- {
- "name": "qemu32"
- },
- {
- "name": "kvm64"
- },
- {
- "name": "core2duo"
- },
- {
- "name": "phenom"
- },
- {
- "name": "qemu64"
- }
- ],
- "id": "libvirt-40"
-}
-
-{
- "return": {
- "enabled": false,
- "present": true
- },
- "id": "libvirt-41"
-}
-
-{
- "return": [
- ],
- "id": "libvirt-42"
-}
-
-{
- "return": [
- ],
- "id": "libvirt-43"
-}
-
-{
- "return": [
- {
- "parameters": [
- ],
- "option": "smbios"
- },
- {
- "parameters": [
- {
- "name": "seamless-migration",
- "type": "boolean"
- },
- {
- "name": "playback-compression",
- "type": "boolean"
- },
- {
- "name": "agent-mouse",
- "type": "boolean"
- },
- {
- "name": "streaming-video",
- "type": "string"
- },
- {
- "name": "zlib-glz-wan-compression",
- "type": "string"
- },
- {
- "name": "jpeg-wan-compression",
- "type": "string"
- },
- {
- "name": "image-compression",
- "type": "string"
- },
- {
- "name": "plaintext-channel",
- "type": "string"
- },
- {
- "name": "tls-channel",
- "type": "string"
- },
- {
- "name": "tls-ciphers",
- "type": "string"
- },
- {
- "name": "x509-dh-key-file",
- "type": "string"
- },
- {
- "name": "x509-cacert-file",
- "type": "string"
- },
- {
- "name": "x509-cert-file",
- "type": "string"
- },
- {
- "name": "x509-key-password",
- "type": "string"
- },
- {
- "name": "x509-key-file",
- "type": "string"
- },
- {
- "name": "x509-dir",
- "type": "string"
- },
- {
- "name": "sasl",
- "type": "boolean"
- },
- {
- "name": "disable-agent-file-xfer",
- "type": "boolean"
- },
- {
- "name": "disable-copy-paste",
- "type": "boolean"
- },
- {
- "name": "disable-ticketing",
- "type": "boolean"
- },
- {
- "name": "password",
- "type": "string"
- },
- {
- "name": "ipv6",
- "type": "boolean"
- },
- {
- "name": "ipv4",
- "type": "boolean"
- },
- {
- "name": "addr",
- "type": "string"
- },
- {
- "name": "tls-port",
- "type": "number"
- },
- {
- "name": "port",
- "type": "number"
- }
- ],
- "option": "spice"
- },
- {
- "parameters": [
- ],
- "option": "acpi"
- },
- {
- "parameters": [
- {
- "name": "sock_fd",
- "type": "number"
- },
- {
- "name": "socket",
- "type": "string"
- },
- {
- "name": "readonly",
- "type": "boolean"
- },
- {
- "name": "writeout",
- "type": "string"
- },
- {
- "name": "security_model",
- "type": "string"
- },
- {
- "name": "mount_tag",
- "type": "string"
- },
- {
- "name": "path",
- "type": "string"
- },
- {
- "name": "fsdriver",
- "type": "string"
- }
- ],
- "option": "virtfs"
- },
- {
- "parameters": [
- {
- "name": "sock_fd",
- "type": "number"
- },
- {
- "name": "socket",
- "type": "string"
- },
- {
- "name": "readonly",
- "type": "boolean"
- },
- {
- "name": "writeout",
- "type": "string"
- },
- {
- "name": "security_model",
- "type": "string"
- },
- {
- "name": "path",
- "type": "string"
- },
- {
- "name": "fsdriver",
- "type": "string"
- }
- ],
- "option": "fsdev"
- },
- {
- "parameters": [
- {
- "name": "timestamp",
- "type": "boolean"
- }
- ],
- "option": "msg"
- },
- {
- "parameters": [
- {
- "name": "mlock",
- "type": "boolean"
- }
- ],
- "option": "realtime"
- },
- {
- "parameters": [
- ],
- "option": "tpmdev"
- },
- {
- "parameters": [
- ],
- "option": "object"
- },
- {
- "parameters": [
- {
- "name": "opaque",
- "help": "free-form string used to describe fd",
- "type": "string"
- },
- {
- "name": "set",
- "help": "ID of the fd set to add fd to",
- "type": "number"
- },
- {
- "name": "fd",
- "help": "file descriptor of which a duplicate is added to fd set",
- "type": "number"
- }
- ],
- "option": "add-fd"
- },
- {
- "parameters": [
- {
- "name": "enable",
- "type": "boolean"
- }
- ],
- "option": "sandbox"
- },
- {
- "parameters": [
- {
- "name": "strict",
- "type": "string"
- },
- {
- "name": "reboot-timeout",
- "type": "string"
- },
- {
- "name": "splash-time",
- "type": "string"
- },
- {
- "name": "splash",
- "type": "string"
- },
- {
- "name": "menu",
- "type": "boolean"
- },
- {
- "name": "once",
- "type": "string"
- },
- {
- "name": "order",
- "type": "string"
- }
- ],
- "option": "boot-opts"
- },
- {
- "parameters": [
- {
- "name": "maxcpus",
- "type": "number"
- },
- {
- "name": "threads",
- "type": "number"
- },
- {
- "name": "cores",
- "type": "number"
- },
- {
- "name": "sockets",
- "type": "number"
- },
- {
- "name": "cpus",
- "type": "number"
- }
- ],
- "option": "smp-opts"
- },
- {
- "parameters": [
- {
- "name": "usb",
- "help": "Set on/off to enable/disable usb",
- "type": "boolean"
- },
- {
- "name": "mem-merge",
- "help": "enable/disable memory merge support",
- "type": "boolean"
- },
- {
- "name": "dump-guest-core",
- "help": "Include guest memory in a core dump",
- "type": "boolean"
- },
- {
- "name": "dt_compatible",
- "help": "Overrides the \"compatible\" property of the dt root node",
- "type": "string"
- },
- {
- "name": "phandle_start",
- "help": "The first phandle ID we may generate dynamically",
- "type": "number"
- },
- {
- "name": "dumpdtb",
- "help": "Dump current dtb to a file and quit",
- "type": "string"
- },
- {
- "name": "dtb",
- "help": "Linux kernel device tree file",
- "type": "string"
- },
- {
- "name": "append",
- "help": "Linux kernel command line",
- "type": "string"
- },
- {
- "name": "initrd",
- "help": "Linux initial ramdisk file",
- "type": "string"
- },
- {
- "name": "kernel",
- "help": "Linux kernel image file",
- "type": "string"
- },
- {
- "name": "kvm_shadow_mem",
- "help": "KVM shadow MMU size",
- "type": "size"
- },
- {
- "name": "kernel_irqchip",
- "help": "use KVM in-kernel irqchip",
- "type": "boolean"
- },
- {
- "name": "accel",
- "help": "accelerator list",
- "type": "string"
- },
- {
- "name": "type",
- "help": "emulated machine",
- "type": "string"
- }
- ],
- "option": "machine"
- },
- {
- "parameters": [
- {
- "name": "romfile",
- "type": "string"
- },
- {
- "name": "bootindex",
- "type": "number"
- }
- ],
- "option": "option-rom"
- },
- {
- "parameters": [
- {
- "name": "file",
- "type": "string"
- },
- {
- "name": "events",
- "type": "string"
- }
- ],
- "option": "trace"
- },
- {
- "parameters": [
- {
- "name": "pretty",
- "type": "boolean"
- },
- {
- "name": "default",
- "type": "boolean"
- },
- {
- "name": "chardev",
- "type": "string"
- },
- {
- "name": "mode",
- "type": "string"
- }
- ],
- "option": "mon"
- },
- {
- "parameters": [
- {
- "name": "value",
- "type": "string"
- },
- {
- "name": "property",
- "type": "string"
- },
- {
- "name": "driver",
- "type": "string"
- }
- ],
- "option": "global"
- },
- {
- "parameters": [
- {
- "name": "driftfix",
- "type": "string"
- },
- {
- "name": "clock",
- "type": "string"
- },
- {
- "name": "base",
- "type": "string"
- }
- ],
- "option": "rtc"
- },
- {
- "parameters": [
- ],
- "option": "net"
- },
- {
- "parameters": [
- ],
- "option": "netdev"
- },
- {
- "parameters": [
- ],
- "option": "numa"
- },
- {
- "parameters": [
- ],
- "option": "device"
- },
- {
- "parameters": [
- {
- "name": "chardev",
- "type": "string"
- },
- {
- "name": "size",
- "type": "size"
- },
- {
- "name": "debug",
- "type": "number"
- },
- {
- "name": "name",
- "type": "string"
- },
- {
- "name": "signal",
- "type": "boolean"
- },
- {
- "name": "mux",
- "type": "boolean"
- },
- {
- "name": "rows",
- "type": "number"
- },
- {
- "name": "cols",
- "type": "number"
- },
- {
- "name": "height",
- "type": "number"
- },
- {
- "name": "width",
- "type": "number"
- },
- {
- "name": "telnet",
- "type": "boolean"
- },
- {
- "name": "delay",
- "type": "boolean"
- },
- {
- "name": "server",
- "type": "boolean"
- },
- {
- "name": "wait",
- "type": "boolean"
- },
- {
- "name": "ipv6",
- "type": "boolean"
- },
- {
- "name": "ipv4",
- "type": "boolean"
- },
- {
- "name": "to",
- "type": "number"
- },
- {
- "name": "localport",
- "type": "string"
- },
- {
- "name": "localaddr",
- "type": "string"
- },
- {
- "name": "port",
- "type": "string"
- },
- {
- "name": "host",
- "type": "string"
- },
- {
- "name": "path",
- "type": "string"
- },
- {
- "name": "backend",
- "type": "string"
- }
- ],
- "option": "chardev"
- },
- {
- "parameters": [
- ],
- "option": "drive"
- }
- ],
- "id": "libvirt-44"
-}
-
-{
- "return": [
- {
- "capability": "xbzrle",
- "state": false
- },
- {
- "capability": "x-rdma-pin-all",
- "state": false
- },
- {
- "capability": "auto-converge",
- "state": false
- },
- {
- "capability": "zero-blocks",
- "state": false
- }
- ],
- "id": "libvirt-45"
-}
diff --git a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
deleted file mode 100644
index 296f769..0000000
--- a/tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<qemuCaps>
- <qemuctime>0</qemuctime>
- <selfctime>0</selfctime>
- <selfvers>0</selfvers>
- <usedQMP/>
- <flag name='mem-path'/>
- <flag name='drive-serial'/>
- <flag name='chardev'/>
- <flag name='enable-kvm'/>
- <flag name='monitor-json'/>
- <flag name='sdl'/>
- <flag name='smp-topology'/>
- <flag name='netdev'/>
- <flag name='rtc'/>
- <flag name='vhost-net'/>
- <flag name='no-hpet'/>
- <flag name='no-kvm-pit'/>
- <flag name='pci-configfd'/>
- <flag name='nodefconfig'/>
- <flag name='boot-menu'/>
- <flag name='fsdev'/>
- <flag name='name-process'/>
- <flag name='smbios-type'/>
- <flag name='vga-qxl'/>
- <flag name='spice'/>
- <flag name='vga-none'/>
- <flag name='boot-index'/>
- <flag name='hda-duplex'/>
- <flag name='drive-aio'/>
- <flag name='pci-multibus'/>
- <flag name='pci-bootindex'/>
- <flag name='ccid-emulated'/>
- <flag name='ccid-passthru'/>
- <flag name='chardev-spicevmc'/>
- <flag name='virtio-tx-alg'/>
- <flag name='device-qxl-vga'/>
- <flag name='pci-multifunction'/>
- <flag name='virtio-blk-pci.ioeventfd'/>
- <flag name='sga'/>
- <flag name='virtio-blk-pci.event_idx'/>
- <flag name='virtio-net-pci.event_idx'/>
- <flag name='cache-directsync'/>
- <flag name='piix3-usb-uhci'/>
- <flag name='piix4-usb-uhci'/>
- <flag name='usb-ehci'/>
- <flag name='ich9-usb-ehci1'/>
- <flag name='vt82c686b-usb-uhci'/>
- <flag name='pci-ohci'/>
- <flag name='usb-hub'/>
- <flag name='no-shutdown'/>
- <flag name='cache-unsafe'/>
- <flag name='ich9-ahci'/>
- <flag name='no-acpi'/>
- <flag name='fsdev-readonly'/>
- <flag name='virtio-blk-pci.scsi'/>
- <flag name='drive-copy-on-read'/>
- <flag name='fsdev-writeout'/>
- <flag name='drive-iotune'/>
- <flag name='system_wakeup'/>
- <flag name='scsi-disk.channel'/>
- <flag name='scsi-block'/>
- <flag name='transaction'/>
- <flag name='block-job-async'/>
- <flag name='scsi-cd'/>
- <flag name='ide-cd'/>
- <flag name='no-user-config'/>
- <flag name='hda-micro'/>
- <flag name='dump-guest-memory'/>
- <flag name='nec-usb-xhci'/>
- <flag name='balloon-event'/>
- <flag name='bridge'/>
- <flag name='lsi'/>
- <flag name='virtio-scsi-pci'/>
- <flag name='blockio'/>
- <flag name='disable-s3'/>
- <flag name='disable-s4'/>
- <flag name='ide-drive.wwn'/>
- <flag name='scsi-disk.wwn'/>
- <flag name='seccomp-sandbox'/>
- <flag name='reboot-timeout'/>
- <flag name='dump-guest-core'/>
- <flag name='seamless-migration'/>
- <flag name='block-commit'/>
- <flag name='vnc'/>
- <flag name='drive-mirror'/>
- <flag name='blockdev-snapshot-sync'/>
- <flag name='qxl'/>
- <flag name='VGA'/>
- <flag name='cirrus-vga'/>
- <flag name='vmware-svga'/>
- <flag name='device-video-primary'/>
- <flag name='usb-serial'/>
- <flag name='usb-net'/>
- <flag name='add-fd'/>
- <flag name='nbd-server'/>
- <flag name='virtio-rng'/>
- <flag name='rng-random'/>
- <flag name='rng-egd'/>
- <flag name='dtb'/>
- <flag name='megasas'/>
- <flag name='ipv6-migration'/>
- <flag name='machine-opt'/>
- <flag name='machine-usb-opt'/>
- <flag name='pci-bridge'/>
- <flag name='vfio-pci'/>
- <flag name='vfio-pci.bootindex'/>
- <flag name='scsi-generic'/>
- <flag name='scsi-generic.bootindex'/>
- <flag name='mem-merge'/>
- <flag name='vnc-websocket'/>
- <flag name='mlock'/>
- <flag name='vnc-share-policy'/>
- <flag name='device-del-event'/>
- <flag name='dmi-to-pci-bridge'/>
- <flag name='i440fx-pci-hole64-size'/>
- <flag name='q35-pci-hole64-size'/>
- <flag name='usb-storage'/>
- <flag name='usb-storage.removable'/>
- <flag name='virtio-mmio'/>
- <flag name='ich9-intel-hda'/>
- <flag name='kvm-pit-lost-tick-policy'/>
- <flag name='boot-strict'/>
- <flag name='pvpanic'/>
- <flag name='spice-file-xfer-disable'/>
- <flag name='spiceport'/>
- <flag name='usb-kbd'/>
- <flag name='host-pci-multidomain'/>
- <flag name='msg-timestamp'/>
- <flag name='numa'/>
- <flag name='usb-audio'/>
- <flag name='splash-timeout'/>
- <flag name='ivshmem'/>
- <flag name='VGA.vgamem_mb'/>
- <flag name='vmware-svga.vgamem_mb'/>
- <flag name='qxl.vgamem_mb'/>
- <flag name='qxl-vga.vgamem_mb'/>
- <flag name='pci-serial'/>
- <flag name='ioh3420'/>
- <flag name='x3130-upstream'/>
- <flag name='xio3130-downstream'/>
- <flag name='rtl8139'/>
- <flag name='e1000'/>
- <flag name='virtio-net'/>
- <flag name='qxl.vram64_size_mb'/>
- <flag name='qxl-vga.vram64_size_mb'/>
- <flag name='device-tray-moved-event'/>
- <flag name='nec-usb-xhci-ports'/>
- <version>1006050</version>
- <kvmVersion>0</kvmVersion>
- <package></package>
- <arch>x86_64</arch>
- <cpu name='Opteron_G5'/>
- <cpu name='Opteron_G4'/>
- <cpu name='Opteron_G3'/>
- <cpu name='Opteron_G2'/>
- <cpu name='Opteron_G1'/>
- <cpu name='Haswell'/>
- <cpu name='SandyBridge'/>
- <cpu name='Westmere'/>
- <cpu name='Nehalem'/>
- <cpu name='Penryn'/>
- <cpu name='Conroe'/>
- <cpu name='n270'/>
- <cpu name='athlon'/>
- <cpu name='pentium3'/>
- <cpu name='pentium2'/>
- <cpu name='pentium'/>
- <cpu name='486'/>
- <cpu name='coreduo'/>
- <cpu name='kvm32'/>
- <cpu name='qemu32'/>
- <cpu name='kvm64'/>
- <cpu name='core2duo'/>
- <cpu name='phenom'/>
- <cpu name='qemu64'/>
- <machine name='pc-i440fx-1.7' alias='pc' maxCpus='255'/>
- <machine name='xenpv' maxCpus='1'/>
- <machine name='pc-q35-1.4' maxCpus='255'/>
- <machine name='pc-q35-1.5' maxCpus='255'/>
- <machine name='pc-q35-1.6' maxCpus='255'/>
- <machine name='pc-q35-1.7' alias='q35' maxCpus='255'/>
- <machine name='xenfv' maxCpus='128'/>
- <machine name='isapc' maxCpus='1'/>
- <machine name='pc-0.10' maxCpus='255'/>
- <machine name='pc-0.11' maxCpus='255'/>
- <machine name='pc-0.12' maxCpus='255'/>
- <machine name='pc-0.13' maxCpus='255'/>
- <machine name='pc-0.14' maxCpus='255'/>
- <machine name='pc-0.15' maxCpus='255'/>
- <machine name='pc-1.0' maxCpus='255'/>
- <machine name='pc-1.1' maxCpus='255'/>
- <machine name='pc-1.2' maxCpus='255'/>
- <machine name='pc-1.3' maxCpus='255'/>
- <machine name='pc-i440fx-1.4' maxCpus='255'/>
- <machine name='pc-i440fx-1.5' maxCpus='255'/>
- <machine name='pc-i440fx-1.6' maxCpus='255'/>
-</qemuCaps>
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies
new file mode 100644
index 0000000..50e4042
--- /dev/null
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.replies
@@ -0,0 +1,3195 @@
+{
+ "QMP": {
+ "version": {
+ "qemu": {
+ "micro": 0,
+ "minor": 7,
+ "major": 1
+ },
+ "package": ""
+ },
+ "capabilities": [
+ ]
+ }
+}
+
+{
+ "return": {
+ },
+ "id": "libvirt-1"
+}
+
+{
+ "return": {
+ "qemu": {
+ "micro": 0,
+ "minor": 7,
+ "major": 1
+ },
+ "package": ""
+ },
+ "id": "libvirt-2"
+}
+
+{
+ "return": {
+ "arch": "x86_64"
+ },
+ "id": "libvirt-3"
+}
+
+{
+ "return": [
+ {
+ "name": "blockdev-add"
+ },
+ {
+ "name": "query-rx-filter"
+ },
+ {
+ "name": "chardev-remove"
+ },
+ {
+ "name": "chardev-add"
+ },
+ {
+ "name": "query-tpm-types"
+ },
+ {
+ "name": "query-tpm-models"
+ },
+ {
+ "name": "query-tpm"
+ },
+ {
+ "name": "query-target"
+ },
+ {
+ "name": "query-cpu-definitions"
+ },
+ {
+ "name": "query-machines"
+ },
+ {
+ "name": "device-list-properties"
+ },
+ {
+ "name": "qom-list-types"
+ },
+ {
+ "name": "change-vnc-password"
+ },
+ {
+ "name": "nbd-server-stop"
+ },
+ {
+ "name": "nbd-server-add"
+ },
+ {
+ "name": "nbd-server-start"
+ },
+ {
+ "name": "qom-get"
+ },
+ {
+ "name": "qom-set"
+ },
+ {
+ "name": "qom-list"
+ },
+ {
+ "name": "query-block-jobs"
+ },
+ {
+ "name": "query-balloon"
+ },
+ {
+ "name": "query-migrate-capabilities"
+ },
+ {
+ "name": "migrate-set-capabilities"
+ },
+ {
+ "name": "query-migrate"
+ },
+ {
+ "name": "query-command-line-options"
+ },
+ {
+ "name": "query-uuid"
+ },
+ {
+ "name": "query-name"
+ },
+ {
+ "name": "query-spice"
+ },
+ {
+ "name": "query-vnc"
+ },
+ {
+ "name": "query-mice"
+ },
+ {
+ "name": "query-status"
+ },
+ {
+ "name": "query-kvm"
+ },
+ {
+ "name": "query-pci"
+ },
+ {
+ "name": "query-cpus"
+ },
+ {
+ "name": "query-blockstats"
+ },
+ {
+ "name": "query-block"
+ },
+ {
+ "name": "query-chardev"
+ },
+ {
+ "name": "query-events"
+ },
+ {
+ "name": "query-commands"
+ },
+ {
+ "name": "query-version"
+ },
+ {
+ "name": "human-monitor-command"
+ },
+ {
+ "name": "qmp_capabilities"
+ },
+ {
+ "name": "add_client"
+ },
+ {
+ "name": "expire_password"
+ },
+ {
+ "name": "set_password"
+ },
+ {
+ "name": "block_set_io_throttle"
+ },
+ {
+ "name": "block_passwd"
+ },
+ {
+ "name": "query-fdsets"
+ },
+ {
+ "name": "remove-fd"
+ },
+ {
+ "name": "add-fd"
+ },
+ {
+ "name": "closefd"
+ },
+ {
+ "name": "getfd"
+ },
+ {
+ "name": "set_link"
+ },
+ {
+ "name": "balloon"
+ },
+ {
+ "name": "drive-mirror"
+ },
+ {
+ "name": "blockdev-snapshot-delete-internal-sync"
+ },
+ {
+ "name": "blockdev-snapshot-internal-sync"
+ },
+ {
+ "name": "blockdev-snapshot-sync"
+ },
+ {
+ "name": "transaction"
+ },
+ {
+ "name": "block-job-complete"
+ },
+ {
+ "name": "block-job-resume"
+ },
+ {
+ "name": "block-job-pause"
+ },
+ {
+ "name": "block-job-cancel"
+ },
+ {
+ "name": "block-job-set-speed"
+ },
+ {
+ "name": "drive-backup"
+ },
+ {
+ "name": "block-commit"
+ },
+ {
+ "name": "block-stream"
+ },
+ {
+ "name": "block_resize"
+ },
+ {
+ "name": "netdev_del"
+ },
+ {
+ "name": "netdev_add"
+ },
+ {
+ "name": "dump-guest-memory"
+ },
+ {
+ "name": "client_migrate_info"
+ },
+ {
+ "name": "migrate_set_downtime"
+ },
+ {
+ "name": "migrate_set_speed"
+ },
+ {
+ "name": "query-migrate-cache-size"
+ },
+ {
+ "name": "migrate-set-cache-size"
+ },
+ {
+ "name": "migrate_cancel"
+ },
+ {
+ "name": "migrate"
+ },
+ {
+ "name": "xen-set-global-dirty-log"
+ },
+ {
+ "name": "xen-save-devices-state"
+ },
+ {
+ "name": "ringbuf-read"
+ },
+ {
+ "name": "ringbuf-write"
+ },
+ {
+ "name": "inject-nmi"
+ },
+ {
+ "name": "pmemsave"
+ },
+ {
+ "name": "memsave"
+ },
+ {
+ "name": "cpu-add"
+ },
+ {
+ "name": "cpu"
+ },
+ {
+ "name": "send-key"
+ },
+ {
+ "name": "device_del"
+ },
+ {
+ "name": "device_add"
+ },
+ {
+ "name": "system_powerdown"
+ },
+ {
+ "name": "system_reset"
+ },
+ {
+ "name": "system_wakeup"
+ },
+ {
+ "name": "cont"
+ },
+ {
+ "name": "stop"
+ },
+ {
+ "name": "screendump"
+ },
+ {
+ "name": "change"
+ },
+ {
+ "name": "eject"
+ },
+ {
+ "name": "quit"
+ }
+ ],
+ "id": "libvirt-4"
+}
+
+{
+ "return": {
+ "fd": 11,
+ "fdset-id": 0
+ },
+ "id": "libvirt-5"
+}
+
+{
+ "id": "libvirt-6",
+ "error": {
+ "class": "GenericError",
+ "desc": "Parameter 'top' is missing"
+ }
+}
+
+{
+ "return": [
+ {
+ "name": "BLOCK_IMAGE_CORRUPTED"
+ },
+ {
+ "name": "GUEST_PANICKED"
+ },
+ {
+ "name": "SPICE_MIGRATE_COMPLETED"
+ },
+ {
+ "name": "BALLOON_CHANGE"
+ },
+ {
+ "name": "WAKEUP"
+ },
+ {
+ "name": "SUSPEND_DISK"
+ },
+ {
+ "name": "SUSPEND"
+ },
+ {
+ "name": "NIC_RX_FILTER_CHANGED"
+ },
+ {
+ "name": "DEVICE_TRAY_MOVED"
+ },
+ {
+ "name": "DEVICE_DELETED"
+ },
+ {
+ "name": "BLOCK_JOB_READY"
+ },
+ {
+ "name": "BLOCK_JOB_ERROR"
+ },
+ {
+ "name": "BLOCK_JOB_CANCELLED"
+ },
+ {
+ "name": "BLOCK_JOB_COMPLETED"
+ },
+ {
+ "name": "SPICE_DISCONNECTED"
+ },
+ {
+ "name": "SPICE_INITIALIZED"
+ },
+ {
+ "name": "SPICE_CONNECTED"
+ },
+ {
+ "name": "WATCHDOG"
+ },
+ {
+ "name": "RTC_CHANGE"
+ },
+ {
+ "name": "BLOCK_IO_ERROR"
+ },
+ {
+ "name": "VNC_DISCONNECTED"
+ },
+ {
+ "name": "VNC_INITIALIZED"
+ },
+ {
+ "name": "VNC_CONNECTED"
+ },
+ {
+ "name": "RESUME"
+ },
+ {
+ "name": "STOP"
+ },
+ {
+ "name": "POWERDOWN"
+ },
+ {
+ "name": "RESET"
+ },
+ {
+ "name": "SHUTDOWN"
+ }
+ ],
+ "id": "libvirt-7"
+}
+
+{
+ "return": [
+ {
+ "name": "virtio-blk-device"
+ },
+ {
+ "name": "ib700"
+ },
+ {
+ "name": "ICH9 LPC"
+ },
+ {
+ "name": "port92"
+ },
+ {
+ "name": "i6300esb"
+ },
+ {
+ "name": "kvm-pci-assign"
+ },
+ {
+ "name": "virtio-scsi-device"
+ },
+ {
+ "name": "apic"
+ },
+ {
+ "name": "pc-testdev"
+ },
+ {
+ "name": "fusbh200-ehci-usb"
+ },
+ {
+ "name": "virtio-scsi-pci"
+ },
+ {
+ "name": "usb-ehci"
+ },
+ {
+ "name": "exynos4210-ehci-usb"
+ },
+ {
+ "name": "xlnx,ps7-usb"
+ },
+ {
+ "name": "virtio-balloon-pci"
+ },
+ {
+ "name": "usb-host"
+ },
+ {
+ "name": "ich9-usb-ehci2"
+ },
+ {
+ "name": "ich9-ahci"
+ },
+ {
+ "name": "ich9-usb-ehci1"
+ },
+ {
+ "name": "isa-ide"
+ },
+ {
+ "name": "ICH9 SMB"
+ },
+ {
+ "name": "piix4-usb-uhci"
+ },
+ {
+ "name": "vt82c686b-usb-uhci"
+ },
+ {
+ "name": "i82558b"
+ },
+ {
+ "name": "i82558a"
+ },
+ {
+ "name": "isa-fdc"
+ },
+ {
+ "name": "isabus-bridge"
+ },
+ {
+ "name": "sb16"
+ },
+ {
+ "name": "i2c-bus"
+ },
+ {
+ "name": "piix3-ide"
+ },
+ {
+ "name": "ioapic"
+ },
+ {
+ "name": "pci-bridge"
+ },
+ {
+ "name": "HDA"
+ },
+ {
+ "name": "am53c974"
+ },
+ {
+ "name": "hpet"
+ },
+ {
+ "name": "vmmouse"
+ },
+ {
+ "name": "i82801b11-bridge"
+ },
+ {
+ "name": "nvme"
+ },
+ {
+ "name": "lsi53c810"
+ },
+ {
+ "name": "vmxnet3"
+ },
+ {
+ "name": "isa-cirrus-vga"
+ },
+ {
+ "name": "dc390"
+ },
+ {
+ "name": "vmware-svga"
+ },
+ {
+ "name": "smbus-eeprom"
+ },
+ {
+ "name": "i82801"
+ },
+ {
+ "name": "ccid-card-passthru"
+ },
+ {
+ "name": "fw_cfg"
+ },
+ {
+ "name": "x86_64-cpu"
+ },
+ {
+ "name": "piix3-usb-uhci"
+ },
+ {
+ "name": "usb-audio"
+ },
+ {
+ "name": "virtio-9p-device"
+ },
+ {
+ "name": "i82557c"
+ },
+ {
+ "name": "i82557b"
+ },
+ {
+ "name": "i82557a"
+ },
+ {
+ "name": "IndustryPack"
+ },
+ {
+ "name": "qxl"
+ },
+ {
+ "name": "pvscsi"
+ },
+ {
+ "name": "rtl8139"
+ },
+ {
+ "name": "isa-applesmc"
+ },
+ {
+ "name": "container"
+ },
+ {
+ "name": "virtio-mmio"
+ },
+ {
+ "name": "vfio-pci"
+ },
+ {
+ "name": "cfi.pflash01"
+ },
+ {
+ "name": "usb-kbd"
+ },
+ {
+ "name": "ich9-usb-uhci5"
+ },
+ {
+ "name": "isa-vga"
+ },
+ {
+ "name": "pci-testdev"
+ },
+ {
+ "name": "usb-tablet"
+ },
+ {
+ "name": "vmport"
+ },
+ {
+ "name": "virtio-rng-pci"
+ },
+ {
+ "name": "kvmvapic"
+ },
+ {
+ "name": "usb-bt-dongle"
+ },
+ {
+ "name": "sysbus-fdc"
+ },
+ {
+ "name": "piix4-ide"
+ },
+ {
+ "name": "e1000"
+ },
+ {
+ "name": "kvm-apic"
+ },
+ {
+ "name": "AC97"
+ },
+ {
+ "name": "ich9-usb-uhci6"
+ },
+ {
+ "name": "ipoctal232"
+ },
+ {
+ "name": "mch"
+ },
+ {
+ "name": "mc146818rtc"
+ },
+ {
+ "name": "ivshmem"
+ },
+ {
+ "name": "usb-ccid"
+ },
+ {
+ "name": "sysbus-ahci"
+ },
+ {
+ "name": "kvmclock"
+ },
+ {
+ "name": "i82562"
+ },
+ {
+ "name": "hda-output"
+ },
+ {
+ "name": "pci-serial-4x"
+ },
+ {
+ "name": "ccid-bus"
+ },
+ {
+ "name": "i82559er"
+ },
+ {
+ "name": "virtio-balloon-device"
+ },
+ {
+ "name": "megasas"
+ },
+ {
+ "name": "i8042"
+ },
+ {
+ "name": "intel-hda"
+ },
+ {
+ "name": "hda-duplex"
+ },
+ {
+ "name": "virtio-serial-pci"
+ },
+ {
+ "name": "ne2k_pci"
+ },
+ {
+ "name": "ich9-usb-uhci2"
+ },
+ {
+ "name": "ich9-usb-uhci3"
+ },
+ {
+ "name": "virtconsole"
+ },
+ {
+ "name": "ich9-usb-uhci4"
+ },
+ {
+ "name": "isa-parallel"
+ },
+ {
+ "name": "pci-serial"
+ },
+ {
+ "name": "ich9-usb-uhci1"
+ },
+ {
+ "name": "PCI"
+ },
+ {
+ "name": "adlib"
+ },
+ {
+ "name": "SUNW,fdtwo"
+ },
+ {
+ "name": "ide-cd"
+ },
+ {
+ "name": "isa-debugcon"
+ },
+ {
+ "name": "usb-bot"
+ },
+ {
+ "name": "i82551"
+ },
+ {
+ "name": "i82550"
+ },
+ {
+ "name": "isa-serial"
+ },
+ {
+ "name": "PCIE"
+ },
+ {
+ "name": "kvm-ioapic"
+ },
+ {
+ "name": "nec-usb-xhci"
+ },
+ {
+ "name": "System"
+ },
+ {
+ "name": "qemu-console"
+ },
+ {
+ "name": "ich9-intel-hda"
+ },
+ {
+ "name": "virtio-net-device"
+ },
+ {
+ "name": "q35-pcihost"
+ },
+ {
+ "name": "usb-wacom-tablet"
+ },
+ {
+ "name": "PIIX4_PM"
+ },
+ {
+ "name": "kvm-i8259"
+ },
+ {
+ "name": "usb-redir"
+ },
+ {
+ "name": "scsi-cd"
+ },
+ {
+ "name": "pci-ohci"
+ },
+ {
+ "name": "i440FX"
+ },
+ {
+ "name": "usb-braille"
+ },
+ {
+ "name": "virtserialport"
+ },
+ {
+ "name": "pci-serial-2x"
+ },
+ {
+ "name": "icc-bridge"
+ },
+ {
+ "name": "xio3130-downstream"
+ },
+ {
+ "name": "rng-random"
+ },
+ {
+ "name": "hda-micro"
+ },
+ {
+ "name": "scsi-disk"
+ },
+ {
+ "name": "vhost-scsi"
+ },
+ {
+ "name": "lsi53c895a"
+ },
+ {
+ "name": "SCSI"
+ },
+ {
+ "name": "pcnet"
+ },
+ {
+ "name": "scsi-generic"
+ },
+ {
+ "name": "pvpanic"
+ },
+ {
+ "name": "virtio-serial-device"
+ },
+ {
+ "name": "virtio-serial-bus"
+ },
+ {
+ "name": "vhost-scsi-pci"
+ },
+ {
+ "name": "usb-bus"
+ },
+ {
+ "name": "ne2k_isa"
+ },
+ {
+ "name": "IDE"
+ },
+ {
+ "name": "ccid-card-emulated"
+ },
+ {
+ "name": "tegra2-ehci-usb"
+ },
+ {
+ "name": "usb-net"
+ },
+ {
+ "name": "virtio-mmio-bus"
+ },
+ {
+ "name": "usb-hub"
+ },
+ {
+ "name": "i440FX-pcihost"
+ },
+ {
+ "name": "usb-mouse"
+ },
+ {
+ "name": "ISA"
+ },
+ {
+ "name": "cs4231a"
+ },
+ {
+ "name": "usb-serial"
+ },
+ {
+ "name": "scsi-block"
+ },
+ {
+ "name": "isa-i8259"
+ },
+ {
+ "name": "sga"
+ },
+ {
+ "name": "virtio-net-pci"
+ },
+ {
+ "name": "isa-debug-exit"
+ },
+ {
+ "name": "virtio-rng-device"
+ },
+ {
+ "name": "ioh3420"
+ },
+ {
+ "name": "ES1370"
+ },
+ {
+ "name": "PIIX3"
+ },
+ {
+ "name": "isa-pcspk"
+ },
+ {
+ "name": "ide-hd"
+ },
+ {
+ "name": "rng-egd"
+ },
+ {
+ "name": "cirrus-vga"
+ },
+ {
+ "name": "kvm-pit"
+ },
+ {
+ "name": "virtio-9p-pci"
+ },
+ {
+ "name": "icc-bus"
+ },
+ {
+ "name": "ide-drive"
+ },
+ {
+ "name": "x3130-upstream"
+ },
+ {
+ "name": "virtio-pci-bus"
+ },
+ {
+ "name": "qxl-vga"
+ },
+ {
+ "name": "usb-uas"
+ },
+ {
+ "name": "virtio-blk-pci"
+ },
+ {
+ "name": "sysbus-ohci"
+ },
+ {
+ "name": "esp"
+ },
+ {
+ "name": "piix3-ide-xen"
+ },
+ {
+ "name": "i82559c"
+ },
+ {
+ "name": "i82559b"
+ },
+ {
+ "name": "i82559a"
+ },
+ {
+ "name": "scsi-hd"
+ },
+ {
+ "name": "PIIX3-xen"
+ },
+ {
+ "name": "usb-storage"
+ },
+ {
+ "name": "isa-pit"
+ },
+ {
+ "name": "tpci200"
+ },
+ {
+ "name": "gus"
+ },
+ {
+ "name": "VGA"
+ }
+ ],
+ "id": "libvirt-8"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "scsi",
+ "type": "on/off"
+ },
+ {
+ "name": "config-wce",
+ "type": "on/off"
+ },
+ {
+ "name": "serial",
+ "type": "string"
+ },
+ {
+ "name": "secs",
+ "type": "uint32"
+ },
+ {
+ "name": "heads",
+ "type": "uint32"
+ },
+ {
+ "name": "cyls",
+ "type": "uint32"
+ },
+ {
+ "name": "discard_granularity",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "opt_io_size",
+ "type": "uint32"
+ },
+ {
+ "name": "min_io_size",
+ "type": "uint16"
+ },
+ {
+ "name": "physical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "logical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "drive",
+ "type": "drive"
+ },
+ {
+ "name": "event_idx",
+ "type": "on/off"
+ },
+ {
+ "name": "indirect_desc",
+ "type": "on/off"
+ },
+ {
+ "name": "x-data-plane",
+ "type": "on/off"
+ },
+ {
+ "name": "vectors",
+ "type": "uint32"
+ },
+ {
+ "name": "ioeventfd",
+ "type": "on/off"
+ },
+ {
+ "name": "class",
+ "type": "hex32"
+ }
+ ],
+ "id": "libvirt-9"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "tx",
+ "type": "string"
+ },
+ {
+ "name": "x-txburst",
+ "type": "int32"
+ },
+ {
+ "name": "x-txtimer",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "netdev",
+ "type": "netdev"
+ },
+ {
+ "name": "vlan",
+ "type": "vlan"
+ },
+ {
+ "name": "mac",
+ "type": "macaddr"
+ },
+ {
+ "name": "mq",
+ "type": "on/off"
+ },
+ {
+ "name": "ctrl_guest_offloads",
+ "type": "on/off"
+ },
+ {
+ "name": "ctrl_mac_addr",
+ "type": "on/off"
+ },
+ {
+ "name": "ctrl_rx_extra",
+ "type": "on/off"
+ },
+ {
+ "name": "ctrl_vlan",
+ "type": "on/off"
+ },
+ {
+ "name": "ctrl_rx",
+ "type": "on/off"
+ },
+ {
+ "name": "ctrl_vq",
+ "type": "on/off"
+ },
+ {
+ "name": "status",
+ "type": "on/off"
+ },
+ {
+ "name": "mrg_rxbuf",
+ "type": "on/off"
+ },
+ {
+ "name": "host_ufo",
+ "type": "on/off"
+ },
+ {
+ "name": "host_ecn",
+ "type": "on/off"
+ },
+ {
+ "name": "host_tso6",
+ "type": "on/off"
+ },
+ {
+ "name": "host_tso4",
+ "type": "on/off"
+ },
+ {
+ "name": "guest_ufo",
+ "type": "on/off"
+ },
+ {
+ "name": "guest_ecn",
+ "type": "on/off"
+ },
+ {
+ "name": "guest_tso6",
+ "type": "on/off"
+ },
+ {
+ "name": "guest_tso4",
+ "type": "on/off"
+ },
+ {
+ "name": "gso",
+ "type": "on/off"
+ },
+ {
+ "name": "guest_csum",
+ "type": "on/off"
+ },
+ {
+ "name": "csum",
+ "type": "on/off"
+ },
+ {
+ "name": "any_layout",
+ "type": "on/off"
+ },
+ {
+ "name": "event_idx",
+ "type": "on/off"
+ },
+ {
+ "name": "indirect_desc",
+ "type": "on/off"
+ },
+ {
+ "name": "vectors",
+ "type": "uint32"
+ },
+ {
+ "name": "ioeventfd",
+ "type": "on/off"
+ }
+ ],
+ "id": "libvirt-10"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "cmd_per_lun",
+ "type": "uint32"
+ },
+ {
+ "name": "max_sectors",
+ "type": "uint32"
+ },
+ {
+ "name": "num_queues",
+ "type": "uint32"
+ },
+ {
+ "name": "param_change",
+ "type": "on/off"
+ },
+ {
+ "name": "hotplug",
+ "type": "on/off"
+ },
+ {
+ "name": "event_idx",
+ "type": "on/off"
+ },
+ {
+ "name": "indirect_desc",
+ "type": "on/off"
+ },
+ {
+ "name": "vectors",
+ "type": "uint32"
+ },
+ {
+ "name": "ioeventfd",
+ "type": "on/off"
+ }
+ ],
+ "id": "libvirt-11"
+}
+
+{
+ "id": "libvirt-12",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-blk-ccw' not found"
+ }
+}
+
+{
+ "id": "libvirt-13",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-net-ccw' not found"
+ }
+}
+
+{
+ "id": "libvirt-14",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-scsi-ccw' not found"
+ }
+}
+
+{
+ "id": "libvirt-15",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-blk-s390' not found"
+ }
+}
+
+{
+ "id": "libvirt-16",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-net-s390' not found"
+ }
+}
+
+{
+ "id": "libvirt-17",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'pci-assign' not found"
+ }
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "configfd",
+ "type": "string"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "share_intx",
+ "type": "on/off"
+ },
+ {
+ "name": "prefer_msi",
+ "type": "on/off"
+ },
+ {
+ "name": "host",
+ "type": "pci-host-devaddr"
+ }
+ ],
+ "id": "libvirt-18"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "x-vga",
+ "type": "on/off"
+ },
+ {
+ "name": "x-intx-mmap-timeout-ms",
+ "type": "uint32"
+ },
+ {
+ "name": "host",
+ "type": "pci-host-devaddr"
+ }
+ ],
+ "id": "libvirt-19"
+}
+
+{
+ "return": [
+ {
+ "name": "lun",
+ "type": "uint32"
+ },
+ {
+ "name": "scsi-id",
+ "type": "uint32"
+ },
+ {
+ "name": "channel",
+ "type": "uint32"
+ },
+ {
+ "name": "wwn",
+ "type": "hex64"
+ },
+ {
+ "name": "dpofua",
+ "type": "on/off"
+ },
+ {
+ "name": "removable",
+ "type": "on/off"
+ },
+ {
+ "name": "product",
+ "type": "string"
+ },
+ {
+ "name": "vendor",
+ "type": "string"
+ },
+ {
+ "name": "serial",
+ "type": "string"
+ },
+ {
+ "name": "ver",
+ "type": "string"
+ },
+ {
+ "name": "discard_granularity",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "opt_io_size",
+ "type": "uint32"
+ },
+ {
+ "name": "min_io_size",
+ "type": "uint16"
+ },
+ {
+ "name": "physical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "logical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "drive",
+ "type": "drive"
+ }
+ ],
+ "id": "libvirt-20"
+}
+
+{
+ "return": [
+ {
+ "name": "unit",
+ "type": "uint32"
+ },
+ {
+ "name": "model",
+ "type": "string"
+ },
+ {
+ "name": "serial",
+ "type": "string"
+ },
+ {
+ "name": "wwn",
+ "type": "hex64"
+ },
+ {
+ "name": "ver",
+ "type": "string"
+ },
+ {
+ "name": "discard_granularity",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "opt_io_size",
+ "type": "uint32"
+ },
+ {
+ "name": "min_io_size",
+ "type": "uint16"
+ },
+ {
+ "name": "physical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "logical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "drive",
+ "type": "drive"
+ }
+ ],
+ "id": "libvirt-21"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "s4_val",
+ "type": "uint8"
+ },
+ {
+ "name": "disable_s4",
+ "type": "uint8"
+ },
+ {
+ "name": "disable_s3",
+ "type": "uint8"
+ },
+ {
+ "name": "smb_io_base",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-22"
+}
+
+{
+ "return": [
+ {
+ "name": "full-path",
+ "type": "on/off"
+ },
+ {
+ "name": "serial",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "string"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "filter",
+ "type": "string"
+ },
+ {
+ "name": "debug",
+ "type": "uint8"
+ },
+ {
+ "name": "chardev",
+ "type": "chr"
+ }
+ ],
+ "id": "libvirt-23"
+}
+
+{
+ "return": [
+ {
+ "name": "full-path",
+ "type": "on/off"
+ },
+ {
+ "name": "serial",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "string"
+ },
+ {
+ "name": "pipeline",
+ "type": "on/off"
+ },
+ {
+ "name": "loglevel",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "isobsize",
+ "type": "uint32"
+ },
+ {
+ "name": "isobufs",
+ "type": "uint32"
+ },
+ {
+ "name": "productid",
+ "type": "hex32"
+ },
+ {
+ "name": "vendorid",
+ "type": "hex32"
+ },
+ {
+ "name": "hostport",
+ "type": "string"
+ },
+ {
+ "name": "hostaddr",
+ "type": "uint32"
+ },
+ {
+ "name": "hostbus",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-24"
+}
+
+{
+ "return": [
+ {
+ "name": "lun",
+ "type": "uint32"
+ },
+ {
+ "name": "scsi-id",
+ "type": "uint32"
+ },
+ {
+ "name": "channel",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "drive",
+ "type": "drive"
+ }
+ ],
+ "id": "libvirt-25"
+}
+
+{
+ "return": [
+ {
+ "name": "short_root_bus",
+ "type": "uint32"
+ },
+ {
+ "name": "pci-hole64-size",
+ "type": "size"
+ }
+ ],
+ "id": "libvirt-26"
+}
+
+{
+ "return": [
+ {
+ "name": "short_root_bus",
+ "type": "uint32"
+ },
+ {
+ "name": "pci-hole64-size",
+ "type": "size"
+ },
+ {
+ "name": "MCFG",
+ "type": "uint64"
+ }
+ ],
+ "id": "libvirt-27"
+}
+
+{
+ "return": [
+ {
+ "name": "full-path",
+ "type": "on/off"
+ },
+ {
+ "name": "serial",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "string"
+ },
+ {
+ "name": "removable",
+ "type": "on/off"
+ },
+ {
+ "name": "discard_granularity",
+ "type": "uint32"
+ },
+ {
+ "name": "bootindex",
+ "type": "int32"
+ },
+ {
+ "name": "opt_io_size",
+ "type": "uint32"
+ },
+ {
+ "name": "min_io_size",
+ "type": "uint16"
+ },
+ {
+ "name": "physical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "logical_block_size",
+ "type": "blocksize"
+ },
+ {
+ "name": "drive",
+ "type": "drive"
+ }
+ ],
+ "id": "libvirt-28"
+}
+
+{
+ "return": [
+ {
+ "name": "lost_tick_policy",
+ "type": "LostTickPolicy"
+ },
+ {
+ "name": "iobase",
+ "type": "hex32"
+ }
+ ],
+ "id": "libvirt-29"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "mmio",
+ "type": "on/off"
+ },
+ {
+ "name": "vgamem_mb",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-30"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "vgamem_mb",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-31"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "surfaces",
+ "type": "int32"
+ },
+ {
+ "name": "vgamem_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "vram64_size_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "vram_size_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "ram_size_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "cmdlog",
+ "type": "uint32"
+ },
+ {
+ "name": "guestdebug",
+ "type": "uint32"
+ },
+ {
+ "name": "debug",
+ "type": "uint32"
+ },
+ {
+ "name": "revision",
+ "type": "uint32"
+ },
+ {
+ "name": "vram_size",
+ "type": "uint32"
+ },
+ {
+ "name": "ram_size",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-32"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "surfaces",
+ "type": "int32"
+ },
+ {
+ "name": "vgamem_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "vram64_size_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "vram_size_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "ram_size_mb",
+ "type": "uint32"
+ },
+ {
+ "name": "cmdlog",
+ "type": "uint32"
+ },
+ {
+ "name": "guestdebug",
+ "type": "uint32"
+ },
+ {
+ "name": "debug",
+ "type": "uint32"
+ },
+ {
+ "name": "revision",
+ "type": "uint32"
+ },
+ {
+ "name": "vram_size",
+ "type": "uint32"
+ },
+ {
+ "name": "ram_size",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-33"
+}
+
+{
+ "id": "libvirt-34",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-gpu-pci' not found"
+ }
+}
+
+{
+ "id": "libvirt-35",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'ICH9-LPC' not found"
+ }
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "class",
+ "type": "hex32"
+ },
+ {
+ "name": "event_idx",
+ "type": "on/off"
+ },
+ {
+ "name": "indirect_desc",
+ "type": "on/off"
+ }
+ ],
+ "id": "libvirt-36"
+}
+
+{
+ "id": "libvirt-37",
+ "error": {
+ "class": "DeviceNotFound",
+ "desc": "Device 'virtio-balloon-ccw' not found"
+ }
+}
+
+{
+ "return": [
+ ],
+ "id": "libvirt-38"
+}
+
+{
+ "return": [
+ {
+ "name": "command_serr_enable",
+ "type": "on/off"
+ },
+ {
+ "name": "multifunction",
+ "type": "on/off"
+ },
+ {
+ "name": "rombar",
+ "type": "uint32"
+ },
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "addr",
+ "type": "pci-devfn"
+ },
+ {
+ "name": "p3",
+ "type": "uint32"
+ },
+ {
+ "name": "p2",
+ "type": "uint32"
+ },
+ {
+ "name": "slots",
+ "type": "uint32"
+ },
+ {
+ "name": "intrs",
+ "type": "uint32"
+ },
+ {
+ "name": "msix",
+ "type": "on/off"
+ },
+ {
+ "name": "msi",
+ "type": "on/off"
+ }
+ ],
+ "id": "libvirt-39"
+}
+
+{
+ "return": [
+ {
+ "name": "pc-q35-1.4",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-q35-1.5",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-q35-1.6",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-q35-1.7",
+ "cpu-max": 255,
+ "alias": "q35"
+ },
+ {
+ "name": "isapc",
+ "cpu-max": 1
+ },
+ {
+ "name": "pc-0.10",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-0.11",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-0.12",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-0.13",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-0.14",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-0.15",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-1.0",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-1.1",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-1.2",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-1.3",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-i440fx-1.4",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-i440fx-1.5",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-i440fx-1.6",
+ "cpu-max": 255
+ },
+ {
+ "name": "pc-i440fx-1.7",
+ "is-default": true,
+ "cpu-max": 255,
+ "alias": "pc"
+ },
+ {
+ "name": "none",
+ "cpu-max": 1
+ }
+ ],
+ "id": "libvirt-40"
+}
+
+{
+ "return": [
+ {
+ "name": "Opteron_G5"
+ },
+ {
+ "name": "Opteron_G4"
+ },
+ {
+ "name": "Opteron_G3"
+ },
+ {
+ "name": "Opteron_G2"
+ },
+ {
+ "name": "Opteron_G1"
+ },
+ {
+ "name": "Haswell"
+ },
+ {
+ "name": "SandyBridge"
+ },
+ {
+ "name": "Westmere"
+ },
+ {
+ "name": "Nehalem"
+ },
+ {
+ "name": "Penryn"
+ },
+ {
+ "name": "Conroe"
+ },
+ {
+ "name": "n270"
+ },
+ {
+ "name": "athlon"
+ },
+ {
+ "name": "pentium3"
+ },
+ {
+ "name": "pentium2"
+ },
+ {
+ "name": "pentium"
+ },
+ {
+ "name": "486"
+ },
+ {
+ "name": "coreduo"
+ },
+ {
+ "name": "kvm32"
+ },
+ {
+ "name": "qemu32"
+ },
+ {
+ "name": "kvm64"
+ },
+ {
+ "name": "core2duo"
+ },
+ {
+ "name": "phenom"
+ },
+ {
+ "name": "qemu64"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": {
+ "enabled": false,
+ "present": true
+ },
+ "id": "libvirt-42"
+}
+
+{
+ "return": [
+ ],
+ "id": "libvirt-43"
+}
+
+{
+ "return": [
+ ],
+ "id": "libvirt-44"
+}
+
+{
+ "return": [
+ {
+ "parameters": [
+ {
+ "name": "initiator-name",
+ "help": "Initiator iqn name to use when connecting",
+ "type": "string"
+ },
+ {
+ "name": "header-digest",
+ "help": "HeaderDigest setting. {CRC32C|CRC32C-NONE|NONE-CRC32C|NONE}",
+ "type": "string"
+ },
+ {
+ "name": "password",
+ "help": "password for CHAP authentication to target",
+ "type": "string"
+ },
+ {
+ "name": "user",
+ "help": "username for CHAP authentication to target",
+ "type": "string"
+ }
+ ],
+ "option": "iscsi"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "smbios"
+ },
+ {
+ "parameters": [
+ {
+ "name": "seamless-migration",
+ "type": "boolean"
+ },
+ {
+ "name": "playback-compression",
+ "type": "boolean"
+ },
+ {
+ "name": "agent-mouse",
+ "type": "boolean"
+ },
+ {
+ "name": "streaming-video",
+ "type": "string"
+ },
+ {
+ "name": "zlib-glz-wan-compression",
+ "type": "string"
+ },
+ {
+ "name": "jpeg-wan-compression",
+ "type": "string"
+ },
+ {
+ "name": "image-compression",
+ "type": "string"
+ },
+ {
+ "name": "plaintext-channel",
+ "type": "string"
+ },
+ {
+ "name": "tls-channel",
+ "type": "string"
+ },
+ {
+ "name": "tls-ciphers",
+ "type": "string"
+ },
+ {
+ "name": "x509-dh-key-file",
+ "type": "string"
+ },
+ {
+ "name": "x509-cacert-file",
+ "type": "string"
+ },
+ {
+ "name": "x509-cert-file",
+ "type": "string"
+ },
+ {
+ "name": "x509-key-password",
+ "type": "string"
+ },
+ {
+ "name": "x509-key-file",
+ "type": "string"
+ },
+ {
+ "name": "x509-dir",
+ "type": "string"
+ },
+ {
+ "name": "sasl",
+ "type": "boolean"
+ },
+ {
+ "name": "disable-agent-file-xfer",
+ "type": "boolean"
+ },
+ {
+ "name": "disable-copy-paste",
+ "type": "boolean"
+ },
+ {
+ "name": "disable-ticketing",
+ "type": "boolean"
+ },
+ {
+ "name": "password",
+ "type": "string"
+ },
+ {
+ "name": "ipv6",
+ "type": "boolean"
+ },
+ {
+ "name": "ipv4",
+ "type": "boolean"
+ },
+ {
+ "name": "addr",
+ "type": "string"
+ },
+ {
+ "name": "tls-port",
+ "type": "number"
+ },
+ {
+ "name": "port",
+ "type": "number"
+ }
+ ],
+ "option": "spice"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "acpi"
+ },
+ {
+ "parameters": [
+ {
+ "name": "sock_fd",
+ "type": "number"
+ },
+ {
+ "name": "socket",
+ "type": "string"
+ },
+ {
+ "name": "readonly",
+ "type": "boolean"
+ },
+ {
+ "name": "writeout",
+ "type": "string"
+ },
+ {
+ "name": "security_model",
+ "type": "string"
+ },
+ {
+ "name": "mount_tag",
+ "type": "string"
+ },
+ {
+ "name": "path",
+ "type": "string"
+ },
+ {
+ "name": "fsdriver",
+ "type": "string"
+ }
+ ],
+ "option": "virtfs"
+ },
+ {
+ "parameters": [
+ {
+ "name": "sock_fd",
+ "type": "number"
+ },
+ {
+ "name": "socket",
+ "type": "string"
+ },
+ {
+ "name": "readonly",
+ "type": "boolean"
+ },
+ {
+ "name": "writeout",
+ "type": "string"
+ },
+ {
+ "name": "security_model",
+ "type": "string"
+ },
+ {
+ "name": "path",
+ "type": "string"
+ },
+ {
+ "name": "fsdriver",
+ "type": "string"
+ }
+ ],
+ "option": "fsdev"
+ },
+ {
+ "parameters": [
+ {
+ "name": "timestamp",
+ "type": "boolean"
+ }
+ ],
+ "option": "msg"
+ },
+ {
+ "parameters": [
+ {
+ "name": "mlock",
+ "type": "boolean"
+ }
+ ],
+ "option": "realtime"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "tpmdev"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "object"
+ },
+ {
+ "parameters": [
+ {
+ "name": "opaque",
+ "help": "free-form string used to describe fd",
+ "type": "string"
+ },
+ {
+ "name": "set",
+ "help": "ID of the fd set to add fd to",
+ "type": "number"
+ },
+ {
+ "name": "fd",
+ "help": "file descriptor of which a duplicate is added to fd set",
+ "type": "number"
+ }
+ ],
+ "option": "add-fd"
+ },
+ {
+ "parameters": [
+ {
+ "name": "enable",
+ "type": "boolean"
+ }
+ ],
+ "option": "sandbox"
+ },
+ {
+ "parameters": [
+ {
+ "name": "strict",
+ "type": "string"
+ },
+ {
+ "name": "reboot-timeout",
+ "type": "string"
+ },
+ {
+ "name": "splash-time",
+ "type": "string"
+ },
+ {
+ "name": "splash",
+ "type": "string"
+ },
+ {
+ "name": "menu",
+ "type": "boolean"
+ },
+ {
+ "name": "once",
+ "type": "string"
+ },
+ {
+ "name": "order",
+ "type": "string"
+ }
+ ],
+ "option": "boot-opts"
+ },
+ {
+ "parameters": [
+ {
+ "name": "maxcpus",
+ "type": "number"
+ },
+ {
+ "name": "threads",
+ "type": "number"
+ },
+ {
+ "name": "cores",
+ "type": "number"
+ },
+ {
+ "name": "sockets",
+ "type": "number"
+ },
+ {
+ "name": "cpus",
+ "type": "number"
+ }
+ ],
+ "option": "smp-opts"
+ },
+ {
+ "parameters": [
+ {
+ "name": "usb",
+ "help": "Set on/off to enable/disable usb",
+ "type": "boolean"
+ },
+ {
+ "name": "mem-merge",
+ "help": "enable/disable memory merge support",
+ "type": "boolean"
+ },
+ {
+ "name": "dump-guest-core",
+ "help": "Include guest memory in a core dump",
+ "type": "boolean"
+ },
+ {
+ "name": "dt_compatible",
+ "help": "Overrides the \"compatible\" property of the dt root node",
+ "type": "string"
+ },
+ {
+ "name": "phandle_start",
+ "help": "The first phandle ID we may generate dynamically",
+ "type": "number"
+ },
+ {
+ "name": "dumpdtb",
+ "help": "Dump current dtb to a file and quit",
+ "type": "string"
+ },
+ {
+ "name": "dtb",
+ "help": "Linux kernel device tree file",
+ "type": "string"
+ },
+ {
+ "name": "append",
+ "help": "Linux kernel command line",
+ "type": "string"
+ },
+ {
+ "name": "initrd",
+ "help": "Linux initial ramdisk file",
+ "type": "string"
+ },
+ {
+ "name": "kernel",
+ "help": "Linux kernel image file",
+ "type": "string"
+ },
+ {
+ "name": "kvm_shadow_mem",
+ "help": "KVM shadow MMU size",
+ "type": "size"
+ },
+ {
+ "name": "kernel_irqchip",
+ "help": "use KVM in-kernel irqchip",
+ "type": "boolean"
+ },
+ {
+ "name": "accel",
+ "help": "accelerator list",
+ "type": "string"
+ },
+ {
+ "name": "type",
+ "help": "emulated machine",
+ "type": "string"
+ }
+ ],
+ "option": "machine"
+ },
+ {
+ "parameters": [
+ {
+ "name": "romfile",
+ "type": "string"
+ },
+ {
+ "name": "bootindex",
+ "type": "number"
+ }
+ ],
+ "option": "option-rom"
+ },
+ {
+ "parameters": [
+ {
+ "name": "file",
+ "type": "string"
+ },
+ {
+ "name": "events",
+ "type": "string"
+ }
+ ],
+ "option": "trace"
+ },
+ {
+ "parameters": [
+ {
+ "name": "pretty",
+ "type": "boolean"
+ },
+ {
+ "name": "default",
+ "type": "boolean"
+ },
+ {
+ "name": "chardev",
+ "type": "string"
+ },
+ {
+ "name": "mode",
+ "type": "string"
+ }
+ ],
+ "option": "mon"
+ },
+ {
+ "parameters": [
+ {
+ "name": "value",
+ "type": "string"
+ },
+ {
+ "name": "property",
+ "type": "string"
+ },
+ {
+ "name": "driver",
+ "type": "string"
+ }
+ ],
+ "option": "global"
+ },
+ {
+ "parameters": [
+ {
+ "name": "driftfix",
+ "type": "string"
+ },
+ {
+ "name": "clock",
+ "type": "string"
+ },
+ {
+ "name": "base",
+ "type": "string"
+ }
+ ],
+ "option": "rtc"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "net"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "netdev"
+ },
+ {
+ "parameters": [
+ ],
+ "option": "device"
+ },
+ {
+ "parameters": [
+ {
+ "name": "chardev",
+ "type": "string"
+ },
+ {
+ "name": "size",
+ "type": "size"
+ },
+ {
+ "name": "debug",
+ "type": "number"
+ },
+ {
+ "name": "name",
+ "type": "string"
+ },
+ {
+ "name": "signal",
+ "type": "boolean"
+ },
+ {
+ "name": "mux",
+ "type": "boolean"
+ },
+ {
+ "name": "rows",
+ "type": "number"
+ },
+ {
+ "name": "cols",
+ "type": "number"
+ },
+ {
+ "name": "height",
+ "type": "number"
+ },
+ {
+ "name": "width",
+ "type": "number"
+ },
+ {
+ "name": "telnet",
+ "type": "boolean"
+ },
+ {
+ "name": "delay",
+ "type": "boolean"
+ },
+ {
+ "name": "server",
+ "type": "boolean"
+ },
+ {
+ "name": "wait",
+ "type": "boolean"
+ },
+ {
+ "name": "ipv6",
+ "type": "boolean"
+ },
+ {
+ "name": "ipv4",
+ "type": "boolean"
+ },
+ {
+ "name": "to",
+ "type": "number"
+ },
+ {
+ "name": "localport",
+ "type": "string"
+ },
+ {
+ "name": "localaddr",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "string"
+ },
+ {
+ "name": "host",
+ "type": "string"
+ },
+ {
+ "name": "path",
+ "type": "string"
+ },
+ {
+ "name": "backend",
+ "type": "string"
+ }
+ ],
+ "option": "chardev"
+ },
+ {
+ "parameters": [
+ {
+ "name": "copy-on-read",
+ "help": "copy read data from backing file into image file",
+ "type": "boolean"
+ },
+ {
+ "name": "read-only",
+ "help": "open drive file as read-only",
+ "type": "boolean"
+ },
+ {
+ "name": "addr",
+ "help": "pci address (virtio only)",
+ "type": "string"
+ },
+ {
+ "name": "boot",
+ "help": "(deprecated, ignored)",
+ "type": "boolean"
+ },
+ {
+ "name": "trans",
+ "help": "chs translation (auto, lba, none)",
+ "type": "string"
+ },
+ {
+ "name": "secs",
+ "help": "number of sectors (ide disk geometry)",
+ "type": "number"
+ },
+ {
+ "name": "heads",
+ "help": "number of heads (ide disk geometry)",
+ "type": "number"
+ },
+ {
+ "name": "cyls",
+ "help": "number of cylinders (ide disk geometry)",
+ "type": "number"
+ },
+ {
+ "name": "if",
+ "help": "interface (ide, scsi, sd, mtd, floppy, pflash, virtio)",
+ "type": "string"
+ },
+ {
+ "name": "media",
+ "help": "media type (disk, cdrom)",
+ "type": "string"
+ },
+ {
+ "name": "index",
+ "help": "index number",
+ "type": "number"
+ },
+ {
+ "name": "unit",
+ "help": "unit number (i.e. lun for scsi)",
+ "type": "number"
+ },
+ {
+ "name": "bus",
+ "help": "bus number",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-size",
+ "help": "when limiting by iops max size of an I/O in bytes",
+ "type": "number"
+ },
+ {
+ "name": "throttling.bps-write-max",
+ "help": "total bytes write burst",
+ "type": "number"
+ },
+ {
+ "name": "throttling.bps-read-max",
+ "help": "total bytes read burst",
+ "type": "number"
+ },
+ {
+ "name": "throttling.bps-total-max",
+ "help": "total bytes burst",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-write-max",
+ "help": "I/O operations write burst",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-read-max",
+ "help": "I/O operations read burst",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-total-max",
+ "help": "I/O operations burst",
+ "type": "number"
+ },
+ {
+ "name": "throttling.bps-write",
+ "help": "limit write bytes per second",
+ "type": "number"
+ },
+ {
+ "name": "throttling.bps-read",
+ "help": "limit read bytes per second",
+ "type": "number"
+ },
+ {
+ "name": "throttling.bps-total",
+ "help": "limit total bytes per second",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-write",
+ "help": "limit write operations per second",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-read",
+ "help": "limit read operations per second",
+ "type": "number"
+ },
+ {
+ "name": "throttling.iops-total",
+ "help": "limit total I/O operations per second",
+ "type": "number"
+ },
+ {
+ "name": "werror",
+ "help": "write error action",
+ "type": "string"
+ },
+ {
+ "name": "rerror",
+ "help": "read error action",
+ "type": "string"
+ },
+ {
+ "name": "serial",
+ "help": "disk serial number",
+ "type": "string"
+ },
+ {
+ "name": "format",
+ "help": "disk format (raw, qcow2, ...)",
+ "type": "string"
+ },
+ {
+ "name": "aio",
+ "help": "host AIO implementation (threads, native)",
+ "type": "string"
+ },
+ {
+ "name": "cache.no-flush",
+ "help": "ignore any flush requests for the device",
+ "type": "boolean"
+ },
+ {
+ "name": "cache.direct",
+ "help": "enables use of O_DIRECT (bypass the host page cache)",
+ "type": "boolean"
+ },
+ {
+ "name": "cache.writeback",
+ "help": "enables writeback mode for any caches",
+ "type": "boolean"
+ },
+ {
+ "name": "discard",
+ "help": "discard operation (ignore/off, unmap/on)",
+ "type": "string"
+ },
+ {
+ "name": "file",
+ "help": "disk image",
+ "type": "string"
+ },
+ {
+ "name": "snapshot",
+ "help": "enable/disable snapshot mode",
+ "type": "boolean"
+ }
+ ],
+ "option": "drive"
+ }
+ ],
+ "id": "libvirt-45"
+}
+
+{
+ "return": [
+ {
+ "state": false,
+ "capability": "xbzrle"
+ },
+ {
+ "state": false,
+ "capability": "x-rdma-pin-all"
+ },
+ {
+ "state": false,
+ "capability": "auto-converge"
+ },
+ {
+ "state": false,
+ "capability": "zero-blocks"
+ }
+ ],
+ "id": "libvirt-46"
+}
diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
new file mode 100644
index 0000000..db0d000
--- /dev/null
+++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
@@ -0,0 +1,200 @@
+<qemuCaps>
+ <qemuctime>0</qemuctime>
+ <selfctime>0</selfctime>
+ <selfvers>0</selfvers>
+ <usedQMP/>
+ <flag name='mem-path'/>
+ <flag name='drive-serial'/>
+ <flag name='chardev'/>
+ <flag name='enable-kvm'/>
+ <flag name='monitor-json'/>
+ <flag name='sdl'/>
+ <flag name='smp-topology'/>
+ <flag name='netdev'/>
+ <flag name='rtc'/>
+ <flag name='vhost-net'/>
+ <flag name='no-hpet'/>
+ <flag name='no-kvm-pit'/>
+ <flag name='pci-configfd'/>
+ <flag name='nodefconfig'/>
+ <flag name='boot-menu'/>
+ <flag name='fsdev'/>
+ <flag name='name-process'/>
+ <flag name='smbios-type'/>
+ <flag name='vga-qxl'/>
+ <flag name='spice'/>
+ <flag name='vga-none'/>
+ <flag name='boot-index'/>
+ <flag name='hda-duplex'/>
+ <flag name='drive-aio'/>
+ <flag name='pci-multibus'/>
+ <flag name='pci-bootindex'/>
+ <flag name='ccid-emulated'/>
+ <flag name='ccid-passthru'/>
+ <flag name='chardev-spicevmc'/>
+ <flag name='virtio-tx-alg'/>
+ <flag name='device-qxl-vga'/>
+ <flag name='pci-multifunction'/>
+ <flag name='virtio-blk-pci.ioeventfd'/>
+ <flag name='sga'/>
+ <flag name='virtio-blk-pci.event_idx'/>
+ <flag name='virtio-net-pci.event_idx'/>
+ <flag name='cache-directsync'/>
+ <flag name='piix3-usb-uhci'/>
+ <flag name='piix4-usb-uhci'/>
+ <flag name='usb-ehci'/>
+ <flag name='ich9-usb-ehci1'/>
+ <flag name='vt82c686b-usb-uhci'/>
+ <flag name='pci-ohci'/>
+ <flag name='usb-redir'/>
+ <flag name='usb-hub'/>
+ <flag name='no-shutdown'/>
+ <flag name='cache-unsafe'/>
+ <flag name='ich9-ahci'/>
+ <flag name='no-acpi'/>
+ <flag name='fsdev-readonly'/>
+ <flag name='virtio-blk-pci.scsi'/>
+ <flag name='drive-copy-on-read'/>
+ <flag name='fsdev-writeout'/>
+ <flag name='drive-iotune'/>
+ <flag name='system_wakeup'/>
+ <flag name='scsi-disk.channel'/>
+ <flag name='scsi-block'/>
+ <flag name='transaction'/>
+ <flag name='block-job-async'/>
+ <flag name='scsi-cd'/>
+ <flag name='ide-cd'/>
+ <flag name='no-user-config'/>
+ <flag name='hda-micro'/>
+ <flag name='dump-guest-memory'/>
+ <flag name='nec-usb-xhci'/>
+ <flag name='balloon-event'/>
+ <flag name='bridge'/>
+ <flag name='lsi'/>
+ <flag name='virtio-scsi-pci'/>
+ <flag name='blockio'/>
+ <flag name='disable-s3'/>
+ <flag name='disable-s4'/>
+ <flag name='usb-redir.filter'/>
+ <flag name='ide-drive.wwn'/>
+ <flag name='scsi-disk.wwn'/>
+ <flag name='seccomp-sandbox'/>
+ <flag name='reboot-timeout'/>
+ <flag name='dump-guest-core'/>
+ <flag name='seamless-migration'/>
+ <flag name='block-commit'/>
+ <flag name='vnc'/>
+ <flag name='drive-mirror'/>
+ <flag name='usb-redir.bootindex'/>
+ <flag name='usb-host.bootindex'/>
+ <flag name='blockdev-snapshot-sync'/>
+ <flag name='qxl'/>
+ <flag name='VGA'/>
+ <flag name='cirrus-vga'/>
+ <flag name='vmware-svga'/>
+ <flag name='device-video-primary'/>
+ <flag name='usb-serial'/>
+ <flag name='usb-net'/>
+ <flag name='add-fd'/>
+ <flag name='nbd-server'/>
+ <flag name='virtio-rng'/>
+ <flag name='rng-random'/>
+ <flag name='rng-egd'/>
+ <flag name='dtb'/>
+ <flag name='megasas'/>
+ <flag name='ipv6-migration'/>
+ <flag name='machine-opt'/>
+ <flag name='machine-usb-opt'/>
+ <flag name='pci-bridge'/>
+ <flag name='vfio-pci'/>
+ <flag name='vfio-pci.bootindex'/>
+ <flag name='scsi-generic'/>
+ <flag name='scsi-generic.bootindex'/>
+ <flag name='mem-merge'/>
+ <flag name='vnc-websocket'/>
+ <flag name='drive-discard'/>
+ <flag name='mlock'/>
+ <flag name='vnc-share-policy'/>
+ <flag name='device-del-event'/>
+ <flag name='dmi-to-pci-bridge'/>
+ <flag name='i440fx-pci-hole64-size'/>
+ <flag name='q35-pci-hole64-size'/>
+ <flag name='usb-storage'/>
+ <flag name='usb-storage.removable'/>
+ <flag name='virtio-mmio'/>
+ <flag name='ich9-intel-hda'/>
+ <flag name='kvm-pit-lost-tick-policy'/>
+ <flag name='boot-strict'/>
+ <flag name='pvpanic'/>
+ <flag name='spice-file-xfer-disable'/>
+ <flag name='spiceport'/>
+ <flag name='usb-kbd'/>
+ <flag name='host-pci-multidomain'/>
+ <flag name='msg-timestamp'/>
+ <flag name='usb-audio'/>
+ <flag name='splash-timeout'/>
+ <flag name='ivshmem'/>
+ <flag name='drive-iotune-max'/>
+ <flag name='VGA.vgamem_mb'/>
+ <flag name='vmware-svga.vgamem_mb'/>
+ <flag name='qxl.vgamem_mb'/>
+ <flag name='qxl-vga.vgamem_mb'/>
+ <flag name='pci-serial'/>
+ <flag name='ioh3420'/>
+ <flag name='x3130-upstream'/>
+ <flag name='xio3130-downstream'/>
+ <flag name='rtl8139'/>
+ <flag name='e1000'/>
+ <flag name='virtio-net'/>
+ <flag name='qxl.vram64_size_mb'/>
+ <flag name='qxl-vga.vram64_size_mb'/>
+ <flag name='device-tray-moved-event'/>
+ <flag name='nec-usb-xhci-ports'/>
+ <version>1007000</version>
+ <kvmVersion>0</kvmVersion>
+ <package></package>
+ <arch>x86_64</arch>
+ <cpu name='Opteron_G5'/>
+ <cpu name='Opteron_G4'/>
+ <cpu name='Opteron_G3'/>
+ <cpu name='Opteron_G2'/>
+ <cpu name='Opteron_G1'/>
+ <cpu name='Haswell'/>
+ <cpu name='SandyBridge'/>
+ <cpu name='Westmere'/>
+ <cpu name='Nehalem'/>
+ <cpu name='Penryn'/>
+ <cpu name='Conroe'/>
+ <cpu name='n270'/>
+ <cpu name='athlon'/>
+ <cpu name='pentium3'/>
+ <cpu name='pentium2'/>
+ <cpu name='pentium'/>
+ <cpu name='486'/>
+ <cpu name='coreduo'/>
+ <cpu name='kvm32'/>
+ <cpu name='qemu32'/>
+ <cpu name='kvm64'/>
+ <cpu name='core2duo'/>
+ <cpu name='phenom'/>
+ <cpu name='qemu64'/>
+ <machine name='pc-i440fx-1.7' alias='pc' maxCpus='255'/>
+ <machine name='pc-q35-1.4' maxCpus='255'/>
+ <machine name='pc-q35-1.5' maxCpus='255'/>
+ <machine name='pc-q35-1.6' maxCpus='255'/>
+ <machine name='pc-q35-1.7' alias='q35' maxCpus='255'/>
+ <machine name='isapc' maxCpus='1'/>
+ <machine name='pc-0.10' maxCpus='255'/>
+ <machine name='pc-0.11' maxCpus='255'/>
+ <machine name='pc-0.12' maxCpus='255'/>
+ <machine name='pc-0.13' maxCpus='255'/>
+ <machine name='pc-0.14' maxCpus='255'/>
+ <machine name='pc-0.15' maxCpus='255'/>
+ <machine name='pc-1.0' maxCpus='255'/>
+ <machine name='pc-1.1' maxCpus='255'/>
+ <machine name='pc-1.2' maxCpus='255'/>
+ <machine name='pc-1.3' maxCpus='255'/>
+ <machine name='pc-i440fx-1.4' maxCpus='255'/>
+ <machine name='pc-i440fx-1.5' maxCpus='255'/>
+ <machine name='pc-i440fx-1.6' maxCpus='255'/>
+</qemuCaps>
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index 058ad8c..3d55006 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -165,7 +165,7 @@ mymain(void)
DO_TEST("x86_64", "caps_1.4.2");
DO_TEST("x86_64", "caps_1.5.3");
DO_TEST("x86_64", "caps_1.6.0");
- DO_TEST("x86_64", "caps_1.6.50");
+ DO_TEST("x86_64", "caps_1.7.0");
DO_TEST("x86_64", "caps_2.1.1");
DO_TEST("x86_64", "caps_2.4.0");
DO_TEST("x86_64", "caps_2.5.0");
--
2.8.3
2
1
[libvirt] [PATCH 00/11] qemu: Erradicate use of virDomainLiveConfigHelperMethod
by Peter Krempa 25 May '16
by Peter Krempa 25 May '16
25 May '16
Don't use that terrible function in the qemu driver and a few relevant refactors.
Peter Krempa (11):
qemu: monitor: Remove 'supportMaxOptions' argument from
qemuMonitorGetBlockIoThrottle
qemu: Replace virDomainLiveConfigHelperMethod in
qemuDomainGetBlockIoTune
qemu: Refactor typed params assignment in qemuDomainGetBlockIoTune
qemu: Remove virDomainLiveConfigHelperMethod from
qemuDomainSetMemoryParameters
qemu: Remove virDomainLiveConfigHelperMethod from
qemuDomainGetBlkioParameters
qemu: Refactor qemuDomainGetBlkioParameters
qemu: Remove virDomainLiveConfigHelperMethod from
qemuDomainGetSchedulerParametersFlags
conf: Change virDomainCputune member 'shares' to unsigned long long
qemu: Refactor qemuDomainGetSchedulerParametersFlags
qemu: Remove virDomainLiveConfigHelperMethod from
qemuDomainSetBlockIoTune
qemu: Remove virDomainLiveConfigHelperMethod from
qemuDomainSetSchedulerParametersFlags
src/conf/domain_conf.c | 6 +-
src/conf/domain_conf.h | 2 +-
src/lxc/lxc_native.c | 2 +-
src/qemu/qemu_driver.c | 896 ++++++++++++-------------------------------
src/qemu/qemu_monitor.c | 5 +-
src/qemu/qemu_monitor.h | 3 +-
src/qemu/qemu_monitor_json.c | 24 +-
src/qemu/qemu_monitor_json.h | 3 +-
src/vmx/vmx.c | 6 +-
tests/qemumonitorjsontest.c | 2 +-
10 files changed, 261 insertions(+), 688 deletions(-)
--
2.8.2
2
13
25 May '16
Xen only supports network-based disks with the qemu (aka qdisk) driver.
Set the driverName to 'qemu' in libxlDomainDeviceDefPostParse() if
not already set. When starting a domain with network-based disks,
ensure the driverName is 'qemu'.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_conf.c | 11 +++++++----
src/libxl/libxl_domain.c | 12 ++++++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 13e56ac..78e9ee9 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1058,13 +1058,18 @@ libxlMakeNetworkDiskSrc(virStorageSourcePtr src, char **srcstr)
int
libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
{
- const char *driver;
- int format;
+ const char *driver = virDomainDiskGetDriver(l_disk);
+ int format = virDomainDiskGetFormat(l_disk);
int actual_type = virStorageSourceGetActualType(l_disk->src);
libxl_device_disk_init(x_disk);
if (actual_type == VIR_STORAGE_TYPE_NETWORK) {
+ if (driver && STRNEQ(driver, "qemu")) {
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("only the 'qemu' driver can be used with network disks"));
+ return -1;
+ }
if (libxlMakeNetworkDiskSrc(l_disk->src, &x_disk->pdev_path) < 0)
return -1;
} else {
@@ -1075,8 +1080,6 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
if (VIR_STRDUP(x_disk->vdev, l_disk->dst) < 0)
return -1;
- driver = virDomainDiskGetDriver(l_disk);
- format = virDomainDiskGetFormat(l_disk);
if (driver) {
if (STREQ(driver, "tap") || STREQ(driver, "tap2")) {
switch (format) {
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 113942b..8a3866f 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -364,6 +364,18 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
}
}
+ /* for network-based disks, set 'qemu' as the default driver */
+ if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
+ virDomainDiskDefPtr disk = dev->data.disk;
+ int actual_type = virStorageSourceGetActualType(disk->src);
+
+ if (actual_type == VIR_STORAGE_TYPE_NETWORK) {
+ if (!virDomainDiskGetDriver(disk) &&
+ virDomainDiskSetDriver(disk, "qemu") < 0)
+ return -1;
+ }
+ }
+
return 0;
}
--
2.1.4
3
4
[libvirt] [PATCH v2] Call qemuDomainObjEndJob when qemuCaps is null during hotplug
by Shivaprasad G Bhat 25 May '16
by Shivaprasad G Bhat 25 May '16
25 May '16
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_driver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 249393a..cd53d3c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8237,7 +8237,7 @@ qemuDomainAttachDeviceFlags(virDomainPtr dom,
if (priv->qemuCaps)
qemuCaps = virObjectRef(priv->qemuCaps);
else if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, vm->def->emulator)))
- goto cleanup;
+ goto endjob;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
@@ -8366,7 +8366,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
if (priv->qemuCaps)
qemuCaps = virObjectRef(priv->qemuCaps);
else if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, vm->def->emulator)))
- goto cleanup;
+ goto endjob;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
@@ -8490,7 +8490,7 @@ qemuDomainDetachDeviceFlags(virDomainPtr dom,
if (priv->qemuCaps)
qemuCaps = virObjectRef(priv->qemuCaps);
else if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, vm->def->emulator)))
- goto cleanup;
+ goto endjob;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
2
1
Re: [libvirt] [Qemu-devel] [Bug 1585533] [NEW] cache-miss-rate / Invalid JSON
by Eric Blake 25 May '16
by Eric Blake 25 May '16
25 May '16
On 05/25/2016 02:46 AM, Marc Brothier wrote:
> Public bug reported:
>
> Hi,
>
> We have VMs which were started with an older version than qemu 2.1 which
> added "cache-miss-rate" property for XBZRLECacheStats. While trying to
> migrate the VM to a new host which is running a higher version (2.3) of
> Qemu we got an exception:
>
> virJSONValueFromString:1642 : internal error: cannot parse json {"return": {"expected-downtime": 1, "xbzrle-cache": {"bytes": 0, "cache-size": 67108864, "cache-miss-rate": -nan, "pages": 0, "overflow": 0, "cache-miss": 8933}, "status": "active", "disk": {"total": 429496729600, "dirty-sync-count": 0, "remaining": 193896382464, "mbps": 0, "transferred": 235600347136, "duplicate": 0, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 0, "normal": 0}, "setup-time": 13, "total-time": 1543124, "ram": {"total": 8599183360, "dirty-sync-count": 4, "remaining": 30695424, "mbps": 830.636997, "transferred": 3100448901, "duplicate": 1358341, "dirty-pages-rate": 7, "skipped": 0, "normal-bytes": 3082199040, "normal": 752490}}, "id": "libvirt-186200"}: lexical error: malformed number, a digit is required after the minus sign.
> 67108864, "cache-miss-rate": -nan, "pages": 0, "overflow": 0
> (right here) ------^
>
> virNetClientStreamRaiseError:191 : stream aborted at client request
Wow - I've known we have a problem with qemu emitting non-compliant
JSON, but this proves that it is fatal to libvirt. I guess my series on
improving the JSON parser [1] should consider doing a fallback to
s/NaN/0/ and s/Inf/DBL_MAX/ rather than completely erroring out when a
client tries to request it. Meanwhile, it's an easy patch to qemu to
avoid division by zero when generating cache-miss-rate.
[1] https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg03424.html
>
>
> Would it be possible to improve the JSON parser to skip the key if the value is incorrect
Libvirt uses libyajl to parse JSON, and libyajl has an outstanding bug
request to support extensions to JSON such as parsing non-finite floats.
Since there has been no upstream reaction to the bug request, I
seriously doubt it will happen any time soon, so any change to tolerate
NaN in libvirt would have to be a one-off patch. It sounds like the
better fix is to make qemu emit valid JSON in the first place, rather
than making libvirt deal with broken JSON from qemu.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
1
0
[libvirt] [PATCH 0/3] qemu: Allow update of certain disk options during runtime
by Peter Krempa 25 May '16
by Peter Krempa 25 May '16
25 May '16
Until this series it was possible to update floppies and cdroms only. With this
you can update startup policy and snapshot behavior for regular disks too.
Peter Krempa (3):
qemu: driver: Move around code to avoid need to rollback
qemu: driver: Remove unnecessary cleanup label from
qemuDomainChangeDiskLive
qemu: driver: Allow disk update of startupPolicy/snapshot for all
disks
src/qemu/qemu_driver.c | 74 ++++++++++++++++++--------------------------------
1 file changed, 26 insertions(+), 48 deletions(-)
--
2.8.2
2
5
25 May '16
This had been on the Debian package list before but its time to take
this onwards. So the goal would be to have one set to rule them all
(when using apparmor) and drop the seperate set of definitions which
exist at least in the Ubuntu packaging.
Right now the patch would be at a state which adds all missing files
and rules to the current examples in libvirt and installs them when
using --with-apparmor-profiles.
One problem seems to be that some of the definitions might cause
parse failures on certain versions of apparmor. I checked this morning
and this looks a bit hairy. So some apparmor 2.8 versions potentially
have issues, but not all apparmor 2.8 are the same (gah).
I could imagine (but John, we really could use some guidance here ;))
that at least some changes could be related to version 2.8.95~2430:
+ debian/patches/mediate-signals.patch,
debian/patches/change-signal-syntax.patch: Parse signal rules with
apparmor_parser. See the apparmor.d(5) man page for syntax details.
+ debian/patches/change-ptrace-syntax.patch,
debian/patches/mediate-ptrace.patch: Parse ptrace rules with
apparmor_parser. See the apparmor.d(5) man page for syntax details.
But, regardless of the when, the apparmor rules maybe need a way to handle
versioned features of the parser. One proposal was to comment out problematic
rules and allow the packager to re-enable things. Maybe going one step
further and have some pre-processing that handles version based sections
(like #if (APPARMOR_VERSION >= xxx)).
So that is where we stand. Ideas are very welcome.
-Stefan
---
>From aec5cf8cc30c80492a37856626264c3d4c27a31f Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader(a)canonical.com>
Date: Thu, 18 Sep 2014 14:15:17 +0200
Subject: [PATCH] Add missing delta from Ubuntu to apparmor profiles
This fixes up the upstream profiles and would allow to drop apparmor
related delta from the Ubuntu package.
Thanks to Serge Hallyn for the Makefile.am install hook that allows
to rename the local file.
Signed-off-by: Stefan Bader <stefan.bader(a)canonical.com>
---
examples/apparmor/Makefile.am | 10 ++++++++
examples/apparmor/libvirt-lxc | 15 +++++++++++-
examples/apparmor/libvirt-qemu | 31 +++++++++++++++++++++++-
examples/apparmor/local-usr.sbin.libvirtd | 2 ++
examples/apparmor/usr.lib.libvirt.virt-aa-helper | 25 ++++++++++++++++---
examples/apparmor/usr.sbin.libvirtd | 17 ++++++++++++-
6 files changed, 94 insertions(+), 6 deletions(-)
create mode 100644 examples/apparmor/local-usr.sbin.libvirtd
diff --git a/examples/apparmor/Makefile.am b/examples/apparmor/Makefile.am
index 7a20e16..aa46cb9 100644
--- a/examples/apparmor/Makefile.am
+++ b/examples/apparmor/Makefile.am
@@ -20,6 +20,7 @@ EXTRA_DIST= \
libvirt-qemu \
libvirt-lxc \
usr.lib.libvirt.virt-aa-helper \
+ local-usr.sbin.libvirtd \
usr.sbin.libvirtd
if WITH_APPARMOR_PROFILES
@@ -29,6 +30,15 @@ apparmor_DATA = \
usr.sbin.libvirtd \
$(NULL)
+localdir = $(apparmordir)/local
+local_DATA = \
+ local-usr.sbin.libvirtd \
+ $(NULL)
+
+install-data-hook:
+ mv $(DESTDIR)$(localdir)/local-usr.sbin.libvirtd \
+ $(DESTDIR)$(localdir)/usr.sbin.libvirtd
+
abstractionsdir = $(apparmordir)/abstractions
abstractions_DATA = \
libvirt-qemu \
diff --git a/examples/apparmor/libvirt-lxc b/examples/apparmor/libvirt-lxc
index 4bfb503..4705e0a 100644
--- a/examples/apparmor/libvirt-lxc
+++ b/examples/apparmor/libvirt-lxc
@@ -1,12 +1,18 @@
-# Last Modified: Fri Feb 7 13:01:36 2014
+# Last Modified: Thu, 18 Sep 2014 13:56:49 +0200
#include <abstractions/base>
umount,
+ dbus,
+ signal,
+ ptrace,
# ignore DENIED message on / remount
deny mount options=(ro, remount) -> /,
+ # support use of cgmanager proxy
+ mount options=(move) /sys/fs/cgroup/cgmanager/ -> /sys/fs/cgroup/cgmanager.lower/,
+
# allow tmpfs mounts everywhere
mount fstype=tmpfs,
@@ -33,8 +39,15 @@
mount fstype=fusectl -> /sys/fs/fuse/connections/,
mount fstype=securityfs -> /sys/kernel/security/,
mount fstype=debugfs -> /sys/kernel/debug/,
+ deny mount fstype=debugfs -> /var/lib/ureadahead/debugfs/,
mount fstype=proc -> /proc/,
mount fstype=sysfs -> /sys/,
+
+ mount options=(rw nosuid nodev noexec remount) -> /sys/,
+ mount options=(rw remount) -> /sys/kernel/security/,
+ mount options=(rw remount) -> /sys/fs/pstore/,
+ mount options=(ro remount) -> /sys/fs/pstore/,
+
deny /sys/firmware/efi/efivars/** rwklx,
deny /sys/kernel/security/** rwklx,
diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
index c6de6dd..b69e64c 100644
--- a/examples/apparmor/libvirt-qemu
+++ b/examples/apparmor/libvirt-qemu
@@ -1,4 +1,4 @@
-# Last Modified: Wed Sep 3 21:52:03 2014
+# Last Modified: Thu, 18 Sep 2014 16:41:21 +0200
#include <abstractions/base>
#include <abstractions/consoles>
@@ -13,15 +13,22 @@
capability setgid,
capability setuid,
+ # this is needed with libcap-ng support, however it breaks a lot of things
+ # atm, so just silence the denial until libcap-ng works right. LP: #522845
+ deny capability setpcap,
+
network inet stream,
network inet6 stream,
/dev/net/tun rw,
+ /dev/tap* rw,
/dev/kvm rw,
/dev/ptmx rw,
/dev/kqemu rw,
@{PROC}/*/status r,
@{PROC}/sys/kernel/cap_last_cap r,
+ owner @{PROC}/*/auxv r,
+ @{PROC}/sys/vm/overcommit_memory r,
# For hostdev access. The actual devices will be added dynamically
/sys/bus/usb/devices/ r,
@@ -38,6 +45,9 @@
/dev/snd/* rw,
capability ipc_lock,
# spice
+ /usr/bin/qemu-system-i386-spice rmix,
+ /usr/bin/qemu-system-x86_64-spice rmix,
+ /{dev,run}/shm/ r,
owner /{dev,run}/shm/spice.* rw,
# 'kill' is not required for sound and is a security risk. Do not enable
# unless you absolutely need it.
@@ -73,6 +83,7 @@
# the various binaries
/usr/bin/kvm rmix,
/usr/bin/qemu rmix,
+ /usr/bin/qemu-system-aarch64 rmix,
/usr/bin/qemu-system-arm rmix,
/usr/bin/qemu-system-cris rmix,
/usr/bin/qemu-system-i386 rmix,
@@ -91,6 +102,7 @@
/usr/bin/qemu-system-sparc rmix,
/usr/bin/qemu-system-sparc64 rmix,
/usr/bin/qemu-system-x86_64 rmix,
+ /usr/bin/qemu-system-x86_64-spice rmix,
/usr/bin/qemu-alpha rmix,
/usr/bin/qemu-arm rmix,
/usr/bin/qemu-armeb rmix,
@@ -117,6 +129,16 @@
/bin/dash rmix,
/bin/dd rmix,
/bin/cat rmix,
+ /etc/pki/CA/ r,
+ /etc/pki/CA/* r,
+ /etc/pki/libvirt/ r,
+ /etc/pki/libvirt/** r,
+
+ # for rbd
+ /etc/ceph/ceph.conf r,
+
+ # for access to hugepages
+ owner "/run/hugepages/kvm/libvirt/qemu/**" rw,
# for usb access
/dev/bus/usb/ r,
@@ -124,6 +146,13 @@
/sys/bus/ r,
/sys/class/ r,
+ signal (receive) peer=/usr/sbin/libvirtd,
+ ptrace (tracedby) peer=/usr/sbin/libvirtd,
+
+ # for ppc device-tree access
+ @{PROC}/device-tree/ r,
+ @{PROC}/device-tree/** r,
+
/usr/{lib,libexec}/qemu-bridge-helper Cx -> qemu_bridge_helper,
# child profile for bridge helper process
profile qemu_bridge_helper {
diff --git a/examples/apparmor/local-usr.sbin.libvirtd b/examples/apparmor/local-usr.sbin.libvirtd
new file mode 100644
index 0000000..6e19f20
--- /dev/null
+++ b/examples/apparmor/local-usr.sbin.libvirtd
@@ -0,0 +1,2 @@
+# Site-specific additions and overrides for usr.sbin.libvirtd.
+# For more details, please see /etc/apparmor.d/local/README.
diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
index bceaaff..4df86b0 100644
--- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
@@ -1,8 +1,9 @@
-# Last Modified: Mon Apr 5 15:10:27 2010
+# Last Modified: Thu, 18 Sep 2014 14:05:36 +0200
#include <tunables/global>
/usr/lib/libvirt/virt-aa-helper {
#include <abstractions/base>
+ #include <abstractions/user-tmp>
# needed for searching directories
capability dac_override,
@@ -19,6 +20,12 @@
# for hostdev
/sys/devices/ r,
/sys/devices/** r,
+ /sys/bus/usb/devices/ r,
+ /sys/bus/usb/devices/** r,
+ deny /dev/sd* r,
+ deny /dev/dm-* r,
+ deny /dev/mapper/ r,
+ deny /dev/mapper/* r,
/usr/lib/libvirt/virt-aa-helper mr,
/sbin/apparmor_parser Ux,
@@ -26,8 +33,11 @@
/etc/apparmor.d/libvirt/* r,
/etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
- # for backingstore -- allow access to non-hidden files in @{HOME} as well
- # as storage pools
+ # For backingstore, virt-aa-helper needs to peek inside the disk image, so
+ # allow access to non-hidden files in @{HOME} as well as storage pools, and
+ # removable media and filesystems, and certain file extentions. A
+ # virt-aa-helper failure when checking a disk for backinsgstore is non-fatal
+ # (but obviously the backingstore won't be added).
audit deny @{HOME}/.* mrwkl,
audit deny @{HOME}/.*/ rw,
audit deny @{HOME}/.*/** mrwkl,
@@ -35,8 +45,17 @@
audit deny @{HOME}/bin/** mrwkl,
@{HOME}/ r,
@{HOME}/** r,
+ @{HOME}/.Private/** mrwlk,
+ @{HOMEDIRS}/.ecryptfs/*/.Private/** mrwlk,
+
/var/lib/libvirt/images/ r,
/var/lib/libvirt/images/** r,
+ /var/lib/nova/images/** r,
+ /var/lib/nova/instances/_base/** r,
+ /var/lib/nova/instances/snapshots/** r,
+ /var/lib/eucalyptus/instances/**/disk* r,
+ /var/lib/eucalyptus/instances/**/loader* r,
+ /var/lib/uvtool/libvirt/images/** r,
/{media,mnt,opt,srv}/** r,
/**.img r,
diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
index 3011eff..814b4d81 100644
--- a/examples/apparmor/usr.sbin.libvirtd
+++ b/examples/apparmor/usr.sbin.libvirtd
@@ -1,10 +1,12 @@
-# Last Modified: Mon Apr 5 15:03:58 2010
+# Last Modified: Tue, 23 Sep 2014 09:28:07 +0200
#include <tunables/global>
@{LIBVIRT}="libvirt"
/usr/sbin/libvirtd {
#include <abstractions/base>
#include <abstractions/dbus>
+ # Site-specific additions and overrides. See local/README for details.
+ #include <local/usr.sbin.libvirtd>
capability kill,
capability net_admin,
@@ -23,6 +25,7 @@
capability setpcap,
capability mknod,
capability fsetid,
+ capability ipc_lock,
capability audit_write,
# Needed for vfio
@@ -33,6 +36,12 @@
network inet6 stream,
network inet6 dgram,
network packet dgram,
+ network netlink,
+
+ dbus bus=system,
+ signal,
+ ptrace,
+ unix,
# Very lenient profile for libvirtd since we want to first focus on confining
# the guests. Guests will have a very restricted profile.
@@ -45,6 +54,12 @@
/usr/sbin/* PUx,
/lib/udev/scsi_id PUx,
/usr/lib/xen-common/bin/xen-toolstack PUx,
+ /usr/lib/xen-*/bin/pygrub PUx,
+ /usr/lib/xen-*/bin/libxl-save-helper PUx,
+
+ # Required by nwfilter_ebiptables_driver.c:ebiptablesWriteToTempFile() to
+ # write and run an ebtables script.
+ /var/lib/libvirt/virtd* ixr,
# force the use of virt-aa-helper
audit deny /sbin/apparmor_parser rwxl,
--
1.9.1
5
17
[libvirt] [PATCH] Call qemuDomainObjEndJob when qemuCaps is null during hotplug
by Shivaprasad G Bhat 25 May '16
by Shivaprasad G Bhat 25 May '16
25 May '16
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 249393a..3f26f1f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8237,7 +8237,7 @@ qemuDomainAttachDeviceFlags(virDomainPtr dom,
if (priv->qemuCaps)
qemuCaps = virObjectRef(priv->qemuCaps);
else if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, vm->def->emulator)))
- goto cleanup;
+ goto endjob;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
@@ -8490,7 +8490,7 @@ qemuDomainDetachDeviceFlags(virDomainPtr dom,
if (priv->qemuCaps)
qemuCaps = virObjectRef(priv->qemuCaps);
else if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, vm->def->emulator)))
- goto cleanup;
+ goto endjob;
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
/* Make a copy for updated domain. */
3
2
25 May '16
When reviewing libxl vif typename series[0] I found out a bug
on xen-xm formatter where this "virsh domxml-to-native xen-xm file.xml"
can lead to a NULL dereference if the disk driver isn't specified.
Fix this by checking for driver before writing/testing it down.
[0] https://www.redhat.com/archives/libvir-list/2016-April/msg01434.html
Signed-off-by: Joao Martins <joao.m.martins(a)oracle.com>
---
src/xenconfig/xen_xm.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c
index 34d57de..3658c59 100644
--- a/src/xenconfig/xen_xm.c
+++ b/src/xenconfig/xen_xm.c
@@ -297,9 +297,12 @@ xenFormatXMDisk(virConfValuePtr list,
type = "aio";
else
type = virStorageFileFormatTypeToString(format);
- virBufferAsprintf(&buf, "%s:", driver);
- if (STREQ(driver, "tap"))
- virBufferAsprintf(&buf, "%s:", type);
+
+ if (driver) {
+ virBufferAsprintf(&buf, "%s:", driver);
+ if (STREQ(driver, "tap"))
+ virBufferAsprintf(&buf, "%s:", type);
+ }
} else {
switch (virDomainDiskGetType(disk)) {
case VIR_STORAGE_TYPE_FILE:
--
2.1.4
2
2
25 May '16
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 807aaf8..41a0e4f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1164,7 +1164,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
unsigned int flags = 0;
if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0)
- return -1;
+ goto cleanup;
if (!cfg->relaxedACS)
flags |= VIR_HOSTDEV_STRICT_ACS_CHECK;
2
1
25 May '16
Changes from [v1]:
* fix all callers of virPCIGetPhysicalFunction()
* document virPCIGetPhysicalFunction()
[v1] https://www.redhat.com/archives/libvir-list/2016-May/msg01681.html
Andrea Bolognani (2):
Document virPCIGetPhysicalFunction() and fix its callers
conf: nodedev: Set PCI_PHYSICAL_FUNCTION flag more carefully
src/conf/node_device_conf.c | 4 ++--
src/node_device/node_device_linux_sysfs.c | 10 ++++++++--
src/util/virpci.c | 18 ++++++++++++++++--
3 files changed, 26 insertions(+), 6 deletions(-)
--
2.5.5
2
5
25 May '16
v1:
http://www.redhat.com/archives/libvir-list/2016-May/msg01611.html
Although initially ACK'd by Erik, Jan pointed out something with one
of the patches and well this just lagged on my todo list. Since then
a change was made to lxc_driver.c (commit id '306b3a850') which caused
a merge conflict.
So rather than push without checking first, I figure I'll make a v2.
Patch 1 was already ACK'd
Patch 2 is new to remove persistentAddrs from qemu
Patch 3 is altered... I think the return from virDomainObjListRemove
will cause the 'vm' to be NULL anyway; however, since the next
called API virDomainObjEndAPI checks for that - it seems that
making that call won't hurt. I also moved the check to after
endjob, so that some sort of "failure" and goto cleanup doesn't
unexpectedly remove a transient domain.
John Ferlan (3):
qemu: Remove dead code
qemu: Remove unused persistentAddrs
lxc: Fix lxcDomainDestroyFlags endjob processing
src/lxc/lxc_driver.c | 6 ++----
src/qemu/qemu_domain.h | 1 -
src/qemu/qemu_domain_address.c | 17 ++++-------------
src/qemu/qemu_process.c | 18 ++++++++----------
4 files changed, 14 insertions(+), 28 deletions(-)
--
2.5.5
3
7
25 May '16
Peter Krempa (7):
qemu: Move struct qemuDomainDiskInfo to qemu_domain.h
qemu: Extract more information about qemu drives
qemu: Move and rename qemuDomainCheckEjectableMedia to
qemuProcessRefreshDisks
qemu: process: Fix and improve disk data extraction
qemu: hotplug: Extract code for waiting for tray eject
qemu: hotplug: Fix error reported when cdrom tray is locked
qemu: hotplug: wait for the tray to eject only for drives with a tray
src/qemu/qemu_conf.h | 7 ---
src/qemu/qemu_domain.h | 13 ++++
src/qemu/qemu_hotplug.c | 141 ++++++++++++++++---------------------------
src/qemu/qemu_hotplug.h | 3 -
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_monitor.c | 18 ------
src/qemu/qemu_monitor.h | 3 -
src/qemu/qemu_monitor_json.c | 12 ++--
src/qemu/qemu_process.c | 58 +++++++++++++++++-
src/qemu/qemu_process.h | 5 ++
tests/qemumonitorjsontest.c | 25 +++++++-
11 files changed, 157 insertions(+), 130 deletions(-)
--
2.8.2
2
11
24 May '16
This patch follows the pattern used in qemu driver regarding
reference counting.
It changes lxcDomObjFromDomain() to ref the domain (using
virDomainObjListFindByUUIDRef()) and adds virDomainObjEndAPI() which
should be the only function in which the return value of
virObjectUnref() is checked. This makes all reference counting
deterministic and makes the code a bit clearer.
Signed-off-by: Katerina Koukiou <k.koukiou(a)gmail.com>
---
src/lxc/lxc_domain.c | 16 +---
src/lxc/lxc_domain.h | 5 +-
src/lxc/lxc_driver.c | 216 +++++++++++++++++++--------------------------------
3 files changed, 85 insertions(+), 152 deletions(-)
diff --git a/src/lxc/lxc_domain.c b/src/lxc/lxc_domain.c
index bca2bb2..6fd5423 100644
--- a/src/lxc/lxc_domain.c
+++ b/src/lxc/lxc_domain.c
@@ -80,7 +80,7 @@ virLXCDomainObjFreeJob(virLXCDomainObjPrivatePtr priv)
* in any way
*
* Upon successful return, the object will have its ref count increased,
- * successful calls must be followed by EndJob eventually
+ * Successful calls must be followed by EndJob eventually
*/
int
virLXCDomainObjBeginJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
@@ -95,8 +95,6 @@ virLXCDomainObjBeginJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
return -1;
then = now + LXC_JOB_WAIT_TIME;
- virObjectRef(obj);
-
while (priv->job.active) {
VIR_DEBUG("Wait normal job condition for starting job: %s",
virLXCDomainJobTypeToString(job));
@@ -126,23 +124,17 @@ virLXCDomainObjBeginJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
else
virReportSystemError(errno,
"%s", _("cannot acquire job mutex"));
-
- virObjectUnref(obj);
return -1;
}
/*
- * obj must be locked before calling
+ * obj must be locked and have a reference before calling
*
* To be called after completing the work associated with the
* earlier virLXCDomainBeginJob() call
- *
- * Returns true if the remaining reference count on obj is
- * non-zero, false if the reference count has dropped to zero
- * and obj is disposed.
*/
-bool
+void
virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
virDomainObjPtr obj)
{
@@ -154,8 +146,6 @@ virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
virLXCDomainObjResetJob(priv);
virCondSignal(&priv->job.cond);
-
- return virObjectUnref(obj);
}
diff --git a/src/lxc/lxc_domain.h b/src/lxc/lxc_domain.h
index e82c719..5c4f31e 100644
--- a/src/lxc/lxc_domain.h
+++ b/src/lxc/lxc_domain.h
@@ -102,10 +102,9 @@ virLXCDomainObjBeginJob(virLXCDriverPtr driver,
enum virLXCDomainJob job)
ATTRIBUTE_RETURN_CHECK;
-bool
+void
virLXCDomainObjEndJob(virLXCDriverPtr driver,
- virDomainObjPtr obj)
- ATTRIBUTE_RETURN_CHECK;
+ virDomainObjPtr obj);
#endif /* __LXC_DOMAIN_H__ */
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 143089d..4aef78d 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -126,11 +126,11 @@ static virNWFilterCallbackDriver lxcCallbackDriver = {
* lxcDomObjFromDomain:
* @domain: Domain pointer that has to be looked up
*
- * This function looks up @domain and returns the appropriate
- * virDomainObjPtr.
+ * This function looks up @domain and returns the appropriate virDomainObjPtr
+ * that has to be released by calling virDomainObjEndAPI.
*
- * Returns the domain object which is locked on success, NULL
- * otherwise.
+ * Returns the domain object with incremented reference counter which is locked
+ * on success, NULL otherwise.
*/
static virDomainObjPtr
lxcDomObjFromDomain(virDomainPtr domain)
@@ -139,7 +139,7 @@ lxcDomObjFromDomain(virDomainPtr domain)
virLXCDriverPtr driver = domain->conn->privateData;
char uuidstr[VIR_UUID_STRING_BUFLEN];
- vm = virDomainObjListFindByUUID(driver->domains, domain->uuid);
+ vm = virDomainObjListFindByUUIDRef(driver->domains, domain->uuid);
if (!vm) {
virUUIDFormat(domain->uuid, uuidstr);
virReportError(VIR_ERR_NO_DOMAIN,
@@ -283,7 +283,7 @@ static virDomainPtr lxcDomainLookupByUUID(virConnectPtr conn,
virDomainObjPtr vm;
virDomainPtr dom = NULL;
- vm = virDomainObjListFindByUUID(driver->domains, uuid);
+ vm = virDomainObjListFindByUUIDRef(driver->domains, uuid);
if (!vm) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
@@ -301,8 +301,7 @@ static virDomainPtr lxcDomainLookupByUUID(virConnectPtr conn,
dom->id = vm->def->id;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return dom;
}
@@ -347,8 +346,7 @@ static int lxcDomainIsActive(virDomainPtr dom)
ret = virDomainObjIsActive(obj);
cleanup:
- if (obj)
- virObjectUnlock(obj);
+ virDomainObjEndAPI(&obj);
return ret;
}
@@ -367,8 +365,7 @@ static int lxcDomainIsPersistent(virDomainPtr dom)
ret = obj->persistent;
cleanup:
- if (obj)
- virObjectUnlock(obj);
+ virDomainObjEndAPI(&obj);
return ret;
}
@@ -386,8 +383,7 @@ static int lxcDomainIsUpdated(virDomainPtr dom)
ret = obj->updated;
cleanup:
- if (obj)
- virObjectUnlock(obj);
+ virDomainObjEndAPI(&obj);
return ret;
}
@@ -492,13 +488,14 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
driver->xmlopt,
0, &oldDef)))
goto cleanup;
+
+ virObjectRef(vm);
def = NULL;
vm->persistent = 1;
if (virDomainSaveConfig(cfg->configDir, driver->caps,
vm->newDef ? vm->newDef : vm->def) < 0) {
virDomainObjListRemove(driver->domains, vm);
- vm = NULL;
goto cleanup;
}
@@ -515,8 +512,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
cleanup:
virDomainDefFree(def);
virDomainDefFree(oldDef);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
virObjectUnref(caps);
@@ -566,14 +562,12 @@ static int lxcDomainUndefineFlags(virDomainPtr dom,
vm->persistent = 0;
} else {
virDomainObjListRemove(driver->domains, vm);
- vm = NULL;
}
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
virObjectUnref(cfg);
@@ -628,8 +622,7 @@ static int lxcDomainGetInfo(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -654,8 +647,7 @@ lxcDomainGetState(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -674,8 +666,7 @@ static char *lxcDomainGetOSType(virDomainPtr dom)
goto cleanup;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -695,8 +686,7 @@ lxcDomainGetMaxMemory(virDomainPtr dom)
ret = virDomainDefGetMemoryActual(vm->def);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -790,12 +780,10 @@ static int lxcDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -940,12 +928,10 @@ lxcDomainSetMemoryParameters(virDomainPtr dom,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -1042,8 +1028,7 @@ lxcDomainGetMemoryParameters(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
return ret;
}
@@ -1069,8 +1054,7 @@ static char *lxcDomainGetXMLDesc(virDomainPtr dom,
virDomainDefFormatConvertXMLFlags(flags));
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -1166,12 +1150,10 @@ static int lxcDomainCreateWithFiles(virDomainPtr dom,
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
virObjectUnref(cfg);
@@ -1301,13 +1283,11 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
dom->id = vm->def->id;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
virDomainDefFree(def);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
virObjectUnref(caps);
@@ -1390,8 +1370,7 @@ static int lxcDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr secla
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -1568,12 +1547,10 @@ lxcDomainDestroyFlags(virDomainPtr dom,
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
return ret;
@@ -1907,8 +1884,7 @@ static char *lxcDomainGetSchedulerType(virDomainPtr dom,
ignore_value(VIR_STRDUP(ret, "posix"));
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -2089,13 +2065,11 @@ lxcDomainSetSchedulerParametersFlags(virDomainPtr dom,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
virDomainDefFree(vmdef);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -2206,8 +2180,7 @@ lxcDomainGetSchedulerParametersFlags(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
return ret;
}
@@ -2461,12 +2434,10 @@ lxcDomainBlockStats(virDomainPtr dom,
&stats->wr_req);
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -2594,12 +2565,10 @@ lxcDomainBlockStatsFlags(virDomainPtr dom,
*nparams = tmp;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -2809,12 +2778,10 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -3209,8 +3176,7 @@ lxcDomainGetBlkioParameters(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
return ret;
}
@@ -3258,12 +3224,10 @@ lxcDomainInterfaceStats(virDomainPtr dom,
_("Invalid path, '%s' is not a known interface"), path);
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
#else
@@ -3293,8 +3257,7 @@ static int lxcDomainGetAutostart(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -3365,13 +3328,12 @@ static int lxcDomainSetAutostart(virDomainPtr dom,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(cfg);
return ret;
}
@@ -3503,13 +3465,12 @@ static int lxcDomainSuspend(virDomainPtr dom)
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(cfg);
return ret;
}
@@ -3559,13 +3520,12 @@ static int lxcDomainResume(virDomainPtr dom)
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
if (event)
virObjectEventStateQueue(driver->domainEventState, event);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(cfg);
return ret;
}
@@ -3630,8 +3590,7 @@ lxcDomainOpenConsole(virDomainPtr dom,
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -3707,12 +3666,10 @@ lxcDomainSendProcessSignal(virDomainPtr dom,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -3814,12 +3771,10 @@ lxcDomainShutdownFlags(virDomainPtr dom,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -3899,12 +3854,10 @@ lxcDomainReboot(virDomainPtr dom,
ret = 0;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -5208,15 +5161,14 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
virDomainDefFree(vmdef);
if (dev != dev_copy)
virDomainDeviceDefFree(dev_copy);
virDomainDeviceDefFree(dev);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -5314,15 +5266,14 @@ static int lxcDomainUpdateDeviceFlags(virDomainPtr dom,
}
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
virDomainDefFree(vmdef);
if (dev != dev_copy)
virDomainDeviceDefFree(dev_copy);
virDomainDeviceDefFree(dev);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -5419,15 +5370,14 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
virDomainDefFree(vmdef);
if (dev != dev_copy)
virDomainDeviceDefFree(dev_copy);
virDomainDeviceDefFree(dev);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -5484,12 +5434,10 @@ static int lxcDomainLxcOpenNamespace(virDomainPtr dom,
ret = nfds;
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -5586,11 +5534,10 @@ lxcDomainMemoryStats(virDomainPtr dom,
}
endjob:
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
+
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -5738,12 +5685,10 @@ lxcDomainSetMetadata(virDomainPtr dom,
driver->xmlopt, cfg->stateDir,
cfg->configDir, flags);
- if (!virLXCDomainObjEndJob(driver, vm))
- vm = NULL;
+ virLXCDomainObjEndJob(driver, vm);
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
return ret;
@@ -5773,7 +5718,7 @@ lxcDomainGetMetadata(virDomainPtr dom,
ret = virDomainObjGetMetadata(vm, type, uri, caps, driver->xmlopt, flags);
cleanup:
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(caps);
return ret;
}
@@ -5820,7 +5765,7 @@ lxcDomainGetCPUStats(virDomainPtr dom,
ret = virCgroupGetPercpuStats(priv->cgroup, params,
nparams, start_cpu, ncpus, NULL);
cleanup:
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -5881,8 +5826,7 @@ lxcDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
ret = 0;
cleanup:
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
return ret;
}
--
2.7.4
2
1
[libvirt] [PATCH] lxc: use job functions in lxcDomainLxcOpenNamespace & lxcDomainSendProcessSignal
by Katerina Koukiou 24 May '16
by Katerina Koukiou 24 May '16
24 May '16
Use the recently added job functions in lxcDomainLxcOpenNamespace,
lxcDomainSendProcessSignal.
Signed-off-by: Katerina Koukiou <k.koukiou(a)gmail.com>
---
src/lxc/lxc_driver.c | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 7cdea2c..143089d 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3642,6 +3642,7 @@ lxcDomainSendProcessSignal(virDomainPtr dom,
unsigned int signum,
unsigned int flags)
{
+ virLXCDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm = NULL;
virLXCDomainObjPrivatePtr priv;
pid_t victim;
@@ -3664,10 +3665,13 @@ lxcDomainSendProcessSignal(virDomainPtr dom,
if (virDomainSendProcessSignalEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ if (virLXCDomainObjBeginJob(driver, vm, LXC_JOB_MODIFY) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("domain is not running"));
- goto cleanup;
+ goto endjob;
}
/*
@@ -3680,13 +3684,13 @@ lxcDomainSendProcessSignal(virDomainPtr dom,
if (pid_value != 1) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("Only the init process may be killed"));
- goto cleanup;
+ goto endjob;
}
if (!priv->initpid) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Init pid is not yet available"));
- goto cleanup;
+ goto endjob;
}
victim = priv->initpid;
@@ -3697,11 +3701,15 @@ lxcDomainSendProcessSignal(virDomainPtr dom,
virReportSystemError(errno,
_("Unable to send %d signal to process %d"),
signum, victim);
- goto cleanup;
+ goto endjob;
}
ret = 0;
+ endjob:
+ if (!virLXCDomainObjEndJob(driver, vm))
+ vm = NULL;
+
cleanup:
if (vm)
virObjectUnlock(vm);
@@ -5438,6 +5446,7 @@ static int lxcDomainLxcOpenNamespace(virDomainPtr dom,
int **fdlist,
unsigned int flags)
{
+ virLXCDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm;
virLXCDomainObjPrivatePtr priv;
int ret = -1;
@@ -5454,22 +5463,30 @@ static int lxcDomainLxcOpenNamespace(virDomainPtr dom,
if (virDomainLxcOpenNamespaceEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
+ if (virLXCDomainObjBeginJob(driver, vm, LXC_JOB_QUERY) < 0)
+ goto cleanup;
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("Domain is not running"));
- goto cleanup;
+ goto endjob;
}
if (!priv->initpid) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Init pid is not yet available"));
- goto cleanup;
+ goto endjob;
}
if (virProcessGetNamespaces(priv->initpid, &nfds, fdlist) < 0)
- goto cleanup;
+ goto endjob;
ret = nfds;
+
+ endjob:
+ if (!virLXCDomainObjEndJob(driver, vm))
+ vm = NULL;
+
cleanup:
if (vm)
virObjectUnlock(vm);
--
2.7.4
2
1
[libvirt] [PATCH v3 00/13] PCI Multifunction device hotplug support
by Shivaprasad G Bhat 24 May '16
by Shivaprasad G Bhat 24 May '16
24 May '16
V2 was posted here.
http://www.redhat.com/archives/libvir-list/2016-May/msg01384.html
Changes from V2:
-Squashed the original patch 1 with the patch which actually enables
multifunction hotplug as suggested.
-As suggested, introduced the virDomainDeviceDefParseMany for
parsing.
-Retained the patch which validates the function address before releasing. I
feel this should be retained as originally checks used to happen for slots.
-Changed the assign address logic to simply decrementally assign function
numbers to the devices in the list. The CONNECT_TYPE flags are yet to be
explored.
-Split the original patch 8 into multiple simpler patches for easier reading.
The original motivation was to help introduce test cases for multifunction
hotplug which is not possible for functions static in qemu_driver.c. So,
moved the functions to qemu_domain.c and qemu_hotplug.c. Hopefully, the
movements helps adding good number of test cases.
V1 was posted here.
http://www.redhat.com/archives/libvir-list/2016-May/msg01178.html
Changes from V1
Fixed couple of issues in address validation and assignment.
Added Rollback of the hotplug if anything fails in between.
Removed Patch 6 completely as it exposed way too many bugs. Changed the approach
a bit by introducing 2 new patches which take care of hostdevice preparation
and help reverting.
Todo:
1) Hardening the hotplug checks to disallow multifunction cards
hotplug as though they are single function cards.
2) Documentation update.
3) Test cases. This is easier now with the helper functions moved out of
qemu_driver.c
4) Should the events be delayed till all the functions are
hotplugged/unplugged? Something can fail and the revert may not be possible
Or the guest may refuse to free the device. If we show events
for those which got free, the rest of them may never be freed and also
that may not be usable by guest if the function 0 is not part of it. Need to
think more on this. Any suggestions ?
---
Shivaprasad G Bhat (13):
Release address in function granularity than slot
Validate address in virDomainPCIAddressReleaseAddr
Introduce PCI Multifunction device parser
Introduce virDomainPCIMultifunctionDeviceAddressAssign
Separate the hostdevice preparation and checks to a new funtion
Move the qemu[*]DomainDeviceConfig to qemu_domain.c
Move qemuDomain[*]Live functions to qemu_hotplug.c
Introduce qemuDomain*DeviceLiveInternal
Introduce qemuDomain*DeviceConfigInternal
Move the virDomainDefCompatibleDevice checks a level down
Move the detach of PCI device to the beginnging of live hotplug
Pass virDomainDeviceDefListPtr to hotplug functions
Enable PCI Multifunction hotplug/unplug
src/conf/domain_addr.c | 153 ++++++-
src/conf/domain_addr.h | 4
src/conf/domain_conf.c | 123 +++++-
src/conf/domain_conf.h | 19 +
src/libvirt_private.syms | 5
src/qemu/qemu_domain.c | 460 +++++++++++++++++++++
src/qemu/qemu_domain.h | 17 +
src/qemu/qemu_domain_address.c | 2
src/qemu/qemu_driver.c | 882 ++++++----------------------------------
src/qemu/qemu_hotplug.c | 625 ++++++++++++++++++++++++----
src/qemu/qemu_hotplug.h | 24 +
11 files changed, 1421 insertions(+), 893 deletions(-)
--
Signature
2
17
To get replies from qemu the tests/qemucapsprobe tool was used with following
QEMUs:
qemu-1.2.2 and qemu-1.3.1 on Fedora18
qemu-1.4.2 and qemu-1.5.3 on Fedora19
qemu-1.6.0 on Fedora20
qemu-2.1.1 on Fedora21
qemu-2.4.0 and qemu-2.5.0 on Fedora23
qemu-2.6.0 on Fedora24
To get as much as possible dependencies I've used "yum-builddeb qemu",
uninstalled "xen" packages and if it was missing installed "spice" packages.
Pavel Hrdina (10):
qemucapstest: update caps for qemu-1.2.2
qemucapstest: update caps for qemu-1.3.1
qemucapstest: update caps for qemu-1.4.2
qemucapstest: update caps for qemu-1.5.3
qemucapstest: update caps for qemu-1.6.0
qemucapstest: update caps for qemu-2.1.1
qemucapstest: update caps for qemu-2.4.0
qemucapstest: update caps for qemu-2.5.0
qemucapstest: update caps for qemu-2.6.0
qemucapstest: remove data for qemu-1.6.50
tests/domaincapsschemadata/qemu_1.6.0.x86_64.xml | 78 +
tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml | 78 -
tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml | 2 +-
tests/domaincapstest.c | 2 +-
.../qemucapabilitiesdata/caps_1.2.2.x86_64.replies | 3483 ++++++-------
tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml | 2 -
.../qemucapabilitiesdata/caps_1.3.1.x86_64.replies | 3943 ++++++++-------
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 5 +-
.../qemucapabilitiesdata/caps_1.4.2.x86_64.replies | 4050 +++++++--------
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 5 +-
.../qemucapabilitiesdata/caps_1.5.3.x86_64.replies | 5245 ++++++++++----------
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 4 +
.../qemucapabilitiesdata/caps_1.6.0.x86_64.replies | 5244 +++++++++----------
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 5 +-
.../caps_1.6.50.x86_64.replies | 2848 -----------
tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml | 199 -
.../qemucapabilitiesdata/caps_2.1.1.x86_64.replies | 665 +--
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 2 -
.../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 411 +-
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 1587 +++---
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 14 +-
.../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 1877 ++++---
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 33 +-
tests/qemucapabilitiestest.c | 1 -
25 files changed, 13934 insertions(+), 15850 deletions(-)
create mode 100644 tests/domaincapsschemadata/qemu_1.6.0.x86_64.xml
delete mode 100644 tests/domaincapsschemadata/qemu_1.6.50.x86_64.xml
delete mode 100644 tests/qemucapabilitiesdata/caps_1.6.50.x86_64.replies
delete mode 100644 tests/qemucapabilitiesdata/caps_1.6.50.x86_64.xml
--
2.8.2
2
21
Below is backtraces of two deadlocked threads:
thread #1:
virDomainConfVMNWFilterTeardown
virNWFilterTeardownFilter
lock updateMutex <------------
_virNWFilterTeardownFilter
try to lock interface <----------
thread #2:
learnIPAddressThread
lock interface <-------
virNWFilterInstantiateFilterLate
try to lock updateMutex <----------
The problem is fixed by unlocking interface before calling
virNWFilterInstantiateFilterLate to avoid updateMutex and interface ordering
deadlocks. Otherwise we are going to instantiate the filter while holding
interface lock, which will try to lock updateMutex, and if some other thread
instantiating a filter in parallel is holding updateMutex and is trying to
lock interface, both will deadlock.
Also it is safe to unlock interface before virNWFilterInstantiateFilterLate
because learnIPAddressThread stopped capturing packets and applied necessary
rules on the interface, while instantiating a new filter doesn't require a
locked interface.
Signed-off-by: Maxim Nestratov <mnestratov(a)virtuozzo.com>
---
src/nwfilter/nwfilter_learnipaddr.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 1adbadb..cfd92d9 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -611,6 +611,16 @@ learnIPAddressThread(void *arg)
sa.data.inet4.sin_addr.s_addr = vmaddr;
char *inetaddr;
+ /* It is necessary to unlock interface here to avoid updateMutex and
+ * interface ordering deadlocks. Otherwise we are going to
+ * instantiate the filter, which will try to lock updateMutex, and
+ * some other thread instantiating a filter in parallel is holding
+ * updateMutex and is trying to lock interface, both will deadlock.
+ * Also it is safe to unlock interface here because we stopped
+ * capturing and applied necessary rules on the interface, while
+ * instantiating a new filter doesn't require a locked interface.*/
+ virNWFilterUnlockIface(req->ifname);
+
if ((inetaddr = virSocketAddrFormat(&sa)) != NULL) {
if (virNWFilterIPAddrMapAddIPAddr(req->ifname, inetaddr) < 0) {
VIR_ERROR(_("Failed to add IP address %s to IP address "
@@ -636,11 +646,11 @@ learnIPAddressThread(void *arg)
req->ifname, req->ifindex);
techdriver->applyDropAllRules(req->ifname);
+ virNWFilterUnlockIface(req->ifname);
}
VIR_DEBUG("pcap thread terminating for interface %s", req->ifname);
- virNWFilterUnlockIface(req->ifname);
err_no_lock:
virNWFilterDeregisterLearnReq(req->ifindex);
--
2.4.3
5
10