Re: [PATCH] qapi: deprecate drive-backup

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
23.04.2021 16:09, Daniel P. Berrangé wrote: On Fri, Apr 23, 2021 at 03:59:00PM +0300, Vladimir Sementsov-Ogievskiy wrote: Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following:

[PATCH] qapi: deprecate drive-backup

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same cache and aio mode as source. Corresponding logic is in

[libvirt PATCH 07/10] virDomainDef: Change type of hyperv_stimer_direct to virTristateSwitch

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ede80ac322..61f2d10d89 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2755,7 +2755,7 @@ struct

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 50ddb293ed..867a83a605 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

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

2021-04-23 Thread Tim Wiederhake
This strictens the parser to disallow negative values (interpreted as `UINT_MAX + value + 1`) for attribute `bufferCount`. Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt PATCH 08/10] virDomainDef: Change type of xen_passthrough_mode to virDomainXenPassthroughMode

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 61f2d10d89..85c318d027 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2753,7 +2753,7 @@ struct

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5b0e90f234..d57450b3c0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -12885,18

[libvirt PATCH 05/10] virDomainSoundDef: Change type of model to virDomainSoundModel

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 2 +- src/qemu/qemu_command.c| 2 +- src/qemu/qemu_domain_address.c | 2 +- src/qemu/qemu_validate.c | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9aba2edf0a..f599d1afe7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c| 333 +++--- .../qemuxml2argvdata/aarch64-gic-invalid.err | 2 +- 2 files changed, 119 insertions(+), 216 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 251 ++--- 1 file changed, 59 insertions(+), 192 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d57450b3c0..9aba2edf0a 100644 --- a/src/conf/domain_conf.c +++

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

2021-04-23 Thread Tim Wiederhake
For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Tim Wiederhake (10): virDomainGraphicsDefParseXMLSDL: Use virXMLProp* virDomainGraphicsDefParseXMLDesktop: Use virXMLProp* virDomainGraphicsDefParseXMLSpice: Use virXMLProp*

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 35 --- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a72d58f488..5b0e90f234 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 01/11] ci: util: Drop documentation for api_version parameter

2021-04-23 Thread Andrea Bolognani
It's a leftover from development. Signed-off-by: Andrea Bolognani --- ci/util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/util.py b/ci/util.py index 90d58454be..304d0d4af8 100644 --- a/ci/util.py +++ b/ci/util.py @@ -12,7 +12,6 @@ def get_registry_uri(namespace: str, :param

[libvirt PATCH 05/11] ci: util: Add new get_registry_images() function

2021-04-23 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- ci/util.py | 28 1 file changed, 28 insertions(+) diff --git a/ci/util.py b/ci/util.py index b6a99ce9c0..b314ebd078 100644 --- a/ci/util.py +++ b/ci/util.py @@ -72,6 +72,34 @@ def get_image_info(image_name: str) -> Dict[str, str]:

[libvirt PATCH 00/11] ci: helper: Improve cross-building support and more

2021-04-23 Thread Andrea Bolognani
Mainly, this switches the output of the list-images action to be more compact and changes all actions that work on containers so that the cross-building architecture is provided as a separate argument. A few additional cleanups / improvements are thrown in as well. Andrea Bolognani (11): ci:

[libvirt PATCH 08/11] ci: helper: Add _make_run_action() function

2021-04-23 Thread Andrea Bolognani
This provides a single place where we can process self._args before handing the control over to make; later on, we're going to implement more logic that can be shared by the build, test and shell actions. Signed-off-by: Andrea Bolognani --- ci/helper | 11 --- 1 file changed, 8

[libvirt PATCH 06/11] ci: helper: Use get_registry_images()

2021-04-23 Thread Andrea Bolognani
Generate output using the processed data instead of the raw data. The output remains identical for now, so this doesn't look like a big improvement, but we're soon going to change it in a way that highlights the convenience of using processed data. Signed-off-by: Andrea Bolognani --- ci/helper

[libvirt PATCH 11/11] ci: helper: Perform some validation on containers

2021-04-23 Thread Andrea Bolognani
This reports a nice error messages when the user attempts to perform a cross-build on a target that doesn't support it, or to use a target that doesn't exist at all. Signed-off-by: Andrea Bolognani --- ci/helper | 9 + 1 file changed, 9 insertions(+) diff --git a/ci/helper b/ci/helper

[libvirt PATCH 09/11] ci: helper: Accept --cross-arch argument

2021-04-23 Thread Andrea Bolognani
This argument is accepted by all actions that use containers. Signed-off-by: Andrea Bolognani --- ci/helper | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ci/helper b/ci/helper index 31e05c0e38..e39934d357 100755 --- a/ci/helper +++ b/ci/helper @@ -23,6 +23,10

[libvirt PATCH 04/11] ci: util: Add _raw suffix to get_registry_images()

2021-04-23 Thread Andrea Bolognani
This stresses the fact that the function returns the data obtained from the GitLab API in its raw form; later on, we're going to implement a more convenient wrapper that extracts the information we're interested in and processes it so that it can be used more conveniently. Signed-off-by: Andrea

[libvirt PATCH 02/11] ci: util: Replace get_image_distro() with get_image_info()

2021-04-23 Thread Andrea Bolognani
This is a more flexible function that parses the name of the container image into its components: distro name and, where applicable, target architecture for cross-building. Signed-off-by: Andrea Bolognani --- ci/util.py | 33 + 1 file changed, 21 insertions(+),

[libvirt PATCH 07/11] ci: helper: Improve output for list-images action

2021-04-23 Thread Andrea Bolognani
This makes the output more compact by grouping together all images that are built on the same base OS. Later on, when we change the actions that operate on container images to accept an lcitool-style --cross-arch argument instead of expecting the name of the image to have the cross-building

[libvirt PATCH 10/11] ci: helper: Enable gitlabparser for container actions

2021-04-23 Thread Andrea Bolognani
Unfortunately this doesn't work completely yet, because the underlying Makefile has no notion of the --namespace and --gitlab-uri arguments, but we need the subparser to be enabled so that we can use the corresponding information in _make_run_action() for validation purposes. Once we've

[libvirt PATCH 03/11] ci: util: Document that get_registry_images() returns raw data

2021-04-23 Thread Andrea Bolognani
The current documentation makes it sound like the function will only return a simple list containing the name of each image available on the registry, but it actually returns a lot more information than that. Signed-off-by: Andrea Bolognani --- ci/util.py | 7 ++- 1 file changed, 6

[libvirt PATCH v2 07/11] virDomainActualNetDefParseXML: Use virXMLProp*

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 57 ++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2de1b17f9e..385d24d2ba 100644 ---

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

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Tim Wiederhake (10): virXMLPropEnum: Fix return value virDomainControllerDef: Change type of ioeventfd to virTristateSwitch virDomainPCIControllerOpts:

[libvirt PATCH v2 02/11] virDomainControllerDef: Change type of ioeventfd to virTristateSwitch

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 13 - src/conf/domain_conf.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 24c0943d62..4ed7c0ef83 100644 ---

[libvirt PATCH v2 10/11] virDomainGraphicsDef: Change type of sharePolicy to virDomainGraphicsVNCSharePolicy

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index cb21ee7872..4838687edf 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@

[libvirt PATCH v2 11/11] virDomainGraphicsDefParseXMLVNC: Use virXMLProp*

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 59 ++ 1 file changed, 13 insertions(+), 46 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 98335781a6..5924198900 100644 ---

[libvirt PATCH v2 09/11] virDomainGraphicsListenDefParseXML: Use virXMLProp*

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 99e05613f7..98335781a6 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH v2 08/11] virDomainNetDefParseXML: Use virXMLProp*

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 199 - 1 file changed, 57 insertions(+), 142 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 385d24d2ba..99e05613f7 100644 ---

[libvirt PATCH v2 04/11] virDomainControllerDefParseXML: Use virXMLProp*

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 275 +++-- 1 file changed, 101 insertions(+), 174 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 33e79b20e6..46b3f03d99 100644 ---

[libvirt PATCH v2 05/11] virDomainControllerDefParseXML: Cosmetic changes

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 46b3f03d99..27d1954692 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9511,8 +9511,7 @@

[libvirt PATCH v2 06/11] virDomainActualNetDef: Change type of type to virDomainNetType

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 30 ++ src/conf/domain_conf.h | 2 +- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 27d1954692..2de1b17f9e

[libvirt PATCH v2 03/11] virDomainPCIControllerOpts: Change type of modelName to virDomainControllerPCIModelName

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/conf/domain_conf.c | 16 +--- src/conf/domain_conf.h | 2 +- src/qemu/qemu_domain_address.c | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt PATCH v2 01/11] virXMLPropEnum: Fix return value

2021-04-23 Thread Tim Wiederhake
Function incorrectly returns 0 when property was successfully read. Fixes: ab5d2776c925ec45eb54ec5432f5645cebb80c85 Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko --- src/util/virxml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virxml.c

[libvirt PATCH v2 00/11] Refactor more XML parsing boilerplate code, part V

2021-04-23 Thread Tim Wiederhake
For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Changes since V1: * Split up patch for virDomainControllerDefParseXML * Code style fixes Tim Wiederhake (11): virXMLPropEnum: Fix return value virDomainControllerDef: Change type of ioeventfd to

Re: [libvirt PATCH 06/10] virDomainActualNetDefParseXML: Use virXMLProp*

2021-04-23 Thread Tim Wiederhake
On Fri, 2021-04-23 at 15:35 +0200, Ján Tomko wrote: > On a Friday in 2021, Tim Wiederhake wrote: > > > > (...) > > > > +goto error; > > + > > +if (rc) > > +actual->data.direct.mode = mode; > > You can just pass actual->data.direct.mode as an argument

Re: [libvirt PATCH 10/10] virDomainGraphicsDefParseXMLVNC: Use virXMLProp*

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 59 ++ 1 file changed, 13 insertions(+), 46 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH 09/10] virDomainGraphicsDef: Change type of sharePolicy to virDomainGraphicsVNCSharePolicy

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH 08/10] virDomainGraphicsListenDefParseXML: Use virXMLProp*

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH 07/10] virDomainNetDefParseXML: Use virXMLProp*

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 199 - 1 file changed, 57 insertions(+), 142 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH 06/10] virDomainActualNetDefParseXML: Use virXMLProp*

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 57 ++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 554efe0aea..3051a5d56d 100644

[PATCH v3 04/14] qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI

2021-04-23 Thread Michal Privoznik
This commit introduces a new capability that reflects virtio-mem-pci device support in QEMU: QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI, /* -device virtio-mem-pci */ The virtio-mem-pci device was introduced in QEMU 5.1. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c

[PATCH v3 12/14] virsh: Introduce update-memory-device command

2021-04-23 Thread Michal Privoznik
New 'update-memory-device' command is introduced which aims on making it user friendly to change device. So far I just need to change so I'm introducing --requested-size only; but the idea is that this is extensible for other cases too. For instance, want to change ? A new --my-element argument

[PATCH v3 09/14] qemu: Refresh the actual size of virtio-mem on monitor reconnect

2021-04-23 Thread Michal Privoznik
If the QEMU driver restarts it loses the track of the actual size of virtio-mem (because it's runtime type of information and thus not stored in XML) and therefore, we have to refresh it when reconnecting to the domain monitor. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c |

[PATCH v3 14/14] kbase: Document virtio-mem

2021-04-23 Thread Michal Privoznik
This commit adds new memorydevices.rst page which should serve all models of memory devices. Yet, I'm documenting virtio-mem quirks only. Signed-off-by: Michal Privoznik --- docs/kbase/index.rst | 4 + docs/kbase/memorydevices.rst | 150 +++

[PATCH v3 07/14] qemu: Wire up live update

2021-04-23 Thread Michal Privoznik
As advertised in one of previous commits, we want to be able to change 'requested-size' attribute of virtio-mem on the fly. This commit does exactly that. Changing anything else is checked for and forbidden. Once guest has changed the allocation, QEMU emits an event which we will use to track the

[PATCH v3 13/14] news: document recent virtio memory addition

2021-04-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 16 1 file changed, 16 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5f8b0ae02d..af6631724a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -8,6 +8,22 @@ the changes introduced by each of them. For a more fine-grained view, use the

[PATCH v3 06/14] qemu: Build command line for virtio-mem

2021-04-23 Thread Michal Privoznik
Nothing special is happening here. All important changes were done when for 'virtio-pmem' (adjusting the code to put virtio memory on PCI bus, generating alias using qemuDomainDeviceAliasIndex(). The only bit that might look suspicious is no prealloc for virtio-mem. But if you think about it, the

[PATCH v3 11/14] qemuDomainSetMemoryFlags: Take virtio-mem into consideration

2021-04-23 Thread Michal Privoznik
The qemuDomainSetMemoryFlags() allows for memballoon () changes for both active and inactive guests. And just before doing any change, we have to make sure that the new size is not greater than the total memory (). However, the total memory includes not only the regular guest memory, but also sum

[PATCH v3 10/14] qemu: Account for both memballoon and virtio-mem

2021-04-23 Thread Michal Privoznik
Reporting how much memory is exposed to the guest happens under which is taken from def->mem.cur_balloon. The reported amount should account for both balloon size and the sum of @actualsize of all virtio-mems. For instance, if domain has 4GiB via balloon and additional 2GiB via virtio-mem, then

[PATCH v3 08/14] qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

2021-04-23 Thread Michal Privoznik
As advertised in previous commit, this event is delivered to us when virtio-mem module changes the allocation inside the guest. It comes with one attribute - size - which holds the new size of the virtio-mem (well, allocated size), in bytes. Mind you, this is not necessarily the same number as

[PATCH v3 01/14] virhostmem: Introduce virHostMemGetTHPSize()

2021-04-23 Thread Michal Privoznik
New virHostMemGetTHPSize() is introduced which allows caller to obtain THP PMD (Page Middle Directory) size, which is equal to the minimal size that THP can use, taken from kernel doc (Documentation/admin-guide/mm/transhuge.rst): Some userspace (such as a test program, or an optimized memory

[PATCH v3 RESEND for v7.4.0 00/14] Introduce virtio-mem model

2021-04-23 Thread Michal Privoznik
This is a rebased version of v3 I've sent about a month ago: https://listman.redhat.com/archives/libvir-list/2021-March/msg00823.html v2 here: https://listman.redhat.com/archives/libvir-list/2021-February/msg00961.html My intent is to merge these only after the upcoming release so that we have

[PATCH v3 03/14] qemu_process: Drop needless check in qemuProcessNeedMemoryBackingPath()

2021-04-23 Thread Michal Privoznik
The aim of this function is to return whether domain definition and/or memory device that user intents to hotplug needs a private path inside cfg->memoryBackingDir. The rule for the memory device that's being hotplug includes checking whether corresponding guest NUMA node needs memoryBackingDir.

[PATCH v3 05/14] conf: Introduce virtio-mem model

2021-04-23 Thread Michal Privoznik
The virtio-mem is paravirtualized mechanism of adding/removing memory to/from a VM. A virtio-mem-pci device is split into blocks of equal size which are then exposed (all or only a requested portion of them) to the guest kernel to use as regular memory. Therefore, the device has two important

[PATCH v3 02/14] qemu_process: Deduplicate code in qemuProcessNeedHugepagesPath()

2021-04-23 Thread Michal Privoznik
The aim of qemuProcessNeedHugepagesPath() is to return whether guest needs private path inside HugeTLBFS mounts (deducted from domain definition @def) or whether the memory device that user is hotplugging in needs the private path (deducted from the @mem argument). The actual creation of the path

Re: [PATCH] qapi: deprecate drive-backup

2021-04-23 Thread Daniel P . Berrangé
On Fri, Apr 23, 2021 at 03:59:00PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Modern way is using blockdev-add + blockdev-backup, which provides a > lot more control on how target is opened. > > As example of drive-backup problems consider the following: > > User of drive-backup expects that

Re: [libvirt PATCH 05/10] virDomainActualNetDef: Change type of type to virDomainNetType

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 30 ++ src/conf/domain_conf.h | 2 +- 2 files changed, 27 insertions(+), 5 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH 04/10] virDomainControllerDefParseXML: Use virXMLProp*

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 281 +++-- 1 file changed, 103 insertions(+), 178 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 33e79b20e6..152b4b8813

Re: [libvirt PATCH 03/10] virDomainPCIControllerOpts: Change type of modelName to virDomainControllerPCIModelName

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 16 +--- src/conf/domain_conf.h | 2 +- src/qemu/qemu_domain_address.c | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt PATCH 02/10] virDomainControllerDef: Change type of ioeventfd to virTristateSwitch

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 13 - src/conf/domain_conf.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH 01/10] virXMLPropEnum: Fix return value

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Function incorrectly returns 0 when property was successfully read. Fixes: ab5d2776c925ec45eb54ec5432f5645cebb80c85 Signed-off-by: Tim Wiederhake --- src/util/virxml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 199 - 1 file changed, 57 insertions(+), 142 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3051a5d56d..2103aae2a3 100644 --- a/src/conf/domain_conf.c +++

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 59 ++ 1 file changed, 13 insertions(+), 46 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1acd692720..b752ccd70b 100644 --- a/src/conf/domain_conf.c +++

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2103aae2a3..1acd692720 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c

[libvirt PATCH 02/10] virDomainControllerDef: Change type of ioeventfd to virTristateSwitch

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 13 - src/conf/domain_conf.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 24c0943d62..4ed7c0ef83 100644 --- a/src/conf/domain_conf.c +++

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

2021-04-23 Thread Tim Wiederhake
For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html Tim Wiederhake (10): virXMLPropEnum: Fix return value virDomainControllerDef: Change type of ioeventfd to virTristateSwitch virDomainPCIControllerOpts: Change type of modelName to

[libvirt PATCH 09/10] virDomainGraphicsDef: Change type of sharePolicy to virDomainGraphicsVNCSharePolicy

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index cb21ee7872..4838687edf 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1834,7 +1834,7 @@ struct

[libvirt PATCH 05/10] virDomainActualNetDef: Change type of type to virDomainNetType

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 30 ++ src/conf/domain_conf.h | 2 +- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 152b4b8813..554efe0aea 100644 ---

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 57 ++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 554efe0aea..3051a5d56d 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 03/10] virDomainPCIControllerOpts: Change type of modelName to virDomainControllerPCIModelName

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 16 +--- src/conf/domain_conf.h | 2 +- src/qemu/qemu_domain_address.c | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

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

2021-04-23 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 281 +++-- 1 file changed, 103 insertions(+), 178 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 33e79b20e6..152b4b8813 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 01/10] virXMLPropEnum: Fix return value

2021-04-23 Thread Tim Wiederhake
Function incorrectly returns 0 when property was successfully read. Fixes: ab5d2776c925ec45eb54ec5432f5645cebb80c85 Signed-off-by: Tim Wiederhake --- src/util/virxml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index

[libvirt PATCHv2 1/3] docs: document new socket attribute for virtiofs

2021-04-23 Thread Ján Tomko
Describe the attribute and add an example. Signed-off-by: Ján Tomko --- docs/formatdomain.rst | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 1b9b221611..282176c4f4 100644 --- a/docs/formatdomain.rst +++

[libvirt PATCHv2 2/3] docs: virtiofs: add section about externally-launched virtiofsd

2021-04-23 Thread Ján Tomko
Provide an exmple in a place more visible than formatdomain.html. Signed-off-by: Ján Tomko --- docs/kbase/virtiofs.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst index c0bc07a68d..740b08d50d 100644 ---

[libvirt PATCHv2 0/3] docs: qemu: add socket for virtiofs filesystems

2021-04-23 Thread Ján Tomko
Ján Tomko (3): docs: document new socket attribute for virtiofs docs: virtiofs: add section about externally-launched virtiofsd NEWS: qemu: add socket for virtiofs filesystems NEWS.rst| 6 ++ docs/formatdomain.rst | 10 +- docs/kbase/virtiofs.rst | 15

[libvirt PATCHv2 3/3] NEWS: qemu: add socket for virtiofs filesystems

2021-04-23 Thread Ján Tomko
Signed-off-by: Ján Tomko --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 5f8b0ae02d..7b55dd056f 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -18,6 +18,12 @@ v7.3.0 (unreleased) The xen driver now supports domains with more than 4TB of memory with

Re: [PATCH] qemu: Don't double free @node_cpus in qemuProcessSetupPid()

2021-04-23 Thread Michal Privoznik
On 4/23/21 10:56 AM, Ján Tomko wrote: On a Friday in 2021, Michal Privoznik wrote: When placing vCPUs into CGroups the qemuProcessSetupPid() is called which then enters a for() loop (around its middle) where it calls virDomainNumaGetNodeCpumask() for each guest NUMA node. But the latter returns

Re: [PATCH] qemu: Don't double free @node_cpus in qemuProcessSetupPid()

2021-04-23 Thread Ján Tomko
On a Friday in 2021, Michal Privoznik wrote: When placing vCPUs into CGroups the qemuProcessSetupPid() is called which then enters a for() loop (around its middle) where it calls virDomainNumaGetNodeCpumask() for each guest NUMA node. But the latter returns only a pointer not new reference/copy

[PATCH] qemu: Don't double free @node_cpus in qemuProcessSetupPid()

2021-04-23 Thread Michal Privoznik
When placing vCPUs into CGroups the qemuProcessSetupPid() is called which then enters a for() loop (around its middle) where it calls virDomainNumaGetNodeCpumask() for each guest NUMA node. But the latter returns only a pointer not new reference/copy and thus the caller must not free it. But the