[libvirt] Release of libvirt-3.4.0
by Daniel Veillard
It's out ! The release is tagged in git, the tree is open ! I pushed
the signed tartball and rpms to the usual place:
ftp://libvirt.org/libvirt/
I also rolled out the libvirt-python-3.4.0 release that you can find at
ftp://libvirt.org/libvirt/python/
This is a feature and improvements driven release, as you can see below
there is a number of point with direct user visible improvements:
* New features
- Improved streams to efficiently transfer sparseness
New extension to virStream was implemented so that
virStorageVolDownload and virStorageVolUpload can preserve file
sparseness.
- I/O APIC type can be specified for QEMU/KVM domains
The ioapic tag was added to domain features, so the type of the I/O
APIC can now be specified (e.g. putting it in userspace for KVM
domains).
- The reason for VM shutdown is reported, if known
QEMU 2.10 will be able to report the reason for shutting down (whether
that was caused by the guest or not), and libvirt is prepared for that
and reports that information in its shutdown event as well, if it is
known.
* Improvements
- Repository now has new README.md file
The new file uses markdown syntax, so it looks better on github and
possibly other web pages, but it has also more useful information. The
old README is now symlink to the new file.
- qemu: Use GICv2 by default for aarch64/virt TCG guests
The emulated GICv3 has some limitations that make it unusable as a
default; use GICv2 until they're sorted out. This change makes it once
again possible to run aarch64/virt guests on a x86_64 host without
having to tweak their configuration.
- Additional capabilities for the node_device module
Introduce two new capabilities to the node_device module. The first is
for CCW devices, most common on the S390 architecture. The second is
for fibre channel-backed SCSI devices and exposes the fc_remote_port
sub-capability to SCSI target devices.
- Node devices now report Mediated device capabilities
Endpoint devices support new mdev capability and their parents now
report the supported types in new mdev_types capability.
- Capabilities now report information about host caches
If supported in the kernel, host capabilities will now list L3 caches.
The code for other levels was added as well, but only L3 caches are
reported currently.
- POWER9 CPU model was added
It is now properly reported in host capabilities.
- libxl: NUMA sibling distances are now reported in host capabilities
- VMDK version 3 files are now properly detected
- Interrupt remapping and Extended interrupt mode for IOMMU devices
These two new features can now be controlled with new <driver
intremap='on/off' eim='on/off'/> tag for iommu devices.
- Graphics in libxl domains now have default addresses
Even though there were default addresses before this change, they were
not saved in the XML. It is now possible to see and control the listen
addresses properly.
- Default USB controllers are now added for devices in libxl domains
Even though they were added automatically when USB device was attached,
they could've been missing in some other cases. The logic is now fixed
so there are always USB controllers, even if there was none of them in
the specified XML.
- Limits for RPC messages were increased
Hitting the RPC limits we have is easier every day, so they were
increased once again and some guessing logic was improved as well. It
is now possible to get more stats than ever using the
virConnectGetAllDomainStats() call and push through even bigger
requests and replies for all APIs.
* Bug fixes
- qemu: Create memory_backing_dir on startup
Libvirt's policy is that directories are created on startup if they
don't exist. We've missed this one.
- PCIe 4.0 cards now report proper link speeds
It could happen that the link speed for PCIe devices was not properly
reported or the nodedev-dumpxml just failed. That was due to mistake in
the field width, but should now work properly.
- qemu: Do not report errors on shutdown
For some users, in some rare cases, it could happen that there was an
error message "internal error: End of file from qemu monitor" in the
logs even though no problem happened. The detection of these false
positives was improved and such errors should not show any more.
- User-specified UNIX socket paths for virtio channels should not be reset
It could happen, in some cases, that libvirt would mistake a
user-specified path for its own generated one and thus remove it from
the XML. The detection of such addresses was improved now.
- Fix address reservation during RNG hot-plug
When error occurred in a specific point in time during the hot-plug of
an RNG device, it could happen that an address was released even though
another device was already using it, making it possible to hot-plug
another device with that address, effectively having duplicated
addresses in the XML.
Thanks everybody for your help with the release, be it code, reviews, bug
reports, doc, etc!
Enjoy !
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
7 years, 5 months
[libvirt] [PATCH V2] maint: add sanitizers to the build process
by claudioandre.br@gmail.com
From: Claudio André <claudioandre.br(a)gmail.com>
Sanitizers are based on compile-time instrumentation. They are available
in gcc and clang for a range of supported operation systems and
platforms. More info at: https://github.com/google/sanitizers
The address sanitizer finds bugs related to addressing memory: use after
free, heap buffer overflow, stack buffer overflow, memory leaks, ...
The undefined behavior sanitizer detects situations not prescribed by the
language specification: bound violations, data overflows, ...
The llvm.org states that Sanitizers have found thousands of bugs everywhere.
Sanitizers running during CI can prevent bugs from taking up residence. They
are helper tools to maintain bugs out.
---
* Harmless (the new flags are disabled by default)
* Real example of it working:
Direct leak of 1432 byte(s) in 1 object(s) allocated from:
#0 0x4cea00 in calloc /home/ben/development/llvm/3.5/final/llvm.src/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:56:3
#1 0x2b0459e834a6 in virAlloc /home/travis/build/claudioandre/libvirt/src/util/viralloc.c:144:24
#2 0x2b045a010af4 in virDomainDefNew /home/travis/build/claudioandre/libvirt/src/conf/domain_conf.c:2923:9
#3 0x2b045a010af4 in virDomainDefParseXML /home/travis/build/claudioandre/libvirt/src/conf/domain_conf.c:16923
#4 0x2b045a0106a1 in virDomainDefParseNode /home/travis/build/claudioandre/libvirt/src/conf/domain_conf.c:18764:11
#5 0x2b045a0105ba in virDomainDefParse /home/travis/build/claudioandre/libvirt/src/conf/domain_conf.c:18708:15
#6 0x4ec396 in testCompareMemLock /home/travis/build/claudioandre/libvirt/tests/qemumemlocktest.c:45:17
#7 0x4ede56 in virTestRun /home/travis/build/claudioandre/libvirt/tests/testutils.c:180:11
#8 0x4ec194 in mymain /home/travis/build/claudioandre/libvirt/tests/qemumemlocktest.c:119:5
#9 0x4f0f9c in virTestMain /home/travis/build/claudioandre/libvirt/tests/testutils.c:1019:11
#10 0x2b045b221f44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44)
m4/virt-compile-warnings.m4 | 35 +++++++++++++++++++++++++++++------
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index 768a5c8..269f14d 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -166,12 +166,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
wantwarn="$wantwarn -Wno-format"
fi
- # This should be < 256 really. Currently we're down to 4096,
- # but using 1024 bytes sized buffers (mostly for virStrerror)
- # stops us from going down further
- gl_WARN_ADD(["-Wframe-larger-than=4096"], [STRICT_FRAME_LIMIT_CFLAGS])
- gl_WARN_ADD(["-Wframe-larger-than=25600"], [RELAXED_FRAME_LIMIT_CFLAGS])
-
# Extra special flags
dnl -fstack-protector stuff passes gl_WARN_ADD with gcc
dnl on Mingw32, but fails when actually used
@@ -259,4 +253,33 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
AC_DEFINE_UNQUOTED([BROKEN_GCC_WLOGICALOP_EQUAL_EXPR], 1,
[Define to 1 if gcc -Wlogical-op reports false positive 'or' equal expr])
fi
+
+ dnl Check for support for Sanitizers
+ dnl Check for -fsanitize=address and -fsanitize=undefined support
+ LIBVIRT_ARG_ENABLE([ASAN], [build with address sanitizer support], [no])
+ SAN_CFLAGS=
+
+ AS_IF([test "x$enable_asan" = "xyes"], [
+ gl_COMPILER_OPTION_IF([-fsanitize=address -fno-omit-frame-pointer], [
+ SAN_CFLAGS="-fsanitize=address"
+ ])
+ ])
+
+ LIBVIRT_ARG_ENABLE([UBSAN], [build with undefined behavior sanitizer support], [no])
+ AS_IF([test "x$enable_ubsan" = "xyes"], [
+ gl_COMPILER_OPTION_IF([-fsanitize=undefined -fno-omit-frame-pointer], [
+ SAN_CFLAGS="$SAN_CFLAGS -fsanitize=undefined"
+ ])
+ ])
+
+ AS_IF([ test -n "${SAN_CFLAGS}"], [
+ gl_AS_VAR_APPEND([WARN_CFLAGS], [" $SAN_CFLAGS -fno-omit-frame-pointer"])
+ gl_AS_VAR_APPEND([LDFLAGS], [" $SAN_CFLAGS -ldl"])
+ ],[
+ # This should be < 256 really. Currently we're down to 4096,
+ # but using 1024 bytes sized buffers (mostly for virStrerror)
+ # stops us from going down further
+ gl_WARN_ADD(["-Wframe-larger-than=4096"], [STRICT_FRAME_LIMIT_CFLAGS])
+ gl_WARN_ADD(["-Wframe-larger-than=25600"], [RELAXED_FRAME_LIMIT_CFLAGS])
+ ])
])
--
2.11.0
7 years, 5 months
[libvirt] [PATCH v2 0/6] Fix error reporting in streams
by Michal Privoznik
Technically, just 1/6 and 2/6 are v2. The rest is brand new. Whatever.
Michal Privoznik (6):
virfdstream: Check for thread error more frequently
fdstream: Report error from the I/O thread
virStream*All: Call virStreamAbort() more frequently
virStream*All: Preserve reported error
virsh: Report errors from stream callbacks
streams: Report errors if sendAll/recvAll callbacks fail
daemon/stream.c | 18 ++++++++----
src/libvirt-stream.c | 74 +++++++++++++++++++++++++++++++++++++-------------
src/util/virfdstream.c | 22 +++++++++++----
tools/virsh-util.c | 38 ++++++++++++++++++++------
tools/virsh-util.h | 2 +-
tools/virsh-volume.c | 8 ++++--
6 files changed, 120 insertions(+), 42 deletions(-)
--
2.13.0
7 years, 5 months
[libvirt] [PATCH v4 0/3] Loadparm support
by Farhan Ali
This patch series introduces the support for new s390x 'loadparm'
feature. The 'loadparm' can be used to select the boot entry to
boot from, for a boot device.
Here is a link to the QEMU patches:
https://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg00192.html
ChangeLog
---------
v3 -> v4
- Break news and documentation updates to a
separate patch (patch 3)
- Merge test cases with qemu patch (patch 2)
- Add xml2xml test case (patch 2)
- Add qemucapabilities test (patch 2)
- Rebased the patch series on master commit
5970b13 udev: Fix build on older platforms
v2 -> v3:
- Updated news.xml and formatdomain.html.in with a more architectural
description of loadparm (patch 1)
v1 -> v2:
- Rebased the patch series on the latest master, commit
2f69dd3 virfiletest: include linux/falloc.h
Thanks
Farhan Ali
Farhan Ali (3):
conf : Add loadparm boot option for a boot device
qemu : Add loadparm to qemu command line string
news: Update news and libvirt documentation
docs/formatdomain.html.in | 9 +-
docs/news.xml | 11 +
docs/schemas/domaincommon.rng | 7 +
src/conf/device_conf.h | 1 +
src/conf/domain_conf.c | 69 +-
src/qemu/qemu_capabilities.c | 3 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 33 +
.../qemucapabilitiesdata/caps_2.9.50.s390x.replies | 14587 +++++++++++++++++++
tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml | 302 +
...-machine-loadparm-multiple-disks-nets-s390.args | 28 +
...v-machine-loadparm-multiple-disks-nets-s390.xml | 43 +
.../qemuxml2argv-machine-loadparm-net-s390.args | 20 +
.../qemuxml2argv-machine-loadparm-net-s390.xml | 26 +
...xml2argv-machine-loadparm-s390-char-invalid.xml | 26 +
...uxml2argv-machine-loadparm-s390-len-invalid.xml | 26 +
.../qemuxml2argv-machine-loadparm-s390.args | 20 +
.../qemuxml2argv-machine-loadparm-s390.xml | 26 +
tests/qemuxml2argvtest.c | 19 +
...t-machine-loadparm-multiple-disks-nets-s390.xml | 44 +
tests/qemuxml2xmltest.c | 4 +
21 files changed, 15303 insertions(+), 4 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_2.9.50.s390x.replies
create mode 100644 tests/qemucapabilitiesdata/caps_2.9.50.s390x.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-multiple-disks-nets-s390.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-multiple-disks-nets-s390.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-net-s390.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-net-s390.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390-char-invalid.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390-len-invalid.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-machine-loadparm-s390.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-machine-loadparm-multiple-disks-nets-s390.xml
--
1.9.1
7 years, 5 months
[libvirt] [PATCH 0/2] Two simple sparse streams fixes
by Michal Privoznik
I've been experimenting with sparse streams and found a bug. If you try to
download a volume which doesn't support sparseness here's what happens:
# virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/blah.raw
# echo $?
0
# ls -lhs /mnt/floppy/bla.raw
0 -rw-r--r-- 1 root root 0 May 30 12:40 /mnt/floppy/bla.raw
That's not good. iSCSI doesn't know anything about sparseness so an error is
expected here. Fortunately, the fix is fairly simple:
# virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/bla.raw
error: cannot close volume /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0
error: Unable to seek to data: Invalid argument
Michal Privoznik (2):
virfdstream: Check for thread error more frequently
fdstream: Report error from the I/O thread
daemon/stream.c | 18 ++++++++++++------
src/util/virfdstream.c | 22 ++++++++++++++++++++--
2 files changed, 32 insertions(+), 8 deletions(-)
--
2.13.0
7 years, 5 months
[libvirt] [RFC] Version numbers outside of releases
by Andrea Bolognani
Our current practice when it comes to bumping the version
number for libvirt is to do so immediately after a release,
eg. right after 3.4.0 is released later today someone will
push a commit that changes configure.ac to use 3.5.0 instead.
As a consequence, builds made from master will always carry
the release number of the *upcoming* release, so from a
versioning point of view there is no way to tell eg. 3.4.0-rc2
or even the final 3.4.0 release apart from a random build made
at a random time from master during 3.4.0's development cycle.
In particular, when creating RPMs from a git clone, you'll end
up having to use either 'dnf install' or 'dnf reinstall'
depending on whether or not you already installed any build
during the current development cycle.
I suggest we change our habits slightly:
* right after X.Y.0 has been released, bump the version
number to X.Y.90;
* bump the version number to X.Y.91 for rc1, X.Y.92 for
rc2 and so on;
* only bump the version number to X.Y+1.0 as the release is
being prepared, then go back to the first step and move
on with development.
This would make sure each step in the development cycle gets
its own version number, and as a pleasant side effect you'll
always be able to install newer builds using 'dnf install'.
Comments welcome! :)
--
Andrea Bolognani / Red Hat / Virtualization
7 years, 5 months
[libvirt] [PATCH] qemu: Fix serial stub console allocation
by Erik Skultety
When adding the aliased serial stub console, the structure wasn't
properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then
resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device
coldplug.
https://bugzilla.redhat.com/show_bug.cgi?id=1434278
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 4a7d99725..34ddb95f8 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1810,7 +1810,7 @@ qemuDomainChrPreInsert(virDomainDefPtr vmdef,
if (!vmdef->consoles && VIR_ALLOC(vmdef->consoles) < 0)
return -1;
- if (VIR_ALLOC(vmdef->consoles[0]) < 0) {
+ if (!(vmdef->consoles[0] = virDomainChrDefNew(NULL))) {
VIR_FREE(vmdef->consoles);
return -1;
}
@@ -1841,7 +1841,7 @@ qemuDomainChrInsertPreAllocCleanup(virDomainDefPtr vmdef,
/* Remove the stub console added by qemuDomainChrPreInsert */
if (vmdef->nserials == 0 && vmdef->nconsoles == 1 &&
chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL) {
- VIR_FREE(vmdef->consoles[0]);
+ virDomainChrDefFree(vmdef->consoles[0]);
VIR_FREE(vmdef->consoles);
vmdef->nconsoles = 0;
}
--
2.13.0
7 years, 5 months
[libvirt] [PATCH] Fix closing XML element in news file
by Daniel P. Berrange
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as a trivial build fix
docs/news.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/news.xml b/docs/news.xml
index 6ff01ca..e95fe72 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -108,7 +108,7 @@
<description>
Endpoint devices support new <code>mdev</code> capability
and their parents now report the supported types in new
- <code>mdev_types</mdev> capability.
+ <code>mdev_types</code> capability.
</description>
</change>
<change>
--
2.9.3
7 years, 5 months
[libvirt] [PATCH v3 0/2] Check for <memoryBacking/>
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2017-May/msg00939.html
diff to v2:
- moved xmlopt argument further the argument list in virDomainSnapshotRedefinePrep
- drop couple of checks in qemuDomainABIStabilityCheck
Patch 1/2 has been ACKed. But just conditionally. So I'm sending it again to
see if I haven't missed anything.
Michal Privoznik (2):
virDomainXMLOption: Introduce virDomainABIStabilityDomain
virQEMUDriverDomainABIStability: Check for memoryBacking
src/conf/domain_conf.c | 19 ++++++++++++++++---
src/conf/domain_conf.h | 16 ++++++++++++++--
src/conf/snapshot_conf.c | 3 ++-
src/conf/snapshot_conf.h | 1 +
src/libvirt_private.syms | 2 ++
src/libxl/libxl_conf.c | 2 +-
src/libxl/libxl_domain.c | 4 +++-
src/lxc/lxc_conf.c | 3 ++-
src/openvz/openvz_driver.c | 2 +-
src/phyp/phyp_driver.c | 2 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_conf.c | 3 ++-
src/qemu/qemu_domain.c | 23 +++++++++++++++++++++++
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_driver.c | 5 +++--
src/security/virt-aa-helper.c | 2 +-
src/test/test_driver.c | 6 ++++--
src/uml/uml_driver.c | 2 +-
src/vbox/vbox_common.c | 2 +-
src/vmware/vmware_driver.c | 2 +-
src/vmx/vmx.c | 2 +-
src/vz/vz_driver.c | 2 +-
src/xen/xen_driver.c | 2 +-
src/xenapi/xenapi_driver.c | 2 +-
tests/bhyveargv2xmltest.c | 3 ++-
tests/qemuargv2xmltest.c | 2 +-
tests/qemuxml2argvtest.c | 2 +-
tests/sexpr2xmltest.c | 2 +-
tests/testutils.c | 4 ++--
tests/vmx2xmltest.c | 2 +-
tests/xlconfigtest.c | 2 +-
tests/xmconfigtest.c | 2 +-
tests/xml2sexprtest.c | 2 +-
tests/xml2vmxtest.c | 2 +-
34 files changed, 97 insertions(+), 36 deletions(-)
--
2.13.0
7 years, 5 months