[libvirt PATCH] qemu: Do not pass negative ncpus to virCapabilitiesClearHostNUMACellCPUTopology
by Jiri Denemark
It won't cause any harm as cpus is NULL when we pass a negative ncpus,
but doing so when the function expects unsigned value is not right.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/capabilities.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index a3e68741a9..cea4803fc8 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1954,6 +1954,7 @@ virCapabilitiesHostNUMAInitReal(virCapsHostNUMA *caps)
if (ncpus == -2)
continue;
+ ncpus = 0;
goto cleanup;
}
--
2.33.1
3 years, 1 month
[libvirt PATCH] util: Avoid null pointer dereference when setting QoS on OVS
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/util/virnetdevopenvswitch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index 250726a633..5dab545037 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -759,7 +759,7 @@ virNetDevOpenvswitchInterfaceSetQos(const char *ifname,
}
virCommandAddArgList(cmd, vmid_ex_id, ifname_ex_id, NULL);
if (virCommandRun(cmd, NULL) < 0) {
- if (*queue_uuid) {
+ if (queue_uuid && *queue_uuid) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to set queue configuration on port %s"), ifname);
} else {
--
2.33.1
3 years, 1 month
[PATCH v3 0/3] qapi & doc: deprecate drive-backup
by Vladimir Sementsov-Ogievskiy
Hi all!
See 03 commit message for details. 01-02 are preparation docs update.
v3: wording fix-ups and improvements suggested by Kashyap
v2: add a lot of documentation changes
v1 was "[PATCH] qapi: deprecate drive-backup"
Note, that this series lack deprecating drive-backup transaction action.
That's done by Markus in 05 patch of
"[PATCH v4 0/5] qapi: Add feature flags to enum members"
So, the most effective would be to take these series together.
Vladimir Sementsov-Ogievskiy (3):
docs/block-replication: use blockdev-backup
docs/interop/bitmaps: use blockdev-backup
qapi: deprecate drive-backup
docs/about/deprecated.rst | 11 +
docs/block-replication.txt | 4 +-
docs/interop/bitmaps.rst | 285 +++++++++++++++++++------
docs/interop/live-block-operations.rst | 47 ++--
qapi/block-core.json | 5 +-
5 files changed, 263 insertions(+), 89 deletions(-)
--
2.31.1
3 years, 1 month
[libvirt PATCH 0/3] daemon: allow setting minimum SSF level
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1431589
Ján Tomko (3):
remote: warn on low SSF
daemon: virNetSASLContext: store tcpMinSSF
daemon: add tcp_min_ssf option
src/libvirt_sasl.syms | 1 +
src/remote/libvirtd.aug.in | 1 +
src/remote/libvirtd.conf.in | 8 ++++++++
src/remote/remote_daemon.c | 7 ++++++-
src/remote/remote_daemon_config.c | 15 +++++++++++++++
src/remote/remote_daemon_config.h | 1 +
src/remote/remote_daemon_dispatch.c | 2 +-
src/remote/remote_driver.c | 5 +++++
src/remote/remote_driver.h | 2 ++
src/remote/test_libvirtd.aug.in | 1 +
src/rpc/virnetsaslcontext.c | 11 ++++++++++-
src/rpc/virnetsaslcontext.h | 5 ++++-
12 files changed, 55 insertions(+), 4 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH v2 0/2] qemu: tpm: Activate PCR banks of a TPM 2.0 before VM start
by Stefan Berger
This series of patches adds support for activating the PCR banks of a TPM 2.0
before starting a VM.
Stefan
Stefan Berger (2):
qemu: Move code to add encryption options for swtpm_setup into
function
qemu: tpm: Extend TPM domain XML with PCR banks to activate
docs/formatdomain.rst | 12 +-
docs/schemas/basictypes.rng | 6 +
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 21 ++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_tpm.c | 135 +++++++++++++++---
src/util/virtpm.c | 1 +
src/util/virtpm.h | 1 +
tests/qemuxml2argvdata/tpm-emulator-tpm2.xml | 2 +-
.../tpm-emulator-tpm2.x86_64-latest.xml | 2 +-
10 files changed, 165 insertions(+), 21 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH v2 0/1] virt-aa-helper: Remove corrupted profile
by Ioanna Alifieraki
This is a v2 of the patches sent previously and hopefully makes things simpler.
(previous patches subject: [PATCH 0/4] virt-aa-helper: Add new option to remove corrupted).
This patch aims to address the bug reported in [1] and [2].
Bug description :
Some times libvirt fails to start a vm with the following error :
libvirt: error : unable to set AppArmor profile 'libvirt-b05b297f-952f-42d6-b04e-f9a13767db54' for '/usr/bin/kvm-spice': No such file or directory
This happens because file /etc/apparmor.d/libvirt/libvirt-<vm-uuid> has 0 size.
During the vm start-up virt-aa-helper tries to load the profile and because it is 0 it fails.
When file /etc/apparmor.d/libvirt/libvirt-<vm-uuid> is removed the vm can start without problems.
To address this issue this patch checks if the profile has 0 size and if this is
the case it removes it.
Changes with v1:
I incorporated the feedback provided on v1 so the patches change as follows :
Patches 1, 2 and 4 from v1 are dropped.
The first patch is dropped because according to feedback provided remove_profile
is not necessary and in the new version we unlink the profile directly in main().
In addition we skip calling create_profile twice by adding a boolean variable
'purged' if the profile was purged and creation occurs later on in main().
The second patch, which was adding a the option (-P) to remove the profile is dropped
because currently this action happens only internally and there is no use case needed
to make it available to the users of virt-aa-helper.
The third patch which is the actual fix stays but modified.
The forth patch which was adding a test to virt-aa-helper-test was the hardest to drop.
Although, I'd like to have a test for this case, there is no apparent to make a test
for this without having any side effects.
The tests in virt-aa-helper-test are run with the --dryrun option and therefore no action
should really happen.
To test this fix, we need to create a corrupted profile and then remove it violating the dryrun.
[1] https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1927519
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890084
Ioanna Alifieraki (1):
virt-aa-helper: Purge profile if corrupted
src/security/virt-aa-helper.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
--
2.17.1
3 years, 1 month
[libvirt PATCH] docs: fix documentation for nodedev-start
by Jonathon Jongsma
Presumably the result of a copy/paste mistake, the the argument for the
`nodedev-start` command was described as a 'network' rather than a
'device'.
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
pushed as trivial
docs/manpages/virsh.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index bcc9c80320..ac564d94f2 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -5083,7 +5083,7 @@ nodedev-start
::
- nodedev-start network
+ nodedev-start device
Start a (previously defined) inactive device.
--
2.31.1
3 years, 1 month
[PATCH 0/4] qemu: Report stats for backing images
by Peter Krempa
Management tools such as oVirt need to monitor the 'allocation' of the
backup job scratch file or disk copy target. Add the stats to the bulk
stats.
The stats can be queried by:
$ virsh domstats $VM --block --backing
Patch 1 fixes a bug in the status XML formatter where we'd not store the
private data for the scratch file of a backup job, which resulted in a
failure of getting the stats after restart of libvirtd.
Peter Krempa (4):
virDomainBackupDefFormat: Propagate private data callbacks
qemustatusxml2xmldata: backup-pull: Add private data for scratch image
qemuMonitorJSONQueryBlockstats: query stats for helper images
qemuDomainGetStatsBlockExportDisk: Report stats also for helper images
src/conf/backup_conf.c | 10 +--
src/conf/backup_conf.h | 3 +-
src/qemu/qemu_backup.c | 4 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 61 +++++++++++++++++++
src/qemu/qemu_monitor.c | 4 +-
src/qemu/qemu_monitor_json.c | 20 +++---
src/qemu/qemu_monitor_json.h | 3 +-
tests/genericxml2xmltest.c | 2 +-
.../qemustatusxml2xmldata/backup-pull-in.xml | 9 ++-
10 files changed, 95 insertions(+), 23 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH] meson: Fix rst2html5 detection
by Andrea Bolognani
The first part of the version string contains the name that the
rst2html5 command was invoked as, which can differ based on the
operating system: on FreeBSD, for example, it's rst2html5.py
instead of just rst2html5.
Fix our detection logic so that it works regardless of the
specific name used for the docutils-provided rst2html5 command.
Fixes: cf0c9e186565e886a0016b2b269088b3eed3d26d
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as a CI fix.
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 3a9066b9fe..6f5d480c1e 100644
--- a/meson.build
+++ b/meson.build
@@ -836,8 +836,8 @@ endforeach
# Use this knowledge to detect the version that we know doesn't work
# for building libvirt and reject it
rst2html5_version = run_command(rst2html5_prog, '--version')
-rst2html5_version = rst2html5_version.stdout().split('(')
-if rst2html5_version[0] != 'rst2html5 '
+rst2html5_version = rst2html5_version.stdout().split(' ')
+if rst2html5_version[1] != '(Docutils'
error('Please uninstall the rst2html5 package and install the docutils package')
endif
--
2.31.1
3 years, 1 month
[libvirt PATCH 0/2] meson: Detect and reject invalid rst2html5 command
by Andrea Bolognani
Previous attempt at solving this issue:
https://listman.redhat.com/archives/libvir-list/2021-June/msg00097.html
The solution presented here should be way more future-proof, though
there's of course always the risk that the format used to report
version information will change in a way that causes our detection to
trip over...
Andrea Bolognani (2):
meson: Use 'rst2html5' instead of 'rst2html' everywhere
meson: Detect and reject invalid rst2html5 command
docs/go/meson.build | 2 +-
docs/kbase/meson.build | 2 +-
docs/manpages/meson.build | 2 +-
docs/meson.build | 8 ++++----
meson.build | 30 +++++++++++++++++++++++++++++-
5 files changed, 36 insertions(+), 8 deletions(-)
--
2.31.1
3 years, 1 month