[PATCH v2 14/14] news: qemu: Add support for NFS disk protocol

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index b63d2baba2..937a03a37a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -249,6 +249,10 @@ v7.0.0 (2021-01-15) The cpu model Snowridge is supported since QEMU 4.1. + * qemu: Add

[PATCH v2 06/14] logging: allow max_len=0 to disable log rollover

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 7a85fa29f3..884b541f7a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -445,6 +445,10 @@ v6.9.0 (2020-11-02) For SR-IOV VF hostdev, now libvirt supports to retrieve device traffic

[PATCH v2 13/14] news: cpu_map: Add Snowridge cpu model

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 106b6ed3c6..b63d2baba2 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -245,6 +245,10 @@ v7.0.0 (2021-01-15) powered off or undefined. Add per-TPM emulator option

[PATCH v2 12/14] qemu: support kvm-poll-control performance hint

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 55d57aa53b..106b6ed3c6 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -366,6 +366,11 @@ v6.10.0 (2020-12-01) mode of files and directories, respectively, when using

[PATCH v2 08/14] news: qemu: Introduce virtio free page reporting feature

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4026b92b0c..c0ecc5664e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -433,6 +433,13 @@ v6.9.0 (2020-11-02) virsh, use the option ``--validate`` for sub-commmand ``cpu-compare``

[PATCH v2 10/14] news: qemu: Add 'fmode' and 'dmode' options for 9pfs

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index bc863eceb2..5b806f86d1 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -353,6 +353,13 @@ v6.10.0 (2020-12-01) ``virDomainSetVcpus()``, and ``virDomainSetVcpusFlags()`` APIs have

[PATCH v2 02/14] news: support device stats collection for SR-IOV VF hostdev

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index e4a98fbd75..2db7e8c27c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -428,6 +428,11 @@ v6.9.0 (2020-11-02) Libvirt probes the underlying platform in order to fill in these SEV

[PATCH v2 11/14] news: Introduce "migrate_tls_force" to qemu.conf

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5b806f86d1..55d57aa53b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -335,6 +335,12 @@ v6.10.0 (2020-12-01) option is missing are now '1'. This ensures that only legitimate

[PATCH v2 00/14] news update since v6.9 to v7.0

2021-04-21 Thread Han Han
Diff from v1: - Drop the news "Introduce VIR_DOMAIN_CHECKPOINT_REDEFINE_VALIDATE flag" - Move the news of virt-aa-helper to bug fix part - Update some descriptions of news v1: https://listman.redhat.com/archives/libvir-list/2021-April/msg00456.html Thanks for the advice from Peter Krempa and

[PATCH v2 09/14] news: qemu: virtiofs can be used without NUMA nodes

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index c0ecc5664e..bc863eceb2 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -462,6 +462,11 @@ v6.9.0 (2020-11-02) avoid needless cost of host CPU cycles and improve the performance of

[PATCH v2 04/14] news: cpu_map: Add EPYC-Rome cpu model

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 0ce67a9a50..31ca073e75 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -421,6 +421,10 @@ v6.9.0 (2020-11-02) using . The node device APIs also now list and provide XML

[PATCH v2 07/14] news: qemu: Set noqueue qdisc for TAP devices

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 884b541f7a..4026b92b0c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -449,6 +449,12 @@ v6.9.0 (2020-11-02) Set ``max_len=0`` in ``virtlogd.conf`` to disable log rollover. +

[PATCH v2 05/14] news: cpu: Support for XML validation in cpu comparison

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 31ca073e75..7a85fa29f3 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -425,6 +425,14 @@ v6.9.0 (2020-11-02) The EPYC-Rome is supported in QEMU since ``v5.0.0``. + * cpu:

[PATCH v2 01/14] news: make SEV attrs 'cbitpos' & 'reducedPhysBits' optional

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5f8b0ae02d..e4a98fbd75 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -421,6 +421,13 @@ v6.9.0 (2020-11-02) using . The node device APIs also now list and provide XML

[PATCH v2 03/14] news: virt-aa-helper: allow guest to create hard links for mounted 9pfs paths

2021-04-21 Thread Han Han
Signed-off-by: Han Han --- NEWS.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2db7e8c27c..0ce67a9a50 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -446,6 +446,8 @@ v6.9.0 (2020-11-02) ``virt-ssh-helper`` command on the remote host, and thus always used the

Re: [PATCH 0/3] tests: qemuxml2argv negative tests for hugepages and numatune

2021-04-21 Thread Han Han
On Mon, Apr 19, 2021 at 8:56 PM Michal Privoznik wrote: > On 3/30/21 8:36 AM, Han Han wrote: > > > > Han Han (3): > >tests: negative test for hugepages with anonymous memory backing > >tests: negative test for hugepages with ondemand mode > >tests: negative test of binding memnode

Re: [PATCH 1/1] Replace AbsPath judgement method with g_path_is_absolute()

2021-04-21 Thread Luke Yue
On Wed, 2021-04-21 at 10:03 +0200, Michal Privoznik wrote: > On 4/20/21 6:44 AM, Luke Yue wrote: > > The g_path_is_absolute() considers more situations > > than just a simply "path[0] == '/'". > > > > Related issue: https://gitlab.com/libvirt/libvirt/-/issues/12 > > > > Signed-off-by: Luke Yue

Re: [libvirt PATCH v2 3/3] nodedev: remove unnecessary checks for NULL cmd

2021-04-21 Thread Michal Privoznik
On 4/21/21 5:52 PM, Jonathon Jongsma wrote: virCommandRun() already handles the case where the cmd argument is NULL, so there's no need for the caller to check. Make all callers consistent and remove unnecessary NULL checks. Signed-off-by: Jonathon Jongsma ---

[libvirt PATCH v2 1/3] nodedev: fix potential leak of command

2021-04-21 Thread Jonathon Jongsma
When returning early due to errors, cmd will be leaked. Use an autoptr to handle these early returns without leaking memory. Signed-off-by: Jonathon Jongsma Reviewed-by: Michal Privoznik --- src/node_device/node_device_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[libvirt PATCH 09/10] virDomainDiskSourceNetworkParse: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 55 -- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 367258bf7a..113f4123d7 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH v2 2/3] nodedev: handle failure to generate mdevctl cmd

2021-04-21 Thread Jonathon Jongsma
Coverity complained that the 'default' case of the switch in nodeDeviceGetMdevctlCommand() was falling through without initializing 'cmd'. Return NULL in this case even though it should never happen. Signed-off-by: Jonathon Jongsma Reviewed-by: Michal Privoznik ---

[libvirt PATCH v2 3/3] nodedev: remove unnecessary checks for NULL cmd

2021-04-21 Thread Jonathon Jongsma
virCommandRun() already handles the case where the cmd argument is NULL, so there's no need for the caller to check. Make all callers consistent and remove unnecessary NULL checks. Signed-off-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 6 -- 1 file changed, 6

[libvirt PATCH 06/10] virDomainHostdevSubsysSCSIHostDefParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 30 ++ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c1ed206119..eaa1398de1 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 03/10] qemuAppendKeyWrapMachineParm: Stricten parameter types

2021-04-21 Thread Tim Wiederhake
Follow up to the last patch. Signed-off-by: Tim Wiederhake --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2ceff15512..be93182092 100644 --- a/src/qemu/qemu_command.c +++

[libvirt PATCH 01/10] virDomainKeyWrapCipherDefParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0a00be4e80..cc0bdeed56 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 08/10] virDomainDeviceInfoParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index eaa1398de1..367258bf7a 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 10/10] virDomainMemorytuneDefParseMemory: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 28 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 113f4123d7..c53ed60bae 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c

[libvirt PATCH 05/10] virDomainDeviceDimmAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index cc0bdeed56..c1ed206119 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt PATCH 07/10] virStorageEncryptionInfoParseCipher: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/storage_encryption_conf.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c index c2c7c1dd43..9112b96cc7 100644 ---

[libvirt PATCH 04/10] virxml: Add virXMLPropULongLong

2021-04-21 Thread Tim Wiederhake
Convenience function to return the value of an unsigned long long XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 56 src/util/virxml.h| 8 ++ 3 files changed, 65 insertions(+)

[libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part III

2021-04-21 Thread Tim Wiederhake
For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Tim Wiederhake (10): virDomainKeyWrapCipherDefParseXML: Use virXMLProp* virDomainKeyWrapDef: Make members virTristateSwitch qemuAppendKeyWrapMachineParm: Stricten parameter types virxml: Add

[libvirt PATCH 02/10] virDomainKeyWrapDef: Make members virTristateSwitch

2021-04-21 Thread Tim Wiederhake
With the last usage of `aes` and `dea` as int gone, these two can become virTristateSwitch. Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index

Re: [PATCH 00/10] qemu: Fix block job cancelling

2021-04-21 Thread Michal Privoznik
On 4/21/21 4:04 PM, Peter Krempa wrote: Since -blockdev support was introduced qemuDomainBlockJobAbort was using the wrong API to terminate the blockjob since we care about sync finishing semantics. Additionally for cases where we don't care we can force-finish the jobs such as when cancelling

Re: [libvirt PATCH v2] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Michal Privoznik
On 4/21/21 5:17 PM, Pavel Hrdina wrote: The code in storage_backend_fs is used for storage_dir and storage_fs drivers so some parts need to be guarded by checking for WITH_STORAGE_FS. Fixes: 16c69e7aaed4cabfd8e8c19cc326854d4c480437 Signed-off-by: Pavel Hrdina --- GitLab CI faild on MacOS and

Re: [libvirt PATCH] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Pavel Hrdina
On Wed, Apr 21, 2021 at 04:43:01PM +0200, Michal Privoznik wrote: > On 4/21/21 4:23 PM, Pavel Hrdina wrote: > > On Wed, Apr 21, 2021 at 04:06:05PM +0200, Michal Privoznik wrote: > > > On 4/21/21 3:33 PM, Pavel Hrdina wrote: > > > > The code in storage_backend_fs is used for storage_dir and

[libvirt PATCH v2] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Pavel Hrdina
The code in storage_backend_fs is used for storage_dir and storage_fs drivers so some parts need to be guarded by checking for WITH_STORAGE_FS. Fixes: 16c69e7aaed4cabfd8e8c19cc326854d4c480437 Signed-off-by: Pavel Hrdina --- GitLab CI faild on MacOS and FreeBSD where storage_fs is disabled.

Re: [libvirt PATCH] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Michal Privoznik
On 4/21/21 4:23 PM, Pavel Hrdina wrote: On Wed, Apr 21, 2021 at 04:06:05PM +0200, Michal Privoznik wrote: On 4/21/21 3:33 PM, Pavel Hrdina wrote: The code in storage_backend_fs is used for storage_dir and storage_fs drivers so some parts need to be guarded by checking for WITH_STORAGE_FS.

Re: [libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part II

2021-04-21 Thread Peter Krempa
On Wed, Apr 21, 2021 at 15:33:22 +0200, Tim Wiederhake wrote: > For background, see > https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html > > Tim Wiederhake (10): > virDomainVirtioOptionsParseXML: Use virXMLProp* > virDomainDeviceBootParseXML: Use virXMLProp* >

Re: [libvirt PATCH 09/10] virDomainVsockDefParseXML: Use virXMLProp*

2021-04-21 Thread Peter Krempa
On Wed, Apr 21, 2021 at 15:33:31 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/conf/domain_conf.c | 48 -- > 1 file changed, 13 insertions(+), 35 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c >

Re: [libvirt PATCH] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Pavel Hrdina
On Wed, Apr 21, 2021 at 04:06:05PM +0200, Michal Privoznik wrote: > On 4/21/21 3:33 PM, Pavel Hrdina wrote: > > The code in storage_backend_fs is used for storage_dir and storage_fs > > drivers so some parts need to be guarded by checking for > > WITH_STORAGE_FS. > > > > Fixes:

Re: [PATCH 00/21] Refactoring conf to use XPath

2021-04-21 Thread Michal Privoznik
On 4/15/21 6:27 PM, Tim Wiederhake wrote: On Thu, 2021-04-15 at 16:26 +0200, Kristina Hanicova wrote: This series reworks the outdated way of parsing XML to parsing by XPath, which is more obvious and saves a few lines of code. Kristina Hanicova (21): conf: Propagate xmlXPathContextPtr into

[PATCH 05/10] qemuBackupJobCancelBlockjobs: Replace qemuMonitorJobCancel by qemuMonitorBlockJobCancel

2021-04-21 Thread Peter Krempa
We want to unify on one block job cancellation API. Use qemuMonitorBlockJobCancel which has more features. In case of backup jobs we can cancel the jobs forcefully since the code is on a cleanup path when the job fails. Signed-off-by: Peter Krempa --- src/qemu/qemu_backup.c | 2 +- 1 file

[PATCH 07/10] qemuMigrationSrcNBDCopyCancel*: Rename 'check' to 'abortMigration'

2021-04-21 Thread Peter Krempa
Rename the parameter so that it's more clear what state we are in and fix all callees. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_migration.c

[PATCH 08/10] qemuMigrationSrcNBDCopyCancelOne: Force-cancel disk copy jobs when aborting migration

2021-04-21 Thread Peter Krempa
We don't require that the data is consistent on the destination if aborting the migration. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

Re: [libvirt PATCH] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Michal Privoznik
On 4/21/21 3:33 PM, Pavel Hrdina wrote: The code in storage_backend_fs is used for storage_dir and storage_fs drivers so some parts need to be guarded by checking for WITH_STORAGE_FS. Fixes: 16c69e7aaed4cabfd8e8c19cc326854d4c480437 Signed-off-by: Pavel Hrdina --- GitLab CI faild on MacOS and

[PATCH 04/10] qemuDomainBlockJobAbort: Don't use 'job-cancel' instead of 'block-job-cancel'

2021-04-21 Thread Peter Krempa
'block-job-cancel' has one very important semantic difference to 'job-cancel', docummented in qemu as: Note that if you issue 'block-job-cancel' after 'drive-mirror' has indicated (via the event BLOCK_JOB_READY) that the source and destination are synchronized, then the event triggered by

[PATCH 09/10] qemuMigrationSrcNBDCopyCancelled: Use do-while loop instead of jumping back

2021-04-21 Thread Peter Krempa
Jumping back in the code is an anti-pattern that should be avoided if possible. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration.c | 73 +++ 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/src/qemu/qemu_migration.c

[PATCH 10/10] qemu: monitor: Remove qemuMonitorJobCancel

2021-04-21 Thread Peter Krempa
The API is unused since last commit. Remove it. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 13 - src/qemu/qemu_monitor.h | 5 - src/qemu/qemu_monitor_json.c | 28 src/qemu/qemu_monitor_json.h | 5 -

[PATCH 02/10] qemuMonitorJSONBlockJobCancel: Refactor cleanup

2021-04-21 Thread Peter Krempa
Use automatic memory freeing and remove the cleanup section. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index

[PATCH 06/10] qemuBlockJobRefreshJobs: Replace qemuMonitorJobCancel by qemuMonitorBlockJobCancel

2021-04-21 Thread Peter Krempa
We want to unify on one block job cancellation API. Use qemuMonitorBlockJobCancel which has more features. In case of job refresh, we are killing off any unknown jobs so we don't care about their fate. Another difference is that an possible error from the block job cancellation might be

[PATCH 03/10] qemu: monitor: Add 'force' argument for 'block-job-cancel' QMP command

2021-04-21 Thread Peter Krempa
In certain cases such as when aborting migration we don't really care for completion of the blockjob. Add 'force' as parameter of 'block-job-cancel'. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_migration.c| 2 +- src/qemu/qemu_monitor.c | 7

[PATCH 01/10] qemumonitorjsontest: Add test for 'qemuMonitorJSONBlockJobCancel'

2021-04-21 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 0866ebe2bf..8ed6509159 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1218,6 +1218,7

[PATCH 00/10] qemu: Fix block job cancelling

2021-04-21 Thread Peter Krempa
Since -blockdev support was introduced qemuDomainBlockJobAbort was using the wrong API to terminate the blockjob since we care about sync finishing semantics. Additionally for cases where we don't care we can force-finish the jobs such as when cancelling an migration with NBD disk copy. Peter

Re: [RFC PATCH 0/7] Fix issue when storage migration is requested but there are no disks to migrate

2021-04-21 Thread Michal Privoznik
On 4/13/21 5:38 PM, Peter Krempa wrote: In certain weird cases and due to very crusty code we'd instruct qemu to migrate storage using the old style storage migration when there wasn't anything to migrate. This was caused by a recent refactor. Note that the series is RFC as I didn't really test

[PATCH] docs: formatdomain: Fix quoting of ':since:' argument for

2021-04-21 Thread Peter Krempa
The end quote of the argument of :since: must not have a space in front of it as it's then not considered as end of the argument. Signed-off-by: Peter Krempa --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Pushed as trivial. diff --git a/docs/formatdomain.rst

[libvirt PATCH] storage_backend_fs: use MKFS ony if WITH_STORAGE_FS is defined

2021-04-21 Thread Pavel Hrdina
The code in storage_backend_fs is used for storage_dir and storage_fs drivers so some parts need to be guarded by checking for WITH_STORAGE_FS. Fixes: 16c69e7aaed4cabfd8e8c19cc326854d4c480437 Signed-off-by: Pavel Hrdina --- GitLab CI faild on MacOS and FreeBSD where storage_fs is disabled.

[libvirt PATCH 06/10] virDomainChrSourceDefParseLog: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d10d697884..c97a062d1f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11713,20

[libvirt PATCH 09/10] virDomainVsockDefParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 48 -- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9e968c087d..1878d9ed9d 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 07/10] virDomainAudioJackParse: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c97a062d1f..ec7d48b40e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13806,19

[libvirt PATCH 05/10] virDomainChrSourceDefParseFile: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6ea347e05b..d10d697884 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11678,20

[libvirt PATCH 01/10] virDomainVirtioOptionsParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 41 + 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9a0d1f9285..5c13d9946c 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 03/10] virDomainDeviceISAAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9113993bce..b28265cf4f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt PATCH 02/10] virDomainDeviceBootParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5c13d9946c..9113993bce 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6465,22

[libvirt PATCH 10/10] virDomainLoaderDefParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 47 ++ 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1878d9ed9d..4c88a124bc 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 08/10] virDomainVideoResolutionDefParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ec7d48b40e..9e968c087d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt PATCH 04/10] virDomainDiskSourceNVMeParse: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b28265cf4f..6ea347e05b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8453,7

[libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part II

2021-04-21 Thread Tim Wiederhake
For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Tim Wiederhake (10): virDomainVirtioOptionsParseXML: Use virXMLProp* virDomainDeviceBootParseXML: Use virXMLProp* virDomainDeviceISAAddressParseXML: Use virXMLProp* virDomainDiskSourceNVMeParse:

Re: [libvirt PATCH v2 00/10] Refactor more XML parsing boilerplate code

2021-04-21 Thread Peter Krempa
On Wed, Apr 21, 2021 at 14:07:58 +0200, Tim Wiederhake wrote: > For background, see > https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html > > Changes since V1: > * Rebased > * s/VIR_XML_PROP_OPTIONAL/VIR_XML_PROP_NONE/ > * Declare variables 1 / line > * Commented on

Re: [libvirt PATCH] spec: Do not build qemu driver for Power on RHEL-9

2021-04-21 Thread Ján Tomko
On a Wednesday in 2021, Jiri Denemark wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1946529 Signed-off-by: Jiri Denemark --- libvirt.spec.in | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[libvirt PATCH] spec: Do not build qemu driver for Power on RHEL-9

2021-04-21 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1946529 Signed-off-by: Jiri Denemark --- libvirt.spec.in | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index f9af330186..be74964b7b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@

[libvirt PATCH v3 8/8] libvirt.spec: drop no longer required build dependencies

2021-04-21 Thread Pavel Hrdina
These are no longer required to build libvirt as they are used during compilation only by meson to detect if some "auto" features should be enabled or not but in spec file we explicitly enable/disable all libvirt features. Signed-off-by: Pavel Hrdina --- libvirt.spec.in | 31

[libvirt PATCH v3 6/8] meson: use runtime binaries to only resolve features with "auto" value

2021-04-21 Thread Pavel Hrdina
This way meson will try to do the right thing by default but we will allow users to change this behavior by using -Dname=enabled. This comes with two benefits compared to the previous behavior: - no need to install the binaries if developers would like to check that the code compiles

[libvirt PATCH v3 7/8] meson: optional_programs should be used only for building libvirt

2021-04-21 Thread Pavel Hrdina
Drop code that creates defines with program paths and update the comment to reflect current usage of optional_programs. Signed-off-by: Pavel Hrdina --- meson.build | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/meson.build b/meson.build index

[libvirt PATCH v3 5/8] meson: stop setting runtime binaries defines during compilation

2021-04-21 Thread Pavel Hrdina
Technically the location of these binaries may be different when compiling libvirt or running it. This will allow users to change $PATH to use different binaries as well. Signed-off-by: Pavel Hrdina --- meson.build| 41 --

[libvirt PATCH v3 4/8] meson: move iscsiadm check into storage_iscsi condition

2021-04-21 Thread Pavel Hrdina
This requires to define the binary name in code because we compile src/util/viriscsi.c unconditionally. Signed-off-by: Pavel Hrdina --- meson.build | 22 -- src/util/viriscsi.h | 2 ++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/meson.build

[libvirt PATCH v3 3/8] meson: drop check for runtime binary dependencies

2021-04-21 Thread Pavel Hrdina
These binaries are used only during runtime so technically there is no need to check for them while compiling libvirt. Usually the location is the same while compiling and running but it may not be true. In addition they are not strictly required to compile the code so this way developers don't

[libvirt PATCH v3 1/8] virfile: introduce virFindFileInPathFull()

2021-04-21 Thread Pavel Hrdina
Extend virFindFileInPath to search in custom extra paths as well. Some binaries that libvirt needs are not usually in $PATH so we need to have a way to look for these as well. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 2 +- src/util/virfile.c | 16 ++--

[libvirt PATCH v3 0/8] cleanup meson checks for runtime binaries

2021-04-21 Thread Pavel Hrdina
Recent attempt to add a lot of meson options to specify different runtime paths motivated me enough to cleanup this from meson. Changes in v3: - some patches were already pushed - removed patch that moved virFindFileInPath from testutilsqemu.c Changes in v2: - split and rework patch

[libvirt PATCH v3 2/8] qemu_conf: use virFindFileInPathFull for runtime binaries

2021-04-21 Thread Pavel Hrdina
Following patches will stop detecting the full path during compilation so we will need to do it here. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_conf.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

Re: [libvirt PATCH v2 13/21] storage: use virFindFileInPath to validate presence of mkfs

2021-04-21 Thread Pavel Hrdina
On Tue, Apr 20, 2021 at 02:44:53PM +0100, Daniel P. Berrangé wrote: > On Mon, Apr 19, 2021 at 07:14:16PM +0200, Pavel Hrdina wrote: > > Future patch will remove MKFS define as we will no longer check it > > during compilation. > > > > Signed-off-by: Pavel Hrdina > > --- > >

[libvirt PATCH v2 08/10] virDomainDeviceCcidAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 5360fb301f..dbe30b05c1 100644 --- a/src/conf/device_conf.c +++

[libvirt PATCH v2 09/10] virDomainDeviceUSBAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index dbe30b05c1..9b0b81b2cb 100644 --- a/src/conf/device_conf.c +++

[libvirt PATCH v2 00/10] Refactor more XML parsing boilerplate code

2021-04-21 Thread Tim Wiederhake
For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Changes since V1: * Rebased * s/VIR_XML_PROP_OPTIONAL/VIR_XML_PROP_NONE/ * Declare variables 1 / line * Commented on strictening of parser in patch #10 Tim Wiederhake (10):

[libvirt PATCH v2 06/10] virDomainDeviceDriveAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index e527899d7d..66b7af109f 100644 ---

[libvirt PATCH v2 04/10] virPCIDeviceAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 47 +++--- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 9abbd5ebb7..801552a9cf 100644 ---

[libvirt PATCH v2 05/10] virDomainDeviceCCWAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 53 ++ 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 801552a9cf..e527899d7d 100644 ---

[libvirt PATCH v2 10/10] virInterfaceLinkParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
This strictens the parser to disallow negative values (interpreted as `UINT_MAX + value + 1`) for attribute `speed`, which does not make sense for a value measured in Mbits per second. Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 25

[libvirt PATCH v2 03/10] virZPCIDeviceAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 6a4b14cfda..9abbd5ebb7 100644 ---

[libvirt PATCH v2 07/10] virDomainDeviceVirtioSerialAddressParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/device_conf.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 66b7af109f..5360fb301f 100644 --- a/src/conf/device_conf.c +++

[libvirt PATCH v2 02/10] virDomainBackupDefParse: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/backup_conf.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index e4464b91a0..7f176b783f 100644 --- a/src/conf/backup_conf.c +++

[libvirt PATCH v2 01/10] virDomainBackupDiskDefParseXML: Use virXMLProp*

2021-04-21 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Peter Krempa --- src/conf/backup_conf.c | 40 ++-- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index 7f54a25ff6..e4464b91a0 100644 ---

Re: [PATCH] qemu.conf: add max-ram-below-4g option

2021-04-21 Thread Zhiyong Ye
Sure,I‘ll push a new version later. On Wed, Apr 21, 2021 at 6:35 PM Daniel P. Berrangé wrote: > On Wed, Apr 21, 2021 at 06:19:47PM +0800, Zhiyong Ye wrote: > > I agree with you. If it is added to the XML file, where should it be > > placed? I think the following may be OK: > > > > ... > >

Re: [External] Re: [PATCH] qemu.conf: add max-ram-below-4g option

2021-04-21 Thread Daniel P . Berrangé
On Wed, Apr 21, 2021 at 06:19:47PM +0800, Zhiyong Ye wrote: > I agree with you. If it is added to the XML file, where should it be > placed? I think the following may be OK: > > ... > 1524288 > 524288 > 524288 > 2 > ... > I think we could probably just make it an attribute on the

Re: [External] Re: [PATCH] qemu.conf: add max-ram-below-4g option

2021-04-21 Thread Zhiyong Ye
I agree with you. If it is added to the XML file, where should it be placed? I think the following may be OK: ... 1524288 524288 524288 2 ... Peter Krempa 于2021年4月21日周三 下午4:46写道: > On Wed, Apr 21, 2021 at 16:25:28 +0800, yezhiyong wrote: > > Limit the amount of ram below 4G. This

Re: [PATCH] qemu: blockjob: Transition into 'ready' state only from expected states

2021-04-21 Thread Michal Privoznik
On 4/20/21 1:44 PM, Peter Krempa wrote: In certain rare occasions qemu can transition a block job which was already 'ready' into 'standby' and then back. If this happens in the following order libvirt will get confused about the actual job state: 1) the block copy job is 'ready' (job->state ==

Re: [PATCH] qemu: blockjob: Transition into 'ready' state only from expected states

2021-04-21 Thread Peter Krempa
On Tue, Apr 20, 2021 at 15:07:03 +0300, Nir Soffer wrote: > On Tue, Apr 20, 2021 at 2:45 PM Peter Krempa wrote: > > > > In certain rare occasions qemu can transition a block job which was > > already 'ready' into 'standby' and then back. If this happens in the > > following order libvirt will get

Re: [PATCH] qemu.conf: add max-ram-below-4g option

2021-04-21 Thread Peter Krempa
On Wed, Apr 21, 2021 at 16:25:28 +0800, yezhiyong wrote: > Limit the amount of ram below 4G. This helps in scenarios like > GPU passthrough when the GPA used by DMA device is conflict with > the decode window of a host bridge and the address translation > request to iommu isn't launched, which

Re: [PATCH] qemu.conf: add max-ram-below-4g option

2021-04-21 Thread Daniel P . Berrangé
On Wed, Apr 21, 2021 at 04:25:28PM +0800, yezhiyong wrote: > Limit the amount of ram below 4G. This helps in scenarios like > GPU passthrough when the GPA used by DMA device is conflict with > the decode window of a host bridge and the address translation > request to iommu isn't launched, which

[PATCH] qemu.conf: add max-ram-below-4g option

2021-04-21 Thread yezhiyong
Limit the amount of ram below 4G. This helps in scenarios like GPU passthrough when the GPA used by DMA device is conflict with the decode window of a host bridge and the address translation request to iommu isn't launched, which causes address overlapping. Note that currently this can be

Re: [libvirt PATCH 2/4] xenParseHypervisorFeatures: Remove superfluous VIR_FREE

2021-04-21 Thread Michal Privoznik
On 4/20/21 1:27 PM, Tim Wiederhake wrote: Fixes: 4eb7c621985dad4de911ec394ac628bd1a5b29ab Signed-off-by: Tim Wiederhake --- src/libxl/xen_common.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 6fa69fbdf0..aeb94e12ad 100644 ---

  1   2   >