[libvirt] [PATCH] Update my email address in AUTHORS.in
by Claudio Bley
---
pushed under the trivial rule.
AUTHORS.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/AUTHORS.in b/AUTHORS.in
index 3c783f7..329924f 100644
--- a/AUTHORS.in
+++ b/AUTHORS.in
@@ -10,7 +10,7 @@ The primary maintainers and people with commit access rights:
Alex Jia <ajia(a)redhat.com>
Cédric Bosdonnat <cbosdonnat(a)suse.com>
Christophe Fergeau <cfergeau(a)redhat.com>
-Claudio Bley <cbley(a)av-test.de>
+Claudio Bley <claudio.bley(a)gmail.com>
Cole Robinson <crobinso(a)redhat.com>
Daniel Berrange <berrange(a)redhat.com>
Daniel Veillard <veillard(a)redhat.com>
--
2.2.1
9 years, 11 months
[libvirt] [PATCH] maint: update .mailmap
by Claudio Bley
Add an email alias after updating my email address in commit 738a2ae.
---
Pushed under the trivial rule.
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 826c63c..84a6dbe 100644
--- a/.mailmap
+++ b/.mailmap
@@ -5,6 +5,7 @@
<bozzolan(a)gmail.com> <redshift(a)gmx.com>
<charles_duffy(a)messageone.com> <charles(a)dyfis.net>
+<claudio.bley(a)gmail.com> <cbley(a)av-test.de>
<dfj(a)redhat.com> <dfj(a)dfj.bne.redhat.com>
<eblake(a)redhat.com> <ebb9(a)byu.net>
<gdolley(a)arpnetworks.com> <gdolley(a)ucla.edu>
--
2.2.1
9 years, 11 months
[libvirt] [PATCH] Fix typo s/interpetation/interpretation/
by Claudio Bley
Fix the typo in struct virSecurityModel's comment for its doi field.
---
Pushed under the trivial rule.
include/libvirt/libvirt-host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h
index 0704672..f760a55 100644
--- a/include/libvirt/libvirt-host.h
+++ b/include/libvirt/libvirt-host.h
@@ -148,7 +148,7 @@ typedef struct _virSecurityModel virSecurityModel;
struct _virSecurityModel {
char model[VIR_SECURITY_MODEL_BUFLEN]; /* security model string */
- char doi[VIR_SECURITY_DOI_BUFLEN]; /* domain of interpetation */
+ char doi[VIR_SECURITY_DOI_BUFLEN]; /* domain of interpretation */
};
/**
--
2.2.1
9 years, 11 months
[libvirt] [PATCH 2/2] lxc: Don't crash on NULL ifname_guest_actual
by Guido Günther
Reported and patch provided by Bastian Blank at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769600
---
src/lxc/lxc_container.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 1b9e2f2..f986f71 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -472,7 +472,7 @@ lxcContainerGetNetDef(virDomainDefPtr vmDef, const char *devName)
for (i = 0; i < vmDef->nnets; i++) {
netDef = vmDef->nets[i];
- if (STREQ(netDef->ifname_guest_actual, devName))
+ if (netDef->ifname_guest_actual && STREQ(netDef->ifname_guest_actual, devName))
return netDef;
}
--
2.1.3
9 years, 11 months
[libvirt] [PATCH] util: Fix possible NULL dereference
by Martin Kletzander
Commit 1a80b97d, which added the virCgroupHasEmptyTasks() function
forgot that the parameter @cgroup may be NULL and did not check that.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/util/vircgroup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 4857ef3..64bc647 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3932,6 +3932,9 @@ virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller)
int ret = -1;
char *content = NULL;
+ if (!cgroup)
+ return -1;
+
ret = virCgroupGetValueStr(cgroup, controller, "tasks", &content);
if (ret == 0 && content[0] == '\0')
--
2.2.1
9 years, 11 months
[libvirt] [PATCH] docs: split typedef and struct definition for apibuild.py
by Claudio Bley
The members of struct virSecurityLabel[1] and struct
virSecurityModel[2] were not shown in the libvirt API docs because the
corresponding <field> elements were missing from the libvirt-api.xml.
The reason is that apibuild.py does not cope well with typedef's using
inline struct definitions. It fails to associate any info about the
struct with the typedef and consequently cannot write out the members
of the struct.
Splitting the typedef and the struct definition into seperate
statements as it is done for other structs works around this problem.
[1]: http://libvirt.org/html/libvirt-libvirt-host.html#virSecurityLabel
[2]: http://libvirt.org/html/libvirt-libvirt-host.html#virSecurityModel
---
Seems I had to run "make" twice inside the docs folder before the changes
were picked up.
Besides, my email address has changed. If this this patch gets ACKed,
I'd also adjust the AUTHORS file in a separate trivial patch.
include/libvirt/libvirt-host.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h
index 53b529f..0704672 100644
--- a/include/libvirt/libvirt-host.h
+++ b/include/libvirt/libvirt-host.h
@@ -108,12 +108,13 @@ typedef virStream *virStreamPtr;
* a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(),
* providing the security label and associated attributes for the specified
* domain.
- *
*/
-typedef struct _virSecurityLabel {
+typedef struct _virSecurityLabel virSecurityLabel;
+
+struct _virSecurityLabel {
char label[VIR_SECURITY_LABEL_BUFLEN]; /* security label string */
int enforcing; /* 1 if security policy is being enforced for domain */
-} virSecurityLabel;
+};
/**
* virSecurityLabelPtr:
@@ -142,12 +143,13 @@ typedef virSecurityLabel *virSecurityLabelPtr;
* a virSecurityModel is a structure filled by virNodeGetSecurityModel(),
* providing the per-hypervisor security model and DOI attributes for the
* specified domain.
- *
*/
-typedef struct _virSecurityModel {
+typedef struct _virSecurityModel virSecurityModel;
+
+struct _virSecurityModel {
char model[VIR_SECURITY_MODEL_BUFLEN]; /* security model string */
char doi[VIR_SECURITY_DOI_BUFLEN]; /* domain of interpetation */
-} virSecurityModel;
+};
/**
* virSecurityModelPtr:
--
2.2.0
9 years, 11 months
[libvirt] [PATCH] Drop hle feature for Haswell CPUs
by Guido Günther
The intel-microcode 3.20140913.1 update disables TSX-NI (transactional
memory instructions). When a server running libvirt is rebooted with
this update, libvirt no longer considers the machine to have a Haswell
CPU:
# virsh capabilities | grep -A1 '<arch>x86_64'
<arch>x86_64</arch>
<model>SandyBridge</model>
Since Intel disables the feature on their CPUs we shouldn't check for it
as well to keep VMs using Haswell working.
This was debugged and reported by Chris Boot at
http://bugs.debian.org/773189
---
src/cpu/cpu_map.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/cpu/cpu_map.xml b/src/cpu/cpu_map.xml
index bd9b056..f41dbce 100644
--- a/src/cpu/cpu_map.xml
+++ b/src/cpu/cpu_map.xml
@@ -507,7 +507,6 @@
<feature name='movbe'/>
<feature name='fsgsbase'/>
<feature name='bmi1'/>
- <feature name='hle'/>
<feature name='avx2'/>
<feature name='smep'/>
<feature name='bmi2'/>
--
2.1.3
9 years, 11 months
[libvirt] [PATCH] virsh: add transient interfaces check for iface-unbridge
by Lin Ma
iface-unbridge(netcf interface backend) checks multiple interfaces
attaching based on static configuration.
If guests interfaces(says tun/tap devices) are attaching to the bridge,
iface-unbridge doesn't check them, It causes the bridge is removed
although it's in use by other guests.
Please refer to:
https://bugzilla.suse.com/show_bug.cgi?id=813117
Signed-off-by: Lin Ma <lma(a)suse.com>
---
tools/virsh-interface.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c
index 5f848b6..63ba5bb 100644
--- a/tools/virsh-interface.c
+++ b/tools/virsh-interface.c
@@ -1040,11 +1040,11 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
const char *br_name;
char *if_type = NULL, *if_name = NULL;
bool nostart = false;
- char *br_xml = NULL;
+ char *br_xml = NULL, *br_xml_transient_if = NULL;
xmlChar *if_xml = NULL;
int if_xml_size;
- xmlDocPtr xml_doc = NULL;
- xmlXPathContextPtr ctxt = NULL;
+ xmlDocPtr xml_doc = NULL, xml_doc_transient_if = NULL;
+ xmlXPathContextPtr ctxt = NULL, ctxt_transient_if = NULL;
xmlNodePtr top_node, if_node, cur;
/* Get a handle to the original device */
@@ -1103,6 +1103,21 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
}
+ /* verify whether there is any transient interface attached to bridge. */
+ if (!(br_xml_transient_if = virInterfaceGetXMLDesc(br_handle, 0)))
+ goto cleanup;
+ if (!(xml_doc_transient_if = virXMLParseStringCtxt(br_xml_transient_if,
+ _("(bridge interface definition)"),
+ &ctxt_transient_if))) {
+ vshError(ctl, _("Failed to parse configuration of %s"), br_name);
+ goto cleanup;
+ }
+
+ if (virXPathNode("./bridge/interface[2]", ctxt_transient_if) != NULL) {
+ vshError(ctl, "%s", _("The bridge is in use by transient interfaces"));
+ goto cleanup;
+ }
+
/* Change the type and name of the outer/master interface to
* the type/name of the attached slave interface.
*/
@@ -1198,10 +1213,13 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
virInterfaceFree(br_handle);
VIR_FREE(if_xml);
VIR_FREE(br_xml);
+ VIR_FREE(br_xml_transient_if);
VIR_FREE(if_type);
VIR_FREE(if_name);
xmlXPathFreeContext(ctxt);
+ xmlXPathFreeContext(ctxt_transient_if);
xmlFreeDoc(xml_doc);
+ xmlFreeDoc(xml_doc_transient_if);
return ret;
}
--
1.8.4
9 years, 11 months
[libvirt] virSecurityLabel
by Claudio Bley
Hi.
Looking at the API docs, the virSecurityLabel is one of the
undisclosed structs, making its members not publicly available.
Is this a mistake? It seems the a virSecurityLabel or
virSecurityLabelPtr retrieved by the virDomainGetSecurityLabel
et. al. would be rather useless without being able to inspect the
contents of the returned struct. Especially since the docs mention
something about a 'label' field.
Thanks.
--
Claudio
9 years, 11 months
[libvirt] [PATCH] disable vCPU pinning with TCG mode
by Daniel P. Berrange
Although QMP returns info about vCPU threads in TCG mode, the
data it returns is mostly lies. Only the first vCPU has a valid
thread_id returned. The thread_id given for the other vCPUs is
in fact the main emulator thread. All vCPUs actually run under
the same thread in TCG mode.
Our vCPU pinning code is not at all able to cope with this
so if you try to set CPU affinity per-vCPU you end up with
wierd errors
error: Failed to start domain instance-00000007
error: cannot set CPU affinity on process 24365: Invalid argument
Since few people will care about the performance of TCG with
strict CPU pinning, lets just disable that for now, so we get
a clear error message
error: Failed to start domain instance-00000007
error: Requested operation is not valid: cpu affinity is not supported
---
src/qemu/qemu_process.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index b067f18..e2ccc4e 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2231,6 +2231,40 @@ qemuProcessDetectVcpuPIDs(virQEMUDriverPtr driver,
int ncpupids;
qemuDomainObjPrivatePtr priv = vm->privateData;
+ /*
+ * Current QEMU *can* report info about host threads mapped
+ * to vCPUs, but it is not in a manner we can correctly
+ * deal with. The TCG CPU emulation does have a separate vCPU
+ * thread, but it runs every vCPU in that same thread. So it
+ * is impossible to setup different affinity per thread.
+ *
+ * What's more the 'query-cpus' command returns bizarre
+ * data for the threads. It gives the TCG thread for the
+ * vCPU 0, but for vCPUs 1-> N, it actually replies with
+ * the main process thread ID.
+ *
+ * The result is that when we try to set affinity for
+ * vCPU 1, it will actually change the affinity of the
+ * emulator thread :-( When you try to set affinity for
+ * vCPUs 2, 3.... it will fail if the affinity was
+ * different from vCPU 1.
+ *
+ * We *could* allow vcpu pinning with TCG, if we made the
+ * restriction that all vCPUs had the same mask. This would
+ * at least let us separate emulator from vCPUs threads, as
+ * we do for KVM. It would need some changes to our cgroups
+ * CPU layout though, and error reporting for the config
+ * restrictions.
+ *
+ * Just disable CPU pinning with TCG until someone wants
+ * to try to do this hard work.
+ */
+ if (vm->def->virtType == VIR_DOMAIN_VIRT_QEMU) {
+ priv->nvcpupids = 0;
+ priv->vcpupids = NULL;
+ return 0;
+ }
+
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
return -1;
/* failure to get the VCPU<-> PID mapping or to execute the query
--
2.1.0
9 years, 11 months