[libvirt] [PATCH 0/4] Fix check for accept_ra when starting an IPv6 network
by Laine Stump
These patches fix the crash described in:
https://bugzilla.redhat.com/1583131
They also fix a deficiency revealed by that crash - we weren't
checking the accept_ra value of interfaces in the "nexthop" elements
of multipath RA routes.
Laine Stump (4):
util: remove const specifier from nlmsghdr arg to
virNetlinkDumpCallback()
util: add a function to insert new interfaces to IPv6CheckForwarding
list
util: use nlmsg_find_attr() instead of an open-coded loop
util: check accept_ra for all nexthop interfaces of multipath routes
src/util/virnetdevip.c | 115 ++++++++++++++++++++++++++++-------------
src/util/virnetlink.h | 2 +-
2 files changed, 79 insertions(+), 38 deletions(-)
--
2.20.1
5 years, 9 months
[libvirt] [PATCH 0/2] Fix a couple of SCSI hostdev issues
by John Ferlan
See patches for details
John Ferlan (2):
qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices
qemu: Remove virHostdevIsSCSIDevice from qemuIsSharedHostdev
src/qemu/qemu_conf.c | 3 +--
src/qemu/qemu_hostdev.c | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.20.1
5 years, 9 months
[libvirt] [PATCH] src: Don't use double-colon rules
by Andrea Bolognani
According to the GNU Make manual, "double-colon rules are
somewhat obscure and not often very useful". Looking at
the few instances we have in libvirt, that certainly seems
to be the case, so just drop them.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/Makefile.am | 6 +++---
src/remote/Makefile.inc.am | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index cd386297ed..8c8dfe3dcf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -816,14 +816,14 @@ if WITH_LIBVIRTD
if LIBVIRT_INIT_SCRIPT_RED_HAT
initdir = $(sysconfdir)/rc.d/init.d
-install-init:: $(SYSVINIT_FILES) install-sysconfig
+install-init: $(SYSVINIT_FILES) install-sysconfig
$(MKDIR_P) $(DESTDIR)$(initdir)
for f in $(SYSVINIT_FILES:%.init=%) ; \
do \
$(INSTALL_SCRIPT) $$f.init $(DESTDIR)$(initdir)/$$f; \
done
-uninstall-init:: uninstall-sysconfig
+uninstall-init: uninstall-sysconfig
rm -f $(SYSVINIT_FILES:%.init=$(DESTDIR)$(initdir)/%)
rmdir $(DESTDIR)$(initdir) || :
@@ -1010,7 +1010,7 @@ install-data-local: $(INSTALL_DATA_LOCAL) \
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/filesystems"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
-uninstall-local:: $(UNINSTALL_LOCAL) \
+uninstall-local: $(UNINSTALL_LOCAL) \
$(INSTALL_DATA_DIRS:%=uninstall-data-%)
rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index 0988435eed..3d0ff29548 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -213,7 +213,7 @@ polkitdir = $(datadir)/polkit-1
polkitactionsdir = $(polkitdir)/actions
polkitrulesdir = $(polkitdir)/rules.d
-install-polkit::
+install-polkit:
$(MKDIR_P) $(DESTDIR)$(polkitactionsdir)
$(INSTALL_DATA) $(srcdir)/remote/libvirtd.policy \
$(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy
@@ -221,7 +221,7 @@ install-polkit::
$(INSTALL_DATA) $(srcdir)/remote/libvirtd.rules \
$(DESTDIR)$(polkitrulesdir)/50-libvirt.rules
-uninstall-polkit::
+uninstall-polkit:
rm -f $(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy
rmdir $(DESTDIR)$(polkitactionsdir) || :
rm -f $(DESTDIR)$(polkitrulesdir)/50-libvirt.rules
--
2.20.1
5 years, 9 months
[libvirt] [PATCH] util: Remove unnecessary ATTRIBUTE_NONNULL for virCommandAddArg[Pair]
by John Ferlan
Commit 912c6b22 modified the virCommandAddArg and virCommandAddArgPair
to perform NULL argument checking; however, no corresponding change
to the prototypes was made to remove the ATTRIBUTE_NONNULL, so the
Coverity build failed. Adjust the prototypes accordingly.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
It's a build breaker for Coverity or anything that enables STATIC_ANALYSIS
so I'll push under that rule.
src/util/vircommand.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index dbf5041890..100f7a06e0 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -123,7 +123,7 @@ void virCommandAddEnvPassAllowSUID(virCommandPtr cmd,
void virCommandAddEnvPassCommon(virCommandPtr cmd);
void virCommandAddArg(virCommandPtr cmd,
- const char *val) ATTRIBUTE_NONNULL(2);
+ const char *val);
void virCommandAddArgBuffer(virCommandPtr cmd,
virBufferPtr buf);
@@ -134,8 +134,7 @@ void virCommandAddArgFormat(virCommandPtr cmd,
void virCommandAddArgPair(virCommandPtr cmd,
const char *name,
- const char *val)
- ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
+ const char *val);
void virCommandAddArgSet(virCommandPtr cmd,
const char *const*vals) ATTRIBUTE_NONNULL(2);
--
2.17.2
5 years, 9 months
[libvirt] [PATCH] qemu: require reply from guest agent in qemuAgentGetInterfaces
by Ján Tomko
Since its introduction in commit 0977b8aa071 (released in v1.2.14)
qemuAgentGetInterfaces calls qemuAgentCommand with needReply=false,
which allows qemuAgentCommand to return 0 even when it did not get
any reply from the agent.
Set needReply to true, since we dereference it right after.
This can be hit if libvirt is waiting for an event from the agent
(e.g. shutdown) and the agent cannot reply in time (e.g. due to
the guest being shut down), as reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=1663051
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 0f4dae37e3..80b789b5e0 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -2043,7 +2043,7 @@ qemuAgentGetInterfaces(qemuAgentPtr mon,
if (!(cmd = qemuAgentMakeCommand("guest-network-get-interfaces", NULL)))
goto cleanup;
- if (qemuAgentCommand(mon, cmd, &reply, false,
+ if (qemuAgentCommand(mon, cmd, &reply, true,
VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK) < 0)
goto cleanup;
--
2.20.1
5 years, 9 months
[libvirt] [PATCH] cpu_map: Add support for arch-capabilities feature
by Jiri Denemark
The feature was added to QEMU in 3.1.0 and it is currently blocking
migration, which is expected to change in the future. Luckily 3.1.0 is
new enough to give us migratability hints on each feature via
query-cpu-model-expension, which means we don't need to use the
"migratable" attribute on the CPU map XML.
The kernel calls this feature arch_capabilities and RHEL/CentOS 7.* use
arch-facilities. Apparently some CPU test files were gathered with the
RHEL version of QEMU. Let's update the test files to avoid possible
confusion about the correct naming.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu_map/x86_features.xml | 3 +++
tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json | 2 +-
tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json | 2 +-
5 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index 59236456d6..02431bea29 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -326,6 +326,9 @@
<feature name='stibp'>
<cpuid eax_in='0x07' ecx_in='0x00' edx='0x08000000'/>
</feature>
+ <feature name='arch-capabilities'> <!-- arch_capabilities, arch-facilities -->
+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x20000000'/>
+ </feature>
<feature name='ssbd'>
<cpuid eax_in='0x07' ecx_in='0x00' edx='0x80000000'/>
</feature>
diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
index 94a60fcc8f..1f53bb8bf3 100644
--- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
+++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb.json
@@ -232,7 +232,7 @@
"avx512vbmi": false,
"kvm-asyncpf": true,
"spec-ctrl": false,
- "arch-facilities": false,
+ "arch-capabilities": false,
"model": 1,
"node-id": -1
}
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
index 10c5434263..6bdaf6e83a 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2609-v3.json
@@ -232,7 +232,7 @@
"avx512vbmi": false,
"kvm-asyncpf": true,
"spec-ctrl": true,
- "arch-facilities": false,
+ "arch-capabilities": false,
"model": 63,
"node-id": -1
}
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
index 0506dec0a7..2c6be20768 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-E5-2623-v4.json
@@ -232,7 +232,7 @@
"avx512vbmi": false,
"kvm-asyncpf": true,
"spec-ctrl": true,
- "arch-facilities": false,
+ "arch-capabilities": false,
"model": 79,
"node-id": -1
}
diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
index 79f3580219..79b47a56fb 100644
--- a/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
+++ b/tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115.json
@@ -232,7 +232,7 @@
"avx512vbmi": false,
"kvm-asyncpf": true,
"spec-ctrl": true,
- "arch-facilities": false,
+ "arch-capabilities": false,
"model": 85,
"node-id": -1
}
--
2.20.1
5 years, 9 months
[libvirt] [PATCH] qemu: Don't enable seclabel remembering for session mode
by Michal Privoznik
The session daemon is unable to set XATTRs in 'trusted'
namespace because it doesn't run as privileged process.
Therefore, when creating the default qemu config enable
rememberOwner only when running as privileged process.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 3718ca6c22..20952e9607 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -145,7 +145,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
cfg->group = (gid_t)-1;
}
cfg->dynamicOwnership = privileged;
- cfg->rememberOwner = true;
+ cfg->rememberOwner = privileged;
cfg->cgroupControllers = -1; /* -1 == auto-detect */
--
2.19.2
5 years, 9 months
[libvirt] [PATCH v2 0/3] Better syntax-check on BSD
by Eric Blake
Since v1: fix the gnulib bug I accidentally introduced, then
copy the gist of Roman's gnulib changes to also apply to our
cfg.mk syntax checks.
Eric Blake (3):
maint: update gnulib for syntax-check on BSD
maint: prefer $(GREP) in cfg.mk
maint: split long lines for BSD syntax-check
.gnulib | 2 +-
cfg.mk | 95 +++++++++++++++++++++++++++++----------------------------
2 files changed, 49 insertions(+), 48 deletions(-)
--
2.20.1
5 years, 9 months