[libvirt] [PATCH] test: update capability replies for qemu-2.7.0
by Pavel Hrdina
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
.../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 39 ++++++++++++++++------
1 file changed, 29 insertions(+), 10 deletions(-)
diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
index 7986dae..ce8dee9 100644
--- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
+++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
@@ -2,11 +2,11 @@
"QMP": {
"version": {
"qemu": {
- "micro": 91,
- "minor": 6,
+ "micro": 0,
+ "minor": 7,
"major": 2
},
- "package": " (v2.7.0-rc1-52-g42e0d60)"
+ "package": " (v2.7.0)"
},
"capabilities": [
]
@@ -22,11 +22,11 @@
{
"return": {
"qemu": {
- "micro": 91,
- "minor": 6,
+ "micro": 0,
+ "minor": 7,
"major": 2
},
- "package": " (v2.7.0-rc1-52-g42e0d60)"
+ "package": " (v2.7.0)"
},
"id": "libvirt-2"
}
@@ -466,7 +466,7 @@
{
"return": {
- "fd": 14,
+ "fd": 13,
"fdset-id": 0
},
"id": "libvirt-5"
@@ -696,6 +696,9 @@
"name": "container"
},
{
+ "name": "qio-channel-rdma"
+ },
+ {
"name": "host-x86_64-cpu"
},
{
@@ -1245,6 +1248,9 @@
"name": "nvdimm"
},
{
+ "name": "virtio-balloon-pci"
+ },
+ {
"name": "SandyBridge-x86_64-cpu"
},
{
@@ -1254,6 +1260,9 @@
"name": "virtio-balloon-device"
},
{
+ "name": "ccid-card-passthru"
+ },
+ {
"name": "qxl"
},
{
@@ -1335,7 +1344,7 @@
"name": "tls-creds-x509"
},
{
- "name": "virtio-balloon-pci"
+ "name": "ccid-card-emulated"
},
{
"name": "ISA"
@@ -3176,7 +3185,7 @@
"type": "bool"
},
{
- "name": "any_layout",
+ "name": "event_idx",
"description": "on/off",
"type": "bool"
},
@@ -3191,6 +3200,11 @@
"type": "bool"
},
{
+ "name": "stats",
+ "description": "on/off",
+ "type": "bool"
+ },
+ {
"name": "multifunction",
"description": "on/off",
"type": "bool"
@@ -3206,7 +3220,7 @@
"type": "bool"
},
{
- "name": "event_idx",
+ "name": "virgl",
"description": "on/off",
"type": "bool"
},
@@ -3248,6 +3262,11 @@
"type": "int32"
},
{
+ "name": "any_layout",
+ "description": "on/off",
+ "type": "bool"
+ },
+ {
"name": "max_outputs",
"type": "uint32"
},
--
2.10.0
8 years, 2 months
[libvirt] [PATCHv5 00/13] qemu: allow disabling certain virtio revisions
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1227354
v1: https://www.redhat.com/archives/libvir-list/2016-July/msg01235.html
v2: https://www.redhat.com/archives/libvir-list/2016-August/msg00412.html
* probe for the qemu capability
* add the attribute to virtio1-only devices such as virtio-gpu
and virtio-input devices
* allow multiple revisions to be specified
v3:
* touch up documentation
* rename the capability from "virtio-revision" to "virtio-disable-legacy"
* move the formatting in qemuBuildNicDevStr after the address
and only do it for virtio
* get rid of novelty enum names
v4:
* only probe the capability for PCI devices
v5:
* instead of a separate element, use one attribute under the driver
element
Ján Tomko (13):
Use a separate buffer for <input> subelements
Use a separate buffer for <disk><driver>
Use a separate buffer for <controller><driver>
Use a separate buffer for <filesystem><driver>
Add compatibility attribute to memballoon
Add compatibility attribute to disks
Add compatibility attribute to controllers
Add compatibility attribute to filesystems
Add compatibility attribute to interfaces
Add compatibility attribute to rng devices
Add compatibility attribute to video
Add compatibility attribute to input devices
qemu: format options for enforcing virtio revisions
docs/formatdomain.html.in | 60 +++++-
docs/schemas/domaincommon.rng | 42 ++++
src/conf/domain_conf.c | 220 +++++++++++++++------
src/conf/domain_conf.h | 17 ++
src/qemu/qemu_command.c | 70 +++++++
.../qemuxml2argv-virtio-revision.args | 62 ++++++
.../qemuxml2argv-virtio-revision.xml | 109 ++++++++++
tests/qemuxml2argvtest.c | 11 ++
.../qemuxml2xmlout-virtio-revision.xml | 108 ++++++++++
tests/qemuxml2xmltest.c | 2 +
10 files changed, 641 insertions(+), 60 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-revision.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-revision.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-virtio-revision.xml
--
2.7.3
8 years, 2 months
[libvirt] [PATCH] qemu_process: fix a typo
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
s/unitl/until
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/qemu/qemu_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index cecd321..1f56883 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1678,7 +1678,7 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob,
}
/* Hold an extra reference because we can't allow 'vm' to be
- * deleted unitl the monitor gets its own reference. */
+ * deleted until the monitor gets its own reference. */
virObjectRef(vm);
ignore_value(virTimeMillisNow(&priv->monStart));
--
1.8.3.1
8 years, 2 months
[libvirt] [PATCH] tests: fix use of fixedcontent variable
by Laine Stump
Commit 8563560026d192c2cf047b550ffd468692245ed6 switched from
hardcoded use of strcontent to hardcoded use of fixedcontent
(fixedcontent is *sometimes* a copy of strcontent with a \n
appended). This was a problem because sometimes fixedcontent is *not*
a copy of strcontent, but is instead NULL, leading to the regenerated
test case output being a 0 length file.
This patch creates a new const char *cmpcontent initialized to
strcontent, but changed to fixedcontent if/when fixedcontent is
created, then always uses cmpcontent instead of (str|fixed)content.
---
tests/testutils.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/testutils.c b/tests/testutils.c
index f87628e..c934785 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -694,6 +694,7 @@ virTestCompareToFile(const char *strcontent,
int ret = -1;
char *filecontent = NULL;
char *fixedcontent = NULL;
+ const char *cmpcontent = strcontent;
if (virTestLoadFile(filename, &filecontent) < 0 && !virTestGetRegenerate())
goto failure;
@@ -703,13 +704,13 @@ virTestCompareToFile(const char *strcontent,
strcontent[strlen(strcontent) - 1] != '\n') {
if (virAsprintf(&fixedcontent, "%s\n", strcontent) < 0)
goto failure;
+ cmpcontent = fixedcontent;
}
- if (STRNEQ_NULLABLE(fixedcontent ? fixedcontent : strcontent,
- filecontent)) {
+ if (STRNEQ_NULLABLE(cmpcontent, filecontent)) {
virTestDifferenceFull(stderr,
filecontent, filename,
- fixedcontent, NULL);
+ cmpcontent, NULL);
goto failure;
}
--
2.7.4
8 years, 2 months
[libvirt] [PATCH 0/2] Rawhide fix for major() in sys/types.h
by Eric Blake
Now that autoconf and gnulib have worked around the glibc 2.25
issue, we don't need our hack any more. I'll probably push in
24 hours under the gnulib-maintenance rule, if I don't get a
review first.
Eric Blake (2):
build: update to latest gnulib
Revert "configure: Check for major() more strictly"
.gnulib | 2 +-
configure.ac | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
--
2.7.4
8 years, 2 months
[libvirt] [python PATCH] override: Properly override wrapper for virDomainGetGuestVcpus
by Peter Krempa
Without the change to libvirt-override-api.xml generator.py would
generate the following function header:
def guestVcpus(self, params, nparams, flags=0):
Since @params and @nparams are output-only in C and the python C
implementation actualy creates a dict from them we should not need to
pass them. Add the API definition to drop the two unnecessary args:
def guestVcpus(self, flags=0):
The code did not work at all until this change as the C impl expects
only two arguments but the python required use of four.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1377071
---
libvirt-override-api.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml
index 49de122..50250bc 100644
--- a/libvirt-override-api.xml
+++ b/libvirt-override-api.xml
@@ -698,5 +698,11 @@
<arg name='flags' type='unsigned int' info='extra flags; not used yet, so callers should always pass 0'/>
<return type='char *' info="dictionary of domain interfaces along with their MAC and IP addresses"/>
</function>
+ <function name='virDomainGetGuestVcpus' file='python'>
+ <info>returns a dictionary containing information regarding guest vcpus</info>
+ <arg name='dom' type='virDomainPtr' info='pointer to the domain'/>
+ <arg name='flags' type='unsigned int' info='extra flags; not used yet, so callers should always pass 0'/>
+ <return type='int' info="dictionary of vcpu data returned by the guest agent"/>
+ </function>
</symbols>
</api>
--
2.10.0
8 years, 2 months
[libvirt] [PATCH 0/2] Fix a migration crasher
by Michal Privoznik
So I've tried to migrate a guest recently (to answer a needinfo
for some bug of mine). Meanwhile, I've ran into many problems and
bugs we have (apparently nobody tried migrations lately). Here's
the first round of patches.
Second round will require proper deep copy function for
virDomainDef struct.
Michal Privoznik (2):
qemuBuildMemoryBackendStr: Don't crash if no hugetlbfs is mounted
qemu: Introduce qemuGetHupageMemPath
src/qemu/qemu_command.c | 57 +++++--------------------------------------------
src/qemu/qemu_conf.c | 50 +++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_conf.h | 4 ++++
3 files changed, 59 insertions(+), 52 deletions(-)
--
2.8.4
8 years, 2 months
[libvirt] [PATCH] qemu_agent|monitor: use different log on hangup event
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Both qemu monitor and agent print the same
log on HUANGUP event, which woud be confused
when reading libvirtd log.
This patch will give a different log for them.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/qemu/qemu_agent.c | 2 +-
src/qemu/qemu_monitor.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index eeede6b..babd8f2 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -633,7 +633,7 @@ qemuAgentIO(int watch, int fd, int events, void *opaque)
if (!error &&
events & VIR_EVENT_HANDLE_HANGUP) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from monitor"));
+ _("End of file from agent monitor"));
eof = true;
events &= ~VIR_EVENT_HANDLE_HANGUP;
}
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 4171914..d92a359 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -692,7 +692,7 @@ qemuMonitorIO(int watch, int fd, int events, void *opaque)
hangup = true;
if (!error) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from monitor"));
+ _("End of file from qemu monitor"));
eof = true;
events &= ~VIR_EVENT_HANDLE_HANGUP;
}
--
1.8.3.1
8 years, 2 months
[libvirt] [PATCH] docs: expand docs on user x509 cert locations
by Daniel P. Berrange
The layout in $HOME/.pki is different from that in /etc/pki
but we never tell anyone about this trap. Add docs showing
the required $HOME/.pki layout.
---
docs/remote.html.in | 41 ++++++++++++++++++++++++++++++++++-------
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git a/docs/remote.html.in b/docs/remote.html.in
index 9b132f1..4c3012f 100644
--- a/docs/remote.html.in
+++ b/docs/remote.html.in
@@ -419,13 +419,21 @@ next section.
<td>
<code>/etc/pki/CA/cacert.pem</code>
</td>
- <td> Installed on all clients and servers </td>
+ <td> Installed on the client and server </td>
<td> CA's certificate (<a href="#Remote_TLS_CA">more info</a>)</td>
<td> n/a </td>
</tr>
<tr>
<td>
- <code>/etc/pki/libvirt/ private/serverkey.pem</code>
+ <code>$HOME/.pki/cacert.pem</code>
+ </td>
+ <td> Installed on the client </td>
+ <td> CA's certificate (<a href="#Remote_TLS_CA">more info</a>)</td>
+ <td> n/a </td>
+ </tr>
+ <tr>
+ <td>
+ <code>/etc/pki/libvirt/private/serverkey.pem</code>
</td>
<td> Installed on the server </td>
<td> Server's private key (<a href="#Remote_TLS_server_certificates">more info</a>)</td>
@@ -433,7 +441,7 @@ next section.
</tr>
<tr>
<td>
- <code>/etc/pki/libvirt/ servercert.pem</code>
+ <code>/etc/pki/libvirt/servercert.pem</code>
</td>
<td> Installed on the server </td>
<td> Server's certificate signed by the CA.
@@ -443,7 +451,26 @@ next section.
</tr>
<tr>
<td>
- <code>/etc/pki/libvirt/ private/clientkey.pem</code>
+ <code>/etc/pki/libvirt/private/clientkey.pem</code>
+ </td>
+ <td> Installed on the client </td>
+ <td> Client's private key. (<a href="#Remote_TLS_client_certificates">more info</a>) </td>
+ <td> n/a </td>
+ </tr>
+ <tr>
+ <td>
+ <code>/etc/pki/libvirt/clientcert.pem</code>
+ </td>
+ <td> Installed on the client </td>
+ <td> Client's certificate signed by the CA
+ (<a href="#Remote_TLS_client_certificates">more info</a>) </td>
+ <td> Distinguished Name (DN) can be checked against an access
+ control list (<code>tls_allowed_dn_list</code>).
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <code>$HOME/.pki/libvirt/clientkey.pem</code>
</td>
<td> Installed on the client </td>
<td> Client's private key. (<a href="#Remote_TLS_client_certificates">more info</a>) </td>
@@ -451,7 +478,7 @@ next section.
</tr>
<tr>
<td>
- <code>/etc/pki/libvirt/ clientcert.pem</code>
+ <code>$HOME/.pki/libvirt/clientcert.pem</code>
</td>
<td> Installed on the client </td>
<td> Client's certificate signed by the CA
@@ -469,7 +496,7 @@ next section.
</p>
<ul>
<li> For a non-root user, libvirt tries to find the certificates
- in $HOME/.pki/libvirt. If the required CA certificate cannot
+ in $HOME/.pki/libvirt first. If the required CA certificate cannot
be found, then the global default location
(/etc/pki/CA/cacert.pem) will be used.
Likewise, if either the client certificate
@@ -477,7 +504,7 @@ next section.
locations (/etc/pki/libvirt/clientcert.pem,
/etc/pki/libvirt/private/clientkey.pem) will be used.
</li>
- <li> For the root user, the global default locations will be used.</li>
+ <li> For the root user, the global default locations will always be used.</li>
</ul>
<h4>
<a name="Remote_TLS_background">Background to TLS certificates</a>
--
2.7.4
8 years, 2 months
[libvirt] [PATCH 00/20] 20 crazy IVSHMEM patches you won't believe compile
by Martin Kletzander
Let's see if the subject works if one is in need of reviews =)
Yet another qemu device, right? We even have an existing device for
that, right? That should be pretty straight-forward and easy, right?
Well, let's see... I, at least, tried splitting the patches for you
to be as easy to review as possible.
Just in case you're trying out the hot-(un)plug on an upstream QEMU,
make sure you do it on i440fx machine, not on q35 one, otherwise it
will not work nicely (or rather at all).
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1347049
Martin Kletzander (20):
qemuhotplugtest: Only read result_filename if used
schema: Allow shmem to have alias
conf: Allow copying of shmem defs
conf: Add support for shmem model
conf: Add support for shmem role
qemu: Add support for shmem role
qemu: Add newer shmem models
qemu: Add capabilities for ivshmem-{plain,doorbell}
qemu: Save various defaults for shmem
qemu: Disable migration for shmem with peer role
qemu: Make qemuBuildShmemDevStr static
qemu: Rename qemuBuildShmemDevStr to qemuBuildShmemDevLegacyStr
qemu: Move common checks outside qemuBuildShmemDevLegacyStr
qemu: Reorder shmem params nicely
qemu: Abstract shmem socket path preparation
qemu: Rename qemuBuildShmemBackendStr to qemuBuildShmemBackendChrStr
qemu: Support newer ivshmem device variants
qemu: Add qemuAssignDeviceShmemAlias and use it
conf: Add some shmem helpers for future use
qemu: Add support for hot/cold-(un)plug of shmem devices
docs/formatdomain.html.in | 10 +-
docs/schemas/domaincommon.rng | 22 ++
src/conf/domain_conf.c | 154 ++++++++++++-
src/conf/domain_conf.h | 30 +++
src/libvirt_private.syms | 9 +
src/qemu/qemu_alias.c | 32 ++-
src/qemu/qemu_alias.h | 4 +
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 245 ++++++++++++++++----
src/qemu/qemu_command.h | 14 +-
src/qemu/qemu_domain.c | 46 ++++
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 39 +++-
src/qemu/qemu_hotplug.c | 247 ++++++++++++++++++++-
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_migration.c | 13 ++
.../caps_2.6.0-gicv2.aarch64.xml | 2 +
.../caps_2.6.0-gicv3.aarch64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 2 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 2 +
tests/qemuhotplugtest.c | 23 +-
.../qemuhotplug-ivshmem-doorbell-detach.xml | 7 +
.../qemuhotplug-ivshmem-doorbell.xml | 4 +
.../qemuhotplug-ivshmem-plain-detach.xml | 6 +
.../qemuhotplug-ivshmem-plain.xml | 3 +
...muhotplug-base-live+ivshmem-doorbell-detach.xml | 1 +
.../qemuhotplug-base-live+ivshmem-doorbell.xml | 65 ++++++
.../qemuhotplug-base-live+ivshmem-plain-detach.xml | 1 +
.../qemuhotplug-base-live+ivshmem-plain.xml | 58 +++++
.../qemuxml2argv-shmem-plain-doorbell.args | 46 ++++
...m.xml => qemuxml2argv-shmem-plain-doorbell.xml} | 15 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 16 +-
tests/qemuxml2argvdata/qemuxml2argv-shmem.xml | 6 +-
tests/qemuxml2argvtest.c | 3 +
...xml => qemuxml2xmlout-shmem-plain-doorbell.xml} | 24 +-
tests/qemuxml2xmloutdata/qemuxml2xmlout-shmem.xml | 15 +-
tests/qemuxml2xmltest.c | 2 +
39 files changed, 1092 insertions(+), 93 deletions(-)
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain.xml
create mode 120000 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell-detach.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
create mode 120000 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain-detach.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args
copy tests/qemuxml2argvdata/{qemuxml2argv-shmem.xml => qemuxml2argv-shmem-plain-doorbell.xml} (78%)
copy tests/qemuxml2xmloutdata/{qemuxml2xmlout-shmem.xml => qemuxml2xmlout-shmem-plain-doorbell.xml} (78%)
--
2.10.0
8 years, 2 months