[libvirt] [PATCH] Add missing 'extern' for VIR_EXPORT_VAR macro
by Daniel P. Berrange
The recent update to gnulib
commit 9d7a37ecb2ab516c19164a57b8aeb32016a99d2c
Author: Eric Blake <eblake(a)redhat.com>
Date: Thu Sep 15 15:12:52 2016 -0500
build: update to latest gnulib
Pulled in a change that adds -fno-common to the default compiler
flags
commit bf8e658ffadb95d444f56d222d04c9af955af765
Author: Jim Meyering <meyering(a)fb.com>
Date: Fri Sep 2 09:16:16 2016 -0700
manywarnings: add -fno-common
This caused libvirt Mingw build to break with the compiler
reporting 100's of definitions of virConnectAuthPtrDefault
./.libs/libvirt_util.a(libvirt_util_la-virarch.o):virarch.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):viralloc.c:(.bss+0x0): first defined here
./.libs/libvirt_util.a(libvirt_util_la-viratomic.o):viratomic.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):/home/berrange/src/virt/libvirt/src/util/viralloc.c:87: first defined here
./.libs/libvirt_util.a(libvirt_util_la-viraudit.o):viraudit.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):/home/berrange/src/virt/libvirt/src/util/viralloc.c:87: first defined here
./.libs/libvirt_util.a(libvirt_util_la-virauth.o):virauth.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):/home/berrange/src/virt/libvirt/src/util/viralloc.c:87: first defined here
./.libs/libvirt_util.a(libvirt_util_la-virauthconfig.o):virauthconfig.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
...snip...
The cause is our VIR_EXPORT_VAR macro which has some
magic on win to add dllexport/dllimport to the variable
declaration. Unfortunately the dllexport branch missed
off the 'extern' keyword, so the header file was in
fact declaring an instance of the variable in every
source file.
Previously the linker would merge all these definitions
into one, but that no longer happens due to -fno-common
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushing as a CI build fix
include/libvirt/libvirt-common.h.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libvirt/libvirt-common.h.in b/include/libvirt/libvirt-common.h.in
index 79bfe90..0e8ada4 100644
--- a/include/libvirt/libvirt-common.h.in
+++ b/include/libvirt/libvirt-common.h.in
@@ -49,7 +49,7 @@ extern "C" {
# define VIR_EXPORT_VAR extern
# else
# ifdef IN_LIBVIRT
-# define VIR_EXPORT_VAR __declspec(dllexport)
+# define VIR_EXPORT_VAR __declspec(dllexport) extern
# else
# define VIR_EXPORT_VAR __declspec(dllimport) extern
# endif
--
2.7.4
8 years, 7 months
[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, 7 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, 7 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, 7 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, 7 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, 7 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, 7 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, 7 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, 7 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, 7 months