Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 04:56:37PM +, Daniel P. Berrangé wrote: > On Mon, Feb 14, 2022 at 08:09:57AM -0800, Andrea Bolognani wrote: > > > > Can you please provide pointers to the OpenStack implementation of > > > > this and the issue that resulted from introducing virt-ssh-helper? > > > > > >

Re: [PATCH 2/3] ci: Move from 'centos-8' to 'almalinux-8'

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 06:47:11PM +0100, Peter Krempa wrote: > On Mon, Feb 14, 2022 at 18:22:17 +0100, Peter Krempa wrote: > > Upstream lcitool suggests that as a solution to 'centos-8' being > > removed. > > > > Move also the website and other jobs to depend on > >

Re: [PATCH 2/3] ci: Move from 'centos-8' to 'almalinux-8'

2022-02-14 Thread Peter Krempa
On Mon, Feb 14, 2022 at 18:22:17 +0100, Peter Krempa wrote: > Upstream lcitool suggests that as a solution to 'centos-8' being > removed. > > Move also the website and other jobs to depend on > 'x86_64-almalinux-8-container'. > > Signed-off-by: Peter Krempa > --- > .gitlab-ci.yml

[PULL 0/3] Block patches

2022-02-14 Thread Stefan Hajnoczi
The following changes since commit cc5ce8b8b6be83e5fe3b668dbd061ad97c534e3f: Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220210' into staging (2022-02-13 20:33:28 +) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request

Re: [PATCH 0/3] ci: regenerate wit new lcitool and replace centos 8

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 06:22:15PM +0100, Peter Krempa wrote: > Centos-8 was killed off, so lcitool suggests using AlmaLinux 8 as a > replacement. > > Re-generate the manifests with new lcitool. > > Pipeline with these patches: > > https://gitlab.com/pipo.sk/libvirt/-/pipelines/470699381 > >

[PATCH 3/3] ci: Regenerate with new lcitool

2022-02-14 Thread Peter Krempa
Regenerate with lcitool as of: commit f83b916d5efa4bd33fbf4b7ea41bf6d535cc63fb Author: Alex Bennée Date: Fri Feb 11 09:39:30 2022 + mappings: skip multipath-tools for cross Debian This package is both a mix of library files, headers and native binaries so cannot

[PATCH 2/3] ci: Move from 'centos-8' to 'almalinux-8'

2022-02-14 Thread Peter Krempa
Upstream lcitool suggests that as a solution to 'centos-8' being removed. Move also the website and other jobs to depend on 'x86_64-almalinux-8-container'. Signed-off-by: Peter Krempa --- .gitlab-ci.yml | 6 +++--- ...entos-8.Dockerfile =>

[PATCH 1/3] ci: Regenerate with new lcitool

2022-02-14 Thread Peter Krempa
Re-generate our CI infra with 'lcitool' as of: commit b346752e98bd12395233ebba8c9312e08212b639 (HEAD) Author: Erik Skultety Date: Tue Feb 1 10:48:53 2022 +0100 tests: Replace CentOS 8 with AlmaLinux 8 in test scenarios Switch the test target before actually dropping CentOS

[PATCH 0/3] ci: regenerate wit new lcitool and replace centos 8

2022-02-14 Thread Peter Krempa
Centos-8 was killed off, so lcitool suggests using AlmaLinux 8 as a replacement. Re-generate the manifests with new lcitool. Pipeline with these patches: https://gitlab.com/pipo.sk/libvirt/-/pipelines/470699381 Peter Krempa (3): ci: Regenerate with new lcitool ci: Move from 'centos-8' to

Re: [libvirt PATCH v2 0/6] virnetclient: Cleanups and improvements

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 05:03:29PM +0100, Andrea Bolognani wrote: > Changes from [v1]: > > * most patches have been pushed; > * reduce quoting for most users by only using it when it's > actually necessary to do so. This still has the back compatibility problems I mentioned previously

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 08:09:57AM -0800, Andrea Bolognani wrote: > On Mon, Feb 14, 2022 at 10:25:48AM +, Daniel P. Berrangé wrote: > > > > I understand the motivation, but please don't change this. Applications > > > > like OpenStack have configured ssh authorized_keys files with the > > > >

Re: [PATCH 0/6] qemu: Clean up monitor structs and assume QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE in the hotplug test

2022-02-14 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: qemu-2.11 is the last one which couldn't do FD passing of unix listening sockets. Since it's approaching time to remove the support for such old version we need to make sure that some tests don't break. Peter Krempa (6): qemu: monitor: Drop old monitor

Re: [PATCH 2/6] qemu: Privatize 'struct _qemuMonitorMessage'

2022-02-14 Thread Ján Tomko
Consider using 'make private' in the commit summary, since the other word brings up some bad memories. Jano On a Monday in 2022, Peter Krempa wrote: Move the declaration of the struct into 'qemu_monitor_priv.h' as other code has no business in peeking into the monitor messages. Signed-off-by:

Re: [PATCH 3/6] qemu: monitor: Move declaration of struct _qemuMonitor to qemu_monitor_priv.h

2022-02-14 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: In order to mock the SCM_RIGHTS sendmsg to simulate sending filedescriptors to fake qemu in tests we need access to some fields of 'struct _qemuMonitor'. Move it's declaration to the private header file. *its Signed-off-by: Peter Krempa ---

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 10:25:48AM +, Daniel P. Berrangé wrote: > > > I understand the motivation, but please don't change this. Applications > > > like OpenStack have configured ssh authorized_keys files with the > > > specific command that libvirt invokes. So changes like this will break > >

[libvirt PATCH v2 6/6] virnetclient: Escape socket path

2022-02-14 Thread Andrea Bolognani
Just like the name of the netcat command and the connection URI, the socket path is a user-provided piece of information that might contain characters that have special meaning for the shell, and as such should be escaped. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 10

[libvirt PATCH v2 4/6] virnetclient: Don't unnecessarily quote user-provided values

2022-02-14 Thread Andrea Bolognani
If the output of virNetClientDoubleEscapeShell() matches its input, then no escaping actually happened and quoting the value in the generated script is unnecessary. With this change, awkward use of quotes such as sh -c 'if 'nc' -q' is completely gone when using the default settings. Closes:

[libvirt PATCH v2 5/6] virnetsockettest: Test more socket paths

2022-02-14 Thread Andrea Bolognani
While unlikely, the socket path might also contain unusual characters that need special handling. Adjust test cases so that these scenarios are covered. Note that none of these inputs will actually work outside of the test suite at the moment, but we're going to address that in the next commit.

[libvirt PATCH v2 2/6] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
This makes the generated script a bit shorter and removes an unnecessary call to test. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 3 +-- tests/virnetsockettest.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rpc/virnetclient.c

[libvirt PATCH v2 3/6] virnetclient: Handle netcatPath presence all at once

2022-02-14 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 7e7e9d52a6..9c7047c7f8 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c

[libvirt PATCH v2 1/6] virnetclient: Improve spacing of ssh script

2022-02-14 Thread Andrea Bolognani
This results in the generated script having consistent spacing throughout, instead of having repeated whitespace in some parts and commands that are separated by a semicolon and no spacing at all in others. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 12

[libvirt PATCH v2 0/6] virnetclient: Cleanups and improvements

2022-02-14 Thread Andrea Bolognani
Changes from [v1]: * most patches have been pushed; * reduce quoting for most users by only using it when it's actually necessary to do so. [v1] https://listman.redhat.com/archives/libvir-list/2022-February/msg00477.html Andrea Bolognani (6): virnetclient: Improve spacing of ssh

[PATCH 6/6] qemuhotplugtest: Assume QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE

2022-02-14 Thread Peter Krempa
All modern QEMU versions use FD passing for listening unix sockets so the test should reflect this. This will later help when removing the legacy code paths when we drop support for old QEMUs. Signed-off-by: Peter Krempa --- tests/qemuhotplugtest.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH 5/6] qemuhotplugmock: Mock fd passing to qemu via 'SCM_RIGHTS'

2022-02-14 Thread Peter Krempa
We don't want to be dealing with real FDs thus we mock 'qemuMonitorIOWriteWithFD' to do the same thing as when no FD is being passed. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 2 +- src/qemu/qemu_monitor_priv.h | 7 +++ tests/qemuhotplugmock.c | 14 ++

[PATCH 1/6] qemu: monitor: Drop old monitor fields from 'struct _qemuMonitorMessage'

2022-02-14 Thread Peter Krempa
The fields are no longer used since we've deleted support for HMP-only qemus. The HMP command pass-through works via a QMP command. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/qemu/qemu_monitor.h

[PATCH 3/6] qemu: monitor: Move declaration of struct _qemuMonitor to qemu_monitor_priv.h

2022-02-14 Thread Peter Krempa
In order to mock the SCM_RIGHTS sendmsg to simulate sending filedescriptors to fake qemu in tests we need access to some fields of 'struct _qemuMonitor'. Move it's declaration to the private header file. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 50

[PATCH 4/6] syntax-check: sc_avoid_write: Don't use blanket file exceptions

2022-02-14 Thread Peter Krempa
Adding an exception for the whole file usually defeats the purpose of a syntax check and is also likely to get forgotten once the file is removed. In case of the suggestion of using 'safewrite' instead of write even the comment for safewrite states that the function needs to be used only in

[PATCH 2/6] qemu: Privatize 'struct _qemuMonitorMessage'

2022-02-14 Thread Peter Krempa
Move the declaration of the struct into 'qemu_monitor_priv.h' as other code has no business in peeking into the monitor messages. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.h | 14 -- src/qemu/qemu_monitor_json.c | 3 +++ src/qemu/qemu_monitor_priv.h | 16

[PATCH 0/6] qemu: Clean up monitor structs and assume QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE in the hotplug test

2022-02-14 Thread Peter Krempa
qemu-2.11 is the last one which couldn't do FD passing of unix listening sockets. Since it's approaching time to remove the support for such old version we need to make sure that some tests don't break. Peter Krempa (6): qemu: monitor: Drop old monitor fields from 'struct

Re: [PATCH 0/5] qemu: Test case modernization

2022-02-14 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Peter Krempa (5): qemu: command: Inline qemuBuildDiskFrontendAttributeErrorPolicy qemuxml2argvtest: Add pre-blockdev post-werror-move version of 'disk-error-policy' qemuxml2argvtest: Update disk test cases having 'device_id' argument of SCSI disk

Re: [PATCH 4/5] qemuxml2argvtest: Bump versioned test variants for pre-blockdev disk tests to 4.1.0

2022-02-14 Thread Ján Tomko
On a Monday 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, but blockdev was finally enabled with qemu-4.2. This patch bumps all of the test cases Upcoming patches will

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

2022-02-14 Thread Erik Skultety
On Thu, Feb 10, 2022 at 09:40:45AM +, 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 CI build of Perl bindings which are required by the TCK > > test suite.

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

2022-02-14 Thread Erik Skultety
On Thu, Feb 10, 2022 at 12:22:36PM +0100, Michal Prívozník wrote: > 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

Re: [PATCH 0/2] tests: Don't destroy locked mutexes

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 03:27:51PM +0100, Michal Prívozník wrote: > On 2/14/22 15:01, Daniel P. Berrangé wrote: > > On Mon, Feb 14, 2022 at 02:32:55PM +0100, Michal Privoznik wrote: > >> I've rewritten our virMutexes to check for failures [1] and saw couple > >> of problems. In most cases we are

Re: [PATCH 3/5] qemuxml2argvtest: Update disk test cases having 'device_id' argument of SCSI disk

2022-02-14 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: The 'device_add' property was added in qemu-4.0. Since upcoming patch *device_id will be modernizing all disk test cases we specifically want to preserve the instance of 'device_add' not being used with qemu-3.1 and earlier. *device_id Jano

Re: [PATCH 0/2] tests: Don't destroy locked mutexes

2022-02-14 Thread Michal Prívozník
On 2/14/22 15:01, Daniel P. Berrangé wrote: > On Mon, Feb 14, 2022 at 02:32:55PM +0100, Michal Privoznik wrote: >> I've rewritten our virMutexes to check for failures [1] and saw couple >> of problems. In most cases we are destroying a locked mutex which these >> patches aim to fix. Then we have

[PATCH 3/5] qemuxml2argvtest: Update disk test cases having 'device_id' argument of SCSI disk

2022-02-14 Thread Peter Krempa
The 'device_add' property was added in qemu-4.0. Since upcoming patch will be modernizing all disk test cases we specifically want to preserve the instance of 'device_add' not being used with qemu-3.1 and earlier. Change the 'disk-cache' and 'disk-shared' cases to have a qemu-3.1 and a qemu-4.1

[PATCH 2/5] qemuxml2argvtest: Add pre-blockdev post-werror-move version of 'disk-error-policy'

2022-02-14 Thread Peter Krempa
Starting with qemu-3.0 release we use the 'werror' and 'rerror' properties with the frontend (device) rather than the storage backend (with a minor caveat of s390, where we use it earlier as it doesn't support USB disks, and other disk types supported it earlier). Add specific test cases after

[PATCH 1/5] qemu: command: Inline qemuBuildDiskFrontendAttributeErrorPolicy

2022-02-14 Thread Peter Krempa
Commit dc481f11a61 which converted the function generating properties for disk '-device' argument to JSON removed the only other use of qemuBuildDiskFrontendAttributeErrorPolicy, so we can now inline it into qemuBuildDriveStr. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 29

[PATCH 4/5] qemuxml2argvtest: Bump versioned test variants for pre-blockdev disk tests to 4.1.0

2022-02-14 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, but blockdev was finally enabled with qemu-4.2. This patch bumps all of the test cases Upcoming patches will be removing support for qemu-2.12, but

[PATCH 0/5] qemu: Test case modernization

2022-02-14 Thread Peter Krempa
This is split out and updated based on comments on my RFC series bumping minimum supported qemu version to 3.1. - commit 1 is new - commit 2 is a separated update to 'disk-error-policy' case as pure update to 4.1 (as with others) would camouflage changes in placing of rerror/werror properties

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

2022-02-14 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

Re: [PATCH 0/2] tests: Don't destroy locked mutexes

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 02:32:55PM +0100, Michal Privoznik wrote: > I've rewritten our virMutexes to check for failures [1] and saw couple > of problems. In most cases we are destroying a locked mutex which these > patches aim to fix. Then we have virLogLock() which is locked in > virFork() and

[PATCH 2/2] tests: Destroy domain object properly

2022-02-14 Thread Michal Privoznik
In a lot of cases we do plain virObjectUnref() with the domain object lock held. While this looks okay, what really happens under the hood is that we destroy a locked mutex. But with a help from virDomainObjEndAPI() we can do the right thing and unlock the mutex before destroying it.

[PATCH 0/2] tests: Don't destroy locked mutexes

2022-02-14 Thread Michal Privoznik
I've rewritten our virMutexes to check for failures [1] and saw couple of problems. In most cases we are destroying a locked mutex which these patches aim to fix. Then we have virLogLock() which is locked in virFork() and then unlocked from child (a different process) which is problematic. Pthread

[PATCH 1/2] tests: Track if @vm was created by qemuMonitorCommonTestNew()

2022-02-14 Thread Michal Privoznik
There are two ways how a domain object can appear in _qemuMonitorTest structure. Either it was created by qemuMonitorCommonTestNew() or caller created the object and we are just leasing it. But this also means we have to release the domain object differently. If the domain object was created by

Re: [PATCH v3 4/7] include: Introduce enum for qemuDomainStartDirtyRateCalc

2022-02-14 Thread Hyman Huang
在 2022/2/14 19:31, Daniel P. Berrangé 写道: On Mon, Feb 14, 2022 at 07:21:58PM +0800, Hyman Huang wrote: 在 2022/2/14 18:13, Michal Prívozník 写道: On 1/28/22 08:35, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Introduce virDomainDirtyRateCalcFlags and virDomainDirtyRateCalcMode to

Re: [PATCH v3 4/7] include: Introduce enum for qemuDomainStartDirtyRateCalc

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 07:21:58PM +0800, Hyman Huang wrote: > > > 在 2022/2/14 18:13, Michal Prívozník 写道: > > On 1/28/22 08:35, huang...@chinatelecom.cn wrote: > > > From: Hyman Huang(黄勇) > > > > > > Introduce virDomainDirtyRateCalcFlags and > > > virDomainDirtyRateCalcMode to get ready for

Re: [PATCH v3 7/7] qemu_driver: Add calc_mode for dirtyrate statistics

2022-02-14 Thread Daniel P . Berrangé
On Fri, Jan 28, 2022 at 03:35:54PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add calc_mode for dirtyrate statistics retured by > virsh domstats --dirtyrate api, also add vcpu dirtyrate > if dirty-ring mode was used in last measurement. > > Signed-off-by: Hyman Huang(黄勇)

Re: [PATCH v3 4/7] include: Introduce enum for qemuDomainStartDirtyRateCalc

2022-02-14 Thread Michal Prívozník
On 2/14/22 12:21, Hyman Huang wrote: > > > When displaying the dirtyrate info in 'virsh domstats --dirtyrate' api, > we introduce the 'mode' field to show what mode used last calculation. > Whose meanings can be refered to the virDomainDirtyRateCalcMode Oh, I did not realize that. In that case

Re: [PATCH v3 4/7] include: Introduce enum for qemuDomainStartDirtyRateCalc

2022-02-14 Thread Hyman Huang
在 2022/2/14 18:13, Michal Prívozník 写道: On 1/28/22 08:35, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Introduce virDomainDirtyRateCalcFlags and virDomainDirtyRateCalcMode to get ready for adding mode parameter to qemuDomainStartDirtyRateCalc. Signed-off-by: Hyman Huang(黄勇) ---

Re: [PATCH v3 6/7] virsh: Add mode option to domdirtyrate-calc virsh api

2022-02-14 Thread Hyman Huang
在 2022/2/14 18:13, Michal Prívozník 写道: On 1/28/22 08:35, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Extend domdirtyrate-calc virsh api with mode option, either of these three options "page-sampling,dirty-bitmap,dirty-ring" can be specified when calculating dirty page rate.

Re: [PATCH 0/2] qemu: domain: Move and rename qemuDomainStorageIdNew/Reset

2022-02-14 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: In a review adding similar APIs I was asked to use 'ID' instead of 'Id'. Rename the existing helpers. Patch 1 is a second version as 'qemuDomainStorageIdNew' can be unexported too. Peter Krempa (2): qemu: domain: Move and unexport

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

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 04:59:11AM +0800, Menci wrote: > I tested the patch (applying to v7.10.0) and it works on my M1 MacBook Air. Thanks a lot for confirming! I've pushed the patch now :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 00/11] virnetclient: Cleanups and improvement

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 10:21:57AM +0100, Michal Prívozník wrote: > On 2/11/22 18:39, Andrea Bolognani wrote: > > Andrea Bolognani (11): > > virbuftest: Increase coverage > > virbuffer: Simplify virBufferEscapeShell() > > virnetsockettest: Drop unnecessary backslash > > virnetsockettest:

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 01:56:17AM -0800, Andrea Bolognani wrote: > On Fri, Feb 11, 2022 at 05:46:31PM +, Daniel P. Berrangé wrote: > > > -return g_strdup_printf("sh -c 'which virt-ssh-helper 1>/dev/null > > > 2>&1; " > > > - "if test $? = 0; then " > > >

Re: [PATCH v3 2/7] qemu_driver: Probe capability before calculating dirty page rate

2022-02-14 Thread Michal Prívozník
On 1/28/22 08:35, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Probing QEMU_CAPS_CALC_DIRTY_RATE capability in advance > in case of failure when calculating dirty page rate. > > Signed-off-by: Hyman Huang(黄勇) > --- > src/qemu/qemu_driver.c | 6 ++ > 1 file changed, 6

Re: [PATCH v3 4/7] include: Introduce enum for qemuDomainStartDirtyRateCalc

2022-02-14 Thread Michal Prívozník
On 1/28/22 08:35, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce virDomainDirtyRateCalcFlags and > virDomainDirtyRateCalcMode to get ready for adding mode > parameter to qemuDomainStartDirtyRateCalc. > > Signed-off-by: Hyman Huang(黄勇) > --- >

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

2022-02-14 Thread Peter Krempa
On Thu, Feb 10, 2022 at 18:46:30 +0100, Ján Tomko wrote: > 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 > > --- > >

Re: [PATCH v3 5/7] qemu_driver: Add mode parameter to qemuDomainStartDirtyRateCalc

2022-02-14 Thread Michal Prívozník
On 1/28/22 08:35, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add mode parameter to qemuDomainStartDirtyRateCalc API, 'mode' > option of 'calc-dirty-rate' command was introduced since > qemu >= 6.2. > > Signed-off-by: Hyman Huang(黄勇) > --- > src/qemu/qemu_driver.c | 4

Re: [PATCH v3 6/7] virsh: Add mode option to domdirtyrate-calc virsh api

2022-02-14 Thread Michal Prívozník
On 1/28/22 08:35, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Extend domdirtyrate-calc virsh api with mode option, either > of these three options "page-sampling,dirty-bitmap,dirty-ring" > can be specified when calculating dirty page rate. > > Signed-off-by: Hyman Huang(黄勇) >

Re: [PATCH v3 7/7] qemu_driver: Add calc_mode for dirtyrate statistics

2022-02-14 Thread Michal Prívozník
On 1/28/22 08:35, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add calc_mode for dirtyrate statistics retured by > virsh domstats --dirtyrate api, also add vcpu dirtyrate > if dirty-ring mode was used in last measurement. > > Signed-off-by: Hyman Huang(黄勇) > --- >

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

2022-02-14 Thread Peter Krempa
On Thu, Feb 10, 2022 at 18:35:44 +0100, Ján Tomko wrote: > 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 [...] > >

[PATCH 2/2] qemu: domain: Change 'Id' to 'ID' in qemuDomainStorageIdNew/Reset

2022-02-14 Thread Peter Krempa
In a patch adding similarly named APIs I was asked to use 'ID' instead of 'Id'. Since the code is being put together fix qemuDomainStorageIdNew/Reset first. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 1/2] qemu: domain: Move and unexport 'qemuDomainStorageIdNew/Reset'

2022-02-14 Thread Peter Krempa
They're used only inside qemu_domain.c. Move it before their usage, and unexport them. Signed-off-by: Peter Krempa --- v2: Unexport qemuDomainStorageIdNew too. src/qemu/qemu_domain.c | 54 +- src/qemu/qemu_domain.h | 3 --- 2 files changed, 27

[PATCH 0/2] qemu: domain: Move and rename qemuDomainStorageIdNew/Reset

2022-02-14 Thread Peter Krempa
In a review adding similar APIs I was asked to use 'ID' instead of 'Id'. Rename the existing helpers. Patch 1 is a second version as 'qemuDomainStorageIdNew' can be unexported too. Peter Krempa (2): qemu: domain: Move and unexport 'qemuDomainStorageIdNew/Reset' qemu: domain: Change 'Id' to

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
On Fri, Feb 11, 2022 at 05:46:31PM +, Daniel P. Berrangé wrote: > > -return g_strdup_printf("sh -c 'which virt-ssh-helper 1>/dev/null > > 2>&1; " > > - "if test $? = 0; then " > > +return g_strdup_printf("sh -c 'if which virt-ssh-helper >/dev/null

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

2022-02-14 Thread Peter Krempa
On Thu, Feb 10, 2022 at 18:53:43 +0100, Ján Tomko wrote: > 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

Re: [libvirt PATCH 00/11] virnetclient: Cleanups and improvement

2022-02-14 Thread Michal Prívozník
On 2/11/22 18:39, Andrea Bolognani wrote: > I initially started looking into this because of > > https://gitlab.com/libvirt/libvirt/-/issues/273 > > I have now convinced myself that we don't need to change the way we > quote things, but in the process I have accumulated several > improvements