[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 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 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 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 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

[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:

[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 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

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: -

[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 +++

[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 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 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 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 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 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

Re: [PATCH 20/55] hyperv: use g_autoptr for WMI classes in hypervDomainGetMaxMemory

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 7da4c216b1..2ec0415f62 100644 ---

Re: [libvirt PATCH v2 11/13] util: move virStorageEncryption code into conf

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:25 +0100, Pavel Hrdina wrote: > The code handles XML bits and internal definition and should be > in conf directory. > > Signed-off-by: Pavel Hrdina > --- Reviewed-by: Peter Krempa

[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

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

2021-01-22 Thread Laine Stump
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 lot of people would just blindly continue building with netcf

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

2021-01-22 Thread Laine Stump
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 -Dnetcf=disabled and removes the associated BuildRequires: and Requires:

[PATCH 1/3] build: support explicitly disabling netcf

2021-01-22 Thread Laine Stump
placing "-Dnetcf=disabled" on the meson commandline was ignored, meaning that even with that option the build would get WITH_NETCF if the netcf-devel package was found - the only way to disable it was to uninstall netcf-devel. This patch adds the small bit of logic to check the netcf meson

[PATCH 0/3] RFC: stop using netcf for the interface driver backend

2021-01-22 Thread Laine Stump
This is a followup to my message in December suggesting that we deprecate use of the netcf package: https://www.redhat.com/archives/libvir-list/2020-December/msg00183.html (or Message-Id: <4889202b-734c-4d0f-472c-d86894319...@redhat.com> for those of you who keep a local archive) Each of these

Re: [libvirt PATCH v2 02/13] virstoragefile: properly include virstoragefile.h header

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:16 +0100, Pavel Hrdina wrote: > It was indirectly included by virstoragefilebackend.h. > > Signed-off-by: Pavel Hrdina > --- > src/util/virstoragefile.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Peter Krempa

Re: [libvirt PATCH v2 01/13] src: add missing virstoragefile.h includes

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:15 +0100, Pavel Hrdina wrote: > These files are using functions from virstoragefile.h but are missing > explicit include. > > Signed-off-by: Pavel Hrdina > --- > src/locking/lock_driver_lockd.c| 1 + > src/qemu/qemu_block.c | 1 + >

Re: [PATCH 30/55] hyperv: use g_autoptr for WMI classes in hypervDomainGetVcpusFlags

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c | 30 ++ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index f056761338..0642e42b35 100644

[PATCH] virsh: Fix XPATH in virshDomainDeviceAliasCompleter()

2021-01-22 Thread Michal Privoznik
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. Signed-off-by: Michal Privoznik --- tools/virsh-completer-domain.c | 4

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 06/13] util: extract storage file probe code into virtstoragefileprobe.c

2021-01-22 Thread Peter Krempa
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| 1 + > src/libvirt_private.syms | 6 +- >

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: [PATCH 51/55] hyperv: use GLib auto-cleanup in hypervEnumAndPull

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_wmi.c | 42 ++--- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index c1325b2ccc..b68b555a3b

Re: [PATCH 50/55] hyperv: use GLib auto-cleanup in hypervSerializeEprParam

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_wmi.c | 56 - 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index ed0091ba06..c1325b2ccc

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

2021-01-22 Thread Peter Krempa
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. On the other hand, it's use is strictly limited to the storage source code,

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: [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 10/55] hyperv: use g_autoptr for Msvm_ProcessorSettingData in hypervConnectGetMaxVcpus

2021-01-22 Thread Laine Stump
On 1/21/21 1:50 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_driver.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 8b59dd05f7..6375f6b011 100644 ---

Re: [libvirt PATCH v2 05/13] util: move virStorageSourceFindByNodeName into qemu_domain

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:19 +0100, Pavel Hrdina wrote: > It's only relevant for QEMU driver. > > Signed-off-by: Pavel Hrdina > --- > src/libvirt_private.syms | 1 - > src/qemu/qemu_domain.c| 38 -- > src/util/virstoragefile.c | 25

Re: [PATCH 43/55] hyperv: use GLib auto-cleanup in hypervInvokeMethod

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_wmi.c | 68 - 1 file changed, 27 insertions(+), 41 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 0a9d4bf4fd..459d207ee7

Re: [libvirt PATCH v2 07/13] util: extract virStorageFile code into storage_source

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:21 +0100, Pavel Hrdina wrote: > Up until now we had a runtime code and XML related code in the same > source file inside util directory. > > This patch takes the runtime part and extracts it into the new > storage_file directory. > > Signed-off-by: Pavel Hrdina >

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

2021-01-22 Thread Peter Krempa
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| 2 +- > src/libvirt_private.syms

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 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: [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: [PATCH 44/55] hyperv: use GLib auto-cleanup in hypervInvokeMsvmComputerSystemRequestStateChange

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Signed-off-by: Matt Coleman --- src/hyperv/hyperv_wmi.c | 50 +++-- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 459d207ee7..bd62174739

Re: [libvirt PATCH v2 04/13] storage: move storage file sources to separate directory

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:18 +0100, Pavel Hrdina wrote: > Introduce a new storage_file directory where we will keep storage file > related code. > > Signed-off-by: Pavel Hrdina > --- > po/POTFILES.in| 4 +- > src/meson.build |

Re: [PATCH 45/55] hyperv: use GLib auto-cleanup in hypervMsvmVSMSAddResourceSettings and hypervMsvmVSMSModifyResourceSettings

2021-01-22 Thread Laine Stump
On 1/21/21 1:51 PM, Matt Coleman wrote: Fixes a memory leak when hypervCreateInvokeParamsList() fails. Signed-off-by: Matt Coleman --- src/hyperv/hyperv_wmi.c | 43 - 1 file changed, 17 insertions(+), 26 deletions(-) diff --git

Re: [libvirt PATCH v2 10/13] util: move virStorageSource code into conf

2021-01-22 Thread Peter Krempa
On Thu, Jan 21, 2021 at 20:34:24 +0100, Pavel Hrdina wrote: > The code handles XML bits and internal definition and should be > in conf directory. > > Signed-off-by: Pavel Hrdina > --- Reviewed-by: Peter Krempa

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

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: [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

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 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] 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 +++

[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 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

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. > > > > > >

[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 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 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 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 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 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

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] 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

[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 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 |

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/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

[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 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 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

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

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: [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 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 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

[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 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 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

[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 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 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

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 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

[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] 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

  1   2   >