[libvirt PATCH v6 1/2] news: mention vdpa support
by Jonathon Jongsma
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
NEWS.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 2fef3f706c..384ee94480 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -43,6 +43,12 @@ v6.9.0 (unreleased)
Implement virito-9p shared filesystem using the ``<filesystem/>`` element.
+ * qemu: Add support for vDPA network devices.
+
+ VMs using the QEMU hypervisor can now specify vDPA network devices using
+ ``<interface type='vdpa'>``. Host vDPA devices are also now included in the
+ node device APIs.
+
* **Improvements**
* **Bug fixes**
--
2.26.2
4 years, 1 month
[PATCH] docs/system: Deprecate raspi2/raspi3 machine aliases
by Philippe Mathieu-Daudé
Since commit aa35ec2213b ("hw/arm/raspi: Use more
specific machine names") the raspi2/raspi3 machines
have been renamed as raspi2b/raspi3b.
As more Raspberry Pi 2/3 models are emulated, in order
to avoid confusion deprecate the raspi2/raspi3 machine
aliases.
Signed-off-by: Philippe Mathieu-Daudé <f4bug(a)amsat.org>
---
docs/system/deprecated.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 905628f3a0c..f0c7aaeb2ff 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -355,6 +355,11 @@ This machine has been renamed ``fuloong2e``.
These machine types are very old and likely can not be used for live migration
from old QEMU versions anymore. A newer machine type should be used instead.
+Raspberry Pi ``raspi2`` and ``raspi3`` machines (since 5.2)
+'''''''''''''''''''''''''''''''''''''
+
+These machines have been respectively renamed ``raspi2b`` and ``raspi3b``.
+
Device options
--------------
--
2.26.2
4 years, 1 month
Entering freeze for libvirt-6.9.0
by Jiri Denemark
I have just tagged v6.9.0-rc1 in the repository and pushed signed
tarballs and source RPMs to https://libvirt.org/sources/
Please give the release candidate some testing and in case you find a
serious issue which should have a fix in the upcoming release, feel
free to reply to this thread to make sure the issue is more visible.
If you have not done so yet, please update NEWS.rst to document any
significant change you made since the last release.
Thanks,
Jirka
4 years, 1 month
[libvirt PATCH] tests: fix stat mocking with Fedora rawhide
by Daniel P. Berrangé
GLibC has a really complicated way of dealing with the 'stat' function
historically, which means our mocks in turn have to look at four
different possible functions to replace, stat, stat64, __xstat,
__xstat64.
In Fedora 33 and earlier:
- libvirt.so links to __xstat64
- libc.so library exports stat, stat64, __xstat, __xstat64
- sys/stat.h header exposes stat and __xstat
In Fedora 34 rawhide:
- libvirt.so links to stat64
- libc.so library exports stat, stat64, __xstat, __xstat64
- sys/stat.h header exposes stat
Historically we only looked at the exported symbols from libc.so to
decide which to mock.
In F34 though we must not consider __xstat / __xstat64 though because
they only existance for binary compatibility. Newly built binaries
won't reference them.
Thus we must introduce a header file check into our logic for deciding
which symbol to mock. We must ignore the __xstat / __xstat64 symbols
if they don't appear in the sys/stat.h header, even if they appear
in libc.so
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Validated with this pipeline:
https://gitlab.com/berrange/libvirt/-/pipelines/209361200
meson.build | 28 ++++++++++++-----
tests/virmockstathelpers.c | 62 ++++++++++++++++++++++----------------
2 files changed, 56 insertions(+), 34 deletions(-)
diff --git a/meson.build b/meson.build
index c3ba34bbe0..365c16d167 100644
--- a/meson.build
+++ b/meson.build
@@ -636,10 +636,6 @@ libvirt_export_dynamic = cc.first_supported_link_argument([
# check availability of various common functions (non-fatal if missing)
functions = [
- '__lxstat',
- '__lxstat64',
- '__xstat',
- '__xstat64',
'elf_aux_info',
'fallocate',
'getauxval',
@@ -653,8 +649,6 @@ functions = [
'getuid',
'getutxid',
'if_indextoname',
- 'lstat',
- 'lstat64',
'mmap',
'newlocale',
'pipe2',
@@ -666,12 +660,23 @@ functions = [
'setgroups',
'setns',
'setrlimit',
- 'stat',
- 'stat64',
'symlink',
'sysctlbyname',
]
+stat_functions = [
+ '__lxstat',
+ '__lxstat64',
+ '__xstat',
+ '__xstat64',
+ 'lstat',
+ 'lstat64',
+ 'stat',
+ 'stat64',
+]
+
+functions += stat_functions
+
foreach function : functions
if cc.has_function(function)
conf.set('WITH_@0@'.format(function.to_upper()), 1)
@@ -679,6 +684,13 @@ foreach function : functions
endforeach
+foreach function : stat_functions
+ if cc.has_header_symbol('sys/stat.h', function)
+ conf.set('WITH_@0@_DECL'.format(function.to_upper()), 1)
+ endif
+endforeach
+
+
# various header checks
headers = [
diff --git a/tests/virmockstathelpers.c b/tests/virmockstathelpers.c
index 5c9759551d..3bd2437ffe 100644
--- a/tests/virmockstathelpers.c
+++ b/tests/virmockstathelpers.c
@@ -67,39 +67,49 @@
* - If __xstat & __xstat64 exist, then stat & stat64 will not exist
* as symbols in the library, so the latter should not be mocked.
*
+ * - If __xstat exists in the library, but not the header than it
+ * it is just there for binary back compat and should not be
+ * mocked
+ *
* The same all applies to lstat()
*/
+#if !defined(WITH___XSTAT_DECL)
+# if defined(WITH_STAT)
+# if !defined(WITH___XSTAT) && !defined(WITH_STAT64) || defined(__APPLE__)
+# define MOCK_STAT
+# endif
+# endif
+# if defined(WITH_STAT64)
+# define MOCK_STAT64
+# endif
+#else /* WITH___XSTAT_DECL */
+# if defined(WITH___XSTAT) && !defined(WITH___XSTAT64)
+# define MOCK___XSTAT
+# endif
+# if defined(WITH___XSTAT64)
+# define MOCK___XSTAT64
+# endif
+#endif /* WITH___XSTAT_DECL */
-#if defined(WITH_STAT)
-# if !defined(WITH___XSTAT) && !defined(WITH_STAT64) || defined(__APPLE__)
-# define MOCK_STAT
+#if !defined(WITH___LXSTAT_DECL)
+# if defined(WITH_LSTAT)
+# if !defined(WITH___LXSTAT) && !defined(WITH_LSTAT64) || defined(__APPLE__)
+# define MOCK_LSTAT
+# endif
# endif
-#endif
-#if defined(WITH_STAT64) && !defined(WITH___XSTAT64)
-# define MOCK_STAT64
-#endif
-#if defined(WITH___XSTAT) && !defined(WITH___XSTAT64)
-# define MOCK___XSTAT
-#endif
-#if defined(WITH___XSTAT64)
-# define MOCK___XSTAT64
-#endif
-#if defined(WITH_LSTAT)
-# if !defined(WITH___LXSTAT) && !defined(WITH_LSTAT64) || defined(__APPLE__)
-# define MOCK_LSTAT
+# if defined(WITH_LSTAT64)
+# define MOCK_LSTAT64
# endif
-#endif
-#if defined(WITH_LSTAT64) && !defined(WITH___LXSTAT64)
-# define MOCK_LSTAT64
-#endif
-#if defined(WITH___LXSTAT) && !defined(WITH___LXSTAT64)
-# define MOCK___LXSTAT
-#endif
-#if defined(WITH___LXSTAT64)
-# define MOCK___LXSTAT64
-#endif
+#else /* WITH___LXSTAT_DECL */
+# if defined(WITH___LXSTAT) && !defined(WITH___LXSTAT64)
+# define MOCK___LXSTAT
+# endif
+# if defined(WITH___LXSTAT64)
+# define MOCK___LXSTAT64
+# endif
+#endif /* WITH___LXSTAT_DECL */
#ifdef MOCK_STAT
static int (*real_stat)(const char *path, struct stat *sb);
--
2.28.0
4 years, 1 month
[PATCH] rpm: Fix handling of SOURCE_DATE_EPOCH
by Neal Gompa
Contemporary versions of Fedora automatically set SOURCE_DATE_EPOCH
based on the changelog entry date stamp. In scenarios where it already
is defined, we do not want to redefine it.
Additionally, when building the libvirt package in an Open Build Service
instance, the spec file is not present in %_specdir, but instead in %_sourcedir.
Signed-off-by: Neal Gompa <ngompa13(a)gmail.com>
---
libvirt.spec.in | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2a4324b974..eb0fba4b5a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1128,7 +1128,16 @@ exit 1
# place macros above and build commands below this comment
-export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/%{name}.spec)
+if [ -z "${SOURCE_DATE_EPOCH}" ]; then
+# If SOURCE_DATE_EPOCH is not defined, set it based on spec file
+ if [ ! -f "%{_specdir}/%{name}.spec" ]; then
+ # OBS does not install the spec file into the specdir
+ SPECFILE_PATH="%{_sourcedir}/%{name}.spec"
+ else
+ SPECFILE_PATH="%{_specdir}/%{name}.spec"
+ fi
+ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' ${SPECFILE_PATH})
+fi
%meson \
-Drunstatedir=%{_rundir} \
--
2.28.0
4 years, 1 month
[libvirt PATCH 0/2] Fix disabling of libssh/libssh2 in RPM build
by Daniel P. Berrangé
RHEL builds disable libssh2, and build root lack libssh2-devel. The RPM
build fails though because meson looks for libssh2 and has it set to
"enabled", not "auto" or "disabled".
Daniel P. Berrangé (2):
rpm: remove with_bash_completion condition
rpm: tell meson whether to use libssh or libssh2 explicitly
libvirt.spec.in | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
--
2.26.2
4 years, 1 month
[PATCH 0/3] qemu: sync backing chain update in virDomainGetBlockJobInfo
by Nikolay Shirokovskiy
The issue is desciribed in detail in last patch.
I've already tried to address it in [1]. It was not good at all. Actually it
was waiting for event processing in worker thread but that processing blocked
by qemuDomainGetBlockJobInfo itself holding the job.
Now with help of the 1st patch the block job event offloaded to the worker
thread can be processed in qemuDomainGetBlockJobInfo.
[1] [PATCH 1/1] qemu: sync blockjob finishing in qemuDomainGetBlockJobInfo
https://www.redhat.com/archives/libvir-list/2019-November/msg01366.html
Nikolay Shirokovskiy (3):
qemu: add option to process offloaded legacy blockjob event ealier
qemu: update legacy block job sync after offloading changes
qemu: sync backing chain update in virDomainGetBlockJobInfo
src/qemu/qemu_driver.c | 26 ++++++++++++--------------
src/qemu/qemu_process.c | 28 +++++++++++++++++++---------
2 files changed, 31 insertions(+), 23 deletions(-)
--
1.8.3.1
4 years, 1 month
question regarding systemd ordering of libvirt services
by Jim Fehlig
Hi All,
I'm not sure if the following problem is in systemd or libvirt. When restarting
services and sockets *and* libvirt-guests.service is running, the latter will
sometimes hang when trying to connect to libvirtd. Even though libvirt-guests
has 'Wants=libvirtd.service' and 'After=libvirtd.service', we can see via
journalctl that it is not shutdown before libvirtd when executing something like
systemctl try-restart libvirtd.service libvirtd.socket libvirtd-ro.socket
virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
virt-guest-shutdown.target
Oct 28 15:53:31 systemd[1]: Stopping Virtualization daemon...
Oct 28 15:53:31 systemd[1]: libvirtd.service: Succeeded.
Oct 28 15:53:31 systemd[1]: Stopped Virtualization daemon.
Oct 28 15:53:31 systemd[1]: libvirtd-admin.socket: Succeeded.
Oct 28 15:53:31 systemd[1]: Closed Libvirt admin socket.
Oct 28 15:53:31 systemd[1]: Stopping Libvirt admin socket.
Oct 28 15:53:31 systemd[1]: libvirtd-ro.socket: Succeeded.
Oct 28 15:53:31 systemd[1]: Closed Libvirt local read-only socket.
Oct 28 15:53:31 systemd[1]: Stopping Libvirt local read-only socket.
Oct 28 15:53:31 systemd[1]: libvirtd.socket: Succeeded.
Oct 28 15:53:31 systemd[1]: Closed Libvirt local socket.
Oct 28 15:53:31 systemd[1]: Stopping Libvirt local socket.
Oct 28 15:53:31 systemd[1]: Listening on Libvirt local socket.
Oct 28 15:53:31 systemd[1]: Listening on Libvirt admin socket.
Oct 28 15:53:31 systemd[1]: Listening on Libvirt local read-only socket.
Oct 28 15:53:31 systemd[1]: virtlockd.socket: Succeeded.
Oct 28 15:53:31 systemd[1]: Closed Virtual machine lock manager socket.
Oct 28 15:53:31 systemd[1]: Stopping Virtual machine lock manager socket.
Oct 28 15:53:31 systemd[1]: Listening on Virtual machine lock manager socket.
Oct 28 15:53:31 systemd[1]: virtlogd.socket: Succeeded.
Oct 28 15:53:31 systemd[1]: Closed Virtual machine log manager socket.
Oct 28 15:53:31 systemd[1]: Stopping Virtual machine log manager socket.
Oct 28 15:53:31 systemd[1]: Listening on Virtual machine log manager socket.
Oct 28 15:53:31 systemd[1]: Stopping Suspend/Resume Running libvirt Guests...
In this case, the try-restart command hung and libvirt-guests was stuck trying
to connect to libvirtd. In the following case, the try-restart worked since
libvirtd was started again before libvirt-guests was stopped!
Oct 28 15:19:02 systemd[1]: Stopping Virtualization daemon...
Oct 28 15:19:02 systemd[1]: Stopped Virtualization daemon.
Oct 28 15:19:02 systemd[1]: Closed Libvirt admin socket.
Oct 28 15:19:02 systemd[1]: Stopping Libvirt admin socket.
Oct 28 15:19:02 systemd[1]: Closed Virtual machine lock manager socket.
Oct 28 15:19:02 systemd[1]: Stopping Virtual machine lock manager socket.
Oct 28 15:19:02 systemd[1]: Listening on Virtual machine lock manager socket.
Oct 28 15:19:02 systemd[1]: Closed Libvirt local read-only socket.
Oct 28 15:19:02 systemd[1]: Stopping Libvirt local read-only socket.
Oct 28 15:19:02 systemd[1]: Closed Libvirt local socket.
Oct 28 15:19:02 systemd[1]: Stopping Libvirt local socket.
Oct 28 15:19:02 systemd[1]: Listening on Libvirt local socket.
Oct 28 15:19:02 systemd[1]: Listening on Libvirt admin socket.
Oct 28 15:19:02 systemd[1]: Listening on Libvirt local read-only socket.
Oct 28 15:19:02 systemd[1]: Closed Virtual machine log manager socket.
Oct 28 15:19:02 systemd[1]: Stopping Virtual machine log manager socket.
Oct 28 15:19:02 systemd[1]: Listening on Virtual machine log manager socket.
Oct 28 15:19:02 systemd[1]: Starting Virtualization daemon...
Oct 28 15:19:02 systemd[1]: Stopping Suspend/Resume Running libvirt Guests...
Oct 28 15:19:02 systemd[1]: Started Virtualization daemon.
Oct 28 15:19:02 libvirt-guests.sh[4912]: Running guests on default URI: no
running guests.
Oct 28 15:19:02 systemd[1]: Stopped Suspend/Resume Running libvirt Guests.
Oct 28 15:19:02 systemd[1]: Stopped target Libvirt guests shutdown.
Oct 28 15:19:02 systemd[1]: Stopping Libvirt guests shutdown.
Oct 28 15:19:02 systemd[1]: Reached target Libvirt guests shutdown.
Oct 28 15:19:02 systemd[1]: Starting Suspend/Resume Running libvirt Guests...
Oct 28 15:19:02 systemd[1]: Started Suspend/Resume Running libvirt Guests.
Adding 'Requires=libvirtd.service' to virt-guest-shutdown.target results in
something more reasonable
Oct 28 15:40:00 systemd[1]: Stopping Suspend/Resume Running libvirt Guests...
Oct 28 15:40:00 libvirt-guests.sh[5245]: Running guests on default URI: no
running guests.
Oct 28 15:40:00 systemd[1]: Stopped Suspend/Resume Running libvirt Guests.
Oct 28 15:40:00 systemd[1]: Stopped target Libvirt guests shutdown.
Oct 28 15:40:00 systemd[1]: Stopping Libvirt guests shutdown.
Oct 28 15:40:00 systemd[1]: Stopping Virtualization daemon...
Oct 28 15:40:00 systemd[1]: Stopped Virtualization daemon.
Oct 28 15:40:00 systemd[1]: Closed Virtual machine log manager socket.
Oct 28 15:40:00 systemd[1]: Stopping Virtual machine log manager socket.
Oct 28 15:40:00 systemd[1]: Listening on Virtual machine log manager socket.
Oct 28 15:40:00 systemd[1]: Closed Libvirt admin socket.
Oct 28 15:40:00 systemd[1]: Stopping Libvirt admin socket.
Oct 28 15:40:00 systemd[1]: Closed Libvirt local read-only socket.
Oct 28 15:40:00 systemd[1]: Stopping Libvirt local read-only socket.
Oct 28 15:40:00 systemd[1]: Closed Libvirt local socket.
Oct 28 15:40:00 systemd[1]: Stopping Libvirt local socket.
Oct 28 15:40:00 systemd[1]: Listening on Libvirt local socket.
Oct 28 15:40:00 systemd[1]: Listening on Libvirt admin socket.
Oct 28 15:40:00 systemd[1]: Listening on Libvirt local read-only socket.
Oct 28 15:40:00 systemd[1]: Closed Virtual machine lock manager socket.
Oct 28 15:40:00 systemd[1]: Stopping Virtual machine lock manager socket.
Oct 28 15:40:00 systemd[1]: Listening on Virtual machine lock manager socket.
Oct 28 15:40:00 systemd[1]: Starting Virtualization daemon...
Oct 28 15:40:00 systemd[1]: Started Virtualization daemon.
Oct 28 15:40:00 systemd[1]: Reached target Libvirt guests shutdown.
Oct 28 15:40:00 systemd[1]: Starting Suspend/Resume Running libvirt Guests...
Oct 28 15:40:00 systemd[1]: Started Suspend/Resume Running libvirt Guests.
I found that 'Wants=libvirtd.service' in virt-guest-shutdown.target was not
strong enough. Should virt-guest-shutdown.target 'Requires=libvirtd.service', or
do I need to look closer at systemd (systemd-246)?
Regards,
Jim
4 years, 1 month
[PATCH] Revert "spec: Simplify setting features off by default"
by Neal Gompa
As it turns out, the rather complicated structure that is
currently used for enabling or disabling features in the libvirt
build does not cleanly map well to RPM's bcond feature.
Consequently, we need these back in order to support trivially
activating these features through extra macros as build inputs.
This reverts commit 31d687a3218c9072d7050dd608e013e063ca180f.
Signed-off-by: Neal Gompa <ngompa13(a)gmail.com>
---
libvirt.spec.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 2a4324b974..84515cc7de 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -98,14 +98,14 @@
%define with_numactl 0%{!?_without_numactl:1}
# A few optional bits off by default, we enable later
-%define with_fuse 0
-%define with_sanlock 0
-%define with_numad 0
-%define with_firewalld_zone 0
-%define with_libssh2 0
-%define with_wireshark 0
-%define with_libssh 0
-%define with_dmidecode 0
+%define with_fuse 0%{!?_without_fuse:0}
+%define with_sanlock 0%{!?_without_sanlock:0}
+%define with_numad 0%{!?_without_numad:0}
+%define with_firewalld_zone 0%{!?_without_firewalld:0}
+%define with_libssh2 0%{!?_without_libssh2:0}
+%define with_wireshark 0%{!?_without_wireshark:0}
+%define with_libssh 0%{!?_without_libssh:0}
+%define with_dmidecode 0%{!?_without_dmidecode:0}
# Finally set the OS / architecture specific special cases
--
2.28.0
4 years, 1 month
[PATCH 00/12] use g_autoptr for all DIR*
by Laine Stump
I don't even remember why I started looking at this. I think that
again I was considering changing some function, and making the DIR* in
that function autoclose was a prerequisite for a reasonably clean
addition to the function. I eventually gave up on the other plan
(probably because it was a bad idea), but decided that the DIR*'s
really did need to autoclose.
In the end, all uses of DIR* could be easily converted to use
g_autoptr.
Laine Stump (12):
consistently use VIR_DIR_CLOSE() instead of virDirClose()
tools: reduce scope of a DIR* in virHostValidateIOMMU()
storage: remove extraneous call to VIR_DIR_CLOSE()
util: reduce scope of a DIR * in virCgroupV1SetOwner()
util: manually set dirp to NULL after closing in
virCapabilitiesInitCache()
util: change virDirClose to take a DIR* instead of DIR**.
util: declare g_autoptr cleanup function to auto-close DIR*
change DIR* int g_autoptr(DIR) where appropriate
conf: convert final DIR* to g_autoptr
util: remove unused VIR_DIR_CLOSE() macro
util: refactor function to simplify and remove label
remove unnecessary cleanup labels and unused return variables
src/bhyve/bhyve_capabilities.c | 3 +-
src/conf/capabilities.c | 5 +-
src/conf/virdomainobjlist.c | 3 +-
src/conf/virnetworkobj.c | 44 +++++---------
src/conf/virnwfilterbindingobjlist.c | 3 +-
src/conf/virnwfilterobj.c | 3 +-
src/conf/virsecretobj.c | 3 +-
src/conf/virstorageobj.c | 6 +-
src/openvz/openvz_conf.c | 3 +-
src/qemu/qemu_driver.c | 6 +-
src/qemu/qemu_interop_config.c | 14 ++---
src/security/security_selinux.c | 8 +--
src/storage/storage_backend_iscsi.c | 3 +-
src/storage/storage_util.c | 69 ++++++++-------------
src/util/vircgroup.c | 23 +++----
src/util/vircgroupv1.c | 5 +-
src/util/vircommand.c | 12 ++--
src/util/virdevmapper.c | 9 +--
src/util/virfile.c | 65 ++++++++------------
src/util/virfile.h | 4 +-
src/util/virhook.c | 8 +--
src/util/virhostcpu.c | 6 +-
src/util/virnetdev.c | 13 ++--
src/util/virnuma.c | 24 +++-----
src/util/virpci.c | 91 +++++++++++-----------------
src/util/virprocess.c | 3 +-
src/util/virresctrl.c | 30 ++++-----
src/util/virscsi.c | 32 ++++------
src/util/virscsihost.c | 3 +-
src/util/virusb.c | 3 +-
src/util/virutil.c | 26 +++-----
src/util/virvhba.c | 20 +++---
tests/testutilsqemu.c | 35 ++++-------
tests/virschematest.c | 3 +-
tools/virt-host-validate-common.c | 4 +-
35 files changed, 206 insertions(+), 386 deletions(-)
--
2.26.2
4 years, 1 month