Re: [PATCH v2] util: basic support for VFIO variant drivers

2022-08-23 Thread Alex Williamson
On Tue, 23 Aug 2022 10:11:32 -0400 Laine Stump wrote: > ping. > > I have a different version of this patch where I do read the > modules.alias file rather than just checking the name of the driver, but > that also requires "double mocking" open() in the unit test, which > wasn't working prope

[libvirt PATCH] nodedev: wait a bit longer for new node devices

2022-08-23 Thread Jonathon Jongsma
Openstack developers reported that newly-created mdevs were not recognized by libvirt until after a libvirt daemon restart. The source of the problem appears to be that when libvirt gets the udev 'add' event, the sysfs tree for that device might not be ready and so libvirt waits 100ms for it to app

Re: [PATCH 2/2] qemu: tpm: Remove TPM state after successful migration

2022-08-23 Thread Stefan Berger
On 8/23/22 12:28, Stefan Berger wrote: This patch 'fixes' the behavior of the persistent_state TPM domain XML attribute that intends to preserve the state of the TPM but should not keep the state around on all the hosts a VM has been migrated to. It removes the TPM state directory structure fr

Re: [libvirt PATCH v2 2/2] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Peter Krempa
On Tue, Aug 23, 2022 at 18:22:37 +0200, Erik Skultety wrote: > Coverity reports: > virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, > time_t timeout) > { > if (timeout < ipl->timeout) > return; /* no take-backs */ > >

Re: [libvirt PATCH v2 1/2] nwfilter: Replace a redundant 'now' variable with a direct time(0) call

2022-08-23 Thread Peter Krempa
On Tue, Aug 23, 2022 at 18:22:36 +0200, Erik Skultety wrote: > In this very instance having a variable is pointless since there is > only a single time(0) call in the whole function. > > Signed-off-by: Erik Skultety > --- > src/nwfilter/nwfilter_dhcpsnoop.c | 4 +--- > 1 file changed, 1 insertio

[libvirt RFC 20/24] qemu_snapshot: prepare data for external snapshot deletion

2022-08-23 Thread Pavel Hrdina
In order to save some CPU cycles we will collect all the necessary data to delete external snapshot before we even start. They will be later used by code that deletes the snapshots and updates metadata when needed. With external snapshots we need data that libvirt gets from running QEMU process so

[libvirt RFC 23/24] qemu_snapshot: when deleting snapshot invalidate parent snapshot

2022-08-23 Thread Pavel Hrdina
When deleting external snapshots the operation may fail at any point which could lead to situation that some disks finished the block commit operation but for some disks it failed and the libvirt job ends. In order to make sure that the qcow2 images are in consistent state introduce new element ""

[libvirt RFC 15/24] qemu_snapshot: call qemuSnapshotDiscardMetadata from qemuSnapshotDiscard

2022-08-23 Thread Pavel Hrdina
This changes the snapshot delete call order. Previously we did snapshot XML reparenting before the actual snapshot deletion. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 64 +--- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/src

[libvirt RFC 10/24] qemu_snapshot: extract single snapshot deletion to separate function

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 46 ++-- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index c1c67ac445..b5e6a87566 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/

[libvirt RFC 16/24] qemu_snapshot: pass update_parent into qemuSnapshotDiscardMetadata

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index cbacb05c16..787186605f 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -2284,11 +

[libvirt RFC 18/24] qemu_snapshot: introduce qemuSnapshotDeleteValidate function

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 42 ++-- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 591d6db39b..42bc410078 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/

[libvirt RFC 24/24] qemu_snapshot: allow deletion of external snapshot with internal snapshot children

2022-08-23 Thread Pavel Hrdina
--- Just example how we could support this specific use-case where snapshot in question is external and all children are only internal. But I would rather drop this patch and in the following patch series drop support for both children flags completely as users or management applications can to th

[libvirt RFC 11/24] qemu_snapshot: extract children snapshot deletion to separate function

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 94 ++-- 1 file changed, 53 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index b5e6a87566..d40d75e75d 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/

[libvirt RFC 21/24] qemu_snapshot: implement deletion of external snapshot

2022-08-23 Thread Pavel Hrdina
When deleting snapshot we are starting block-commit job over all disks that are part of the snapshot. This operation may fail as it writes data changes to the backing qcow2 image so we need to wait for all the disks to finish the operation and wait for correct signal from QEMU. If deleting active

[libvirt RFC 13/24] qemu_snapshot: move snapshot discard out of qemu_domain.c

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_domain.c | 95 +-- src/qemu/qemu_domain.h | 9 src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_snapshot.c | 96 +++- src/qemu/qemu_snapshot.h | 4 ++ 5 files changed, 1

[libvirt RFC 19/24] qemu_snapshot: refactor validation of snapshot delete

2022-08-23 Thread Pavel Hrdina
Prepare the validation function for external snapshot delete support. There is one exception when deleting `children-only` snapshots. If the snapshot tree is like this example: snap1 (external) | +- snap2 (internal) | +- snap3 (internal) |

[libvirt RFC 22/24] qemu_snapshot: update metadata when deleting snapshots

2022-08-23 Thread Pavel Hrdina
With external snapshots we need to modify the metadata bit more then what is required for internal snapshots. Mainly the storage source location changes with every external snapshot. This means that if we delete non-leaf snapshot we need to update all children snapshots and modify the disk sources

[libvirt RFC 09/24] qemu_snapshot: refactor qemuSnapshotDelete

2022-08-23 Thread Pavel Hrdina
Move code around to make it clear what is called when deleting single snapshot or children snapshots. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/sr

[libvirt RFC 14/24] qemu_snapshot: introduce qemuSnapshotDiscardMetadata

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 493d83d017..b94506c177 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c

[libvirt RFC 17/24] qemu_snapshot: move metadata changes to qemuSnapshotDiscardMetadata

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 65 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 787186605f..591d6db39b 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/

[libvirt RFC 08/24] qemu_blockjob: process QEMU_MONITOR_JOB_STATUS_PENDING signal

2022-08-23 Thread Pavel Hrdina
QEMU emits this signal when autofinalize is disabled and QEMU is waiting for the caller to start the finalization manually. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_backup.c | 1 + src/qemu/qemu_blockjob.c | 13 - src/qemu/qemu_blockjob.h | 1 + 3 files changed, 14 insertion

[libvirt RFC 12/24] qemu_snapshot: rework snapshot children deletion

2022-08-23 Thread Pavel Hrdina
This simplifies the code a bit by reusing existing parts that deletes a single snapshot. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 69 ++-- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qem

[libvirt RFC 07/24] qemu_block: introduce qemuBlockFinalize

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c | 16 src/qemu/qemu_block.h | 4 2 files changed, 20 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index ce26afe611..92b0fc9812 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @

[libvirt RFC 06/24] qemu_monitor: allow setting autofinalize for block commit

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c| 6 -- src/qemu/qemu_block.h| 1 + src/qemu/qemu_monitor.c | 9 + src/qemu/qemu_monitor.h | 3 ++- src/qemu/qemu_monitor_json.c | 4 ++-- src/qemu/qemu_monitor_json.h | 3 ++- tests/qemumonitorjsontest.c

[libvirt RFC 01/24] qemu_block: extract block commit code to separate function

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c | 197 + src/qemu/qemu_block.h | 9 ++ src/qemu/qemu_driver.c | 181 + 3 files changed, 207 insertions(+), 180 deletions(-) diff --git a/src/qemu/qemu_block.c b/s

[libvirt RFC 03/24] qemu_block: extract qemuBlockCommit impl to separate function

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c | 78 ++- src/qemu/qemu_block.h | 10 ++ 2 files changed, 57 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 5b34461853..902ec7b2a5 100644 --- a/src/q

[libvirt RFC 04/24] qemu_block: add sync option to qemuBlockCommitImpl

2022-08-23 Thread Pavel Hrdina
This will allow starting synchronous block commit job that will be used by snapshot delete code. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c | 6 +- src/qemu/qemu_block.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_bloc

[libvirt RFC 00/24] basic snapshot delete implementation

2022-08-23 Thread Pavel Hrdina
I'm sending it as RFC even though it's somehow completed and works, it probably needs some documentation and most likely unit testing. This implements virDomainSnapshotDelete API to support external snapshots. The support doesn't include flags VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN and VIR_DOMAIN_SNA

[libvirt RFC 05/24] qemu_monitor: introduce qemuMonitorJobFinalize

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_monitor.c | 12 src/qemu/qemu_monitor.h | 5 + src/qemu/qemu_monitor_json.c | 22 ++ src/qemu/qemu_monitor_json.h | 5 + 4 files changed, 44 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src

[libvirt RFC 02/24] qemu_block: move qemuDomainBlockPivot out of qemu_driver

2022-08-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c | 121 src/qemu/qemu_block.h | 5 ++ src/qemu/qemu_driver.c | 123 + 3 files changed, 127 insertions(+), 122 deletions(-) diff --git a/src/qemu/qemu_block.c

[PATCH 0/2] qemu: tpm: Improve TPM state files management

2022-08-23 Thread Stefan Berger
This series of patches adds the --keep-tpm and --tpm flags to virsh for keeping and removing the TPM state directory structure when a VM is undefined. It also fixes the removal of state when a VM is migrated so that the state files are removed on the source upon successful migration and deleted on

[PATCH 2/2] qemu: tpm: Remove TPM state after successful migration

2022-08-23 Thread Stefan Berger
This patch 'fixes' the behavior of the persistent_state TPM domain XML attribute that intends to preserve the state of the TPM but should not keep the state around on all the hosts a VM has been migrated to. It removes the TPM state directory structure from the source host upon successful migration

[PATCH 1/2] qemu: Add UNDEFINE_TPM and UNDEFINE_KEEP_TPM flags

2022-08-23 Thread Stefan Berger
Add UNDEFINE_TPM and UNDEFINE_KEEP_TPM flags to qemuDomainUndefineFlags() API and --tpm and --keep-tpm to 'virsh undefine'. Pass the virDomainUndefineFlagsValues via qemuDomainRemoveInactive() from qemuDomainUndefineFlags() all the way down to qemuTPMEmulatorCleanupHost() and delete TPM storage the

[libvirt PATCH v2 2/2] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Erik Skultety
Coverity reports: virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, time_t timeout) { if (timeout < ipl->timeout) return; /* no take-backs */ virNWFilterSnoopIPLeaseTimerDel(ipl); >>> CID 396747: High impact quality

[libvirt PATCH v2 1/2] nwfilter: Replace a redundant 'now' variable with a direct time(0) call

2022-08-23 Thread Erik Skultety
In this very instance having a variable is pointless since there is only a single time(0) call in the whole function. Signed-off-by: Erik Skultety --- src/nwfilter/nwfilter_dhcpsnoop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src

[libvirt PATCH v2 0/2] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Erik Skultety
Since v1: - instead of time_t, store the timeout as unsigned long long and typecast any affected time_t variables on relevant places here's a successfull CI build: https://gitlab.com/eskultety/libvirt/-/pipelines/620752689 Erik Skultety (2): nwfilter: Replace a redundant 'now' variable with a

Re: [PATCH v3 8/8] qemu: Enable for vCPUs on hotplug

2022-08-23 Thread Daniel P . Berrangé
On Fri, Aug 12, 2022 at 12:04:23PM +0200, Michal Privoznik wrote: > As advertised in the previous commit, QEMU_SCHED_CORE_VCPUS case > is implemented for hotplug case. The implementation is very > similar to the cold boot case, except here we fork off for every > vCPU (because the implementation is

Re: [PATCH v3 7/8] qemu: Enable SCHED_CORE for vCPUs

2022-08-23 Thread Daniel P . Berrangé
On Fri, Aug 12, 2022 at 12:04:22PM +0200, Michal Privoznik wrote: > For QEMU_SCHED_CORE_VCPUS case, the vCPU threads should be placed > all into one scheduling group, but not the emulator or any of its > threads. Therefore, as soon as vCPU TIDs are detected, fork off a > child which then creates a

Re: [PATCH v3 6/8] qemu: Enable SCHED_CORE for helper processes

2022-08-23 Thread Daniel P . Berrangé
On Fri, Aug 12, 2022 at 12:04:21PM +0200, Michal Privoznik wrote: > For QEMU_SCHED_CORE_FULL case, all helper processes should be > placed into the same scheduling group as the QEMU process they > serve. It may happen though, that a helper process is started > before QEMU (cold start of a domain).

Re: [PATCH v3 5/8] qemu_process: Enable SCHED_CORE for QEMU process

2022-08-23 Thread Daniel P . Berrangé
On Fri, Aug 12, 2022 at 12:04:20PM +0200, Michal Privoznik wrote: > For QEMU_SCHED_CORE_EMULATOR or QEMU_SCHED_CORE_FULL the QEMU > process (and its vCPU threads) should be placed into its own > scheduling group. Since we have the dummy process running for > exactly this purpose use its PID as an a

Re: [PATCH v3 3/8] qemu_conf: Introduce a knob to set SCHED_CORE

2022-08-23 Thread Daniel P . Berrangé
On Fri, Aug 12, 2022 at 12:04:18PM +0200, Michal Privoznik wrote: > Ideally, we would just pick the best default and users wouldn't > have to intervene at all. But in some cases it may be handy to > not bother with SCHED_CORE at all or place helper processes into > the same group as QEMU. Introduce

Re: [PATCH v3 4/8] qemu_domain: Introduce qemuDomainSchedCoreStart()

2022-08-23 Thread Daniel P . Berrangé
On Fri, Aug 12, 2022 at 12:04:19PM +0200, Michal Privoznik wrote: > The aim of this helper function is to spawn a child process in > which new scheduling group is created. This dummy process will > then used to distribute scheduling group from (e.g. when starting > helper processes or QEMU itself).

Re: [libvirt PATCH 0/2] ci: Switch from macOS 11 to macOS 12

2022-08-23 Thread Michal Prívozník
On 8/23/22 16:54, Andrea Bolognani wrote: > Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/620665364 > > Now that the test suite issues that were blocking the switch have > been addressed, we can finally jump on the current macOS release. > > Andrea Bolognani (2): > ci: Refresh

Re: [libvirt PATCH] docs: fix syntax errors in IPv6 NAT example XML

2022-08-23 Thread Michal Prívozník
On 8/23/22 17:11, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > docs/formatnetwork.rst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Trivial. Reviewed-by: Michal Privoznik Michal

Re: [PATCH v2] util: basic support for VFIO variant drivers

2022-08-23 Thread Michal Prívozník
On 8/23/22 16:11, Laine Stump wrote: > ping. > > I have a different version of this patch where I do read the > modules.alias file rather than just checking the name of the driver, but > that also requires "double mocking" open() in the unit test, which > wasn't working properly, and I'd rather no

[libvirt PATCH] docs: fix syntax errors in IPv6 NAT example XML

2022-08-23 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- docs/formatnetwork.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatnetwork.rst b/docs/formatnetwork.rst index 044c239985..b5dc29db07 100644 --- a/docs/formatnetwork.rst +++ b/docs/formatnetwork.rst @@ -930,13 +930,13 @@

[libvirt PATCH 1/2] ci: Refresh generated files

2022-08-23 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- ci/containers/centos-stream-9.Dockerfile | 5 + ci/containers/opensuse-leap-153.Dockerfile | 2 +- ci/containers/ubuntu-2004.Dockerfile | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/containers/centos-stream-9.Dockerfile

[libvirt PATCH 2/2] ci: Switch from macOS 11 to macOS 12

2022-08-23 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- ci/cirrus/{macos-11.vars => macos-12.vars} | 0 ci/gitlab/builds.yml | 6 +++--- ci/manifest.yml| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename ci/cirrus/{macos-11.vars => macos-12.vars} (100%)

[libvirt PATCH 0/2] ci: Switch from macOS 11 to macOS 12

2022-08-23 Thread Andrea Bolognani
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/620665364 Now that the test suite issues that were blocking the switch have been addressed, we can finally jump on the current macOS release. Andrea Bolognani (2): ci: Refresh generated files ci: Switch from macOS 11 to macOS 12

Re: [PATCH] virhostcpu: Fix build with clang and newest kernel headers

2022-08-23 Thread Peter Krempa
On Tue, Aug 23, 2022 at 16:38:46 +0200, Michal Prívozník wrote: > On 8/23/22 16:15, Peter Krempa wrote: > > The most recent environment e.g. present in our Fedora Rawhide builds > > fail to build the tree with clang with the following error: > > > > ../src/util/virhostcpu.c:1291:25: error: field '

Re: [PATCH] virhostcpu: Fix build with clang and newest kernel headers

2022-08-23 Thread Jiri Denemark
On Tue, Aug 23, 2022 at 15:42:38 +0100, Daniel P. Berrangé wrote: > On Tue, Aug 23, 2022 at 04:15:54PM +0200, Peter Krempa wrote: > > The most recent environment e.g. present in our Fedora Rawhide builds > > fail to build the tree with clang with the following error: > > > > ../src/util/virhostcpu

Re: [PATCH] virhostcpu: Fix build with clang and newest kernel headers

2022-08-23 Thread Daniel P . Berrangé
On Tue, Aug 23, 2022 at 04:15:54PM +0200, Peter Krempa wrote: > The most recent environment e.g. present in our Fedora Rawhide builds > fail to build the tree with clang with the following error: > > ../src/util/virhostcpu.c:1291:25: error: field 'header' with variable sized > type 'struct kvm_ms

Re: [PATCH] virhostcpu: Fix build with clang and newest kernel headers

2022-08-23 Thread Michal Prívozník
On 8/23/22 16:15, Peter Krempa wrote: > The most recent environment e.g. present in our Fedora Rawhide builds > fail to build the tree with clang with the following error: > > ../src/util/virhostcpu.c:1291:25: error: field 'header' with variable sized > type 'struct kvm_msrs' not at the end of a

Re: [PATCH 6/7] qemu: tpm: Remove TPM state files and directory only when undefining a VM

2022-08-23 Thread Daniel P . Berrangé
On Tue, Aug 23, 2022 at 09:15:52AM -0400, Stefan Berger wrote: > > > On 8/23/22 08:52, Daniel P. Berrangé wrote: > > On Mon, Aug 22, 2022 at 03:17:34PM -0400, Stefan Berger wrote: > > > > > > > > > On 8/22/22 12:46, Daniel P. Berrangé wrote: > > > > On Mon, Aug 22, 2022 at 08:05:53AM -0400, Ste

Re: [PATCH] virhostcpu: Fix build with clang and newest kernel headers

2022-08-23 Thread Jiri Denemark
On Tue, Aug 23, 2022 at 16:15:54 +0200, Peter Krempa wrote: > The most recent environment e.g. present in our Fedora Rawhide builds > fail to build the tree with clang with the following error: > > ../src/util/virhostcpu.c:1291:25: error: field 'header' with variable sized > type 'struct kvm_msrs

Re: [PATCH] qemu: Do not keep swtmp pidfile around after stopping

2022-08-23 Thread Michal Prívozník
On 8/18/22 16:20, Martin Kletzander wrote: > Just like the socket, remove the pidfile when TPM emulator is being stopped. > In > order to make this a bit cleaner, try to remove it even if swtpm_ioctl does > not > exist. > > Signed-off-by: Martin Kletzander > --- > src/qemu/qemu_tpm.c | 31 +++

[PATCH] virhostcpu: Fix build with clang and newest kernel headers

2022-08-23 Thread Peter Krempa
The most recent environment e.g. present in our Fedora Rawhide builds fail to build the tree with clang with the following error: ../src/util/virhostcpu.c:1291:25: error: field 'header' with variable sized type 'struct kvm_msrs' not at the end of a struct or class is a GNU extension [-Werror,-Wg

Re: [PATCH v2] util: basic support for VFIO variant drivers

2022-08-23 Thread Laine Stump
ping. I have a different version of this patch where I do read the modules.alias file rather than just checking the name of the driver, but that also requires "double mocking" open() in the unit test, which wasn't working properly, and I'd rather not spend the time figuring it out if it's not

Re: [PATCH 0/4] docs: Fix generation of hyperlinks and improve backup/checkpoint docs

2022-08-23 Thread Jonathon Jongsma
On 8/23/22 6:32 AM, Peter Krempa wrote: Peter Krempa (4): docs: newapi: Consider also 'https://' links in the API generator XSL virDomainCheckpointCreateXML: Don't use HTML in function docs and fix link virDomainCheckpointCreateXML: Add disclaimer about creating checkpoints

Re: [PATCH] lib: Don't check for retval for virCommandNew*()

2022-08-23 Thread Laine Stump
On 8/23/22 9:51 AM, Michal Privoznik wrote: The virCommand module is specifically designed so that no caller has to check for retval of individual virCommand*() APIs except for virCommandRun() where the actual error is reported. Moreover, virCommandNew*() use g_new0() to allocate memory and thus

Re: [PATCH 3/4] virDomainCheckpointCreateXML: Add disclaimer about creating checkpoints

2022-08-23 Thread Jonathon Jongsma
On 8/23/22 6:32 AM, Peter Krempa wrote: Checkpoints created via virDomainCheckpointCreateXML are generally not very useful as they need to be coupled with a backup. Add a disclaimer to the docs explaining why users should use virDomainBackupBegin instead. Signed-off-by: Peter Krempa --- src/

Re: [PATCH v14 08/15] qemu: Get SGX capabilities form QMP

2022-08-23 Thread Michal Prívozník
On 8/22/22 06:34, Yang, Lin A wrote: > > @Michal, do you have any updated for v14 patches? If yes, I can rework on > > top of your changes and submit for review. > > https://gitlab.com/MichalPrivoznik/libvirt/-/commits/sgx_rework >

[PATCH] lib: Don't check for retval for virCommandNew*()

2022-08-23 Thread Michal Privoznik
The virCommand module is specifically designed so that no caller has to check for retval of individual virCommand*() APIs except for virCommandRun() where the actual error is reported. Moreover, virCommandNew*() use g_new0() to allocate memory and thus it's not really possible for those APIs to ret

Re: [PATCH 0/7] qemu: tpm: Add support for migration across shared storage

2022-08-23 Thread Stefan Berger
On 8/23/22 08:55, Daniel P. Berrangé wrote: On Mon, Aug 22, 2022 at 02:52:26PM -0400, Stefan Berger wrote: On 8/22/22 12:35, Daniel P. Berrangé wrote: On Mon, Aug 22, 2022 at 08:05:47AM -0400, Stefan Berger wrote: This series of patches adds support for migrating vTPMs across hosts whose st

Re: [PATCH 6/7] qemu: tpm: Remove TPM state files and directory only when undefining a VM

2022-08-23 Thread Stefan Berger
On 8/23/22 08:52, Daniel P. Berrangé wrote: On Mon, Aug 22, 2022 at 03:17:34PM -0400, Stefan Berger wrote: On 8/22/22 12:46, Daniel P. Berrangé wrote: On Mon, Aug 22, 2022 at 08:05:53AM -0400, Stefan Berger wrote: When share storage for the TPM state files has been setup betwen hosts then

Re: [PATCH RFC 0/5] storage: Drop the sheepdog storage driver backend

2022-08-23 Thread Claudio Fontana
On 8/22/22 16:48, Peter Krempa wrote: > The sheepdog project is abandoned, with last commit in 2018. QEMU > already removed the storage backend in qemu-6.1 > > This series removes the libvirt storage driver backend. To me it looks fine as it is. Reviewed-by: Claudio Fontana > > This series is

Re: [PATCH 0/7] qemu: tpm: Add support for migration across shared storage

2022-08-23 Thread Daniel P . Berrangé
On Mon, Aug 22, 2022 at 02:52:26PM -0400, Stefan Berger wrote: > On 8/22/22 12:35, Daniel P. Berrangé wrote: > > On Mon, Aug 22, 2022 at 08:05:47AM -0400, Stefan Berger wrote: > > > This series of patches adds support for migrating vTPMs across hosts whose > > > storage has been set up to share the

Re: [PATCH 6/7] qemu: tpm: Remove TPM state files and directory only when undefining a VM

2022-08-23 Thread Daniel P . Berrangé
On Mon, Aug 22, 2022 at 03:17:34PM -0400, Stefan Berger wrote: > > > On 8/22/22 12:46, Daniel P. Berrangé wrote: > > On Mon, Aug 22, 2022 at 08:05:53AM -0400, Stefan Berger wrote: > > > When share storage for the TPM state files has been setup betwen hosts > > > then > > > remove the TPM state f

Plans for the next release

2022-08-23 Thread Jiri Denemark
We are getting close to the next release of libvirt. To aim for the release on Sep 01 I suggest entering the freeze on Friday Aug 26 and tagging RC2 on Tuesday Aug 30. I hope this works for everyone. Jirka

[PATCH 4/4] virDomainBackupGetXMLDesc: Fix and use full link to XML documentation

2022-08-23 Thread Peter Krempa
Use the full link to the backup XML description page and use the proper anchor after html->RST coversion. Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 842663a608..80a6f0f

[PATCH 0/4] docs: Fix generation of hyperlinks and improve backup/checkpoint docs

2022-08-23 Thread Peter Krempa
Peter Krempa (4): docs: newapi: Consider also 'https://' links in the API generator XSL virDomainCheckpointCreateXML: Don't use HTML in function docs and fix link virDomainCheckpointCreateXML: Add disclaimer about creating checkpoints virDomainBackupGetXMLDesc: Fix and use full link

[PATCH 1/4] docs: newapi: Consider also 'https://' links in the API generator XSL

2022-08-23 Thread Peter Krempa
We converted exclusively to https links so the generator should wrap those in appropriate link tags too. Signed-off-by: Peter Krempa --- docs/newapi.xsl | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/newapi.xsl b/docs/newapi.xsl index e56a5f2a27..f2e8bd5334 100644 --- a/docs/newap

[PATCH 3/4] virDomainCheckpointCreateXML: Add disclaimer about creating checkpoints

2022-08-23 Thread Peter Krempa
Checkpoints created via virDomainCheckpointCreateXML are generally not very useful as they need to be coupled with a backup. Add a disclaimer to the docs explaining why users should use virDomainBackupBegin instead. Signed-off-by: Peter Krempa --- src/libvirt-domain-checkpoint.c | 10 ++

[PATCH 2/4] virDomainCheckpointCreateXML: Don't use HTML in function docs and fix link

2022-08-23 Thread Peter Krempa
Fix the link target after the conversion of the XML description to RST which renamed anchors and drop the tag from the C code comment. Apart from not working properly in the .c file it didn't work in the generated docs either as the brackets were escaped. Signed-off-by: Peter Krempa --- src/lib

Re: [PATCH 2/3] conf, docs: Add support for dummy network interface

2022-08-23 Thread Daniel P . Berrangé
On Tue, Aug 23, 2022 at 01:01:49PM +0200, Martin Kletzander wrote: > On Tue, Aug 23, 2022 at 11:39:10AM +0100, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 03:07:17PM +0200, Martin Kletzander wrote: > > > Signed-off-by: Martin Kletzander > > > --- > > > docs/formatdomain.rst

Re: [PATCH 2/3] conf, docs: Add support for dummy network interface

2022-08-23 Thread Martin Kletzander
On Tue, Aug 23, 2022 at 11:39:10AM +0100, Daniel P. Berrangé wrote: On Thu, Aug 04, 2022 at 03:07:17PM +0200, Martin Kletzander wrote: Signed-off-by: Martin Kletzander --- docs/formatdomain.rst | 24 src/ch/ch_monitor.c | 1 + src/conf/domain

Re: [libvirt PATCH] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Daniel P . Berrangé
On Tue, Aug 23, 2022 at 12:48:48PM +0200, Michal Prívozník wrote: > On 8/19/22 10:41, Erik Skultety wrote: > > Coverity reports: > > virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, > > time_t timeout) > > { > > if (timeout < ipl->timeout

Re: [libvirt PATCH] nwfilter: Fix timeout data type reported by coverity

2022-08-23 Thread Michal Prívozník
On 8/19/22 10:41, Erik Skultety wrote: > Coverity reports: > virNWFilterSnoopIPLeaseUpdate(virNWFilterSnoopIPLease *ipl, > time_t timeout) > { > if (timeout < ipl->timeout) > return; /* no take-backs */ > > virNWFilterSnoopIPLe

Re: [PATCH 2/3] conf, docs: Add support for dummy network interface

2022-08-23 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 03:07:17PM +0200, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > docs/formatdomain.rst | 24 > src/ch/ch_monitor.c | 1 + > src/conf/domain_conf.c| 10 ++ > src/conf/domain_conf.h

Re: [PATCH 2/5] tests: Remove storage pool/vol tests for sheepdog

2022-08-23 Thread Peter Krempa
On Mon, Aug 22, 2022 at 10:52:03 -0500, Jonathon Jongsma wrote: > On 8/22/22 9:48 AM, Peter Krempa wrote: > > The support for the sheepdog storage backend will be dropped in the > > upcoming patches. Remove all the relevant tests. > > I happened to notice these the other day. Did you intend to kee