[libvirt PATCH 0/4] Misc version updates
by Daniel P. Berrangé
In both yajl and wireshark we can bump our min version per our platform
support matrix and thus eliminate some historical cruft.
Daniel P. Berrangé (4):
meson: assume pkg-config support for yajl
meson: bump min wireshark to 2.6.0
rpm: remove version checks for wireshark
rpm: enable wireshark build for RHEL-8 and later
libvirt.spec.in | 8 +++----
meson.build | 63 ++++++++++++++-----------------------------------
2 files changed, 22 insertions(+), 49 deletions(-)
--
2.28.0
4 years
[libvirt PATCH] Do not disable incompatible-pointer-types-discards-qualifiers
by Martin Kletzander
This reverts commit b3710e9a2af402a2b620de570b062294e11190eb.
That check is very valuable for our code, but it causes issue with glib >=
2.67.0 when building with clang.
The reason is a combination of two commits in glib, firstly fdda405b6b1b which
adds a g_atomic_pointer_{set,get} variants that enforce stricter type
checking (by removing an extra cast) for compilers that support __typeof__, and
commit dce24dc4492d which effectively enabled the new variant of glib's atomic
code for clang. This will not be necessary when glib's issue #600 [0] (8 years
old) is fixed. Thankfully, MR #1719 [1], which is supposed to deal with this
issue was opened 3 weeks ago, so there is a slight sliver of hope.
[0] https://gitlab.gnome.org/GNOME/glib/-/issues/600
[1] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
meson.build | 3 ---
src/qemu/qemu_domain.c | 7 +++++++
src/util/vireventthread.c | 6 ++++++
src/util/viridentity.c | 6 ++++++
src/util/virobject.c | 6 ++++++
5 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index cecaad199d4c..04646e3a078c 100644
--- a/meson.build
+++ b/meson.build
@@ -405,9 +405,6 @@ cc_flags += [
# so use this Clang-specific arg to keep it quiet
'-Wno-typedef-redefinition',
- # Clang complains about casts in G_DEFINE_TYPE(...)
- '-Wno-incompatible-pointer-types-discards-qualifiers',
-
# We don't use -Wc++-compat so we have to enable it explicitly
'-Wjump-misses-init',
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 2158080a56ad..3349476cceae 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -330,7 +330,14 @@ struct _qemuDomainLogContext {
virLogManagerPtr manager;
};
+#pragma clang diagnostic push
+/* Workaround for glib's issue #600 on clang */
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+
G_DEFINE_TYPE(qemuDomainLogContext, qemu_domain_log_context, G_TYPE_OBJECT);
+
+#pragma clang diagnostic pop
+
static virClassPtr qemuDomainSaveCookieClass;
static void qemuDomainLogContextFinalize(GObject *obj);
diff --git a/src/util/vireventthread.c b/src/util/vireventthread.c
index 8342f420f666..4e202c94d0f0 100644
--- a/src/util/vireventthread.c
+++ b/src/util/vireventthread.c
@@ -32,8 +32,14 @@ struct _virEventThread {
GMainLoop *loop;
};
+#pragma clang diagnostic push
+/* Workaround for glib's issue #600 on clang */
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+
G_DEFINE_TYPE(virEventThread, vir_event_thread, G_TYPE_OBJECT)
+#pragma clang diagnostic pop
+
#define VIR_FROM_THIS VIR_FROM_EVENT
static void
diff --git a/src/util/viridentity.c b/src/util/viridentity.c
index 2cb9042a846a..43f447f629fe 100644
--- a/src/util/viridentity.c
+++ b/src/util/viridentity.c
@@ -50,8 +50,14 @@ struct _virIdentity {
virTypedParameterPtr params;
};
+#pragma clang diagnostic push
+/* Workaround for glib's issue #600 on clang */
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+
G_DEFINE_TYPE(virIdentity, vir_identity, G_TYPE_OBJECT)
+#pragma clang diagnostic pop
+
static virThreadLocal virIdentityCurrent;
static void virIdentityFinalize(GObject *obj);
diff --git a/src/util/virobject.c b/src/util/virobject.c
index a6305354c35e..8d1f26618334 100644
--- a/src/util/virobject.c
+++ b/src/util/virobject.c
@@ -53,8 +53,14 @@ struct _virObjectPrivate {
};
+#pragma clang diagnostic push
+/* Workaround for glib's issue #600 on clang */
+#pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+
G_DEFINE_TYPE_WITH_PRIVATE(virObject, vir_object, G_TYPE_OBJECT)
+#pragma clang diagnostic pop
+
#define VIR_OBJECT_NOTVALID(obj) (!obj || !VIR_IS_OBJECT(obj))
#define VIR_OBJECT_USAGE_PRINT_WARNING(anyobj, objclass) \
--
2.29.2
4 years
[libvirt PATCH] news: Fix vertical and horizontal spacing
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
NEWS.rst | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/NEWS.rst b/NEWS.rst
index f4fc407b77..98303432f0 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -33,6 +33,7 @@ v6.10.0 (unreleased)
This drops support for Windows Server 2008R2 and 2012.
The earliest supported version is now Windows 2012R2.
+
v6.9.0 (2020-11-02)
===================
@@ -165,17 +166,17 @@ v6.8.0 (2020-10-01)
* qemu: Preserve qcow2 cluster size after external snapshots
- The new overlay image which is installed on top of the current chain when
- taking an external snapshot now preserves the cluser size of the original
- top image to preserve any performance tuning done on the original image.
+ The new overlay image which is installed on top of the current chain when
+ taking an external snapshot now preserves the cluser size of the original
+ top image to preserve any performance tuning done on the original image.
* **Bug fixes**
* qemu: Various (i)SCSI backed hostdev fixes
- (i)SCSI backed hostdevs now work again with an arbitrarily long
- user-specified device alias and also honor the 'readonly' property after a
- recent rewrite.
+ (i)SCSI backed hostdevs now work again with an arbitrarily long
+ user-specified device alias and also honor the 'readonly' property after a
+ recent rewrite.
* **Removed features**
--
2.26.2
4 years
[PATCH] News: Several apparmor improvements at v6.7.0[v3]
by jgao
From: Jianan Gao <jgao(a)redhat.com>
Add news about apparmor about the improvements.
Signed-off-by: Jianan Gao <jgao(a)redhat.com>
---
Clarified news content and revised commit information
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 905deba5a8..fd3254d47f 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -224,6 +224,11 @@ v6.7.0 (2020-09-01)
forbidden and no size auto-alignment will be made. Instead, libvirt will
suggest an aligned round up size for the user.
+ * apparmor: Several improvements
+
+ Add support for virtiofs filesystem and allow qemu load old shared objects after
+ upgrade.
+
* **Bug fixes**
* virdevmapper: Deal with kernels without DM support
--
2.21.3
4 years
Issues 14 and 90 Contribution Details
by Dustan B Helm
Hey Libvirt team. We are looking into issue 14
<https://gitlab.com/libvirt/libvirt/-/issues/14> and issue 90
<https://gitlab.com/libvirt/libvirt/-/issues/90> to make possible
contributions to one or both of them. However, before we start preparing
patches for either of these issues, we have some clarifying questions about
the scope of the necessary changes.
Issue 14: Mostly we wanted to know what was wrong with Guannan's previous
attempt at patching this. Was it incorrect, incomplete, or otherwise
lacking? We also were confused on how Peter's usb-audio commit actually
addressed an issue. It seems like most of the changes were documentation
and constant and only a few changes changed significant amounts of code. We
understand that QEMU is the program actually handling the sound card, but
how do Peter's changes actually hook up the sound card with QEMU? Would the
changes needed for the usb-net device be the same as Peter's usb-audio
changes except in different sections of each file, or would the changes
need to be made elsewhere? We saw that Peter and Guannan both had changes
to tests/qemuhelptest.c and src/qemu/qemu_capabilities.c (to name a few).
Issue 90:In order to implement a new network disk protocol, we believe
there should be changes to the parameters in virsh/attach-disk, but we also
know that there will likely be changes elsewhere in the codebase to allow
support for a new protocol type. Ex: diskSourceNetworkProtocol definitions
in docs/schemas/domaincommon.rng. Is there documentation available on what
files/sections of the codebase handle supporting network disk protocols, so
we can find more reference examples and begin to make changes in the
appropriate locations?
Thanks in advance,
Dustan Helm, Ryan Gahagan, Barrett Schonefeld
4 years
[PATCH] News: Several apparmor improvements at v6.7.0
by jgao
From: jgao <jgao(a)redhat.com>
Add news about apparmor about the improvements.
Signed-off-by: jgao <jgao(a)redhat.com>
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 905deba5a8..30a4f1065a 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -224,6 +224,11 @@ v6.7.0 (2020-09-01)
forbidden and no size auto-alignment will be made. Instead, libvirt will
suggest an aligned round up size for the user.
+ * apparmor: Several improvements
+
+ Add support for virtiofs filesystem, allowing qemu load old shared objects after
+ upgrades.
+
* **Bug fixes**
* virdevmapper: Deal with kernels without DM support
--
2.21.3
4 years
[PATCH] util: remove ATTRIBUTE_NONNULL from virDirClose declaration
by Laine Stump
Before commit 24d8968c, virDirClose took a DIR**, and that was never
NULL, so its declaration included ATTRIBUTE_NONNULL(1). Since that
commit, virDirClose takes a DIR*, and it may be NULL (e.g. if the DIR*
is initialized to NULL and was never closed).
Even though virDirClose() is currently only called implicitly (as the
cleanup for a g_autoptr(DIR)), and (as I've just newly learned) the
autocleanup function g_autoptr will only be called if the pointer in
question is non-null (see the definition of
_GLIB_AUTOPTR_CLEAR_FUNC_NAME in
/usr/include/glib-2.0/glib/gmacros.h), it does still cause Coverity to
complain that it *could* be called with a NULL, and it's also possible
that in the future someone might add code that explicitly calls
virDirClose.
To eliminate the Coverity complaints, and protect against the
hypothetical future where someone both explicitly calls virDirClose()
with a potentially NULL value, *and* re-enables the nonnull directive
when not building with Coverity (disabled by commit eefb881) this
patch removes the ATTRIBUTE_NONNULL(1) from the declaration of
virDirClose().
Fixes: 24d8968cd0a718af4badbbc858b1b449fea7205a
Details-Research-by: Dan Berrange <berrange(a)redhat.com>
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
src/util/virfile.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/util/virfile.h b/src/util/virfile.h
index ba31a78e58..32505826ee 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -269,8 +269,7 @@ int virDirOpenQuiet(DIR **dirp, const char *dirname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDirRead(DIR *dirp, struct dirent **ent, const char *dirname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
-void virDirClose(DIR *dirp)
- ATTRIBUTE_NONNULL(1);
+void virDirClose(DIR *dirp);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(DIR, virDirClose);
int virFileMakePath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
--
2.28.0
4 years
[PATCH 1/1] qemu_driver.c: do not redefine 'event' in qemuDomainDefineXMLFlags()
by Daniel Henrique Barboza
A bad merge while rebasing 74b2834333a caused the @event variable
to be defined twice, inside the 'cleanup' label, causing coverity
errors.
This code was originally moved outside of the label by commit
773c7c43611a. Delete the unintended code in the 'cleanup'
label.
Fixes: 74b2834333ab3bf500f870e0a6d4e8309379d96a
Reported-by: John Ferlan <jferlan(a)redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/qemu/qemu_driver.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 78ccf96df5..ac38edf009 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6748,15 +6748,6 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
}
}
- event = virDomainEventLifecycleNewFromObj(vm,
- VIR_DOMAIN_EVENT_DEFINED,
- !oldDef ?
- VIR_DOMAIN_EVENT_DEFINED_ADDED :
- VIR_DOMAIN_EVENT_DEFINED_UPDATED);
-
- VIR_INFO("Creating domain '%s'", vm->def->name);
- dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
-
virDomainObjEndAPI(&vm);
virObjectEventStateQueue(driver->domainEventState, event);
return dom;
--
2.26.2
4 years
[PATCH v1 00/10] more simple g_autoptr() cleanups
by Daniel Henrique Barboza
I intended to clean up the virDomainDefFree() calls that I
kept seeing in qemu_driver.c, ended up doing a bit more than
that.
Daniel Henrique Barboza (10):
qemu_driver.c: use g_autoptr() with virDomainDef pointers
qemu_driver.c: use g_autoptr() with qemuMigrationParams pointers
qemu_driver.c: use g_autoptr() with virDomainDeviceDefPtr
qemu_driver.c: remove unneeded 'cleanup' labels
qemu_snapshot.c: remove uneeded 'cleanup' label in
qemuSnapshotDelete()
qemu_domain.c: use g_autoptr() with virDomainDef pointers
qemu_domain.c: remove unneeded cleanup labels
qemu_domain.c: modernize qemuDomainFixupCPUs()
qemu_domain.c: modernize qemuDomainWriteMasterKeyFile()
qemu_domain.c: modernize qemuMonitorGetCpuHalted()
src/qemu/qemu_domain.c | 100 ++++++------------
src/qemu/qemu_driver.c | 219 +++++++++++++++------------------------
src/qemu/qemu_snapshot.c | 3 +-
3 files changed, 119 insertions(+), 203 deletions(-)
--
2.26.2
4 years
[PATCH] virnetdevopenvswitch: Fix ATTRIBUTE_NONNULL() tag for virNetDevOpenvswitchGetVhostuserIfname()
by Michal Privoznik
After e4c29e2904 the function has one argument more and the
argument that can't be NULL moved from second to third position.
Reported-by: John Ferlan <jferlan(a)redhat.com>
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed as trivial.
src/util/virnetdevopenvswitch.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h
index 5cd1d22ae3..8409aa92ac 100644
--- a/src/util/virnetdevopenvswitch.h
+++ b/src/util/virnetdevopenvswitch.h
@@ -63,7 +63,7 @@ int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
bool server,
char **ifname)
- ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
+ ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
int virNetDevOpenvswitchUpdateVlan(const char *ifname,
const virNetDevVlan *virtVlan)
--
2.26.2
4 years