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

2022-01-27 Thread huangy81
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(黄勇) --- src/libvirt-domain.c | 5 + src/qemu/qemu_driver.c | 14

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

2022-01-27 Thread huangy81
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(黄勇) --- docs/manpages/virsh.rst | 7 +-- src/libvirt-domain.c

[PATCH v3 3/7] qemu_capabilities: Introduce QEMU_CAPS_DIRTYRATE_MODE capability

2022-01-27 Thread huangy81
From: Hyman Huang(黄勇) mode option of calc-dirty-rate command since qemu >=6.2.0. Introduce QEMU_CAPS_DIRTYRATE_MODE capability definition. Signed-off-by: Hyman Huang(黄勇) --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

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

2022-01-27 Thread huangy81
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 +++- src/qemu/qemu_monitor.c | 5 +++--

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

2022-01-27 Thread huangy81
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 below ACL check - [PATCH v2 4/6]: Make the qemuMonitorJSONStartDirtyRateCalc cleaner by

[PATCH v3 1/7] qemu_capabilities: Introduce QEMU_CAPS_CALC_DIRTY_RATE capability

2022-01-27 Thread huangy81
From: Hyman Huang(黄勇) calc-dirty-rate command was introduced since qemu >=5.2.0. Introduce QEMU_CAPS_CALC_DIRTY_RATE capability definition. Signed-off-by: Hyman Huang(黄勇) --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

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

2022-01-27 Thread huangy81
From: Hyman Huang(黄勇) Introduce virDomainDirtyRateCalcFlags and virDomainDirtyRateCalcMode to get ready for adding mode parameter to qemuDomainStartDirtyRateCalc. Signed-off-by: Hyman Huang(黄勇) --- include/libvirt/libvirt-domain.h | 24 1 file changed, 24

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

2022-01-27 Thread huangy81
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 insertions(+) diff --git a/src/qemu/qemu_driver.c

[libvirt PATCH] conf: network: remove hostname validation

2022-01-27 Thread Ján Tomko
We used to validate that the first character of the hostname is a letter. Later, RFC1123 relaxed the requirements to allow a number as well. Drop the validation completely, since we do not care about the following characters, and neither does dnsmasq (even if it's a comma, which is a delimiter in

[libvirt PATCHv2 2/2] qemu: qemuDomainSetLaunchSecurityState: check for params presence

2022-01-27 Thread Ján Tomko
We require the header and the secret to be present. Use a different approach to virParams to report an error if they are not present, instead of trying to pass empty arguments to QEMU via QMP. Signed-off-by: Ján Tomko --- src/qemu/qemu_driver.c | 33 +++-- 1 file

[libvirt PATCHv2 0/2] virsh: domsetlaunchsecstate: report error if no options are passed

2022-01-27 Thread Ján Tomko
Use a different approach that is hopefully more future-proof and also add a check to the qemu driver, as suggested by Michal. Ján Tomko (2): virsh: domsetlaunchsecstate: report error if no options are passed qemu: qemuDomainSetLaunchSecurityState: check for params presence

[libvirt PATCHv2 1/2] virsh: domsetlaunchsecstate: report error if no options are passed

2022-01-27 Thread Ján Tomko
We already exit if they are not present. Report an error, but do not mark them as required in case a future version of this command will want to accept a different set of parameters. https://bugzilla.redhat.com/show_bug.cgi?id=2046024 Signed-off-by: Ján Tomko --- tools/virsh-domain.c | 4 +++-

[libvirt PATCH] qemu: virtiofs: check whether the supplied binary exists

2022-01-27 Thread Ján Tomko
Report an error upfront if the binary does not exist or is not executable. https://bugzilla.redhat.com/show_bug.cgi?id=1999372 Signed-off-by: Ján Tomko --- src/qemu/qemu_virtiofs.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c

Re: [PATCH 3/3] libxl: use virDomainJobData instead of virDomainJobInfo

2022-01-27 Thread Jiri Denemark
On Thu, Jan 20, 2022 at 17:59:50 +0100, Kristina Hanicova wrote: > This transition will make it easier for me in order to generalize s/in order // > jobs in the future as they will always use virDomainJobData and > virDomainJobInfo will be only used in the public api.. > > Signed-off-by:

Re: [PATCH 1/3] qemu: use generalized virDomainJobData instead of qemuDomainJobInfo

2022-01-27 Thread Jiri Denemark
On Thu, Jan 20, 2022 at 17:59:48 +0100, Kristina Hanicova wrote: > This patch includes: > * introducing new files: src/hypervisor/domain_job.c and > src/hypervisor/domain_job.h > * new struct virDomainJobData, which is almost the same as > qemuDomainJobInfo - the only differences are moving

Re: [PATCH 2/3] qemu: make separate function for setting statsType of privateData

2022-01-27 Thread Jiri Denemark
On Thu, Jan 20, 2022 at 17:59:49 +0100, Kristina Hanicova wrote: > We only need to set statsType in almost every case of setting > something from private data, so it seems unnecessary to pull > privateData out of current / completed job for just this one > thing every time. I think this patch

Re: [libvirt PATCH] include: Fix documentation for various VIR_*_LAST values

2022-01-27 Thread Ján Tomko
On a Thursday in 2022, Andrea Bolognani wrote: Signed-off-by: Andrea Bolognani --- include/libvirt/libvirt-domain.h | 6 +++--- include/libvirt/libvirt-secret.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[libvirt PATCH] spec: Move virkey* manual pages from -daemon to -client

2022-01-27 Thread Andrea Bolognani
The documentation included in these manual pages is mostly useful to users of the 'send-key' virsh command, and the virsh manual page refers to them, so it makes more sense to install them along with virsh instead of libvirtd. Signed-off-by: Andrea Bolognani --- libvirt.spec.in | 2 +- 1 file

[libvirt PATCH] include: Fix documentation for various VIR_*_LAST values

2022-01-27 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- include/libvirt/libvirt-domain.h | 6 +++--- include/libvirt/libvirt-secret.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 4da1a63a14..374859fdff 100644 ---

Re: [PATCH v2 0/3] Fix hotplug of unassigned hostdevs

2022-01-27 Thread Daniel Henrique Barboza
On 1/27/22 11:05, Michal Prívozník wrote: On 1/27/22 14:57, Daniel Henrique Barboza wrote: On 1/26/22 06:29, Michal Privoznik wrote: v2 of: https://listman.redhat.com/archives/libvir-list/2022-January/msg0.html Patches 1/3 and 2/3 were ACKed but I'm sending them for completeness.

Re: [PATCH v2 0/3] Fix hotplug of unassigned hostdevs

2022-01-27 Thread Michal Prívozník
On 1/27/22 14:57, Daniel Henrique Barboza wrote: > > > On 1/26/22 06:29, Michal Privoznik wrote: >> v2 of: >> >> https://listman.redhat.com/archives/libvir-list/2022-January/msg0.html >> >> >> Patches 1/3 and 2/3 were ACKed but I'm sending them for completeness. > > > Back when I've added

Re: [PATCH v2 0/3] Fix hotplug of unassigned hostdevs

2022-01-27 Thread Daniel Henrique Barboza
On 1/26/22 06:29, Michal Privoznik wrote: v2 of: https://listman.redhat.com/archives/libvir-list/2022-January/msg0.html Patches 1/3 and 2/3 were ACKed but I'm sending them for completeness. Back when I've added this UNASSIGNED address type I was also pursuing a PCI multifunction

[libvirt PATCH] cpu-data.py: Query hyperv enlightenments

2022-01-27 Thread Tim Wiederhake
Reporting hv-* properties properly requires hv to be enabled, see qemu commit 071ce4b03b. Signed-off-by: Tim Wiederhake --- tests/cputestdata/cpu-data.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py index

[PATCH] qemu_command: Generate memory only after controllers

2022-01-27 Thread Michal Privoznik
Currently, memory device (def->mems) part of cmd line is generated before any controller. In majority of cases it doesn't matter because neither of memory devices live on a bus that's created by an exposed controller (e.g. there's no DIMM controller, at least not exposed). Except for virtio-mem

Re: [PATCH v2 3/3] qemuDomainDetachDeviceLive: Handle hostevs with unassigned type of address

2022-01-27 Thread Ján Tomko
s/hostevs/hostdevs/ in the commit summary On a Wednesday in 2022, Michal Privoznik wrote: A can have which means libvirt manages the device detach from/reattach to the host but the device is never exposed to the guest. This means that we have to take a shortcut during hotunplug (e.g. never

Re: [libvirt PATCH 2/5] meson: Check for os-release's ID_LIKE in addition to ID

2022-01-27 Thread Andrea Bolognani
On Thu, Jan 27, 2022 at 11:05:49AM +0100, Pavel Hrdina wrote: > On Wed, Jan 26, 2022 at 04:13:13PM +0100, Andrea Bolognani wrote: > > + elif (os_release.contains('fedora') or > > os_release.contains('gentoo') or > > os_release.contains('suse')) > > I would add

[libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-01-27 Thread Andrea Bolognani
This makes it possible to reduce the number of cases we have to consider, because 'sles' declares itself to be like 'suse' and both 'rhel' and 'centos' declare themselves to be like 'fedora'. We have to move the check for Ubuntu before the one for Debian, however, because 'ubuntu' declares itself

[libvirt PATCH v2 0/1] meson: Fixes and improvements to handling of qemu_user and qemu_group

2022-01-27 Thread Andrea Bolognani
Changes from [v1]: * most patches have been pushed; * added comments. [v1] https://listman.redhat.com/archives/libvir-list/2022-January/msg01189.html Andrea Bolognani (1): meson: Check for os-release's ID_LIKE in addition to ID meson.build | 15 +++ 1 file changed, 7

Re: [libvirt PATCH 5/5] meson: Optimize handling of qemu_user and qemu_group

2022-01-27 Thread Pavel Hrdina
On Wed, Jan 26, 2022 at 04:13:16PM +0100, Andrea Bolognani wrote: > If the user has already provided us with the configuration they > want, there's no point in trying to come up with a reasonable > OS-specific default. > > Suggested-by: Olaf Hering > Signed-off-by: Andrea Bolognani > --- >

Re: [libvirt PATCH 4/5] meson: Require that both qemu_user and qemu_group are provided

2022-01-27 Thread Pavel Hrdina
On Wed, Jan 26, 2022 at 04:13:15PM +0100, Andrea Bolognani wrote: > Or that neither is. The current implementation, where if only > one of the two is provided the other one will be based on > OS-specific defaults is more likely to cause confusion than it > is to be helpful. > > Signed-off-by:

Re: [libvirt PATCH 3/5] meson: Don't check whether qemu_user and qemu_group exist

2022-01-27 Thread Pavel Hrdina
On Wed, Jan 26, 2022 at 04:13:14PM +0100, Andrea Bolognani wrote: > QEMU might not be installed on the build system, in which case > the user and group will not be present. We should avoid falling > back to root:root in that case, and assume the user and group > are going to be present in the

Re: Backend memory object creation - query

2022-01-27 Thread Peter Krempa
On Thu, Jan 27, 2022 at 04:05:19 +, M, Shivakumar wrote: > Hello, Hi, note that there's no need to CC both libvir-list and libvirt-users maling lists. > > > For our use-case with Libvirt we want to create the Memory backend object , > > Expected QEMU args would be > -object

Re: [libvirt PATCH 1/5] meson: Don't require /etc/os-release to be present

2022-01-27 Thread Pavel Hrdina
On Wed, Jan 26, 2022 at 04:13:12PM +0100, Andrea Bolognani wrote: > It might be part of some non-mandatory package on certain > distros, and our logic deals just fine with its contents not > being available. > > Fixes: 4c69d64efa3731d074d198f871fd42e74c4a39f6 > Reported-by: Olaf Hering >

Re: [libvirt PATCH 2/5] meson: Check for os-release's ID_LIKE in addition to ID

2022-01-27 Thread Pavel Hrdina
On Wed, Jan 26, 2022 at 04:13:13PM +0100, Andrea Bolognani wrote: > This makes is possible to reduce the number of cases we have to s/is/it/ > consider, because 'sles' declares itself to be like 'suse' and > both 'rhel' and 'centos' declare themselves to be like 'fedora'. > > We have to move

Backend memory object creation - query

2022-01-27 Thread M, Shivakumar
Hello, For our use-case with Libvirt we want to create the Memory backend object , Expected QEMU args would be -object memory-backend-memfd,id=mem1,size=4096M Request you to please help us to specify this arg in the libvirt XML. Thanks, Shiv

Re: [PATCH v2 4/6] qemu_driver: Add mode option for qemuDomainStartDirtyRateCalc

2022-01-27 Thread Hyman Huang
在 2022/1/27 16:34, Peter Krempa 写道: On Thu, Jan 27, 2022 at 15:25:20 +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Add mode option to extend qemuDomainStartDirtyRateCalc API, which is introduced since qemu >= 6.2. Signed-off-by: Hyman Huang(黄勇) ---

Re: [PATCH v2 2/6] qemu_driver: Probe capability before calculating dirty page rate

2022-01-27 Thread Hyman Huang
在 2022/1/27 16:23, Peter Krempa 写道: On Thu, Jan 27, 2022 at 15:25:18 +0800, 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(黄勇) ---

Re: [PATCH v2 6/6] qemu_driver: Add calc_mode for dirtyrate statistics

2022-01-27 Thread Peter Krempa
On Thu, Jan 27, 2022 at 15:25:22 +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 v2 5/6] virsh: Extend domdirtyrate-calc virsh api

2022-01-27 Thread Peter Krempa
On Thu, Jan 27, 2022 at 15:25:21 +0800, 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 v2 4/6] qemu_driver: Add mode option for qemuDomainStartDirtyRateCalc

2022-01-27 Thread Peter Krempa
On Thu, Jan 27, 2022 at 15:25:20 +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add mode option to extend qemuDomainStartDirtyRateCalc API, > which is introduced since qemu >= 6.2. > > Signed-off-by: Hyman Huang(黄勇) > --- > include/libvirt/libvirt-domain.h | 13

Re: [PATCH v2 2/6] qemu_driver: Probe capability before calculating dirty page rate

2022-01-27 Thread Peter Krempa
On Thu, Jan 27, 2022 at 15:25:18 +0800, 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 | 12