[libvirt PATCH 4/4] conf: add support for 'blob' in virtio-vga/virtio-gpu

2022-02-10 Thread Jonathon Jongsma
Add the ability to specify the 'blob=on/off' option to qemu for the virtio-vga/virtio-gpu device. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2032406 Signed-off-by: Jonathon Jongsma --- docs/schemas/domaincommon.rng | 5 +++ src/conf/domain_conf.c

[libvirt PATCH 3/4] conf: use enum variable for video type

2022-02-10 Thread Jonathon Jongsma
Rather than storing the video type as an integer, use the proper enum type within the struct. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 4 +--- src/conf/domain_conf.h | 2 +- src/libxl/libxl_conf.c | 10 ++ src/libxl/libxl_domain.c | 11

[libvirt PATCH 1/4] conf: Refactor video model parsing

2022-02-10 Thread Jonathon Jongsma
Factor out a separate function to parse out the element for video devices. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 95 ++ 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt PATCH 2/4] conf: switch to virXMLProp* functions

2022-02-10 Thread Jonathon Jongsma
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions rather than reimplementing them with virXPath* functions. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 78 +- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git

[libvirt PATCH 0/4] Add support for 'blob' to virtio video device

2022-02-10 Thread Jonathon Jongsma
Add support to libvirt for the 'blob' option for virtio video devices in qemu. Also do a little preparatory refactoring of the video device xml parsing code. Jonathon Jongsma (4): conf: Refactor video model parsing conf: switch to virXMLProp* functions conf: use enum variable for video type

Re: [PATCH 04/19] qemucapabilitiestest: Hack/fix version in qemu-3.1 tests

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: The test dumps for x86_64 and ppc64 were generated from pre-release qemu-3.0-rc1/rc2 and thus wouldn't pass our minimum version check. As these are very old, fix the version info we use for our check to 3.1 without re-generating them and keep the

Re: [PATCH 03/19] qemuxml2xmltest: Remove unnecessary versioned invocation of 'disk-cache'

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: The 'disk-cache' output file is identical in the interesting parts (everything besides CPU config) to the '-latest' version, so the versioned invocation can be dropped. Signed-off-by: Peter Krempa --- .../disk-cache.x86_64-2.12.0.xml | 61

Re: [PATCH 01/19] qemuxml2argvtest: Add versioned test variants for pre-blockdev disk tests

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Originally when I started working on '-blockdev' support I added version locked variants of all the relevant disk tests locked to qemu-2.12. Upcoming patches will be removing support for qemu-2.12, but '-blockdev' is used only with qemu-4.2 and

Re: [PATCH 08/27] qemu: domain: Add helper for generating 'fdset' ids for VM startup

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: When starting a VM we must assign unique IDs for fdsets we add via '-add-fd'. For now it was done by using the index of the filedescriptor passed to the virCommand. That approach is not very flexible, because you need to have already passed the 'fd' to

Re: [PATCH 27/27] qemuBuildTPMCommandLine: Use 'qemuPassFD' infrastructure

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Remove the last code path using hardcoded fdsets. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 140 +- .../tpm-passthrough-crb.x86_64-latest.args| 6 +- .../tpm-passthrough.x86_64-latest.args

Re: [PATCH 26/27] qemuBuildTPMOpenBackendFDs: Construct 'cancel_path' internally

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Since 'cancel_path' is constructed from the 'tpmdev' argument, we can push it down into the function opening the FDs. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 15 +++ src/qemu/qemu_command.h | 4 +---

Re: [PATCH 25/27] virTPMCreateCancelPath: Refactor value returning

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Automatically free 'path' inside the loop which fills it and return the values directly. Signed-off-by: Peter Krempa --- src/util/virtpm.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 24/27] qemu: Honour 'virtlogd' use when hotplugging chardevs

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Setup the chardev similarly to how we do it on startup so that virtlogd is properly used with chardevs which are hotplugged to a VM. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 +-- src/qemu/qemu_hotplug.c | 25

Re: [PATCH 23/27] qemu: process: Add a hotplug version of qemuProcessPrepareHostBackendChardev

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: When hotplugging a chardev we need the same form of setup for the character device. Export a version which takes a 'virDomainDeviceDef'. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 27 +++ src/qemu/qemu_process.h

Re: [PATCH 22/27] qemuMonitorJSONTestAttachChardev: Add tests for FD passing of file backend

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 13 + 1 file changed, 13 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 21/27] tests: Move testPrepareHostBackendChardevOne into test utils

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Move the function doing the fake setup of chardev backend for FD passing into the collection of qemu test helpers so that it can be used in qemumonitorjsontest. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 93

Re: [PATCH 20/27] qemuMonitorJSONAttachCharDevGetProps: Properly handle private data

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: FD passing and TLS is normally setup via private data for the chardev source. The monitor implementation didn't support it. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 71 +++- 1 file changed, 54

Re: [PATCH 18/27] qemuMonitorJSONTestAttachChardev: Add test for TLS-secured TCP chardev

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 15 +++ 1 file changed, 15 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 19/27] qemuMonitorJSONTestAttachChardev: Add logfile to some tests

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 17/27] qemumonitorjsontest: Refactor chardev hotplug testing

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: The main objective of this patch is to use a proper instance of virDomainChrSourceDef allocated with the private data. To achieve this the test cases are grouped into blocks by how much they fill in the chardev definition. Some test cases are moved

Re: [PATCH 16/27] qemumonitorjsontest: chardev: Remove need to allow unused commands

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Don't add the command to the test monitor when we don't expect to invoke it rather than bypassing the test monitor. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

Re: [PATCH 15/27] qemuDomainRemoveChrDevice: Detach fdset after chardev hot-unplug

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Our code uses fdsets for the pipe passed from virtlogd to qemu, but the chardev hot-unplug code neglected to detach the fdset after the chardev was removed. This kept the FDs open by qemu even after they were not used any more. After the refactor to

Re: [PATCH 14/27] qemu: Rewrite chardev startup code to use qemuFDPass

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Rewrite the parts which already pass FDs via fdset or directly to use the new infrastructure. Apart from simpler code this also adds the appropriate names to the fds in the fdsets which will allow us to properly remove the fdsets won hot-unplug of

Re: [PATCH 13/27] qemuBuildInterfaceCommandLine: Use new pattern for naming the VDPA fdset

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Prefix the file descriptor name with the alias of the network device so that it's similar to other upcoming use. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c| 4 ++--

Re: [PATCH 11/27] qemu: hotplug: Extract code for unplugging fdsets

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: The code unplugging the fdset for a 'vdpa' network device can be later reused. Extract it into 'qemuHotplugRemoveFDSet'. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 69 +++-- 1 file changed, 39

Re: [PATCH 10/27] qemuBuildInterfaceCommandLine: Use qemuFDPass for the vdpa fd

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Use the new helpers for passing of the file descriptor needed for 'vdpa' interfaces. Apart from the simplification in this case it will allow further changes to unify all fdset handling. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c

Re: [PATCH 12/27] qemuHotplugRemoveFDSet: Prepare for proper FD unplug handling

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: For now we have only one code path ('vdpa' interface) which actually cleans up the fdset after it's done, but there are more device types using fdsets. In order to unify the handling of fdsets the removal code will now be able to remove fdsets based

Re: [PATCH 09/27] qemu: Introduce helper functions for passing FDs to qemu

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: The existing helpers we have are very clumsy and there's no integration with the monitor. This patch introduces new helpers to bridge the gap and simplify handing *handling of fdsets and classic FD passing when generating commandline/hotplug

Re: [PATCH 08/27] qemu: domain: Add helper for generating 'fdset' ids for VM startup

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: When starting a VM we must assign unique IDs for fdsets we add via '-add-fd'. For now it was done by using the index of the filedescriptor passed to the virCommand. That approach is not very flexible, because you need to have already passed the 'fd' to

Re: [PATCH v3 0/7] support mode option for dirtyrate calculation

2022-02-10 Thread Hyman
Ping for this patchset. Thanks, Yong 在 2022/1/28 15:35, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) v3: - Rebase the master - [PATCH v2 2/6]: Fix the usage of virQEMUCapsGet - [PATCH v2 4/6]: Fix the cleanup missed in qemuDomainStartDirtyRateCalc - [PATCH v2 4/6]: Move all blocks

Re: [PATCH 07/27] qemu: domain: Move and unexport 'qemuDomainStorageIdReset'

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: It's used only inside qemu_domain.c. Move it before it's usage, along with the qemuDomainStorageIdNew counterpart and unexport it. s/it's/its/ (It's is correct) Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 54

Re: [PATCH 06/27] qemu: monitor: Make 'id' in 'struct _qemuMonitorFdsetInfo' unsigned

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Similarly to the 'qemuMonitorRemoveFdset', it doesn't make sense to store it as signed when only unsigned values are expected. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.c | 2 +- 2 files changed, 2

Re: [PATCH 05/27] qemuMonitorRemoveFdset: Convert @fdset to unsigned int to avoid error

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: 'qemuMonitorRemoveFdset' validatest that the 'fdset' argument isn't less validates than 0. We can turn it to unsigned and thus avoid the error message completely. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 14 --

Re: [PATCH 5/5] qemuPrepareNVRAM: Us virFileRewrite() to write NVRAM

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 12:13:26PM +0100, Michal Privoznik wrote: > After previous commits there is no need for qemuPrepareNVRAM() to > open code virFileRewrite(). Deduplicate the code by calling the > function. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_process.c | 118

Re: [PATCH 04/27] qemuMonitorJSONQueryFdsetsParse: Don't check value passed to g_strdup

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: 'g_strdup()' is NULL-tolerant. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 03/27] qemuProcessPrepareHostBackendChardev: Drop unneeded arguments

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Caller passes 'driver->securityManager', and 'priv->qemuCaps' as arguments along with 'vm', but both aforementioned objects are accessible directly from 'vm'. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 24 +--- 1

Re: [PATCH 4/5] virFileRewrite: Allow callback report errors

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 12:13:25PM +0100, Michal Privoznik wrote: > Sometimes it may be handy for the callback to report error, even > though our current callbacks are trivial. Let's report an error > only if callback returns a well known value, otherwise assume it > reported error message on its

Re: [PATCH 3/5] virFileRewrite: Allow setting owner

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 12:13:24PM +0100, Michal Privoznik wrote: > Currently, due to the way virFileRewrite() works, the rewritten > file is owned by user and group that the daemon runs under. So > far, this is not a problem, because the function is used to write > XML files or secrets for

Re: [PATCH 2/5] qemuFirmwareFillDomain: Use FW descriptors to lookup template when resetting NVRAM

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 12:13:23PM +0100, Michal Privoznik wrote: > If VIR_QEMU_PROCESS_START_RESET_NVRAM flag is passed when > starting a domain, then user requested to overwrite the domain > specific NVRAM with the one from template. But it is very likely > that the path to the template is not

Re: [PATCH 1/5] qemu_process: Accept VIR_QEMU_PROCESS_START_RESET_NVRAM flag when starting a domain

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 12:13:22PM +0100, Michal Privoznik wrote: > In one of my previous commits I've fixed the value of > VIR_QEMU_PROCESS_START_RESET_NVRAM flag (which was masking > another value). But what I forgot to do is update virCheckFlags() > calls in two places where the flag is passed:

Re: [libvirt PATCH 2/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Jiri Denemark wrote: If 1024 was not enough to fit the DN, gnutls_x509_crt_get_dn would store the required size in subjectlen. And since we're not checking the return value of this function, we would happily overwrite some random memory. Signed-off-by: Jiri Denemark ---

[PATCH 6/6] ch_process: Check whether domain is already running before starting it

2022-02-10 Thread Michal Privoznik
There are two places where a domain can be started in CH driver: chDomainCreateXML() and chDomainCreateWithFlags(). Both acquire a job (good), but neither of them checks whether the domain isn't already running. This is wrong. Fortunately, both function call the very same virCHProcessStart()

[PATCH 4/6] ch_driver: End job properly on failed chDomainCreateXML()

2022-02-10 Thread Michal Privoznik
When creating a domain failed, then the virCHDomainObjEndJob() would be jumped over. Fix this by creating enjob label and fixing one goto. Signed-off-by: Michal Privoznik --- src/ch/ch_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ch/ch_driver.c

[PATCH 3/6] chDomainCreateXML: Drop spurious driver unlock

2022-02-10 Thread Michal Privoznik
Inside chDomainCreateXML(), towards the end, the driver is unlocked even though there is no corresponding driver lock call before that. Drop it. Signed-off-by: Michal Privoznik --- src/ch/ch_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c

[PATCH 2/6] ch_driver: Don't lock driver when looking up domains

2022-02-10 Thread Michal Privoznik
There is no need to lock whole driver when accessing virDomainObjList. Those APIs were specifically tailored to be thread safe (when we were dropping QEMU driver lock). Don't resurrect old history. Signed-off-by: Michal Privoznik --- src/ch/ch_driver.c | 9 - 1 file changed, 9

Re: [libvirt PATCH 1/2] qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Jiri Denemark wrote: We use 'ret' for storing values to be returned from a function. Return values from called functions that are not supposed to be returned further are usually called 'rv' (or 'rc'). Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_cookie.c | 14

[PATCH 0/6] ch_driver: Misc cleanups

2022-02-10 Thread Michal Privoznik
While reviewing Tim's patches [1] I've found couple of places in CH driver that are downright bugs. Fix them. 1: https://listman.redhat.com/archives/libvir-list/2022-February/msg00226.html Michal Prívozník (6): ch_driver: Don't lock driver when getting version ch_driver: Don't lock driver

[PATCH 5/6] ch_driver: Introduce and use virCHDomainRemoveInactive()

2022-02-10 Thread Michal Privoznik
There are few places where a call to virDomainObjListRemove() is guarded with !vm->persistent check. And there are some places which are missing this check completely (leading us to losing a domain). To prevent such mistakes introduce virCHDomainRemoveInactive() which does the check for us. Also

[PATCH 1/6] ch_driver: Don't lock driver when getting version

2022-02-10 Thread Michal Privoznik
In chConnectGetVersion() the CH driver is locked in order to read driver->version. This is needless, because not only is the version set with driver unlocked (chStateInitialize() calls chExtractVersion() which sets the version), but the version is practically immutable. Once driver initialized

Re: [libvirt PATCH] tests: Fix fd leaks in virpcivpdtest

2022-02-10 Thread Michal Prívozník
On 2/10/22 15:32, Jiri Denemark wrote: > Tests testVirPCIVPDReadVPDBytes and testVirPCIVPDParseFullVPDInvalid > failed to properly close open fildescriptors in some cases. Let's fix it > by switching to VIR_AUTOCLOSE in the whole file. > > Signed-off-by: Jiri Denemark > --- >

[libvirt PATCH 2/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-10 Thread Jiri Denemark
If 1024 was not enough to fit the DN, gnutls_x509_crt_get_dn would store the required size in subjectlen. And since we're not checking the return value of this function, we would happily overwrite some random memory. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_cookie.c | 21

[libvirt PATCH 1/2] qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject

2022-02-10 Thread Jiri Denemark
We use 'ret' for storing values to be returned from a function. Return values from called functions that are not supposed to be returned further are usually called 'rv' (or 'rc'). Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration_cookie.c | 14 +++--- 1 file changed, 7

[libvirt PATCH 0/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-10 Thread Jiri Denemark
Jiri Denemark (2): qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject qemu_migration_cookie: Properly fetch cert DN src/qemu/qemu_migration_cookie.c | 35 +++- 1 file changed, 21 insertions(+), 14 deletions(-) -- 2.35.1

Re: [libvirt PATCH] docs: Clarify our stance on backported packages

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 03:15:01PM +0100, Andrea Bolognani wrote: > The repositories containing them are usually offered with lower > guarantees, so we don't consider them when it comes to figuring > out the minimum targeted version of our dependencies. > > Signed-off-by: Andrea Bolognani > ---

[libvirt PATCH] tests: Fix fd leaks in virpcivpdtest

2022-02-10 Thread Jiri Denemark
Tests testVirPCIVPDReadVPDBytes and testVirPCIVPDParseFullVPDInvalid failed to properly close open fildescriptors in some cases. Let's fix it by switching to VIR_AUTOCLOSE in the whole file. Signed-off-by: Jiri Denemark --- tests/virpcivpdtest.c | 23 --- 1 file changed, 8

Re: [PATCH 12/19] qemu: capabilities: Remove tautological version checks

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Some version checks no longer make sense as the minimum supported qemu is now qemu-3.1. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git

[libvirt PATCH] docs: Clarify our stance on backported packages

2022-02-10 Thread Andrea Bolognani
The repositories containing them are usually offered with lower guarantees, so we don't consider them when it comes to figuring out the minimum targeted version of our dependencies. Signed-off-by: Andrea Bolognani --- docs/platforms.rst | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH RFC 00/19] qemu: Bump minimum supported qemu to qemu-3.1

2022-02-10 Thread Andrea Bolognani
On Thu, Feb 10, 2022 at 12:58:56PM +, Daniel P. Berrangé wrote: > On Thu, Feb 10, 2022 at 01:45:21PM +0100, Peter Krempa wrote: > > As of April 23 2022, Ubuntu 20.04 will be out for two years, which means > > we no longer have to support Ubuntu 18.04 along with qemu-2.11 shipped > > with it. >

Re: [libvirt PATCH 07/11] ch: Use automatic mutex management

2022-02-10 Thread Michal Prívozník
On 2/7/22 14:12, Tim Wiederhake wrote: > This leaves a bogus `virMutexUnlock` in `chDomainCreateXML`. > > Signed-off-by: Tim Wiederhake > --- > src/ch/ch_conf.c | 20 > src/ch/ch_conf.h | 10 -- > src/ch/ch_driver.c | 30 +++--- > 3 files

Re: [libvirt PATCH 01/11] virthreadpool: Use automatic memory management

2022-02-10 Thread Michal Prívozník
On 2/7/22 14:12, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake s/memory/lock/ in $SUBJ. > --- > src/util/virthreadpool.c | 39 +-- > 1 file changed, 13 insertions(+), 26 deletions(-) > > diff --git a/src/util/virthreadpool.c

Re: [PATCH RFC 00/19] qemu: Bump minimum supported qemu to qemu-3.1

2022-02-10 Thread Daniel P . Berrangé
On Thu, Feb 10, 2022 at 01:45:21PM +0100, Peter Krempa wrote: > As of April 23 2022, Ubuntu 20.04 will be out for two years, which means > we no longer have to support Ubuntu 18.04 along with qemu-2.11 shipped > with it. > > The supported platforms thus will have the following qemu versions: > >

[PATCH 17/19] qemu: capabilities: Retire QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_MIGRATABLE

2022-02-10 Thread Peter Krempa
The flag was based on a version check which no longer made sense. Remove the flag by replacing it's only use by an arch-check which is equivalent at this point. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 10 ++ src/qemu/qemu_capabilities.h

[PATCH 04/19] qemucapabilitiestest: Hack/fix version in qemu-3.1 tests

2022-02-10 Thread Peter Krempa
The test dumps for x86_64 and ppc64 were generated from pre-release qemu-3.0-rc1/rc2 and thus wouldn't pass our minimum version check. As these are very old, fix the version info we use for our check to 3.1 without re-generating them and keep the version tag intact. Signed-off-by: Peter Krempa

[PATCH 19/19] qemu: capabilities: Retire QEMU_CAPS_OVERCOMMIT

2022-02-10 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 -

[PATCH 16/19] qemu: monitor: Remove waiting for monitor

2022-02-10 Thread Peter Krempa
Now all supported qemus have FD passing for the monitor so all of the backoff timer infra used to wait for qemu to create the monitor socket became obsolete and can be removed. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 61 ++--

[PATCH 15/19] qemu: capabilities: Retire QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE

2022-02-10 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 1 -

[PATCH 14/19] qemu: Always assume QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE

2022-02-10 Thread Peter Krempa
All qemu versions now support FD passing either directly or via FDset. Assume that we always have this capability so that we can simplify chardev handling in many cases. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 26 ++

[PATCH 13/19] qemu: capabilities: Remove probing of QEMU_CAPS_NUMA via 'query-command-line-options'

2022-02-10 Thread Peter Krempa
For modern qemu versions we use the presence of 'set-numa-node' qmp commnad. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 35bf07142a..43880d24e7 100644 ---

[PATCH 10/19] tests: qemucapabilities: Remove qemu-3.0 test data

2022-02-10 Thread Peter Krempa
Upcoming patches will raise the minimum required qemu version to 3.1. Signed-off-by: Peter Krempa --- .../caps_3.0.0.ppc64.replies | 23945 .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1073 - .../caps_3.0.0.riscv32.replies| 14919 --

[PATCH 12/19] qemu: capabilities: Remove tautological version checks

2022-02-10 Thread Peter Krempa
Some version checks no longer make sense as the minimum supported qemu is now qemu-3.1. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[PATCH 08/19] tests: qemucapabilities: Remove qemu-2.11 test data

2022-02-10 Thread Peter Krempa
Upcoming patches will raise the minimum required qemu version to 3.1. Signed-off-by: Peter Krempa --- .../caps_2.11.0.s390x.replies | 18237 --- .../caps_2.11.0.s390x.xml | 2593 -- .../caps_2.11.0.x86_64.replies| 19525

[PATCH 18/19] qemu: command: Always assume QEMU_CAPS_OVERCOMMIT

2022-02-10 Thread Peter Krempa
Starting with qemu-3.1 we always have the '-overcommit' argument and use it instead of '-realtime'. Remove the capability check and fix all fake-caps tests. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c| 10 ++

[PATCH 11/19] qemu: Formally deprecate support for qemu < 3.1

2022-02-10 Thread Peter Krempa
As of April 23 2022, Ubuntu 20.04 will be out for two years, which means we no longer have to support Ubuntu 18.04 along with qemu-2.11 shipped with it. This then brings the minimum qemu version we have to support to qemu-3.1: Debian 10/Stable: 3.1 OpenSUSE Leap 15.3: 5.2 Ubuntu

[PATCH 02/19] qemuxml2argvtest: Add newer variant of 'launch-security-sev-missing-platform-info'

2022-02-10 Thread Peter Krempa
Upcoming patches will remove support for qemu-2.12. Since tests of 'sev' use hacked data we need to use our capability dump of qemu-6.0 as it has the required fields. Signed-off-by: Peter Krempa --- ...ev-missing-platform-info.x86_64-6.0.0.args | 37 +++ tests/qemuxml2argvtest.c

[PATCH 07/19] qemuxml2agvtest: Retire tests based on qemu-3.0

2022-02-10 Thread Peter Krempa
Upcoming patches will raise the minimum required qemu version to 3.1. Signed-off-by: Peter Krempa --- .../cpu-host-model.x86_64-3.0.0.args | 36 --- .../mlock-off.x86_64-3.0.0.args | 31 .../mlock-on.x86_64-3.0.0.args| 31

[PATCH 05/19] qemuxml2agvtest: Retire tests based on qemu-2.11

2022-02-10 Thread Peter Krempa
Upcoming patches will raise the minimum required qemu version to 3.1. Signed-off-by: Peter Krempa --- .../cpu-host-model.x86_64-2.11.0.args | 36 -- ...ics-vnc-auto-socket-cfg.x86_64-2.11.0.args | 34 -- ...raphics-vnc-auto-socket.x86_64-2.11.0.args | 32

[PATCH 01/19] qemuxml2argvtest: Add versioned test variants for pre-blockdev disk tests

2022-02-10 Thread Peter Krempa
Originally when I started working on '-blockdev' support I added version locked variants of all the relevant disk tests locked to qemu-2.12. Upcoming patches will be removing support for qemu-2.12, but '-blockdev' is used only with qemu-4.2 and later. This patch adds variants locked to qemu-4.1

[PATCH 09/19] tests: qemucapabilities: Remove qemu-2.12 test data

2022-02-10 Thread Peter Krempa
Upcoming patches will raise the minimum required qemu version to 3.1. Signed-off-by: Peter Krempa --- .../caps_2.12.0.aarch64.replies | 19577 - .../caps_2.12.0.aarch64.xml | 329 - .../caps_2.12.0.ppc64.replies | 23072

[PATCH 06/19] qemuxml2agvtest: Retire tests based on qemu-2.12

2022-02-10 Thread Peter Krempa
Upcoming patches will raise the minimum required qemu version to 3.1. Signed-off-by: Peter Krempa --- .../cpu-host-model.x86_64-2.12.0.args | 36 -- .../disk-aio.x86_64-2.12.0.args | 36 -- ...sk-backing-chains-index.x86_64-2.12.0.args | 1 -

[PATCH 03/19] qemuxml2xmltest: Remove unnecessary versioned invocation of 'disk-cache'

2022-02-10 Thread Peter Krempa
The 'disk-cache' output file is identical in the interesting parts (everything besides CPU config) to the '-latest' version, so the versioned invocation can be dropped. Signed-off-by: Peter Krempa --- .../disk-cache.x86_64-2.12.0.xml | 61 ---

[PATCH RFC 00/19] qemu: Bump minimum supported qemu to qemu-3.1

2022-02-10 Thread Peter Krempa
As of April 23 2022, Ubuntu 20.04 will be out for two years, which means we no longer have to support Ubuntu 18.04 along with qemu-2.11 shipped with it. The supported platforms thus will have the following qemu versions: Debian 10/Stable: 3.1 OpenSUSE Leap 15.3: 5.2 Ubuntu

Re: [PATCH] virNetDevOpenvswitchUpdateVlan: Use space for indentation

2022-02-10 Thread Michal Prívozník
On 2/10/22 13:11, Peter Krempa wrote: > Breaks syntax-check: > > TAB_in_indentation > /home/pipo/libvirt/src/util/virnetdevopenvswitch.c:610: if (virtVlan && > virtVlan->nTags > 0) > /home/pipo/libvirt/src/util/virnetdevopenvswitch.c:611: > virCommandAddArgList(cmd, "--",

Re: [PATCH] virNetDevOpenvswitchUpdateVlan: Use space for indentation

2022-02-10 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Breaks syntax-check: TAB_in_indentation /home/pipo/libvirt/src/util/virnetdevopenvswitch.c:610: if (virtVlan && virtVlan->nTags > 0) /home/pipo/libvirt/src/util/virnetdevopenvswitch.c:611: virCommandAddArgList(cmd, "--", "--if-exists", "set",

[PATCH] virNetDevOpenvswitchUpdateVlan: Use space for indentation

2022-02-10 Thread Peter Krempa
Breaks syntax-check: TAB_in_indentation /home/pipo/libvirt/src/util/virnetdevopenvswitch.c:610: if (virtVlan && virtVlan->nTags > 0) /home/pipo/libvirt/src/util/virnetdevopenvswitch.c:611: virCommandAddArgList(cmd, "--", "--if-exists", "set", "Port", ifname, NULL); make: Leaving

Re: [PATCH] virNetDevOpenvswitchUpdateVlan: fix vlan tag update error

2022-02-10 Thread Michal Prívozník
On 2/9/22 11:59, Yi Wang wrote: > From: tuqiang > > We try to update vlan tag by running virsh update-device command, > libvirtd will report ovs-vsctl arguments error. Vlan tag update > funtion does't consider the xml with no vlan configured circumstances. > > The steps to reproduce the

Re: [PATCH] Fix the dupliacated cpus used in different cells issue

2022-02-10 Thread Michal Prívozník
On 2/10/22 08:02, Jing Qi wrote: > Signed-off-by: Jing Qi > --- > docs/formatdomain.rst | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst > index 24611f0f09..f69957d8c3 100644 > --- a/docs/formatdomain.rst > +++

Re: [libvirt PATCH] util: Fix getting CPU frequency on Apple Silicon

2022-02-10 Thread Michal Prívozník
On 2/10/22 10:08, Andrea Bolognani wrote: > The hw.cpufrequency sysctl, which we use to obtain the CPU > frequency on macOS, is not available when running on Apple > Silicon, and as a consequence we currently report an error > whenever such information is requested. > > The virNodeInfo.mhz field,

Re: [libvirt PATCH 0/4] [RFC] Functional CI - GitLab enablement

2022-02-10 Thread Michal Prívozník
On 2/10/22 10:52, Daniel P. Berrangé wrote: > On Mon, Feb 07, 2022 at 03:01:18PM +0100, Erik Skultety wrote: >> On Mon, Jan 31, 2022 at 07:00:57PM +0100, Erik Skultety wrote: >>> I'd like to propose a PoC of a GitLab-driven functional CI based on GitLab's >>> custom executor runner feature. >> >>

Re: [PATCH 02/27] qemuProcessPrepareHostBackendChardevFileHelper: Always use FD passing

2022-02-10 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Code paths which don't wish to use FD passing are supposed to not call the function which sets up the chardev for FD passing. This is ensured by calling it only in the host prepare step. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c

[PATCH 5/5] qemuPrepareNVRAM: Us virFileRewrite() to write NVRAM

2022-02-10 Thread Michal Privoznik
After previous commits there is no need for qemuPrepareNVRAM() to open code virFileRewrite(). Deduplicate the code by calling the function. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 118 +--- 1 file changed, 39 insertions(+), 79

[PATCH 1/5] qemu_process: Accept VIR_QEMU_PROCESS_START_RESET_NVRAM flag when starting a domain

2022-02-10 Thread Michal Privoznik
In one of my previous commits I've fixed the value of VIR_QEMU_PROCESS_START_RESET_NVRAM flag (which was masking another value). But what I forgot to do is update virCheckFlags() calls in two places where the flag is passed: qemuProcessLaunch() and qemuProcessStart(). Fixes:

[PATCH 3/5] virFileRewrite: Allow setting owner

2022-02-10 Thread Michal Privoznik
Currently, due to the way virFileRewrite() works, the rewritten file is owned by user and group that the daemon runs under. So far, this is not a problem, because the function is used to write XML files or secrets for persistent objects (domains, networks, etc.) and we don't need other users to

[PATCH 4/5] virFileRewrite: Allow callback report errors

2022-02-10 Thread Michal Privoznik
Sometimes it may be handy for the callback to report error, even though our current callbacks are trivial. Let's report an error only if callback returns a well known value, otherwise assume it reported error message on its own. Signed-off-by: Michal Privoznik --- src/util/virfile.c | 13

[PATCH 0/5] More reset nvram fixes

2022-02-10 Thread Michal Privoznik
I've played with the new functionality and found couple of bugs/possible improvements. Michal Prívozník (5): qemu_process: Accept VIR_QEMU_PROCESS_START_RESET_NVRAM flag when starting a domain qemuFirmwareFillDomain: Use FW descriptors to lookup template when resetting NVRAM

[PATCH 2/5] qemuFirmwareFillDomain: Use FW descriptors to lookup template when resetting NVRAM

2022-02-10 Thread Michal Privoznik
If VIR_QEMU_PROCESS_START_RESET_NVRAM flag is passed when starting a domain, then user requested to overwrite the domain specific NVRAM with the one from template. But it is very likely that the path to the template is not stored in the domain definition, which in turn makes the copy function

Re: [libvirt PATCH 0/4] [RFC] Functional CI - GitLab enablement

2022-02-10 Thread Daniel P . Berrangé
On Mon, Jan 31, 2022 at 07:00:57PM +0100, Erik Skultety wrote: > Another annoying thing in terms of test failure analysis is that TCK in its > current shape cannot save libvirt debug logs on a per-test basis and so a > massive dump is produced for the whole test run. This is very suboptimal, but >

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-02-10 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 02:45:15PM +0100, Erik Skultety wrote: > On Tue, Feb 01, 2022 at 12:36:11PM +, Daniel P. Berrangé wrote: > > On Mon, Jan 31, 2022 at 07:01:01PM +0100, Erik Skultety wrote: > > > Create an integration child pipeline in this stage which will trigger a > > > multi-project

Re: [libvirt PATCH 0/4] [RFC] Functional CI - GitLab enablement

2022-02-10 Thread Daniel P . Berrangé
On Mon, Feb 07, 2022 at 03:01:18PM +0100, Erik Skultety wrote: > On Mon, Jan 31, 2022 at 07:00:57PM +0100, Erik Skultety wrote: > > I'd like to propose a PoC of a GitLab-driven functional CI based on GitLab's > > custom executor runner feature. > > ping? > > I'd like to get more comments on

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-02-10 Thread Daniel P . Berrangé
On Mon, Jan 31, 2022 at 07:01:01PM +0100, Erik Skultety wrote: > Create an integration child pipeline in this stage which will trigger a > multi-project CI build of Perl bindings which are required by the TCK > test suite. > In general, this stage will install all the necessary build artifacts >

Re: [PATCH 0/2] qemu: monitor opening cleanups

2022-02-10 Thread Tim Wiederhake
On Thu, 2022-02-10 at 09:33 +0100, Peter Krempa wrote: > Two drive-by fixes from when I was working on a different topic. > > Peter Krempa (2): >   qemuMonitorOpenUnix: Refactor cleanup >   qemuMonitorOpen: Refactor cleanup > >  src/qemu/qemu_monitor.c | 31 ++- >  1

  1   2   >