[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
Needed to silence a valgrind detection of uninitialized memory:
https://bugzilla.redhat.com/show_bug.cgi?id=1174147
* .gnulib: Update to latest.
* bootstrap: Resync to gnulib.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I've missed RC1, so I'll wait for a review on this one (are we sure
that RC2 will be enough time to ensure the gnulib update doesn't
cause regressions, basically).
.gnulib | 2 +-
bootstrap | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.gnulib b/.gnulib
index c27f1a3..8be5f2c 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit c27f1a356f2f321daa7f971ef276a1dbfa873bf8
+Subproject commit 8be5f2c10eeb05e52cc4a33cdcd37078742ff5db
diff --git a/bootstrap b/bootstrap
index 2fdf267..e72894c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -915,7 +915,8 @@ if test $use_libtool = 1; then
esac
fi
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
-$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
+$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+ || die "gnulib-tool failed"
for file in $gnulib_files; do
symlink_to_dir "$GNULIB_SRCDIR" $file \
--
2.1.0
9 years, 8 months
[libvirt] [PATCH] Fix common misspellings
by Martin Kletzander
Wikipedia's list of common misspellings [1] has a machine-readable
version. This patch fixes those misspellings mentioned in the list
which don't have multiple right variants (as e.g. "accension", which can
be both "accession" and "ascension"), such misspellings are left
untouched. The list of changes was manually re-checked for false
positives.
[1] https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_...
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
This is in no way automated, it's merely a check on whether this makes
sense. Also I left out three words and two files which I thought
might not be what we want.
docs/bugs.html.in | 2 +-
docs/contact.html.in | 2 +-
docs/schemas/basictypes.rng | 2 +-
docs/schemas/interface.rng | 2 +-
docs/securityprocess.html.in | 6 +++---
examples/systemtap/lock-debug.stp | 2 +-
include/libvirt/libvirt-host.h | 2 +-
include/libvirt/virterror.h | 2 +-
src/bhyve/bhyve_driver.c | 6 +++---
src/cpu/cpu_powerpc.c | 2 +-
src/datatypes.c | 4 ++--
src/network/bridge_driver_linux.c | 2 +-
src/qemu/THREADS.txt | 2 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/util/virfirewall.c | 2 +-
src/util/virprocess.c | 2 +-
src/vbox/vbox_common.c | 2 +-
src/vbox/vbox_common.h | 2 +-
src/xen/xend_internal.c | 2 +-
src/xenconfig/xen_xm.c | 2 +-
tools/wireshark/samples/libvirt-sample.pdml | 2 +-
22 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/docs/bugs.html.in b/docs/bugs.html.in
index 140d1b4..55ceb60 100644
--- a/docs/bugs.html.in
+++ b/docs/bugs.html.in
@@ -11,7 +11,7 @@
<p>
If you think that an issue with libvirt may have security
- implications, <strong>please do not</strong> publically
+ implications, <strong>please do not</strong> publicly
report it in the bug tracker, mailing lists, or irc. Libvirt
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
that should be used instead. So if your issue has security
diff --git a/docs/contact.html.in b/docs/contact.html.in
index 51cc775..9ab0ab9 100644
--- a/docs/contact.html.in
+++ b/docs/contact.html.in
@@ -10,7 +10,7 @@
<p>
If you think that an issue with libvirt may have security
- implications, <strong>please do not</strong> publically
+ implications, <strong>please do not</strong> publicly
report it in the bug tracker, mailing lists, or irc. Libvirt
has <a href="securityprocess.html">a dedicated process for handling (potential) security issues</a>
that should be used instead. So if your issue has security
diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
index 3e1841c..8b49a27 100644
--- a/docs/schemas/basictypes.rng
+++ b/docs/schemas/basictypes.rng
@@ -115,7 +115,7 @@
<!--interface on a device (system). The duid is often used by servers -->
<!--such as dnsmasq to assign a specific IP address (and optionally a -->
<!--name to an interface. The applicable standards are RFC3315 and -->
- <!--RFC6355. These standards actualy require the duid to be fixed for -->
+ <!--RFC6355. These standards actually require the duid to be fixed for -->
<!--the hardward device and applicable to all network interfaces on -->
<!--that device. It is not clear that any software currently enforces -->
<!--this requirement although it could be implemented manually. -->
diff --git a/docs/schemas/interface.rng b/docs/schemas/interface.rng
index d78f877..bf0346c 100644
--- a/docs/schemas/interface.rng
+++ b/docs/schemas/interface.rng
@@ -4,7 +4,7 @@
xmlns:v="http://netcf.org/xml/version/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<!-- Versions for this schema are simple integers that are incremented
- everytime a changed (but backwards compatible) version
+ every time a changed (but backwards compatible) version
is released. The current version is indicated with the v:serial
attribute on the start element.
-->
diff --git a/docs/securityprocess.html.in b/docs/securityprocess.html.in
index 3efd687..bdef1e9 100644
--- a/docs/securityprocess.html.in
+++ b/docs/securityprocess.html.in
@@ -66,9 +66,9 @@
<p>
The libvirt security team operates a policy of
<a href="http://en.wikipedia.org/wiki/Responsible_disclosure">responsible disclosure</a>.
- As such any security issue reported, that is not already publically disclosed
+ As such any security issue reported, that is not already publicly disclosed
elsewhere, will have an embargo date assigned. Members of the security team agree
- not to publically disclose any details of the security issue until the embargo
+ not to publicly disclose any details of the security issue until the embargo
date expires.
</p>
@@ -77,7 +77,7 @@
are two weeks or less in duration. If a problem is identified
with a proposed patch for a security issue, requiring further
investigation and bug fixing, the embargo clock may be restarted.
- In exceptional circumstances longer initial embargos may be
+ In exceptional circumstances longer initial embargoes may be
negotiated by mutual agreement between members of the security
team and other relevant parties to the problem. Any such extended
embargoes will aim to be at most one month in duration.
diff --git a/examples/systemtap/lock-debug.stp b/examples/systemtap/lock-debug.stp
index 8f06340..78e94ba 100644
--- a/examples/systemtap/lock-debug.stp
+++ b/examples/systemtap/lock-debug.stp
@@ -49,7 +49,7 @@ probe unlock = library.function("virMutexUnlock")
probe begin
{
%( $# > 1 %? println("error: Too many parameters"); exit();
- %: print("Started, press ^C when the proccess hangs\n"); %)
+ %: print("Started, press ^C when the process hangs\n"); %)
}
probe lock.call
diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h
index 77058af..953366b 100644
--- a/include/libvirt/libvirt-host.h
+++ b/include/libvirt/libvirt-host.h
@@ -218,7 +218,7 @@ typedef enum {
*
* The types virSchedParameter, virBlkioParameter, and
* virMemoryParameter are aliases of this type, for use when
- * targetting libvirt earlier than 0.9.2.
+ * targeting libvirt earlier than 0.9.2.
*/
typedef struct _virTypedParameter virTypedParameter;
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index 3d3d80a..5dc99dc 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -304,7 +304,7 @@ typedef enum {
VIR_ERR_STORAGE_VOL_EXIST = 90, /* the storage vol already exists */
VIR_ERR_CPU_INCOMPATIBLE = 91, /* given CPU is incompatible with host
CPU*/
- VIR_ERR_XML_INVALID_SCHEMA = 92, /* XML document doens't validate against schema */
+ VIR_ERR_XML_INVALID_SCHEMA = 92, /* XML document doesn't validate against schema */
} virErrorNumber;
/**
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 33a12be..21db277 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -1160,14 +1160,14 @@ bhyveStateCleanup(void)
}
static int
-bhyveStateInitialize(bool priveleged,
+bhyveStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
{
virConnectPtr conn = NULL;
- if (!priveleged) {
- VIR_INFO("Not running priveleged, disabling driver");
+ if (!privileged) {
+ VIR_INFO("Not running privileged, disabling driver");
return 0;
}
diff --git a/src/cpu/cpu_powerpc.c b/src/cpu/cpu_powerpc.c
index c77374c..733a0cd 100644
--- a/src/cpu/cpu_powerpc.c
+++ b/src/cpu/cpu_powerpc.c
@@ -102,7 +102,7 @@ ppcModelFindPVR(const struct ppc_map *map,
/* PowerPC Processor Version Register is interpreted as follows :
* Higher order 16 bits : Power ISA generation.
* Lower order 16 bits : CPU chip version number.
- * If the exact CPU isnt found, return the nearest matching CPU generation
+ * If the exact CPU isn't found, return the nearest matching CPU generation
*/
if (pvr & 0x0000FFFFul)
return ppcModelFindPVR(map, (pvr & 0xFFFF0000ul));
diff --git a/src/datatypes.c b/src/datatypes.c
index 1afaf00..0f535b4 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -377,7 +377,7 @@ virInterfaceDispose(void *obj)
* @name: pointer to the storage pool name
* @uuid: pointer to the uuid
* @privateData: pointer to driver specific private data
- * @freeFunc: private data cleanup function pointer specfic to driver
+ * @freeFunc: private data cleanup function pointer specific to driver
*
* Allocates a new storage pool object. When the object is no longer needed,
* virObjectUnref() must be called in order to not leak data.
@@ -453,7 +453,7 @@ virStoragePoolDispose(void *obj)
* @name: pointer to the storage vol name
* @key: pointer to unique key of the volume
* @privateData: pointer to driver specific private data
- * @freeFunc: private data cleanup function pointer specfic to driver
+ * @freeFunc: private data cleanup function pointer specific to driver
*
* Allocates a new storage volume object. When the object is no longer needed,
* virObjectUnref() must be called in order to not leak data.
diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_linux.c
index aa2ad10..e394daf 100644
--- a/src/network/bridge_driver_linux.c
+++ b/src/network/bridge_driver_linux.c
@@ -450,7 +450,7 @@ networkRemoveGeneralIPv4FirewallRules(virFirewallPtr fw,
/* Add all once/network rules required for IPv6.
* If no IPv6 addresses are defined and <network ipv6='yes'> is
- * specified, then allow IPv6 commuinications between virtual systems.
+ * specified, then allow IPv6 communications between virtual systems.
* If any IPv6 addresses are defined, then add the rules for regular operation.
*/
static void
diff --git a/src/qemu/THREADS.txt b/src/qemu/THREADS.txt
index dfa372b..1ad63cc 100644
--- a/src/qemu/THREADS.txt
+++ b/src/qemu/THREADS.txt
@@ -29,7 +29,7 @@ There are a number of locks on various objects
methods. However, preferred method is qemuDomObjFromDomain() that uses
virDomainFindByUUIDRef() which also increases the reference counter and
finds the domain in the domain list without blocking all other lookups.
- When the domain is locked and the reference increased, the prefered way of
+ When the domain is locked and the reference increased, the preferred way of
decrementing the reference counter and unlocking the domain is using the
qemuDomObjEndAPI() function.
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index ccf22f0..ce6767c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1266,7 +1266,7 @@ virQEMUCapsComputeCmdFlags(const char *help,
* promises to keep the human interface stable, but requests that
* we use QMP (the JSON interface) for everything. If the user
* forgot to include YAJL libraries when building their own
- * libvirt but is targetting a newer qemu, we are better off
+ * libvirt but is targeting a newer qemu, we are better off
* telling them to recompile (the spec file includes the
* dependency, so distros won't hit this). This check is
* also in m4/virt-yajl.m4 (see $with_yajl). */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6d9217b..3cd5f8b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6357,7 +6357,7 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
* @open_write: open the file for writing (for updates)
* @unlink_corrupt: remove the image file if it is corrupted
*
- * Returns the opened fd of the save image file and fills the apropriate fields
+ * Returns the opened fd of the save image file and fills the appropriate fields
* on success. On error returns -1 on most failures, -3 if corrupt image was
* unlinked (no error raised).
*/
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index cd7afa5..2251f97 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -945,7 +945,7 @@ virFirewallApply(virFirewallPtr firewall)
VIR_DEBUG("Applying groups for %p", firewall);
for (i = 0; i < firewall->ngroups; i++) {
if (virFirewallApplyGroup(firewall, i) < 0) {
- VIR_DEBUG("Rolling back groups upto %zu for %p", i, firewall);
+ VIR_DEBUG("Rolling back groups up to %zu for %p", i, firewall);
size_t first = i;
virErrorPtr saved_error = virSaveLastError();
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index aa00a99..ab1e039 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -354,7 +354,7 @@ virProcessKillPainfully(pid_t pid, bool force)
/* This loop sends SIGTERM, then waits a few iterations (10 seconds)
* to see if it dies. If the process still hasn't exited, and
* @force is requested, a SIGKILL will be sent, and this will
- * wait upto 5 seconds more for the process to exit before
+ * wait up to 5 seconds more for the process to exit before
* returning.
*
* Note that setting @force could result in dataloss for the process.
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 0fb53aa..20211b2 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -7413,7 +7413,7 @@ vboxConnectListAllDomains(virConnectPtr conn,
/* filter out flag options that will produce 0 results in vbox driver:
* - managed save: vbox guests don't have managed save images
* - autostart: vbox doesn't support autostarting guests
- * - persistance: vbox doesn't support transient guests
+ * - persistence: vbox doesn't support transient guests
*/
if ((MATCH(VIR_CONNECT_LIST_DOMAINS_TRANSIENT) &&
!MATCH(VIR_CONNECT_LIST_DOMAINS_PERSISTENT)) ||
diff --git a/src/vbox/vbox_common.h b/src/vbox/vbox_common.h
index d318921..f9ce612 100644
--- a/src/vbox/vbox_common.h
+++ b/src/vbox/vbox_common.h
@@ -32,7 +32,7 @@
* vbox_CAPI_v*.h. It tells the vbox_common.c
* how to treat with this symbols. This file
* can't be included with files such as
- * vbox_CAPI_v*.h, or it would casue multiple
+ * vbox_CAPI_v*.h, or it would cause multiple
* definitions.
*
* You can see the more informations in vbox_api.h
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 6c8ec7c..3813900 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -523,7 +523,7 @@ xend_op_ext(virConnectPtr xend, const char *path, const char *key, va_list ap)
* @ap: input values to pass to the operation
* @...: input values to pass to the operation
*
- * internal routine to run a POST RPC operation to the Xen Daemon targetting
+ * internal routine to run a POST RPC operation to the Xen Daemon targeting
* a given domain.
*
* Returns 0 in case of success, -1 in case of failure.
diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c
index 5d70af6..c6bdbd3 100644
--- a/src/xenconfig/xen_xm.c
+++ b/src/xenconfig/xen_xm.c
@@ -469,7 +469,7 @@ xenFormatXMInputDevs(virConfPtr conf, virDomainDefPtr def)
verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
/*
- * Convert a virDomainDef object inot an XM config record.
+ * Convert a virDomainDef object into an XM config record.
*/
virConfPtr
xenFormatXM(virConnectPtr conn,
diff --git a/tools/wireshark/samples/libvirt-sample.pdml b/tools/wireshark/samples/libvirt-sample.pdml
index f6a4c28..abe7fbb 100644
--- a/tools/wireshark/samples/libvirt-sample.pdml
+++ b/tools/wireshark/samples/libvirt-sample.pdml
@@ -3,7 +3,7 @@
<!-- ***
This file has been reduced for ineffective packets.
Real output contains more and more elements, but structure
- and hierarchy of XML is same as this exmaple.
+ and hierarchy of XML is same as this example.
*** -->
<!-- You can find pdml2html.xsl in /usr/share/wireshark or at http://anonsvn.wireshark.org/trunk/wireshark/pdml2html.xsl. -->
<pdml version="0" creator="wireshark/1.10.2" time="Thu Sep 19 18:09:24 2013" capture_file="">
--
2.3.3
9 years, 8 months
[libvirt] [PATCH 0/7] iothread api followups
by Ján Tomko
Looking at the proposed SetIOThread API, I noticed
that the virsh command for printing the info is named 'iothreadsinfo'.
This seemed counter-intuitive for me.
Since the API has not been released yet, I propose a rename of the command to:
iothreadinfo (patch 5)
and the API for freeing one struct to:
virDomainIOThreadInfoFree (patch 1)
I don't feel as strongly about renaming the virDomainGetIOThreadsInfo API
(patches 3, 4) or the internal APIs (patch 2).
Looking at virVcpuInfoPtr (which might not be the best inspiration),
I realized including the cpu time might be a good idea.
Ján Tomko (7):
Rename virDomainIOThreadsInfoFree to virDomainIOThreadInfoFree
Rename qemuMonitorIOThreadsInfo* to qemuMonitorIOThreadInfo*
Rename DomainGetIOThreadsInfo to DomainGetIOThreadInfo
gendispatch: remove IOThreads from name fixups
virsh: rename iothreadsinfo to iothreadinfo
Do not use vshPrintPinInfo in iothreadinfo
add cpu time to iothreadinfo
daemon/remote.c | 15 +++++++------
include/libvirt/libvirt-domain.h | 5 +++--
src/driver-hypervisor.h | 4 ++--
src/libvirt-domain.c | 20 ++++++++---------
src/libvirt_public.syms | 4 ++--
src/qemu/qemu_driver.c | 24 ++++++++++++++------
src/qemu/qemu_monitor.c | 4 ++--
src/qemu/qemu_monitor.h | 10 ++++-----
src/qemu/qemu_monitor_json.c | 8 +++----
src/qemu/qemu_monitor_json.h | 2 +-
src/qemu/qemu_process.c | 4 ++--
src/remote/remote_driver.c | 23 ++++++++++----------
src/remote/remote_protocol.x | 11 +++++-----
src/remote_protocol-structs | 7 +++---
src/rpc/gendispatch.pl | 1 -
tests/qemumonitorjsontest.c | 4 ++--
tools/virsh-domain.c | 47 ++++++++++++++++++++++++++++------------
17 files changed, 113 insertions(+), 80 deletions(-)
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] conf: refact virDomainHasDiskMirror and rename it to virDomainHasBlockjob
by Shanzhi Yu
Create external snapshot or migrate a vm when there is a blockpull
job running should be forbidden by libvirt, otherwise qemu try to
create external snapshot and failed with error "unable to execute
QEMU command 'transaction': Device 'drive-virtio-disk0' is busy:
block device is in use by block job: stream", and migration will
succeed which will lead the blockpull job failed.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1203628
Signed-off-by: Shanzhi Yu <shyu(a)redhat.com>
---
src/conf/domain_conf.c | 6 +++---
src/conf/domain_conf.h | 2 +-
src/libvirt_private.syms | 2 +-
src/qemu/qemu_driver.c | 6 +++---
src/qemu/qemu_migration.c | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d633f93..24445af 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12264,13 +12264,13 @@ virDomainDiskRemoveByName(virDomainDefPtr def, const char *name)
}
/* Return true if VM has at least one disk involved in a current block
- * copy/commit job (that is, with a <mirror> element in the disk xml). */
+ * copy/commit/pull job */
bool
-virDomainHasDiskMirror(virDomainObjPtr vm)
+virDomainHasBlockjob(virDomainObjPtr vm)
{
size_t i;
for (i = 0; i < vm->def->ndisks; i++)
- if (vm->def->disks[i]->mirror)
+ if (vm->def->disks[i]->blockjob)
return true;
return false;
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index bceb2d7..32674f3 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2645,7 +2645,7 @@ int virDomainDiskSourceParse(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virStorageSourcePtr src);
-bool virDomainHasDiskMirror(virDomainObjPtr vm);
+bool virDomainHasBlockjob(virDomainObjPtr vm);
int virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net);
virDomainNetDefPtr virDomainNetFind(virDomainDefPtr def, const char *device);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 33222f0..9ebaf4a 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -297,7 +297,7 @@ virDomainGraphicsTypeFromString;
virDomainGraphicsTypeToString;
virDomainGraphicsVNCSharePolicyTypeFromString;
virDomainGraphicsVNCSharePolicyTypeToString;
-virDomainHasDiskMirror;
+virDomainHasBlockjob;
virDomainHasNet;
virDomainHostdevCapsTypeToString;
virDomainHostdevDefAlloc;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 80a3d77..51e302f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7398,7 +7398,7 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
virObjectRef(vm);
def = NULL;
- if (virDomainHasDiskMirror(vm)) {
+ if (virDomainHasBlockjob(vm)) {
virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
_("domain has active block job"));
virDomainObjAssignDef(vm, NULL, false, NULL);
@@ -14583,7 +14583,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
"%s", _("domain is marked for auto destroy"));
goto cleanup;
}
- if (virDomainHasDiskMirror(vm)) {
+ if (virDomainHasBlockjob(vm)) {
virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
_("domain has active block job"));
goto cleanup;
@@ -15245,7 +15245,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
goto cleanup;
- if (virDomainHasDiskMirror(vm)) {
+ if (virDomainHasBlockjob(vm)) {
virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
_("domain has active block job"));
goto cleanup;
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index d34bb02..27a76ec 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1977,7 +1977,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
}
- if (virDomainHasDiskMirror(vm)) {
+ if (virDomainHasBlockjob(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain has an active block job"));
return false;
--
2.1.0
9 years, 8 months
[libvirt] [PATCH 0/7] Implement Set IOThreads Command
by John Ferlan
These patches will implement the Set IOThreads command to complete
the IOThreads family of calls/settings. There are 3 patches in the
middle (3, 4, & 5) which are just refactoring the SetVcpus code so
that the SetIOThreads code can make use of the same functionality
rather than cut-n-paste
John Ferlan (7):
Implement public API for virDomainIOThreadsSet
remote: Plumbing for virDomainSetIOThreads
qemu: qemuDomainHotplugVcpus - separate out the add cgroup
qemu: qemuDomainHotplugVcpus - separate out the del cgroup and pin
qemu: qemuDomainHotplugVcpus - separate out pin adjustment code
qemu: Add support to set IOThreads count
virsh: Add setiothreads command
include/libvirt/libvirt-domain.h | 3 +
src/conf/domain_audit.c | 9 +
src/conf/domain_audit.h | 6 +
src/driver-hypervisor.h | 6 +
src/libvirt-domain.c | 60 +++++
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 1 +
src/qemu/qemu_driver.c | 544 +++++++++++++++++++++++++++++++++------
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 16 +-
src/remote_protocol-structs | 6 +
tools/virsh-domain.c | 82 ++++++
tools/virsh.pod | 17 ++
13 files changed, 676 insertions(+), 76 deletions(-)
--
2.1.0
9 years, 8 months
[libvirt] [PATCH v4 0/2] network_conf: check if bridge exists on host for user created bridges
by Shivaprasad G Bhat
The patch fixes the below problem.
==============================
If the bridge name is not mentioned in the <network> xml, the bridge name is
auto generated from virNetworkAllocateBridge(). If the default template named
bridge is created manually by a user, the bridge start will fail with
"File exists".
bash-4.3$ sudo brctl addbr virbr1
bash-4.3$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
virbr0 8000.525400a91d03 yes virbr0-nic
virbr1 8000.000000000000 no
bash-4.3$ sudo virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
default active no yes
bash-4.3$ cat /tmp/isolated # Notice that the <bridge> intentionally not given.
<network>
<name>isolated</name>
<forward/>
<ip address="192.168.123.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.123.2" end="192.168.123.254"/>
</dhcp>
</ip>
</network>
bash-4.3$ sudo virsh net-create /tmp/isolated
error: Failed to create network from isolated
error: Unable to create bridge virbr1: File exists
===============================
---
Shivaprasad G Bhat (2):
cleanup conf/device_conf.h inclusion from util/virnetdev.h
network_conf: check if bridge exists on host for user created bridges
src/conf/device_conf.h | 38 +-------------------------------------
src/conf/network_conf.c | 8 +++++++-
src/util/virnetdev.h | 38 +++++++++++++++++++++++++++++++++++++-
3 files changed, 45 insertions(+), 39 deletions(-)
--
Signature
9 years, 8 months
[libvirt] [PATCH] qemu: fix cannot start a vm with memory device with address
by Luyao Huang
When start a vm which have a memory device with address, the error
like this :
error: Failed to start domain test3
error: internal error: early end of file from monitor: possible problem:
2015-03-26T03:45:52.338891Z qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,
id=dimm0,slot=0,base=4294967296: Property '.base' not found
After check the qemu code i think this 'base' should named as 'addr',
you can see this mail:
http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg00129.html
Or check the include/hw/mem/pc-dimm.h in qemu source.
Also add a tests for this.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
I didn't change this parameter's name ('base'), because i am not sure
if there is some special mean in it, or it is a result after
discuss.
src/qemu/qemu_command.c | 2 +-
.../qemuxml2argv-memory-hotplug-dimm-addr.args | 9 +++++
.../qemuxml2argv-memory-hotplug-dimm-addr.xml | 45 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
4 files changed, 57 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 04c8df7..2941e7d 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4909,7 +4909,7 @@ qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem,
if (mem->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DIMM) {
virBufferAsprintf(&buf, ",slot=%d", mem->info.addr.dimm.slot);
- virBufferAsprintf(&buf, ",base=%llu", mem->info.addr.dimm.base);
+ virBufferAsprintf(&buf, ",addr=%llu", mem->info.addr.dimm.base);
}
break;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.args b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.args
new file mode 100644
index 0000000..7c59454
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.args
@@ -0,0 +1,9 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/bin/qemu -S -M pc -m size=219136k,slots=16,maxmem=1099511627776k -smp 2 \
+-numa node,nodeid=0,cpus=0-1,mem=214 \
+-object memory-backend-ram,id=memdimm0,size=536870912,host-nodes=1-3,\
+policy=bind \
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
+-nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi -boot c -usb -hda /dev/HostVG/QEMUGuest1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.xml b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.xml
new file mode 100644
index 0000000..2e302c4
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-addr.xml
@@ -0,0 +1,45 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <maxMemory slots='16' unit='KiB'>1099511627776</maxMemory>
+ <memory unit='KiB'>743423</memory>
+ <currentMemory unit='KiB'>743423</currentMemory>
+ <vcpu placement='static' cpuset='0-1'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu>
+ <topology sockets='2' cores='1' threads='1'/>
+ <numa>
+ <cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
+ </numa>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='ide' index='0'/>
+ <controller type='usb' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='virtio'/>
+ <memory model='dimm'>
+ <source>
+ <nodemask>1-3</nodemask>
+ <pagesize unit='KiB'>4096</pagesize>
+ </source>
+ <target>
+ <size unit='KiB'>524287</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='0' base='0x100000000'/>
+ </memory>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 08f374e..a4cb887 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1548,6 +1548,8 @@ mymain(void)
DO_TEST("memory-hotplug", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA);
DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
QEMU_CAPS_DEVICE, QEMU_CAPS_OBJECT_MEMORY_RAM);
+ DO_TEST("memory-hotplug-dimm-addr", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
+ QEMU_CAPS_DEVICE, QEMU_CAPS_OBJECT_MEMORY_RAM);
virObjectUnref(driver.config);
virObjectUnref(driver.caps);
--
1.8.3.1
9 years, 8 months
[libvirt] [PATCH] qemu: Give hint about -noTSX CPU model
by Jiri Denemark
Because of the microcode update to Haswell/Broadwell CPUs, existing
domains using these CPUs may fail to start even though they used to run
just fine. To help users solve this issue we try to suggest switching to
-noTSX variant of the CPU model:
virsh # start cd
error: Failed to start domain cd
error: unsupported configuration: guest and host CPU are not
compatible: Host CPU does not provide required features: rtm, hle;
try using 'Haswell-noTSX' CPU model
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
This patch depends on the previous patch which introduces the new
*-noTSX models.
src/qemu/qemu_command.c | 38 +++++++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 7e6b95c..cabb8b2 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6807,6 +6807,7 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver,
size_t ncpus = 0;
char **cpus = NULL;
virCPUDataPtr data = NULL;
+ virCPUDataPtr hostData = NULL;
char *compare_msg = NULL;
virCPUCompareResult cmp;
const char *preferred;
@@ -6838,16 +6839,42 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver,
/* For non-KVM, CPU features are emulated, so host compat doesn't matter */
if (compareAgainstHost) {
+ bool noTSX = false;
+
cmp = cpuGuestData(host, cpu, &data, &compare_msg);
switch (cmp) {
case VIR_CPU_COMPARE_INCOMPATIBLE:
+ if (cpuEncode(host->arch, host, NULL, &hostData,
+ NULL, NULL, NULL, NULL) == 0 &&
+ (!cpuHasFeature(hostData, "hle") ||
+ !cpuHasFeature(hostData, "rtm")) &&
+ (STREQ_NULLABLE(cpu->model, "Haswell") ||
+ STREQ_NULLABLE(cpu->model, "Broadwell")))
+ noTSX = true;
+
if (compare_msg) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("guest and host CPU are not compatible: %s"),
- compare_msg);
+ if (noTSX) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("guest and host CPU are not compatible: "
+ "%s; try using '%s-noTSX' CPU model"),
+ compare_msg, cpu->model);
+ } else {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("guest and host CPU are not compatible: "
+ "%s"),
+ compare_msg);
+ }
} else {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("guest CPU is not compatible with host CPU"));
+ if (noTSX) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("guest CPU is not compatible with host "
+ "CPU; try using '%s-noTSX' CPU model"),
+ cpu->model);
+ } else {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("guest CPU is not compatible with host "
+ "CPU"));
+ }
}
/* fall through */
case VIR_CPU_COMPARE_ERROR:
@@ -6941,6 +6968,7 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver,
virObjectUnref(caps);
VIR_FREE(compare_msg);
cpuDataFree(data);
+ cpuDataFree(hostData);
virCPUDefFree(guest);
virCPUDefFree(cpu);
return ret;
--
2.3.3
9 years, 8 months
[libvirt] [libvirt-test-API][PATCH 0/2] network event callback testing
by Jincheng Miao
Here is the network event callback testing, the case employed native
libvirt eventLoop, and multi-thread for event trigger.
Jincheng Miao (2):
Add test case for network event callback
Add cases to basic_network.conf
cases/basic_network.conf | 24 ++++
repos/network/event_callback.py | 245 +++++++++++++++++++++++++++++++++++++++
2 files changed, 269 insertions(+), 0 deletions(-)
create mode 100644 repos/network/event_callback.py
9 years, 8 months