[PATCH 1/1] qemuProcessEventSubmit : rename vm to event->vm
by Shaleen Bathla
Coverity scan reports use after free issue which is a false positive.
In error case, free event->vm instead of vm to avoid this warning in
coverity.
Coverty CID: 403592
Signed-off-by: Shaleen Bathla <shaleen.bathla(a)oracle.com>
---
src/qemu/qemu_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index ee9f0784d3a3..83b553418068 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -287,7 +287,7 @@ qemuProcessEventSubmit(virDomainObj *vm,
event->data = data;
if (virThreadPoolSendJob(driver->workerPool, 0, event) < 0) {
- virObjectUnref(vm);
+ virObjectUnref(event->vm);
qemuProcessEventFree(event);
}
}
--
2.31.1
1 year, 10 months
[libvirt PATCH] rpm: convert license to SPDX format
by Daniel P. Berrangé
Note that with the introduction of SPDX, Fedora no longer wants
maintainers to do effective license analysis, hence we no list
all the licenses that are applicable to the binary package
contents
https://docs.fedoraproject.org/en-US/legal/license-field/#_no_effective_l...
Note, we can still omit licenses that are only applicable to
the build system.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 77b274b6f9..afd0b04f99 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -230,7 +230,7 @@ Summary: Library providing a simple virtualization API
Name: libvirt
Version: @VERSION@
Release: 1%{?dist}
-License: LGPLv2+
+License: GPL-2.0-or-later and LGPL-2.1-only and LGPL-2.1-or-later and OFL-1.1
URL: https://libvirt.org/
%if %(echo %{version} | grep -q "\.0$"; echo $?) == 1
--
2.39.0
1 year, 10 months
[PATCH v1 0/4] Introduce active disk internal snapshot support
by Or Ozeri
Internal disk snapshots are currently only supported on non-active VMs.
This patch series extends this support for active VMs running with qemu.
This implementation for the qemu driver works even when there are other
disks which ask for external snapshot.
Thus we remove the restriction disallowing mixing of internal and external
disk snapshots for active VMs.
Note that mixing is still disallowed for non-active VMs, as it require
a bit more work in a different area of the code.
Additionally we add a new attribute to allow the user specifying a
unique snapshot name for each internal disk snapshot.
In case this optional attribute is not specified, snapshot name
will be taken from the domain snapshot name, as it is currently done today.
Or Ozeri (4):
conf: add snapshotName attribute for internal disk snapshot
qemu: Support active disk internal snapshots
qemu: allow mixing active internal and external active disk snapshots
qemu: switch offline internal disk snapshots to use snapshotName
docs/formatsnapshot.rst | 5 ++
src/conf/schemas/domainsnapshot.rng | 4 +
src/conf/snapshot_conf.c | 27 ++++++
src/conf/snapshot_conf.h | 2 +
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_monitor.c | 9 ++
src/qemu/qemu_monitor.h | 5 ++
src/qemu/qemu_monitor_json.c | 14 +++
src/qemu/qemu_monitor_json.h | 5 ++
src/qemu/qemu_snapshot.c | 88 +++++++++++--------
.../disk_snapshot.xml | 2 +-
.../disk_snapshot.xml | 2 +-
.../disk_snapshot_redefine.xml | 2 +-
tests/qemumonitorjsontest.c | 1 +
14 files changed, 125 insertions(+), 43 deletions(-)
--
2.25.1
1 year, 10 months
Release of libvirt-9.0.0
by Jiri Denemark
The 9.0.0 release of both libvirt and libvirt-python is tagged and
signed tarballs and source RPMs are available at
https://libvirt.org/sources/
https://libvirt.org/sources/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing feedback. Your work is greatly
appreciated.
* New features
* QEMU: implement external snapshot deletion
External snapshot deletion is now possible using the existing API
``virDomainSnapshotDelete()``. Flags that allow deleting children
or children only are not supported.
* QEMU: support passt (https://passt.top)
passt can be used to connect an emulated network device to the
host's network without requiring libvirt to have any sort of
elevated privileges. This is configured with::
<interface type='user'>
<backend type='passt'>
...
* QEMU: add external backend for swtpm
Connecting the VM to a swtpm daemon started outside of libvirt
is now possible.
* QEMU: Support for passing FDs instead of opening files for `<disk>`
A new API `virDomainFDAssociate` gives the users the option to pass FDs
to libvirt and then use them when starting a VM. Currently the FDs can
be used instead of directly opening files as `<disk>` backend.
* Improvements
* qemu: Prefer PNG for domain screenshots
With sufficiently new QEMU (v7.1.0) screenshots change format from PPM to PNG.
* tools: Fix install_mode for some scripts
Scripts from the following list were installed with group write bit set:
virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup,
libvirt-guests.sh. This was changed so that only the owner is able to write
them.
* qemu: Allow multiple nodes for preferred policy
Due to restrictions of old kernels and libnuma APIs, the preferred NUMA
policy accepted just a single host NUMA node. With recent enough kernel
(v5.15.0) and libnuma (v2.0.15) it's possible to set multiple nodes.
* secret: Inhibit shutdown of daemon for ephemeral secrets
When an ephemeral secret is defined then automatic shutdown of virtsecretd
is inhibited. This is to avoid ephemeral secrets disappearing shortly
before their use.
* qemu: Report Hyper-V Enlightenments in domcapabilities
The supported Hyper-V Enlightenments are now reported in domain
capabilities XML.
* Bug fixes
* Fix NULL-pointer dereference `virXMLPropStringRequired`
Fix a bug where when parsing a XML property which is required to be present
by using `virXMLPropStringRequired` the parser will crash instead of
reporting an error.
* qemu: Init ext devices paths on reconnect
Paths for external devices are not stored in the status XML. Therefore,
when the daemon restarted and was reconnecting to a running domain, these
paths were left blank which led to the daemon crash.
* qemu: Validate arguments passed to `virConnectGetDomainCapabilities`
There was a code path in which insufficient validation of input arguments
of `virConnectGetDomainCapabilities` API was possible which led to the
daemon crash. This path is now fixed.
Enjoy.
Jirka
1 year, 10 months
[PATCH 0/9] audio: remove deprecated QEMU_AUDIO env support
by Daniel P. Berrangé
This removes much of the deprecated audio code, most
notably the QEMU_AUDIO env variables. The VNC server
will also stop accepting client requests for audio
streaming unless an audiodev is set.
I tried to make the use of 'audiodev' mandatory for
devices but that turned out to not be practical. Our
test suite assumes it can create any device type
without setting any properties. This is not possible
if 'audiodev' setting is enforced at realize() time.
Also there are several machihe boards with embedded
soundcards that provide no way to set audiodev AFAICT
Daniel P. Berrangé (9):
audio: don't check qemu_add_vm_change_state_handler failure
audio: remove special audio_calloc function
audio: remove unused 'name' in QEMUSoundCard struct
audio: remove QEMUSoundCard linked list
audio: remove empty AUD_remove_card method
docs: split the deprecation warning for soundcards vs VNC
ui/vnc: don't accept VNC_ENCODING_AUDIO without audiodev
audio: audio state is now mandatory for capture
audio: remove support for QEMU_AUDIO_ env variables
audio/alsaaudio.c | 6 +-
audio/audio.c | 71 +---
audio/audio.h | 4 -
audio/audio_int.h | 2 -
audio/audio_legacy.c | 552 --------------------------------
audio/audio_template.h | 28 +-
audio/meson.build | 1 -
audio/mixeng.c | 7 +-
docs/about/deprecated.rst | 16 +-
docs/about/removed-features.rst | 14 +
hw/audio/ac97.c | 1 -
hw/audio/adlib.c | 1 -
hw/audio/es1370.c | 1 -
hw/audio/gus.c | 1 -
hw/audio/hda-codec.c | 1 -
hw/audio/wm8750.c | 1 -
hw/usb/dev-audio.c | 1 -
softmmu/vl.c | 4 -
tests/qtest/fuzz-sb16-test.c | 6 +-
tests/qtest/libqtest.c | 3 -
ui/vnc.c | 10 +-
21 files changed, 53 insertions(+), 678 deletions(-)
delete mode 100644 audio/audio_legacy.c
--
2.38.1
1 year, 10 months
[PATCH] NEWS: Document my contributions for upcoming release
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
NEWS.rst | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 9baf10b8e9..a860c2b6f6 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -50,6 +50,30 @@ v9.0.0 (unreleased)
With sufficiently new QEMU (v7.1.0) screenshots change format from PPM to PNG.
+ * tools: Fix install_mode for some scripts
+
+ Scripts from the following list were installed with group write bit set:
+ virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup,
+ libvirt-guests.sh. This was changed so that only the owner is able to write
+ them.
+
+ * qemu: Allow multiple nodes for preferred policy
+
+ Due to restrictions of old kernels and libnuma APIs, the preferred NUMA
+ policy accepted just a single host NUMA node. With recent enough kernel
+ (v5.15.0) and libnuma (v2.0.15) it's possible to set multiple nodes.
+
+ * secret: Inhibit shutdown of daemon for ephemeral secrets
+
+ When an ephemeral secret is defined then automatic shutdown of virtsecretd
+ is inhibited. This is to avoid ephemeral secrets disappearing shortly
+ before their use.
+
+ * qemu: Report Hyper-V Enlightenments in domcapabilities
+
+ The supported Hyper-V Enlightenments are now reported in domain
+ capabilities XML.
+
* **Bug fixes**
* Fix NULL-pointer dereference `virXMLPropStringRequired`
@@ -58,6 +82,19 @@ v9.0.0 (unreleased)
by using `virXMLPropStringRequired` the parser will crash instead of
reporting an error.
+ * qemu: Init ext devices paths on reconnect
+
+ Paths for external devices are not stored in the status XML. Therefore,
+ when the daemon restarted and was reconnecting to a running domain, these
+ paths were left blank which led to the daemon crash.
+
+ * qemu: Validate arguments passed to `virConnectGetDomainCapabilities`
+
+ There was a code path in which insufficient validation of input arguments
+ of `virConnectGetDomainCapabilities` API was possible which led to the
+ daemon crash. This path is now fixed.
+
+
v8.10.0 (2022-12-01)
====================
--
2.38.2
1 year, 10 months
[PATCH V8 00/13] spec: Decompose the daemon subpackage
by Jim Fehlig
This is V8 of
https://listman.redhat.com/archives/libvir-list/2023-January/236919.html
The end goal is to remove the libvirt-dameon dependency on the various
libvirt-daemon-driver-foo subpackages, allowing installation of a
modular daemon configuration without the traditional monolithic libvirtd.
Changes from V7:
* Since the primary and secondary drivers need to be handled a bit
differently when dropping the libvirt-daemon dependency, split the
work into two patches
Jim Fehlig (13):
spec: Move virtlockd to a new subpackage libvirt-daemon-lock
spec: Move virtlogd to a new subpackage libvirt-daemon-log
spec: Move virtproxyd to a new subpackage libvirt-daemon-proxy
spec: Move lockd plugin to a new subpackage
spec: Rename the libvirt-lock-sanlock subpackage
spec: Move common files and dependencies to libvirt-daemon-common
spec: Add module-init-tools dependency to nodedev and lxc drivers
spec: Add numad dependency to qemu and lxc drivers
spec: Remove libvirt-daemon dependency from secondary drivers
spec: Remove libvirt-daemon dependency from primary drivers
spec: Remove libvirt-daemon dependency from hypervisor subpackages
kbase: Update rpm-deployment.rst with new subpackages
NEWS: Mention split of libvirt-daemon subpackage
NEWS.rst | 6 +
docs/kbase/rpm-deployment.rst | 48 +++--
libvirt.spec.in | 333 ++++++++++++++++++++++++----------
src/libxl/virtxend.service.in | 2 +-
src/qemu/virtqemud.service.in | 2 +-
5 files changed, 281 insertions(+), 110 deletions(-)
--
2.38.1
1 year, 10 months
Entering freeze for libvirt-9.0.0
by Jiri Denemark
I have just tagged v9.0.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
1 year, 10 months
[PATCH] NEWS: Document virDomainFDAssociate and NULL dereference in virXMLPropStringRequired
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
NEWS.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 8482c49b3c..9baf10b8e9 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -38,6 +38,12 @@ v9.0.0 (unreleased)
Connecting the VM to a swtpm daemon started outside of libvirt
is now possible.
+ * QEMU: Support for passing FDs instead of opening files for `<disk>`
+
+ A new API `virDomainFDAssociate` gives the users the option to pass FDs
+ to libvirt and then use them when starting a VM. Currently the FDs can
+ be used instead of directly opening files as `<disk>` backend.
+
* **Improvements**
* qemu: Prefer PNG for domain screenshots
@@ -46,6 +52,11 @@ v9.0.0 (unreleased)
* **Bug fixes**
+ * Fix NULL-pointer dereference `virXMLPropStringRequired`
+
+ Fix a bug where when parsing a XML property which is required to be present
+ by using `virXMLPropStringRequired` the parser will crash instead of
+ reporting an error.
v8.10.0 (2022-12-01)
====================
--
2.38.1
1 year, 10 months
[libvirt PATCH 0/3] Remove <backend upstream='blah'/> per danpb's request, and a couple small cleanups
by Laine Stump
The first patch implements what danpb suggested yesterday - using
<source dev='blah'/> instead of <backend upstream='blah'/> to populate
the passt --interface option. The other two are small cleanups I
noticed while making the changes in patch 1.
jdenemar: feel free to push once they've been reviewed, rather than
waiting for me to get up, so that you can get RC2 tagged.
Laine Stump (3):
conf: remove <backend upstream='xxx'/> attribute
qemu: remove commented-out option in passt qemu commandline setup
tests: remove unused qemu .args file
docs/formatdomain.rst | 9 +++---
src/conf/domain_conf.c | 15 ++++++++--
src/conf/domain_conf.h | 1 +
src/conf/schemas/domaincommon.rng | 13 +++++----
src/qemu/qemu_passt.c | 5 ++--
tests/qemuxml2argvdata/net-user-passt.args | 34 ----------------------
tests/qemuxml2argvdata/net-user-passt.xml | 3 +-
7 files changed, 31 insertions(+), 49 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/net-user-passt.args
--
2.38.1
1 year, 10 months