Re: [PATCH 2/2] qemu-img: Require -F with -b backing image

2021-05-03 Thread Eric Blake
On 5/3/21 4:36 PM, Eric Blake wrote: > Back in commit d9f059aa6c (qemu-img: Deprecate use of -b without -F), > we deprecated the ability to create a file with a backing image that > requires qemu to perform format probing. Qemu can still probe older > files for backwards compatibility, but it is

[PATCH 2/2] qemu-img: Require -F with -b backing image

2021-05-03 Thread Eric Blake
Back in commit d9f059aa6c (qemu-img: Deprecate use of -b without -F), we deprecated the ability to create a file with a backing image that requires qemu to perform format probing. Qemu can still probe older files for backwards compatibility, but it is time to finish off the ability to create such

[PATCH 1/2] qcow2: Prohibit backing file changes in 'qemu-img amend'

2021-05-03 Thread Eric Blake
This was deprecated back in bc5ee6da7 (qcow2: Deprecate use of qemu-img amend to change backing file), and no one in the meantime has given any reasons why it should be supported. Time to make change attempts a hard error (but for convenience, specifying the _same_ backing chain is not

Re: Let's remove some deprecated stuff

2021-05-03 Thread Eric Blake
On 4/29/21 4:59 AM, Markus Armbruster wrote: > If you're cc'ed, you added a section to docs/system/deprecated.rst that > is old enough to permit removal. This is *not* a demand to remove, it's > a polite request to consider whether the time for removal has come. > Extra points for telling us in a

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:36 +0200, Michal Privoznik wrote: > 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 + >

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:35 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > NEWS.rst | 16 > 1 file changed, 16 insertions(+) Reviewed-by: Peter Krempa

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:34 +0200, Michal Privoznik wrote: > 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

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:33 +0200, Michal Privoznik wrote: > 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 (). > >

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:32 +0200, Michal Privoznik wrote: > 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,

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:31 +0200, Michal Privoznik wrote: > 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

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:30 +0200, Michal Privoznik wrote: > 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

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:29 +0200, Michal Privoznik wrote: > 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

Re: [PATCH] hw/arm/raspi: Remove deprecated raspi2/raspi3 aliases

2021-05-03 Thread Ján Tomko
On a Monday in 2021, Philippe Mathieu-Daudé wrote: Remove the raspi2/raspi3 machine aliases, deprecated since commit 155e1c82ed0. Signed-off-by: Philippe Mathieu-Daudé --- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++ hw/arm/raspi.c

Re: [libvirt PATCH 6/6] ci: Enable address and undefined behavior sanitizers

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 12:01:46PM +0200, Tim Wiederhake wrote: > meson supports the following sanitizers: "address" (e.g. out-of-bounds > memory access, use-after-free, etc.), "thread" (data races), "undefined" > (e.g. signed integer overflow), and "memory" (use of uninitialized > memory). Note

Re: [PATCH] Deprecate pmem=on with non-DAX capable backend file

2021-05-03 Thread Igor Mammedov
On Wed, 28 Apr 2021 12:29:30 -0400 Eduardo Habkost wrote: > On Tue, Apr 27, 2021 at 04:48:48PM -0400, Eduardo Habkost wrote: > > On Mon, Jan 11, 2021 at 03:33:32PM -0500, Igor Mammedov wrote: > > > It is not safe to pretend that emulated NVDIMM supports > > > persistence while backend actually

Re: [libvirt PATCH 5/6] virt-aa-helper: Remove duplicate linking with src/datatypes.o

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 12:01:45PM +0200, Tim Wiederhake wrote: > "virt-aa-helper" links, amongst others, against "datatypes.o" and > "libvirt.so". The latter links against "libvirt_driver.a" which in turn > also links against "datatypes.o", leading to a One-Definition-Rule > violoation for

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:28 +0200, Michal Privoznik wrote: > 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 >

Re: [libvirt PATCH 4/6] tests: openvzutilstest: Remove duplicate linking with libvirt_openvz.a

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 12:01:44PM +0200, Tim Wiederhake wrote: > "openvzutilstest" links, amongst others, against "libvirt_openvz.a" and > "libvirt.so". The latter also links against "libvirt_openvz.a", leading > to a One-Definition-Rule violation for "openvzLocateConfFile" in > "openvz_conf.c".

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:27 +0200, Michal Privoznik wrote: [...] > diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst > index 1b9b221611..44e478c88a 100644 > --- a/docs/formatdomain.rst > +++ b/docs/formatdomain.rst [...] > @@ -7793,7 +7807,8 @@ Example: usage of the memory

Re: [libvirt PATCH 3/6] tests: virfilemock: realpath: Allow non-null second parameter

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 12:01:43PM +0200, Tim Wiederhake wrote: > When other preloaded libraries wrap and / or make calls to `realpath` > (e.g. LLVM's AddessSanitizer), the second parameter is no longer > guaranteed to be NULL. > > Signed-off-by: Tim Wiederhake > --- > build-aux/syntax-check.mk

[PATCH v1] docs: cputune is also supported by the xen driver

2021-05-03 Thread Olaf Hering
Since commit 68c5b6fb2b5fdabce775e9f8fc761a400e16a9d3 libxl also handles a domain/cputune/vcpupin element in domU.xml. Signed-off-by: Olaf Hering --- docs/formatdomain.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index

Re: [PATCH v3 04/14] qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:26 +0200, Michal Privoznik wrote: > 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. > >

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:25 +0200, Michal Privoznik wrote: > 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

Re: [libvirt PATCH 2/6] meson: Allow undefined symbols when sanitizers are enabled

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 12:01:42PM +0200, Tim Wiederhake wrote: > When enabling sanitizers, clang adds some function symbols when > instrumenting the code. The exact names of those functions are an > implementation detail and should therefore not be added to any > syms file. This patch prevents

Re: [libvirt PATCH 1/6] meson: Allow larger stack frames when instrumenting

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 12:01:41PM +0200, Tim Wiederhake wrote: > When enabling sanitizers, gcc adds some instrumentation to the code > that may enlarge stack frames. Some function's stack frames are already > close to the limit of 4096 and are enlarged past that threshold, > e.g.

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:24 +0200, Michal Privoznik wrote: > 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

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

2021-05-03 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:24:23 +0200, Michal Privoznik wrote: > 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 >

[PATCH v1 0/4] libxl: fix affinity assignment

2021-05-03 Thread Olaf Hering
Olaf Hering (4): libxl: remove obsolete VIR_LIBXL_EVENT_CONST libxl: remove obsolete check for result of xc_get_max_cpus libxl: remove obsolete libxlDomainSetVcpuAffinities function libxl: set vcpu affinity during domain creation src/libxl/libxl_conf.c | 53

[PATCH v1 1/4] libxl: remove obsolete VIR_LIBXL_EVENT_CONST

2021-05-03 Thread Olaf Hering
In Xen 4.2 struct libxl_event_hooks had a member which was erroneously declared const. Since libvirt requires at least Xen 4.6, remove the dead code. Signed-off-by: Olaf Hering --- src/libxl/libxl_domain.c | 2 +- src/libxl/libxl_domain.h | 14 +- 2 files changed, 2 insertions(+),

[PATCH v1 3/4] libxl: remove obsolete libxlDomainSetVcpuAffinities function

2021-05-03 Thread Olaf Hering
Since Xen 4.5 the libxl allows to set affinities during domain creation. This enables Xen to allocate the domain memory on NUMA nodes close to the specified pcpus. Remove the old approach, which moved vcpus after Xen had already allocated domain memory. Signed-off-by: Olaf Hering ---

[PATCH v1 4/4] libxl: set vcpu affinity during domain creation

2021-05-03 Thread Olaf Hering
Since Xen 4.5 libxl allows to set affinities during domain creation. This enables Xen to allocate the domain memory on NUMA systems close to the specified pcpus. Libvirt can now handle in domU.xml correctly. Without this change, Xen will create the domU and assign NUMA memory and vcpu

[PATCH v1 2/4] libxl: remove obsolete check for result of xc_get_max_cpus

2021-05-03 Thread Olaf Hering
xc_get_max_cpus from Xen version 4.3 may return 0 in case xc_physinfo fails. This has been fixed in Xen 4.4. Remove the obsolete result check from libvirt. Just convert libxl error codes to plain -1. Signed-off-by: Olaf Hering --- src/libxl/libxl_driver.c | 6 +- 1 file changed, 1

[PATCH] hw/arm/raspi: Remove deprecated raspi2/raspi3 aliases

2021-05-03 Thread Philippe Mathieu-Daudé
Remove the raspi2/raspi3 machine aliases, deprecated since commit 155e1c82ed0. Signed-off-by: Philippe Mathieu-Daudé --- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++ hw/arm/raspi.c | 2 -- 3 files changed, 7 insertions(+), 9

[libvirt PATCH 3/6] tests: virfilemock: realpath: Allow non-null second parameter

2021-05-03 Thread Tim Wiederhake
When other preloaded libraries wrap and / or make calls to `realpath` (e.g. LLVM's AddessSanitizer), the second parameter is no longer guaranteed to be NULL. Signed-off-by: Tim Wiederhake --- build-aux/syntax-check.mk | 2 +- tests/virfilemock.c | 12 ++-- 2 files changed, 7

[libvirt PATCH 6/6] ci: Enable address and undefined behavior sanitizers

2021-05-03 Thread Tim Wiederhake
meson supports the following sanitizers: "address" (e.g. out-of-bounds memory access, use-after-free, etc.), "thread" (data races), "undefined" (e.g. signed integer overflow), and "memory" (use of uninitialized memory). Note that not all sanitizers are supported by all compilers, and that more

[libvirt PATCH 5/6] virt-aa-helper: Remove duplicate linking with src/datatypes.o

2021-05-03 Thread Tim Wiederhake
"virt-aa-helper" links, amongst others, against "datatypes.o" and "libvirt.so". The latter links against "libvirt_driver.a" which in turn also links against "datatypes.o", leading to a One-Definition-Rule violoation for "virConnectClass" et al. in "datatypes.c". Signed-off-by: Tim Wiederhake ---

[libvirt PATCH 4/6] tests: openvzutilstest: Remove duplicate linking with libvirt_openvz.a

2021-05-03 Thread Tim Wiederhake
"openvzutilstest" links, amongst others, against "libvirt_openvz.a" and "libvirt.so". The latter also links against "libvirt_openvz.a", leading to a One-Definition-Rule violation for "openvzLocateConfFile" in "openvz_conf.c". Signed-off-by: Tim Wiederhake --- src/libvirt_openvz.syms | 2 ++

[libvirt PATCH 2/6] meson: Allow undefined symbols when sanitizers are enabled

2021-05-03 Thread Tim Wiederhake
When enabling sanitizers, clang adds some function symbols when instrumenting the code. The exact names of those functions are an implementation detail and should therefore not be added to any syms file. This patch prevents build failures due to those symbols not present in the syms file when

[libvirt PATCH 0/6] Enable sanitizers

2021-05-03 Thread Tim Wiederhake
This series enables and adds AddressSanitizer and UndefinedBehaviorSanitizer builds to the CI. See: https://clang.llvm.org/docs/AddressSanitizer.html and https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html These sanitizers already found some issues in libvirt, e.g.

[libvirt PATCH 1/6] meson: Allow larger stack frames when instrumenting

2021-05-03 Thread Tim Wiederhake
When enabling sanitizers, gcc adds some instrumentation to the code that may enlarge stack frames. Some function's stack frames are already close to the limit of 4096 and are enlarged past that threshold, e.g. virLXCProcessStart which reaches a frame size of 4624 bytes. Signed-off-by: Tim

Re: [PATCH v2] meson: Declare GLIB_VERSION_* macros at configure

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 10:35:07AM +0200, Michal Privoznik wrote: > So far we have three places where glib version is recorded: > meson.build and then in config.h. The latter is so well hidden > that it's easy to miss when bumping minimal glib version in the > former. With a bit of python^Wmeson

Re: [libvirt PATCH v2 0/6] Refactor more XML parsing boilerplate code, part VI

2021-05-03 Thread Ján Tomko
On a Tuesday in 2021, Tim Wiederhake wrote: For background, see https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html V1: https://listman.redhat.com/archives/libvir-list/2021-April/msg01184.html Changes since V1: * Split up "virDomainFeaturesDefParse" * Added missing

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

2021-05-03 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 Changes since V1: * Split up patch for virDomainControllerDefParseXML * Code style fixes Tim Wiederhake (11): virXMLPropEnum: Fix return value

Release of libvirt-7.3.0

2021-05-03 Thread Jiri Denemark
The 7.3.0 release of both libvirt and libvirt-python is tagged and signed tarballs and source RPMs are available at https://libvirt.org/sources/ https://libvirt.org/sources/python/ Thanks everybody who helped with this release by sending patches, reviewing, testing, or providing any

[PATCH v2] meson: Declare GLIB_VERSION_* macros at configure

2021-05-03 Thread Michal Privoznik
So far we have three places where glib version is recorded: meson.build and then in config.h. The latter is so well hidden that it's easy to miss when bumping minimal glib version in the former. With a bit of python^Wmeson string magic GLIB_VERSION_MIN_REQUIRED and GLIB_VERSION_MAX_ALLOWED macros

Re: [PATCH] block: Drop the sheepdog block driver

2021-05-03 Thread Peter Krempa
On Sat, May 01, 2021 at 09:57:47 +0200, Markus Armbruster wrote: > It was deprecated in commit e1c4269763, v5.2.0. See that commit > message for rationale. > > Signed-off-by: Markus Armbruster > --- > docs/system/deprecated.rst |9 - > docs/system/device-url-syntax.rst.inc |

Re: [PATCH 2/2] meson: Declare GLIB_VERSION_* macros at configure

2021-05-03 Thread Michal Prívozník
On 5/3/21 10:17 AM, Pavel Hrdina wrote: > On Fri, Apr 30, 2021 at 07:18:49AM +0200, Michal Privoznik wrote: >> So far we have three places where glib version is recorded: >> meson.build and then in config.h. The latter is so well hidden >> that it's easy to miss when bumping minimal glib version

Re: [PATCH 1/2] qemu_domainjob: Drop 'const' from strings in _qemuDomainJobObj

2021-05-03 Thread Pavel Hrdina
On Fri, Apr 30, 2021 at 07:18:48AM +0200, Michal Privoznik wrote: > These strings are not constant really. They are allocated in > qemuDomainObjBeginJobInternal() and freed in > qemuDomainReset*Job(). Freeing a pointer to const looks weird. > > Signed-off-by: Michal Privoznik > --- >

Re: [PATCH 2/2] meson: Declare GLIB_VERSION_* macros at configure

2021-05-03 Thread Pavel Hrdina
On Fri, Apr 30, 2021 at 07:18:49AM +0200, Michal Privoznik wrote: > So far we have three places where glib version is recorded: > meson.build and then in config.h. The latter is so well hidden > that it's easy to miss when bumping minimal glib version in the > former. With a bit of python^Wmeson

Re: [libvirt PATCH] meson: Fix compatibility with Meson 0.58

2021-05-03 Thread Pavel Hrdina
On Mon, May 03, 2021 at 09:29:12AM +0200, Andrea Bolognani wrote: > Builds failed with > > tests/meson.build:690:0: ERROR: List item must be one > of , not > > before this change. > > https://gitlab.com/libvirt/libvirt/-/issues/158 > > Signed-off-by: Andrea Bolognani > --- > Test

Re: [libvirt PATCH] meson: Fix compatibility with Meson 0.58

2021-05-03 Thread Peter Krempa
On Mon, May 03, 2021 at 09:29:12 +0200, Andrea Bolognani wrote: > Builds failed with > > tests/meson.build:690:0: ERROR: List item must be one > of , not > > before this change. > > https://gitlab.com/libvirt/libvirt/-/issues/158 > > Signed-off-by: Andrea Bolognani > --- > Test pipeline:

[libvirt PATCH] meson: Fix compatibility with Meson 0.58

2021-05-03 Thread Andrea Bolognani
Builds failed with tests/meson.build:690:0: ERROR: List item must be one of , not before this change. https://gitlab.com/libvirt/libvirt/-/issues/158 Signed-off-by: Andrea Bolognani --- Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/296072074 (hasn't completed yet)

Re: [PATCH for 7.3] conf: Fix heap corruption when hot-adding a lease

2021-05-03 Thread Jiri Denemark
On Sun, May 02, 2021 at 12:13:50 +0200, Peter Krempa wrote: > Commit 28a86993162f7d2f ( v6.9.0-179-g28a8699316 ) incorrectly replaced > VIR_EXPAND_N by g_renew. > > VIR_EXPAND_N has these two extra effects apart from reallocating memory: > > 1) The newly allocated memory is zeroed out > 2) The