Re: [libvirt PATCH] Add and for Network Objects

2023-06-27 Thread K Shiva
Forgot to add the formatted strings to virBuffer. A v2 has been sent at: https://listman.redhat.com/archives/libvir-list/2023-June/240514.html

[libvirt PATCH v2] Add and for Network Objects

2023-06-27 Thread K Shiva Kiran
From: K Shiva This patch adds new elements and to the Network XML. - The attribute holds a short title defined by the user and cannot contain newlines. - The attribute holds any documentation that the user wants to store. - Schema definitions of and have been moved from

Re: [PATCH] apparmor: Add support for local profile customizations

2023-06-27 Thread Jim Fehlig
On 6/27/23 11:28, Jim Fehlig wrote: On 6/27/23 10:49, Andrea Bolognani wrote: On Mon, Jun 26, 2023 at 10:46:40PM +0200, Christian Boltz wrote: Am Montag, 26. Juni 2023, 18:29:11 CEST schrieb Andrea Bolognani: On Mon, Jun 26, 2023 at 09:42:32AM -0600, Jim Fehlig wrote: Specifying which copy

[PATCH] Revert "apparmor: Add support for local profile customizations"

2023-06-27 Thread Jim Fehlig
As it turns out, apparmor 2.x and 3.x behave differently or have differing levels of support for local customizations of profiles and profile abstractions. Additionally the apparmor 2.x tools do not cope well with 'include if exists'. Revert this commit until a more complete solution is developed

Re: [PATCH] nodedev: transient mdev update on nodeDeviceCreateXML

2023-06-27 Thread Jonathon Jongsma
On 6/23/23 5:43 AM, Boris Fiuczynski wrote: Update the optional mdev attributes on the new created nodedev object as they otherwise would not get set until the next mdevctl update cycle. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143158 Signed-off-by: Boris Fiuczynski ---

[libvirt PATCH] Add Public Get and Set APIs for Network Metadata

2023-06-27 Thread K Shiva Kiran
This patch introduces public Get and Set APIs for modifying , and elements of the Network object. Added: - enum to select one of the above elements to operate on. - error code and messages for missing metadata. - public API implementation. - driver support. - wire protocol format. - enums and

Re: [PATCH] apparmor: Add support for local profile customizations

2023-06-27 Thread Jim Fehlig
On 6/27/23 10:49, Andrea Bolognani wrote: On Mon, Jun 26, 2023 at 10:46:40PM +0200, Christian Boltz wrote: Am Montag, 26. Juni 2023, 18:29:11 CEST schrieb Andrea Bolognani: On Mon, Jun 26, 2023 at 09:42:32AM -0600, Jim Fehlig wrote: Specifying which copy to use via a build time option is also

Re: [PATCH] apparmor: Add support for local profile customizations

2023-06-27 Thread Andrea Bolognani
On Mon, Jun 26, 2023 at 10:46:40PM +0200, Christian Boltz wrote: > Am Montag, 26. Juni 2023, 18:29:11 CEST schrieb Andrea Bolognani: > > On Mon, Jun 26, 2023 at 09:42:32AM -0600, Jim Fehlig wrote: > > > Specifying which copy to use via a build time option is also an > > > option :-). Does your

[libvirt PATCH v2 2/4] qemu: add run-with async-teardown capability

2023-06-27 Thread Boris Fiuczynski
QEMU capability is looking in query-command-line-options response for ... { "parameters": [ { "name": "async-teardown", "type": "boolean" } ], "option": "run-with" } ... allow to use the QEMU option -run-with async-teardown=on|off

Re: [PATCH] spec: Do not disable some systemd units of newly split package

2023-06-27 Thread Andrea Bolognani
On Mon, Jun 26, 2023 at 04:16:33PM -0600, Jim Fehlig wrote: > On 6/26/23 10:06, Andrea Bolognani wrote: > > The current logic in all packages' %post scriptlet basically > > translates to: if installing the package from scratch, apply the > > systemd presets; if upgrading, leave things well alone.

Re: [PATCH v2 5/5] migration: Deprecate old compression method

2023-06-27 Thread Peter Xu
On Thu, Jun 22, 2023 at 09:50:19PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Acked-by: Peter Xu -- Peter Xu

Re: [PATCH v2 1/5] migration: Use proper indentation for migration.json

2023-06-27 Thread Peter Xu
On Thu, Jun 22, 2023 at 09:50:15PM +0200, Juan Quintela wrote: > We broke it with dirtyrate limit patches. > > Signed-off-by: Juan Quintela Acked-by: Peter Xu -- Peter Xu

Re: [PATCH v5] vfio/pci: Propagate ACPI notifications to user-space via eventfd

2023-06-27 Thread Grzegorz Jaszczyk
pt., 16 cze 2023 o 00:54 Alex Williamson napisał(a): > > On Fri, 9 Jun 2023 13:39:50 + > Grzegorz Jaszczyk wrote: > > > To allow pass-through devices receiving ACPI notifications, permit to > > register ACPI notify handler (via VFIO_DEVICE_SET_IRQS) for a given > > device. The handler role

[libvirt PATCH v2 0/4] Enable asynchronous teardown

2023-06-27 Thread Boris Fiuczynski
Update capabilities for QEMU 8.1 on s390x, add a new capability async-teardown and make use of it when running on s390x hosts to improve memory reclaiming. v2: - switch to use on/off on the QEMU command line - added configuration management of the feature to the domain XML Boris Fiuczynski (3):

[libvirt PATCH v2 4/4] qemu: enable asynchronous teardown on s390x hosts

2023-06-27 Thread Boris Fiuczynski
Enablement of asynchronous teardown on S390 and add tests for asynchronous teardown autogeneration support. Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_domain.c| 14 .../qemuhotplug-base-ccw-live+ccw-virtio.xml | 1 +

[libvirt PATCH v2 3/4] qemu: allow use of async teardown in domain

2023-06-27 Thread Boris Fiuczynski
Asynchronous teardown can be specified if the QEMU binary supports it by adding in the domain XML ... ... By default this new feature is disabled. Signed-off-by: Boris Fiuczynski --- docs/formatdomain.rst | 6 +++ src/conf/domain_conf.c

[libvirt PATCH v2 11/24] qemu_snapshot: use VIR_ASYNC_JOB_SNAPSHOT when reverting snapshot

2023-06-27 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 5d2ffdeee6..1cb0ea55de 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c

[libvirt PATCH v2 02/24] snapshot_conf: export virDomainSnapshotDiskDefClear

2023-06-27 Thread Pavel Hrdina
We will need to call this function from qemu_snapshot when introducing external snapshot revert support. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/snapshot_conf.c | 2 +- src/conf/snapshot_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 5

[libvirt PATCH v2 20/24] virdomainmomentobjlist: introduce virDomainMomentIsAncestor

2023-06-27 Thread Pavel Hrdina
This new helper will allow us to check if we are able to delete external snapshot after user did revert to non-leaf snapshot. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/virdomainmomentobjlist.c | 17 + src/conf/virdomainmomentobjlist.h | 4

[libvirt PATCH v2 14/24] qemu_snapshot: extract external snapshot delete prepare to function

2023-06-27 Thread Pavel Hrdina
This part of code is about to grow to make deletion work when user reverts to non-leaf snapshot. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 89 +--- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git

[libvirt PATCH v2 00/24] introduce external snapshot revert support

2023-06-27 Thread Pavel Hrdina
This implements virDomainRevertToSnapshot to work with external snapshots. In addition it modifies virDomainSnapshotDelete to work correctly when we revert to non-leaf snapshot or when there is non-linear snapshot tree with multiple branches. Gitlab repo with the patches:

[libvirt PATCH v2 07/24] qemu_snapshot: use virDomainDiskByName while updating domain def

2023-06-27 Thread Pavel Hrdina
When creating external snapshot this function is called only when the VM is not running so there is only one definition to care about. However, it will be used by external snapshot revert code for active and inactive definition and they may be different if a disk was (un)plugged only for the

[libvirt PATCH v2 21/24] qemu_snapshot: update backing store after deleting external snapshot

2023-06-27 Thread Pavel Hrdina
With introduction of external snapshot revert we will have to update backing store of qcow images not actively used be QEMU manually. The need for this patch comes from the fact that we stop and start QEMU process therefore after revert not all existing snapshots will be known to that QEMU process

[libvirt PATCH v2 19/24] qemu_snapshot: remove revertdisks when creating new snapshot

2023-06-27 Thread Pavel Hrdina
When user creates a new snapshot after reverting to non-leaf snapshot we no longer need to store the temporary overlays as they will be part of the VM XMLs stored in the newly created snapshot. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 23 ++- 1 file

[libvirt PATCH v2 05/24] snapshot_conf: add new argument to virDomainSnapshotAlignDisks

2023-06-27 Thread Pavel Hrdina
This new option will be used by external snapshot revert code. Signed-off-by: Pavel Hrdina --- src/conf/snapshot_conf.c | 15 --- src/conf/snapshot_conf.h | 3 ++- src/qemu/qemu_snapshot.c | 2 +- src/test/test_driver.c | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-)

[libvirt PATCH v2 18/24] qemu_snapshot: delete: properly update parent snapshot with revert data

2023-06-27 Thread Pavel Hrdina
When deleting external snapshot and parent snapshot is the currently active snapshot as user reverted to it we need to properly update the parent snapshot metadata. After the delete is done the new overlay files will be the currently used files created when snapshot revert was done, replacing the

[libvirt PATCH v2 06/24] qemu_snapshot: introduce qemuSnapshotDomainDefUpdateDisk

2023-06-27 Thread Pavel Hrdina
Extract the code that updates disks in domain definition while creating external snapshots. We will use it later in the external snapshot revert code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 63 1 file

[libvirt PATCH v2 23/24] qemu_snapshot: add checks for external snapshot deletion

2023-06-27 Thread Pavel Hrdina
With the introduction of external snapshot revert support we need to error out in some cases when trying to delete some snapshots. If users reverts to non-leaf snapshots and would try to delete it after the revert is done it would not work currently as this operation would require using

[libvirt PATCH v2 24/24] qemu_snapshot: allow snapshot revert for external snapshots

2023-06-27 Thread Pavel Hrdina
Now that the support to revert external snapshots is implemented we can drop this check. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 9e8a7f2f9f..5150e8685a 100644 ---

[libvirt PATCH v2 10/24] qemu_snapshot: move external disk prepare to single function

2023-06-27 Thread Pavel Hrdina
We will need to reuse the functionality when reverting external snapshots. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c

[libvirt PATCH v2 22/24] qemu_snapshot: check only once if snapshot is external

2023-06-27 Thread Pavel Hrdina
There will be more external snapshot checks introduced by following patch so group them together. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[libvirt PATCH v2 12/24] qemu_snapshot: introduce external snapshot revert support

2023-06-27 Thread Pavel Hrdina
When reverting to external snapshot we need to create new overlay qcow2 files from the disk files the VM had when the snapshot was taken. There are some specifics and limitations when reverting to a snapshot: 1) When reverting to last snapshot we need to first create new overlay files before

[libvirt PATCH v2 17/24] qemu_snapshot: add support to delete external snapshot without block commit

2023-06-27 Thread Pavel Hrdina
When block commit is not needed we can just simply unlink the disk files. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 56 ++-- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c

[libvirt PATCH v2 16/24] qemu_snapshot: prepare data for non-active leaf external snapshot deletion

2023-06-27 Thread Pavel Hrdina
In this case there is no need to run block commit and using qemu process at all. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 55 +++- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git

[libvirt PATCH v2 08/24] qemu_snapshot: introduce qemuSnapshotCreateQcow2Files

2023-06-27 Thread Pavel Hrdina
Extract creation of qcow2 files for external snapshots to separate function as we will need it for external snapshot revert code. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 67 +--- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git

[libvirt PATCH v2 09/24] qemu_snapshot: allow using alternate domain definition when creating qcow2 files

2023-06-27 Thread Pavel Hrdina
To create new overlay files when external snapshot revert support is introduced we will be using different domain definition than what is currently used by the domain. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[libvirt PATCH v2 15/24] qemu_snapshot: add merge to external snapshot delete prepare data

2023-06-27 Thread Pavel Hrdina
Before external snapshot revert every delete operation did block commit in order to delete a snapshot. But now when user reverts to non-leaf snapshot deleting leaf snapshot will not have any overlay files so we can just simply delete the snapshot images. Signed-off-by: Pavel Hrdina ---

[libvirt PATCH v2 01/24] libvirt_private: list virDomainMomentDefPostParse

2023-06-27 Thread Pavel Hrdina
We will need to call this function from qemu_snapshot when introducing external snapshot revert support. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 4 1 file changed, 4 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt PATCH v2 13/24] qemu_snapshot: rename qemuSnapshotDeleteExternalPrepare

2023-06-27 Thread Pavel Hrdina
The new name reflects that we prepare data for external snapshot deletion and the old name will be used later for different part of code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[libvirt PATCH v2 03/24] snapshot_conf: use alternate domain definition in virDomainSnapshotDefAssignExternalNames

2023-06-27 Thread Pavel Hrdina
Commit introduced new argument for virDomainSnapshotAlignDisks() that allows passing alternate domain definition in case the snapshot parent.dom is NULL. In case of redefining snapshot it will not hit the part of code that unconditionally uses parent.dom as there will not be need to generate

[libvirt PATCH v2 04/24] snapshot_conf: introduce metadata element

2023-06-27 Thread Pavel Hrdina
This new element will hold the new disk overlay created when reverting to non-leaf snapshot in order to remember the files libvirt created. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/schemas/domainsnapshot.rng | 7 +++ src/conf/snapshot_conf.c| 27

[libvirt PATCH] Add and for Network Objects

2023-06-27 Thread K Shiva
This patch adds new elements and to the Network XML. - The attribute holds a short title defined by the user and cannot contain newlines. - The attribute holds any documentation that the user wants to store. - Schema definitions of and have been moved from domaincommon.rng to

Entering freeze for libvirt-9.5.0

2023-06-27 Thread Jiri Denemark
I have just tagged v9.5.0-rc1 in the repository and pushed signed tarballs and source RPMs to https://download.libvirt.org/ 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

Re: [PATCH] qemu: prevent SIGSEGV in qemuProcessHandleDumpCompleted

2023-06-27 Thread Jiri Denemark
On Tue, Jun 27, 2023 at 11:43:58 +0300, Nikolai Barybin wrote: > If VIR_ASYNC_JOB_NONE flag is present, job.current is equal > to NULL, which leads to SIGSEGV. Thus, this check should be > moved up. > > Signed-off-by: Nikolai Barybin > --- > src/qemu/qemu_process.c | 2 +- > 1 file changed, 1

[PATCH] qemu: prevent SIGSEGV in qemuProcessHandleDumpCompleted

2023-06-27 Thread Nikolai Barybin
If VIR_ASYNC_JOB_NONE flag is present, job.current is equal to NULL, which leads to SIGSEGV. Thus, this check should be moved up. Signed-off-by: Nikolai Barybin --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c

Re: [libvirt PATCH v3 1/8] Parser and Schema definitions

2023-06-27 Thread Michal Prívozník
On 6/26/23 15:55, K Shiva wrote: > - The definition of struct virNetworkObj has been moved from > virnetworkobj.c to its header as it was needed by network_event.h. > - Added functions to parse and save the XML along with helper functions > that resolve the live/persistent state of the

Re: [libvirt PATCH v3 0/8] Metadata support for Network Objects

2023-06-27 Thread Michal Prívozník
On 6/26/23 15:55, K Shiva wrote: > Adds the following to Network Object: > - , and to the Network Schema, > along with appropriate XML parse methods. > - Get and Set APIs to access or modify the above. > - An async callback that notifies of metadata changes. > > Resolves (GSoC 2023): >

[PATCH] qemu_passt: Actually use @logfd

2023-06-27 Thread Michal Privoznik
In one of my previous commits I've introduced @logfd variable that was supposed to hold FD of passt logfile. But I've forgot to assign the qemuDomainOpenFile() retval to it. Fixes: 8511b96a319836700b4829816cdae27c3630060d Signed-off-by: Michal Privoznik --- Pushed as trivial.