[libvirt PATCH v2 1/4] qemu: add capability for qemu-vdagent chardev

2022-03-24 Thread Jonathon Jongsma
Detect whether qemu supports the qemu-vdagent character device. This enables support for copy/paste with VNC graphics. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 +

[libvirt PATCH v2 4/4] qemu: add support for qemu-vdagent channel

2022-03-24 Thread Jonathon Jongsma
Implement the qemu-vdagent channel introduced in the previous commit. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_command.c | 21 ++- src/qemu/qemu_monitor_json.c | 28 - src/qemu/qemu_validate.c | 10 +++-

[libvirt PATCH v2 2/4] Rename virDomainGraphicsSpiceMouseMode to virDomainMouseMode

2022-03-24 Thread Jonathon Jongsma
This enumeration will be useful for vnc with the upcoming qemu-vdagent device so make the name more generic. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 8 src/conf/domain_conf.h | 14 +++--- src/libvirt_private.syms | 4 ++-- src/libxl/libxl_conf.c |

[libvirt PATCH v2 3/4] conf: add qemu-vdagent channel

2022-03-24 Thread Jonathon Jongsma
Add the ability to configure a qemu-vdagent in guest domains. This device is similar to the spice vdagent channel except that qemu handles the spice-vdagent protocol messages itself rather than routing them over a spice protocol channel. The qemu-vdagent device has two notable configuration

[libvirt PATCH v2 0/4] Enable copy/paste for vnc displays

2022-03-24 Thread Jonathon Jongsma
This patch series enables support for the qemu-vdagent character device which enables copy/paste support between guest and client when using vnc graphics. The guest must be configured with something like the following: Copy/paste sync requires a

Re: [PATCH v2 16/19] Refactoring virDomainGraphicsDefParseXMLSpice() to use XPath

2022-03-24 Thread Michal Prívozník
On 3/24/22 18:02, Andrea Bolognani wrote: > > but I can't help > wondering if there are other cases where switching to > virXPathString() in the way seen here might have introduced undesired > changes in behavior. > > Thoughts? > Unless you want to audit every virXPath*() call with its

Re: [PATCH v2 16/19] Refactoring virDomainGraphicsDefParseXMLSpice() to use XPath

2022-03-24 Thread Andrea Bolognani
On Tue, May 04, 2021 at 01:40:10PM +0200, Kristina Hanicova wrote: > -} else if (virXMLNodeNameEqual(cur, "playback")) { > -int compressionVal; > -g_autofree char *compression = virXMLPropString(cur, > "compression"); > - > -if

[PATCH] error message in virDomainDiskDefIotuneParse shifted to virDomainDefPostParseCheck

2022-03-24 Thread Jamm02
From: Moteen Shah domain_conf.c: all the option collision total and... error messages in virDomainDiskDefIotuneParse shifted to new function virDomainDefPostParseCheck --- src/conf/domain_conf.c | 86 ++ 1 file changed, 45 insertions(+), 41 deletions(-)

[PATCH 0/5] Generalize job enums across all hypervisors

2022-03-24 Thread Kristina Hanicova
Kristina Hanicova (5): move jobs enums QEMU_X into hypervisor as VIR_X qemu: move macros QEMU_X into hypervisor as VIR_X lxc: use virDomainJob enum instead of virLXCDomainJob libxl: use virDomainJob enum instead of libxlDomainJob ch: use virDomainJob enum instead of virCHDomainJob

[PATCH 2/5] qemu: move macros QEMU_X into hypervisor as VIR_X

2022-03-24 Thread Kristina Hanicova
It makes sense to have these in the same file as the definitions of enums. Signed-off-by: Kristina Hanicova --- src/hypervisor/domain_job.h | 12 src/qemu/qemu_backup.c | 2 +- src/qemu/qemu_domainjob.c | 4 ++-- src/qemu/qemu_domainjob.h | 11 ---

[PATCH 5/5] ch: use virDomainJob enum instead of virCHDomainJob

2022-03-24 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/ch/ch_domain.c | 24 src/ch/ch_domain.h | 18 +++--- src/ch/ch_driver.c | 20 ++-- 3 files changed, 21 insertions(+), 41 deletions(-) diff --git a/src/ch/ch_domain.c b/src/ch/ch_domain.c index

[PATCH 4/5] libxl: use virDomainJob enum instead of libxlDomainJob

2022-03-24 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/libxl/libxl_domain.c| 28 -- src/libxl/libxl_domain.h| 17 ++--- src/libxl/libxl_driver.c| 48 ++--- src/libxl/libxl_migration.c | 6 ++--- 4 files changed, 39 insertions(+), 60

[PATCH 3/5] lxc: use virDomainJob enum instead of virLXCDomainJob

2022-03-24 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/hypervisor/domain_job.h | 4 ++-- src/lxc/lxc_domain.c| 25 src/lxc/lxc_domain.h| 19 +++ src/lxc/lxc_driver.c| 46 ++--- 4 files changed, 37 insertions(+), 57

Re: Request to move my GitLab custom executor repo under the libvirt umbrella

2022-03-24 Thread Daniel P . Berrangé
On Thu, Mar 24, 2022 at 04:07:36PM +0100, Erik Skultety wrote: > So, we successfully enabled functional testing utilizing GitLab's custom > executor feature. The code responsible for creating template images and > provisioning and tearing down the VM workers currently lives under my GitLab >

Request to move my GitLab custom executor repo under the libvirt umbrella

2022-03-24 Thread Erik Skultety
So, we successfully enabled functional testing utilizing GitLab's custom executor feature. The code responsible for creating template images and provisioning and tearing down the VM workers currently lives under my GitLab account [1] and I think it would be better if we hosted it under the libvirt

[PATCH 1/2] qemu: remove unnecessary else branches after return / goto

2022-03-24 Thread Kristina Hanicova
I think the code looks cleaner without else branches. Signed-off-by: Kristina Hanicova --- src/qemu/qemu_domainjob.c | 3 +-- src/qemu/qemu_migration.c | 13 +++-- src/qemu/qemu_process.c | 4 ++-- src/qemu/qemu_snapshot.c | 13 ++--- 4 files changed, 16 insertions(+), 17

[PATCH 0/2] qemu: remove else after return / goto

2022-03-24 Thread Kristina Hanicova
Kristina Hanicova (2): qemu: remove unnecessary else branches after return / goto qemu: remove else branches after return in qemuMigrationSrcPerform() src/qemu/qemu_domainjob.c | 3 +- src/qemu/qemu_migration.c | 59 +++ src/qemu/qemu_process.c | 4

[PATCH 2/2] qemu: remove else branches after return in qemuMigrationSrcPerform()

2022-03-24 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/qemu/qemu_migration.c | 46 +++ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index e16d579928..d8b00aca87 100644 --- a/src/qemu/qemu_migration.c

Re: [PATCH v2] conf: Introduce memory allocation threads

2022-03-24 Thread Martin Kletzander
On Thu, Mar 24, 2022 at 12:16:01PM +0100, Michal Privoznik wrote: Since its v5.0.0 release QEMU is capable of specifying number of threads used to allocate memory. It defaults to 1, which may be too low for humongous guests with gigantic pages. In general, on QEMU cmd line level it is possible

Re: [PATCH 1/4] conf: Introduce memory allocation threads

2022-03-24 Thread Michal Prívozník
On 3/24/22 12:49, Martin Kletzander wrote: > On Thu, Mar 24, 2022 at 11:22:54AM +, Daniel P. Berrangé wrote: >> On Thu, Mar 24, 2022 at 12:15:43PM +0100, Michal Prívozník wrote: >>> On 3/24/22 10:26, Martin Kletzander wrote: >>> > On Tue, Mar 22, 2022 at 04:05:14PM +0100, Michal Privoznik

[PATCH v2 3/3] qemu: remove unnecessary gotos in qemuSnapshotCreateActiveInternal

2022-03-24 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/qemu/qemu_snapshot.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 540fda4854..c23fb40849 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@

[PATCH v2 0/3] qemu: don't pause VM when creating internal snapshot

2022-03-24 Thread Nikolay Shirokovskiy
Diff to v1 [1]: - fix mistake of dropping hunk that starts CPUs if snapshot was not successful. We still need it if halt upon snapshot is requested. The is series is mostly about the first patch. The others patch are minor cleanups. [1] v1 version

[PATCH v2 1/3] qemu: don't pause vm when creating internal snapshot

2022-03-24 Thread Nikolay Shirokovskiy
From: Maxim Nestratov The pause was introduced in [1] in ancient times when probably distro's QEMU does not have RESUME event. Yet the event was in the upstream QEMU at the time version according to [2]. So the event is supported since QEMU version 0.13 which is much older then oldest currently

[PATCH v2 2/3] qemu: remove excessive check in qemuSnapshotCreateActiveInternal

2022-03-24 Thread Nikolay Shirokovskiy
After [1] it is not possible to get inactive state for domain while communicating with QEMU (see also [2]). Also even if it were possible the qemuProcessStopCPUs would return error and the check would not be reached. [1] commit 81f50cb92d16643bcd749e3ab5b404b8b7cec643 Author: Jiri Denemark

Re: [PATCH 0/3] qemu: don't pause vm when creating internal snapshot

2022-03-24 Thread Nikolay Shirokovskiy
Please, disregard this series as it has a mistake. I'll send a new one. Nikolay пн, 21 мар. 2022 г. в 18:16, Nikolay Shirokovskiy : > > The is series is mostly about the first patch. The others patch are > minor cleanups. > > Maxim Nestratov (1): > qemu: don't pause vm when creating internal

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 12:42:12PM +0100, Peter Krempa wrote: > On Thu, Mar 24, 2022 at 12:02:05 +0100, Martin Kletzander wrote: > > On Thu, Mar 24, 2022 at 10:32:51AM +, Andrea Bolognani wrote: > > > On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: > > > > I would rather

Re: [PATCH 1/4] conf: Introduce memory allocation threads

2022-03-24 Thread Martin Kletzander
On Thu, Mar 24, 2022 at 11:22:54AM +, Daniel P. Berrangé wrote: On Thu, Mar 24, 2022 at 12:15:43PM +0100, Michal Prívozník wrote: On 3/24/22 10:26, Martin Kletzander wrote: > On Tue, Mar 22, 2022 at 04:05:14PM +0100, Michal Privoznik wrote: >> Since its commit v5.0.0-rc0~75^2~1^2~3 QEMU is

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Peter Krempa
On Thu, Mar 24, 2022 at 12:02:05 +0100, Martin Kletzander wrote: > On Thu, Mar 24, 2022 at 10:32:51AM +, Andrea Bolognani wrote: > > On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: > > > What I assume is that allowReboot is one of the few, if not the only > > > exception

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Peter Krempa
On Thu, Mar 24, 2022 at 10:03:36 +, Andrea Bolognani wrote: > On Thu, Mar 24, 2022 at 10:14:18AM +0100, Michal Prívozník wrote: > > On 3/24/22 10:00, Peter Krempa wrote: > > > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > > >> Fixes: 8861d96c880d25c940456c5997a2ac93fc073c78

Re: [PATCH 1/4] conf: Introduce memory allocation threads

2022-03-24 Thread Daniel P . Berrangé
On Thu, Mar 24, 2022 at 12:15:43PM +0100, Michal Prívozník wrote: > On 3/24/22 10:26, Martin Kletzander wrote: > > On Tue, Mar 22, 2022 at 04:05:14PM +0100, Michal Privoznik wrote: > >> Since its commit v5.0.0-rc0~75^2~1^2~3 QEMU is capable of > > > > Anything wrong with the old "commit

[PATCH v2] conf: Introduce memory allocation threads

2022-03-24 Thread Michal Privoznik
Since its v5.0.0 release QEMU is capable of specifying number of threads used to allocate memory. It defaults to 1, which may be too low for humongous guests with gigantic pages. In general, on QEMU cmd line level it is possible to use different number of threads per each memory-backend-* object,

Re: [PATCH 1/4] conf: Introduce memory allocation threads

2022-03-24 Thread Michal Prívozník
On 3/24/22 10:26, Martin Kletzander wrote: > On Tue, Mar 22, 2022 at 04:05:14PM +0100, Michal Privoznik wrote: >> Since its commit v5.0.0-rc0~75^2~1^2~3 QEMU is capable of > > Anything wrong with the old "commit ffac16fab33b" ? Not specifically no. But I do it this ways so that it's visible at

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Martin Kletzander
On Thu, Mar 24, 2022 at 10:32:51AM +, Andrea Bolognani wrote: On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: What I assume is that allowReboot is one of the few, if not the only exception where we format the default zero value. My guess is that you're right, but I

[PATCH] meson: do not look for libdevmapper/libparted if not requested

2022-03-24 Thread Paolo Bonzini
devmapper_dep and libparted_dep are not used if -Dstorage_disk=disabled. Do not bother looking for these libraries if the disk storage backend was not requested. Signed-off-by: Paolo Bonzini --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build

[PATCH] meson: do not look for librbd/librados if not requested

2022-03-24 Thread Paolo Bonzini
rbd_dep is not used if -Dstorage_rbd=disabled. Do not bother looking for the libraries that compose it if the rbd storage backend was not requested. Signed-off-by: Paolo Bonzini --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 09:58:28AM +0100, Martin Kletzander wrote: > What I assume is that allowReboot is one of the few, if not the only > exception where we format the default zero value. My guess is that you're right, but I haven't actually verified this yet :) > > @@ -545,8 +545,6 @@

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 10:14:18AM +0100, Michal Prívozník wrote: > On 3/24/22 10:00, Peter Krempa wrote: > > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > >> Fixes: 8861d96c880d25c940456c5997a2ac93fc073c78 > >> Fixes: c8726ede83ac117cb18c0b0a1fbfeeac8b80384b > > I wouldn't say

[PATCH 2/2] qemu: add support for tsc.on_reboot element

2022-03-24 Thread Paolo Bonzini
QEMU 7.0.0 adds a new property tsc-clear-on-reset to x86 CPU, corresponding to Libvirt's element. Plumb it in the validation, command line handling and tests. Signed-off-by: Paolo Bonzini --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[PATCH 1/2] domain: add tsc.on_reboot element

2022-03-24 Thread Paolo Bonzini
Some versions of Windows hang on reboot if their TSC value is greater than 2^54. The workaround is to reset the TSC to a small value. Add to the domain configuration an attribute for this. It can be used by QEMU and in principle also by ESXi, which has a property called

[PATCH 0/2] domain, qemu: add support for clearing TSC on reset

2022-03-24 Thread Paolo Bonzini
Some versions of Windows hang on reboot if their TSC value is greater than 2^54. The workaround is to reset the TSC to a small value, and is implemented by QEMU and ESXi. This series adds a domain attribute for this, and implements it in QEMU. Paolo Paolo Bonzini (2): domain: add

[PATCH] tests: add dependencies to meson declaration

2022-03-24 Thread Paolo Bonzini
Make sure that all tests are run after the helpers and mocks are (re)built. This enables for example using "meson test" as the command line passed to "git bisect run". Signed-off-by: Paolo Bonzini --- tests/meson.build | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 4/4] qemu_command: Generate prealloc-threads property

2022-03-24 Thread Martin Kletzander
On Tue, Mar 22, 2022 at 04:05:17PM +0100, Michal Privoznik wrote: Let's generate prealloc-threads property onto the cmd line if domain configuration requests so. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander signature.asc Description: PGP signature

Re: [PATCH 3/4] qemu_validate: Validate prealloc threads against qemuCpas

2022-03-24 Thread Martin Kletzander
On Tue, Mar 22, 2022 at 04:05:16PM +0100, Michal Privoznik wrote: Only fairly new QEMUs are capable of user provided number of preallocation threads. Validate this assumption. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander signature.asc Description: PGP signature

Re: [PATCH 2/4] qemu_capabilities: Detect memory-backend-*.prealloc-threads property

2022-03-24 Thread Martin Kletzander
On Tue, Mar 22, 2022 at 04:05:15PM +0100, Michal Privoznik wrote: The prealloc-threads is property of memory-backend class which is parent to the other three classes memory-backend-{ram,file,memfd}. Therefore the property is present for all, or none if QEMU is older than v5.0.0-rc0~75^2~1^2~3

Re: [PATCH 1/4] conf: Introduce memory allocation threads

2022-03-24 Thread Martin Kletzander
On Tue, Mar 22, 2022 at 04:05:14PM +0100, Michal Privoznik wrote: Since its commit v5.0.0-rc0~75^2~1^2~3 QEMU is capable of Anything wrong with the old "commit ffac16fab33b" ? specifying number of threads used to allocate memory. While it defaults to the number of vCPUs, users might want to

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Michal Prívozník
On 3/24/22 10:00, Peter Krempa wrote: > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: >> The _ABSENT value of each enumeration has 'default' as string >> representation, and when that's been formatted to XML we should >> parse it back successfully, so we can't just treat

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Peter Krempa
On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > The _ABSENT value of each enumeration has 'default' as string > representation, and when that's been formatted to XML we should > parse it back successfully, so we can't just treat encountering > it as an error. > > Callers of

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Martin Kletzander
On Wed, Mar 23, 2022 at 07:04:20PM +0100, Andrea Bolognani wrote: The _ABSENT value of each enumeration has 'default' as string representation, and when that's been formatted to XML we should parse it back successfully, so we can't just treat encountering it as an error. Callers of