[PATCH 2/2] qemu: Add testing for locking option

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add testing for locking option for qemu disk source. Test three switches for locking: 'auto', 'on' and 'off'. Signed-off-by: Masayoshi Mizuma --- .../disk-file-locking-auto.x86_64-latest.args | 43 +++ .../disk-file-locking-auto.xml| 27

[PATCH 1/2] qemu: introduce locking option for disk source of qemu

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Introduce locking option for disk source of qemu. It may be useful to avoid file lock issues. locking option supports three switches; 'auto', 'on' and 'off'. The default behaivor will work if locking option isn't set. Example of the usage:

[RFC PATCH 7/7] qemu: Add virtio disks as sharable transient disks

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add virtio disks to be sharable transient disks. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_hotplug.c | 13 - src/qemu/qemu_process.c | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[RFC PATCH 4/7] qemu_hotplug: Add bootindex argument to qemuDomainAttachDiskGeneric

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add bootindex argument to qemuDomainAttachDiskGeneric() so that qemu can detect the boot index for the disks which are hot-added before CPUs start. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_hotplug.c | 10 ++ 1 file changed, 6 insertions(+), 4

[RFC PATCH 2/7] qemu_hotplug: Add asyncJob argument to qemuDomainAttachDeviceDiskLiveInternal

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add asynJob argument to qemuDomainAttachDeviceDiskLiveInternal() so that it can be used before CPUs start. To avoid a compile warning, G_GNUC_UNUSED is added here. A later patch will remove G_GNUC_UNUSED. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_hotplug.c | 5

[RFC PATCH 5/7] qemu_hotplug: make disk sharable

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add qemuHotplugCreateDisksTransient() to make disk sharable. The procedure is followings. First, create the overlay disk with the original disk is set as the backingStore. Then, blockdev-del the StorageProgs and FormatProgs of the disk. That's because to fix the bootindex

[RFC PATCH 6/7] qemu: Add check whether the transient disks are sharable

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Check whether the transient disks are shareable or not. If followings are true, the transient disks are shareable. - qemu has blockdev and hotplug feature - the all disk bus support hot-plug Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_command.c | 17

[RFC PATCH 3/7] qemu_hotplug: Add asynJob argument to qemuDomainRemoveDiskDevice

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add asynJob argument to qemuDomainRemoveDiskDevice() so that it can be used before CPUs start. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_hotplug.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[RFC PATCH 0/7] To make disk sharable

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma This patch series is RFC to implement to make disk sharable. Currently, disk option for qemu uses blockdev-snapshot QMP command with overlay. In that case, qemu holds the write lock to the original disk, so we cannot share the original disks with the other qemu guests.

[RFC PATCH 1/7] qemu_hotplug: Add asynJob argument to qemuDomainAttachDiskGeneric

2021-01-22 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add asynJob argument to qemuDomainAttachDiskGeneric() so that it can be used before CPUs start. Signed-off-by: Masayoshi Mizuma --- src/qemu/qemu_hotplug.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[PATCH 12/12] news: implement new Hyper-V APIs

2021-01-22 Thread Matt Coleman
Signed-off-by: Matt Coleman --- NEWS.rst | 12 1 file changed, 12 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 7a2d6649b4..cc8ac4e6eb 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -18,6 +18,18 @@ v7.1.0 (unreleased) The virtio-pmem is a virtio variant of NVDIMM and just like

[PATCH 11/12] hyperv: provide a more detailed error message for WSMan faults

2021-01-22 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/hyperv/hyperv_wmi.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 4c1bd5e0d2..c14ff0e64a 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -789,9

[PATCH 10/12] hyperv: implement domainScreenshot

2021-01-22 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c| 207 ++ src/hyperv/hyperv_wmi_classes.h | 21 +++ src/hyperv/hyperv_wmi_generator.input | 163 3 files changed, 391 insertions(+) diff --git a/src/hyperv/hyperv_driver.c

[PATCH 09/12] hyperv: implement networkGetXMLDesc

2021-01-22 Thread Matt Coleman
Co-authored-by: Dawid Zamirski Signed-off-by: Matt Coleman --- src/hyperv/hyperv_network_driver.c | 24 1 file changed, 24 insertions(+) diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c index d6407ac591..93ef01c9aa 100644 ---

[PATCH 07/12] hyperv: implement connectNumOfDefinedNetworks and connectListDefinedNetworks

2021-01-22 Thread Matt Coleman
Co-authored-by: Dawid Zamirski Signed-off-by: Matt Coleman --- src/hyperv/hyperv_network_driver.c | 20 1 file changed, 20 insertions(+) diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c index 25755f2525..f85dea31fe 100644 ---

[PATCH 08/12] hyperv: implement networkGetAutostart, networkIsActive, and networkIsPersistent

2021-01-22 Thread Matt Coleman
Co-authored-by: Dawid Zamirski Signed-off-by: Matt Coleman --- src/hyperv/hyperv_network_driver.c | 28 1 file changed, 28 insertions(+) diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c index f85dea31fe..d6407ac591 100644 ---

[PATCH 06/12] hyperv: implement networkLookupByName and networkLookupByUUID

2021-01-22 Thread Matt Coleman
Signed-off-by: Matt Coleman --- src/hyperv/hyperv_network_driver.c | 43 ++ 1 file changed, 43 insertions(+) diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c index 3931e548f5..25755f2525 100644 ---

[PATCH 04/12] hyperv: add support for creating network adapters

2021-01-22 Thread Matt Coleman
Co-authored-by: Sri Ramanujam Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c| 138 ++ src/hyperv/hyperv_wmi_classes.h | 2 + src/hyperv/hyperv_wmi_generator.input | 32 ++ 3 files changed, 172 insertions(+) diff --git

[PATCH 05/12] hyperv: implement connectListAllNetworks and connectNumOfNetworks

2021-01-22 Thread Matt Coleman
Co-authored-by: Dawid Zamirski Signed-off-by: Matt Coleman --- po/POTFILES.in | 1 + src/hyperv/hyperv_driver.c | 2 + src/hyperv/hyperv_network_driver.c | 127 + src/hyperv/hyperv_network_driver.h | 26 ++ src/hyperv/meson.build

[PATCH 02/12] hyperv: add support for creating serial devices

2021-01-22 Thread Matt Coleman
Co-authored-by: Sri Ramanujam Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c | 92 ++ 1 file changed, 92 insertions(+) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 9bbbcfc88c..9394794c8f 100644 ---

[PATCH 01/12] hyperv: XML parsing of serial ports

2021-01-22 Thread Matt Coleman
Co-authored-by: Sri Ramanujam Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c| 68 +++ src/hyperv/hyperv_wmi.c | 10 src/hyperv/hyperv_wmi.h | 4 ++ src/hyperv/hyperv_wmi_classes.h | 1 +

[PATCH 03/12] hyperv: XML parsing of Ethernet adapters

2021-01-22 Thread Matt Coleman
Co-authored-by: Sri Ramanujam Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c| 113 ++ src/hyperv/hyperv_wmi.c | 20 + src/hyperv/hyperv_wmi.h | 8 ++ src/hyperv/hyperv_wmi_classes.h | 12 +++

[PATCH 00/12] Hyper-V serial ports, NICs, and screeshots

2021-01-22 Thread Matt Coleman
This patchset makes the following changes to the Hyper-V driver: * enable XML parsing and creation of serial ports and NICs * implement several networking APIs * implement screenshots Matt Coleman (12): hyperv: XML parsing of serial ports hyperv: add support for creating serial devices

Re: [PATCH 00/10] Introduce virtio-mem model

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 6:19 PM, David Hildenbrand wrote: Out of curiosity: are you aware of anyone working in enabling virtio-mem for pseries/ppc64? I'm wondering if there's some kind of architecture limitation in Power or if it's just a lack of interest. I remember there is interest, however: -

Re: [PATCH] spec: Increase meson test timeout 10x

2021-01-22 Thread Jim Fehlig
On 1/22/21 2:46 AM, Andrea Bolognani wrote: On Thu, 2021-01-21 at 16:55 -0500, Cole Robinson wrote: %check -VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check +# Building on slow archs, like emulated s390x in Fedora copr, requires +# raising the test timeout +VIR_TEST_DEBUG=1 %meson_test

Re: [PATCH 00/55] Hyper-V: code cleanup & prep for future changes

2021-01-22 Thread Matt Coleman
> On Jan 22, 2021, at 12:12 PM, Matt Coleman wrote: > >> On Jan 22, 2021, at 12:07 PM, Matt Coleman wrote: >> >>> On Jan 22, 2021, at 11:30 AM, Laine Stump wrote: >>> >>> On 1/22/21 11:05 AM, Laine Stump wrote: 1) There are several cleanup functions in external libraries that in the

Re: [PATCH 00/10] Introduce virtio-mem model

2021-01-22 Thread David Hildenbrand
> Out of curiosity: are you aware of anyone working in enabling virtio-mem > for pseries/ppc64? I'm wondering if there's some kind of architecture > limitation in Power or if it's just a lack of interest. I remember there is interest, however: - arm64 and x86-64 is used more frequently in

Re: [PATCH 00/55] Hyper-V: code cleanup & prep for future changes

2021-01-22 Thread Matt Coleman
> On Jan 22, 2021, at 12:07 PM, Matt Coleman wrote: > >> On Jan 22, 2021, at 11:30 AM, Laine Stump wrote: >> >> On 1/22/21 11:05 AM, Laine Stump wrote: >>> 1) There are several cleanup functions in external libraries that in the >>> past were only called after checking that the pointer was !=

Re: [PATCH 00/55] Hyper-V: code cleanup & prep for future changes

2021-01-22 Thread Matt Coleman
> On Jan 22, 2021, at 11:30 AM, Laine Stump wrote: > > On 1/22/21 11:05 AM, Laine Stump wrote: >> 1) There are several cleanup functions in external libraries that in the >> past were only called after checking that the pointer was != NULL. g_autoptr >> cleanups need to handle being called

Re: [PATCH 00/10] Introduce virtio-mem model

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 4:54 PM, David Hildenbrand wrote: Am 22.01.2021 um 19:53 schrieb Daniel Henrique Barboza :  On 1/22/21 9:50 AM, Michal Privoznik wrote: Technically, this is another version of: https://www.redhat.com/archives/libvir-list/2020-December/msg00199.html But since virtio-pmem part

Re: [PATCH 00/12] Hyper-V serial ports, NICs, and screeshots

2021-01-22 Thread Neal Gompa
On Fri, Jan 22, 2021 at 3:19 PM Matt Coleman wrote: > > This patchset makes the following changes to the Hyper-V driver: > * enable XML parsing and creation of serial ports and NICs > * implement several networking APIs > * implement screenshots > > Matt Coleman (12): > hyperv: XML parsing of

Re: [PATCH 00/10] Introduce virtio-mem model

2021-01-22 Thread David Hildenbrand
> Am 22.01.2021 um 19:53 schrieb Daniel Henrique Barboza > : > >  > >> On 1/22/21 9:50 AM, Michal Privoznik wrote: >> Technically, this is another version of: >> https://www.redhat.com/archives/libvir-list/2020-December/msg00199.html >> But since virtio-pmem part is pushed now, I've reworked

Re: [PATCH] spec: Increase meson test timeout 10x

2021-01-22 Thread Neal Gompa
On Thu, Jan 21, 2021 at 4:59 PM Cole Robinson wrote: > > Tests time out when building in slow environments, like emulated > s390x in Fedora copr. Bump up the test timeout > > Signed-off-by: Cole Robinson > --- > libvirt.spec.in | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff

Re: [PATCH 00/10] Introduce virtio-mem model

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 9:50 AM, Michal Privoznik wrote: Technically, this is another version of: https://www.redhat.com/archives/libvir-list/2020-December/msg00199.html But since virtio-pmem part is pushed now, I've reworked virtio-mem a bit and sending it as a new series. For curious ones, David

Re: [PATCH 09/10] virsh: Introduce update-memory command

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 9:50 AM, Michal Privoznik wrote: New 'update-memory' 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,

Re: [PATCH 05/10] qemu: Wire up live update

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 9:50 AM, Michal Privoznik wrote: As advertised in one of previous commits, we want' to be able to Extra " ' " after want. Reviewed-by: Daniel Henrique Barboza change 'requested-size' attribute of virtio-mem on the fly. This commit does exactly that. Changing anything else is

Re: [PATCH 03/10] conf: Introduce virtio-mem model

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 9:50 AM, Michal Privoznik wrote: 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

Re: [libvirt PATCH] docs: link to PCI docs from the kbase page

2021-01-22 Thread Andrea Bolognani
On Fri, 2021-01-22 at 17:08 +, Daniel P. Berrangé wrote: > +`PCI hotplug <../pci-hotplug.html>`__ > + Effectively usage of PCI hotplug s/Effectively/Effective/ With that fixed Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH] docs: use a relative link to the kbase page

2021-01-22 Thread Andrea Bolognani
On Fri, 2021-01-22 at 17:07 +, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > docs/index.html.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] virsh: Simplify @flags handing in cmdSetmem() and cmdSetmaxmem()

2021-01-22 Thread Daniel Henrique Barboza
Michal, I see that this patch was sent standalone in the ML, and the cover-letter of the series doesn't mention it. Is this an ooopsie? Should I review this patch together with the rest of the series? Thanks, DHB On 1/22/21 9:50 AM, Michal Privoznik wrote: What code tries to achieve is

Re: [PATCH] virNetDevOpenvswitchGetVhostuserIfname: Remove a single '\n' from ifname

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 7:26 AM, Yalei Li wrote: Ovs-vsctl returns a newline result. Signed-off-by: Yalei Li --- Reviewed-by: Daniel Henrique Barboza src/util/virnetdevopenvswitch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virnetdevopenvswitch.c

Re: [libvirt PATCH] qemu: fix release of virDomainObjPtr in SSH key APIs

2021-01-22 Thread Daniel Henrique Barboza
On 1/22/21 2:08 PM, Daniel P. Berrangé wrote: The qemuDomainObjFromDomain() API must be paired with the virDomainObjEndAPI API. The qemuDomainAuthorizedSSHKeysGet method simply did 'return -1' leaking a reference in two paths. The qemuDomainAuthorizedSSHKeysSet method marked the object as an

[libvirt PATCH 16/16] tools: report tainting for 'dominfo' command

2021-01-22 Thread Daniel P . Berrangé
$ virsh dominfo demo Id: 2 Name: demo UUID: eadf8ef0-bf14-4c5f-9708-4a19bacf9e81 OS Type:hvm State: running CPU(s): 2 CPU time: 15.8s Max memory: 1536000 KiB Used memory:1536000 KiB Persistent: yes Autostart: disable

[libvirt PATCH 15/16] qemu: implement virDomainGetTainting API

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_driver.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 43cdb53f22..48d2dafb2f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt PATCH 14/16] remote: add RPC support for the virDomainGetTainting API

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 46 + src/remote/remote_driver.c | 44 +++ src/remote/remote_protocol.x| 20 - 3 files changed, 109 insertions(+), 1 deletion(-) diff

[libvirt PATCH 13/16] src: define virDomainGetTainting API

2021-01-22 Thread Daniel P . Berrangé
This API allows fetching a list of tainting codes against the domain. Internally tainting is defined as a bitmask with enum fields. Most, but not all, of the fields are somewhat QEMU specific in reality though. The idea of exposing the enum in the public API thus feels a little questionable. This

[libvirt PATCH 12/16] tools: report deprecations for 'dominfo' command

2021-01-22 Thread Daniel P . Berrangé
$ virsh dominfo demo Id: 2 Name: demo UUID: eadf8ef0-bf14-4c5f-9708-4a19bacf9e81 OS Type:hvm State: running CPU(s): 2 CPU time: 15.8s Max memory: 1536000 KiB Used memory:1536000 KiB Persistent: yes Autostart: disable

[libvirt PATCH 11/16] qemu: implement virDomainGetDeprecations API

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_driver.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 027617deef..43cdb53f22 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@

[libvirt PATCH 10/16] remote: add RPC support for the virDomainGetDeprecations API

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 45 + src/remote/remote_driver.c | 44 src/remote/remote_protocol.x| 21 +- 3 files changed, 109 insertions(+), 1 deletion(-) diff

[libvirt PATCH 09/16] src: define virDomainGetDeprecations API

2021-01-22 Thread Daniel P . Berrangé
This API allows fetching a list of deprecation messages against the domain. Signed-off-by: Daniel P. Berrangé --- include/libvirt/libvirt-domain.h | 4 +++ src/driver-hypervisor.h | 6 src/libvirt-domain.c | 47

[libvirt PATCH 08/16] qemu: record deprecation messages against the domain

2021-01-22 Thread Daniel P . Berrangé
These messages are only valid while the domain is running. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_domain.c | 5 + src/qemu/qemu_process.c | 5 + 2 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f00e8d9384..64dc7b5eff

[libvirt PATCH 07/16] conf: record deprecation messages against the domain

2021-01-22 Thread Daniel P . Berrangé
These messages will be stored in the live status XML. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 28 +--- src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) diff --git

[libvirt PATCH 06/16] qemu: taint the VM if it is using a deprecated machine type

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 16 src/qemu/qemu_capabilities.h | 3 +++ src/qemu/qemu_domain.c | 20 3 files changed, 39 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[libvirt PATCH 05/16] qemu: taint the VM if it is using a deprecated CPU model

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 17 + src/qemu/qemu_capabilities.h | 3 +++ src/qemu/qemu_domain.c | 37 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt PATCH 04/16] qemu: add ability to associate a string message with taint warning

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_domain.c | 49 ++ src/qemu/qemu_domain.h | 7 ++ 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index dd79cfd9d9..e63bea8b32 100644

[libvirt PATCH 03/16] conf: introduce new taint flag for deprecated configuration

2021-01-22 Thread Daniel P . Berrangé
Hypervisors are capable of reporting that some features are deprecated. This should be used to mark a domain as tainted. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/conf/domain_conf.c

[libvirt PATCH 02/16] qemu: report whether a machine type is deprecated in capabilities

2021-01-22 Thread Daniel P . Berrangé
QEMU has the ability to mark machine types as deprecated. This should be exposed to management applications in the capabilities. Signed-off-by: Daniel P. Berrangé --- docs/schemas/capability.rng | 8 src/conf/capabilities.c | 2 ++

[libvirt PATCH 01/16] qemu: report whether a CPU model is deprecated in dom capabilities

2021-01-22 Thread Daniel P . Berrangé
QEMU has the ability to mark CPUs as deprecated. This should be exposed to management applications in the domain capabilities. This attribute is only set when the model is actually deprecated. Signed-off-by: Daniel P. Berrangé --- docs/formatdomaincaps.html.in| 10

[libvirt PATCH 00/16] expose tainting and deprecations in public API

2021-01-22 Thread Daniel P . Berrangé
Libvirt has a notion of "tainting" which we use to mark a guest which has some undesirable configuration or behaviour from libvirt's POV. This ends up in the libvirtd logs and in the per-VM log file, but is not exposed to management applications directly. QMP has the ability to report whether a

Re: [PATCH RESEND 06/20] virhostdev.c: virHostdevGetPCIHostDevice() now reports missing device

2021-01-22 Thread Daniel Henrique Barboza
Sorry for the delay in answering. I usually get the replies to my patches in my inbox because I usually get my email CC'ed in the reply. On 1/20/21 10:33 PM, Laine Stump wrote: On 1/18/21 2:53 PM, Daniel Henrique Barboza wrote: Gitlab issue #72 [1] reports that removing SR-IOVs VFs before

[libvirt PATCH] qemu: fix release of virDomainObjPtr in SSH key APIs

2021-01-22 Thread Daniel P . Berrangé
The qemuDomainObjFromDomain() API must be paired with the virDomainObjEndAPI API. The qemuDomainAuthorizedSSHKeysGet method simply did 'return -1' leaking a reference in two paths. The qemuDomainAuthorizedSSHKeysSet method marked the object as an autoptr while also have some code paths that will

[libvirt PATCH] docs: link to PCI docs from the kbase page

2021-01-22 Thread Daniel P . Berrangé
While the PCI docs are linked from formatdomain.html, finding those links is not straightforward. It is good for users to highlight them in the kbase pages. The PCI docs are intentionally not moved to the kbase/ sub-directory in order to avoid breaking hyperlinks. Signed-off-by: Daniel P.

[libvirt PATCH] docs: use a relative link to the kbase page

2021-01-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- docs/index.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html.in b/docs/index.html.in index f44e055174..bf164edb58 100644 --- a/docs/index.html.in +++ b/docs/index.html.in @@ -64,7 +64,7 @@

Re: [PATCH 3/3] rpm: disable netcf for the interface driver on RHEL/Fedora/CentOS

2021-01-22 Thread Laine Stump
On 1/22/21 4:49 AM, Daniel P. Berrangé wrote: On Fri, Jan 22, 2021 at 03:01:57AM -0500, Laine Stump wrote: Since libvirt.spec explicitly adds -Dnetcf=enabled to the meson commandline, just setting the default in the meson.build file won't have any effect for rpm builds. This patch changes the

Re: [PATCH 2/3] build: make netcf=disabled the default

2021-01-22 Thread Laine Stump
On 1/22/21 4:51 AM, Daniel P. Berrangé wrote: On Fri, Jan 22, 2021 at 03:01:56AM -0500, Laine Stump wrote: Even after the previous patch, in order to build without netcf you would need to add "-Dnetcf=disabled" to the meson commandline (or uninstall netcf-devel). This patch makes

Re: [PATCH] qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()

2021-01-22 Thread Nikolay Shirokovskiy
On Fri, Jan 22, 2021 at 2:24 PM Michal Privoznik wrote: > On 1/22/21 12:09 PM, Nikolay Shirokovskiy wrote: > > On Fri, Jan 22, 2021 at 12:45 PM Michal Privoznik > > wrote: > > > >> If libvirtd is sent SIGTERM while it is still initializing, it > >> may crash. The following scenario was observed

Re: [PATCH 00/55] Hyper-V: code cleanup & prep for future changes

2021-01-22 Thread Laine Stump
On 1/22/21 11:05 AM, Laine Stump wrote: (Thought I sent this 7 hours ago before I went to sleep, but when I sat down this morning I saw it was still sitting there as a draft :-/) On 1/21/21 1:50 PM, Matt Coleman wrote: This series of patches simplifies the code in several ways and makes a few

Re: [PATCH 00/55] Hyper-V: code cleanup & prep for future changes

2021-01-22 Thread Daniel P . Berrangé
On Fri, Jan 22, 2021 at 11:05:22AM -0500, Laine Stump wrote: > (Thought I sent this 7 hours ago before I went to sleep, but when I sat down > this morning I saw it was still sitting there as a draft :-/) > > On 1/21/21 1:50 PM, Matt Coleman wrote: > > This series of patches simplifies the code in

Re: [PATCH 00/55] Hyper-V: code cleanup & prep for future changes

2021-01-22 Thread Laine Stump
(Thought I sent this 7 hours ago before I went to sleep, but when I sat down this morning I saw it was still sitting there as a draft :-/) On 1/21/21 1:50 PM, Matt Coleman wrote: This series of patches simplifies the code in several ways and makes a few changes required by the next round of

Re: [PATCH] qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()

2021-01-22 Thread Nikolay Shirokovskiy
On Fri, Jan 22, 2021 at 12:45 PM Michal Privoznik wrote: > If libvirtd is sent SIGTERM while it is still initializing, it > may crash. The following scenario was observed (using 'stress' to > slow down CPU so much that the window where the problem exists is > bigger): > > 1) The main thread is

Re: [PATCH 00/10] Introduce virtio-mem model

2021-01-22 Thread David Hildenbrand
On 22.01.21 13:50, Michal Privoznik wrote: > Technically, this is another version of: > > https://www.redhat.com/archives/libvir-list/2020-December/msg00199.html > > But since virtio-pmem part is pushed now, I've reworked virtio-mem a bit > and sending it as a new series. > > For curious ones,

[PATCH 07/10] qemu: Refresh the actual size of virtio-mem on monitor reconnect

2021-01-22 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 06/10] qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

2021-01-22 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 10/10] news: document recent virtio memory addition

2021-01-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 7a2d6649b4..33f316c8d4 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -18,6 +18,13 @@ v7.1.0 (unreleased) The virtio-pmem is a virtio variant of NVDIMM and just like

[PATCH 09/10] virsh: Introduce update-memory command

2021-01-22 Thread Michal Privoznik
New 'update-memory' 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 ? Nnew --my-element argument can be

[PATCH 08/10] qemu: Recalculate balloon on MEMORY_DEVICE_SIZE_CHANGE event and reconnect

2021-01-22 Thread Michal Privoznik
Just like we are recalculating the amount of guest memory on BALLOON_CHANGE and on reconnect to the monitor, we should include the actual size of virtio-mem too. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 3 +++ src/qemu/qemu_process.c | 57

[PATCH 05/10] qemu: Wire up live update

2021-01-22 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

[PATCH 04/10] qemu: Build command line for virtio-mem

2021-01-22 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 01/10] virhostmem: Introduce virHostMemGetTHPSize()

2021-01-22 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 03/10] conf: Introduce virtio-mem model

2021-01-22 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 02/10] qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI

2021-01-22 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 00/10] Introduce virtio-mem model

2021-01-22 Thread Michal Privoznik
Technically, this is another version of: https://www.redhat.com/archives/libvir-list/2020-December/msg00199.html But since virtio-pmem part is pushed now, I've reworked virtio-mem a bit and sending it as a new series. For curious ones, David summarized behaviour well when implementing

[PATCH] virsh: Simplify @flags handing in cmdSetmem() and cmdSetmaxmem()

2021-01-22 Thread Michal Privoznik
What code tries to achieve is that if no flags were provided to either 'setmem' or 'setmaxmem' commands then the old (no flags) API is called to be able to communicate with older daemons. Well, the code can be simplified a bit. Note that with this change the old no flag version of APIs is used

Re: [PATCH] qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()

2021-01-22 Thread Michal Privoznik
On 1/22/21 12:09 PM, Nikolay Shirokovskiy wrote: On Fri, Jan 22, 2021 at 12:45 PM Michal Privoznik wrote: If libvirtd is sent SIGTERM while it is still initializing, it may crash. The following scenario was observed (using 'stress' to slow down CPU so much that the window where the problem

[PATCH] virNetDevOpenvswitchGetVhostuserIfname: Remove a single '\n' from ifname

2021-01-22 Thread Yalei Li
Ovs-vsctl returns a newline result. Signed-off-by: Yalei Li --- src/util/virnetdevopenvswitch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index f9b3369b2a..bd840bd3b7 100644 --- a/src/util/virnetdevopenvswitch.c +++

Re: [libvirt PATCH v2 06/13] util: extract storage file probe code into virtstoragefileprobe.c

2021-01-22 Thread Pavel Hrdina
On Fri, Jan 22, 2021 at 10:09:27AM +0100, Pavel Hrdina wrote: > On Fri, Jan 22, 2021 at 09:23:00AM +0100, Peter Krempa wrote: > > On Thu, Jan 21, 2021 at 20:34:20 +0100, Pavel Hrdina wrote: > > > This code is not directly relevant to virStorageSource so move it to > > > separate file. > > > > > >

Re: [PATCH 2/3] build: make netcf=disabled the default

2021-01-22 Thread Daniel P . Berrangé
On Fri, Jan 22, 2021 at 03:01:56AM -0500, Laine Stump wrote: > Even after the previous patch, in order to build without netcf you > would need to add "-Dnetcf=disabled" to the meson commandline (or > uninstall netcf-devel). This patch makes -Dnetcf=disabled the > default. (Without this change, a

Re: [PATCH 3/3] rpm: disable netcf for the interface driver on RHEL/Fedora/CentOS

2021-01-22 Thread Daniel P . Berrangé
On Fri, Jan 22, 2021 at 03:01:57AM -0500, Laine Stump wrote: > Since libvirt.spec explicitly adds -Dnetcf=enabled to the meson > commandline, just setting the default in the meson.build file won't > have any effect for rpm builds. This patch changes the meson > commandline in the spec file to

Re: [PATCH] spec: Increase meson test timeout 10x

2021-01-22 Thread Andrea Bolognani
On Thu, 2021-01-21 at 16:55 -0500, Cole Robinson wrote: > %check > -VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check > +# Building on slow archs, like emulated s390x in Fedora copr, requires > +# raising the test timeout > +VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check

[PATCH] qemu: Avoid crash in qemuStateShutdownPrepare() and qemuStateShutdownWait()

2021-01-22 Thread Michal Privoznik
If libvirtd is sent SIGTERM while it is still initializing, it may crash. The following scenario was observed (using 'stress' to slow down CPU so much that the window where the problem exists is bigger): 1) The main thread is already executing virNetDaemonRun() and is in

Re: [PATCH RESEND 04/20] virpci.c: simplify virPCIDeviceNew() signature

2021-01-22 Thread Daniel Henrique Barboza
On 1/20/21 10:17 PM, Laine Stump wrote: On 1/18/21 2:53 PM, Daniel Henrique Barboza wrote: The current virPCIDeviceNew() signature, receiving 4 uints in sequence (domain, bus, slot, function), is not neat. We already have a way to represent a PCI address in virPCIDeviceAddress that is used

Re: [libvirt PATCH v2 09/13] util: move virStorageFileProbe code into storage_file

2021-01-22 Thread Peter Krempa
On Fri, Jan 22, 2021 at 10:15:52 +0100, Pavel Hrdina wrote: > On Fri, Jan 22, 2021 at 09:57:03AM +0100, Peter Krempa wrote: > > On Thu, Jan 21, 2021 at 20:34:23 +0100, Pavel Hrdina wrote: [...] > > > @SRCDIR@src/storage_file/storage_file_backend.c > > >

Re: [libvirt PATCH v2 08/13] util: move virStorageFileBackend code into storage_file

2021-01-22 Thread Peter Krempa
On Fri, Jan 22, 2021 at 10:13:02 +0100, Pavel Hrdina wrote: > On Fri, Jan 22, 2021 at 09:54:06AM +0100, Peter Krempa wrote: > > On Thu, Jan 21, 2021 at 20:34:22 +0100, Pavel Hrdina wrote: > > > It's used only by storage file code so it doesn't make sense to have > > > it in util directory. > > >

Re: [PATCH] virsh: Fix XPATH in virshDomainDeviceAliasCompleter()

2021-01-22 Thread Peter Krempa
On Fri, Jan 22, 2021 at 09:39:01 +0100, Michal Privoznik wrote: > The way this completer works is that it dumps XML of specified > domain and then tries to look for @name attribute of > element. However, the XPATH it uses is not correct which results > in no aliases returned by the completer. >

Re: [libvirt PATCH v2 12/13] virstoragefile: use virStorageFile prefix for all functions

2021-01-22 Thread Pavel Hrdina
On Fri, Jan 22, 2021 at 10:10:33AM +0100, Peter Krempa wrote: > On Thu, Jan 21, 2021 at 20:34:26 +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > I really hate that these functions are exported. > > If this patch is necessary for the following, then commit it, otherwise >

Re: [libvirt PATCH v2 09/13] util: move virStorageFileProbe code into storage_file

2021-01-22 Thread Pavel Hrdina
On Fri, Jan 22, 2021 at 09:57:03AM +0100, Peter Krempa wrote: > On Thu, Jan 21, 2021 at 20:34:23 +0100, Pavel Hrdina wrote: > > Same as virStorageFileBackend, it doesn't belong into util directory. > > Arguably, after you remove the file access, it kinda becomes just an > utility function. > >

Re: [libvirt PATCH v2 06/13] util: extract storage file probe code into virtstoragefileprobe.c

2021-01-22 Thread Pavel Hrdina
On Fri, Jan 22, 2021 at 09:23:00AM +0100, Peter Krempa wrote: > On Thu, Jan 21, 2021 at 20:34:20 +0100, Pavel Hrdina wrote: > > This code is not directly relevant to virStorageSource so move it to > > separate file. > > > > Signed-off-by: Pavel Hrdina > > --- > > po/POTFILES.in

Re: [libvirt PATCH v2 08/13] util: move virStorageFileBackend code into storage_file

2021-01-22 Thread Pavel Hrdina
On Fri, Jan 22, 2021 at 09:54:06AM +0100, Peter Krempa wrote: > On Thu, Jan 21, 2021 at 20:34:22 +0100, Pavel Hrdina wrote: > > It's used only by storage file code so it doesn't make sense to have > > it in util directory. > > > > Signed-off-by: Pavel Hrdina > > --- > > po/POTFILES.in

Re: [libvirt PATCH v2 13/13] storage_source: use virStorageSource prefix for all functions

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:27 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/libvirt_private.syms | 42 ++--- > src/qemu/qemu_backup.c| 8 +- > src/qemu/qemu_block.c | 6 +- > src/qemu/qemu_domain.c| 16

Re: [libvirt PATCH v2 12/13] virstoragefile: use virStorageFile prefix for all functions

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:26 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- I really hate that these functions are exported. If this patch is necessary for the following, then commit it, otherwise drop it. I'll follow up with patches for moving the two functions

  1   2   >