Plans for the next release

2021-09-21 Thread Jiri Denemark
We are getting close to the next release of libvirt. To aim for the release on Oct 01 I suggest entering the freeze on Monday Sep 27 and tagging RC2 on Wednesday Sep 29. I hope this works for everyone. Jirka

[libvirt PATCH 1/1] libvirt.spec.in: Replace %global with %define

2021-09-21 Thread Erik Skultety
Commit b5e8db8f14d tuned the SPEC file so that libvirt daemons restart on package upgrade. In order to do that it added a bunch of parametrized macros using the %global directive. This caused a problem when running RPM builds on CentOS Stream 8 resulting in: error: Too many levels of recursion in

[libvirt PATCH 0/1] Fix rpmbuild on CentOS Stream 8

2021-09-21 Thread Erik Skultety
When running rpmbuild on CentOS 8 results in the following error: error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration. error: Macro %libvirt_daemon_perform_restart failed to expand error: line 1275: %global

[libvirt PATCH] scripts: apibuild: fix spacing

2021-09-21 Thread Ján Tomko
Syntax check reports: E226 missing whitespace around arithmetic operator Signed-off-by: Ján Tomko --- Pushed. scripts/apibuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index 722fd33f0e..9b29466e1d 100755 ---

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

2021-09-21 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: v6 of: https://listman.redhat.com/archives/libvir-list/2021-September/msg00333.html diff to v5: - Rebased onto current master - Produce warning (in 05/16) when prealloc was requested for virtio-mem (it's not officially supported by QEMU yet).

Re: [libvirt PATCH] scripts: fix API parsing of *** pointers

2021-09-21 Thread Michal Prívozník
On 9/20/21 6:27 PM, Daniel P. Berrangé wrote: > The currrent generated API contains *** pointer types with bogus > whitespace in the middle: > > > > because the tokenizer only tries to merge 2 distinct '*' together. > This refactors the code to merge an arbitrary number, resulting > in > >

Re: [PATCH v6 04/16] conf: Introduce virtio-mem model

2021-09-21 Thread Ján Tomko
On a Tuesday in 2021, 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

[PATCH 4/5] qemuBuildNumaCommandLine: Separate out building of CPU list

2021-09-21 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 43 ++--- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 020cbfa214..f04ae1e311 100644 --- a/src/qemu/qemu_command.c +++

[PATCH 5/5] qemu: Prefer -numa cpu over -numa node,cpus=

2021-09-21 Thread Michal Privoznik
QEMU is trying to obsolete -numa node,cpus= because that uses ambiguous vCPU id to [socket, die, core, thread] mapping. The new form is: -numa cpu,node-id=N,socket-id=S,die-id=D,core-id=C,thread-id=T which is repeated for every vCPU and places it at [S, D, C, T] into guest NUMA node N. While

[PATCH 3/5] qemuBuildNumaCommandLine: Move vars into loops

2021-09-21 Thread Michal Privoznik
There are two variables that are used only in a single loop. Move their definitions into their respective blocks. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c

[PATCH 0/5] qemu: Prefer -numa cpu over -numa node,cpus=

2021-09-21 Thread Michal Privoznik
I've sent these patches a while ago. Resending them again to resume the discussion. https://listman.redhat.com/archives/libvir-list/2020-May/msg01035.html Michal Prívozník (5): virCPUDefParseXML: Parse uint using virXPathUInt() virCPUDefParseXML: Prefer virXMLPropUInt over virXPathUInt

[PATCH 2/5] virCPUDefParseXML: Prefer virXMLPropUInt over virXPathUInt

2021-09-21 Thread Michal Privoznik
When parsing CPU topology, which is described in attributes we can use virXMLPropUInt() instead of virXPathUInt() as the former results in shorter code. Signed-off-by: Michal Privoznik --- src/conf/cpu_conf.c | 41 ++--- 1 file changed, 18 insertions(+), 23

[PATCH 1/5] virCPUDefParseXML: Parse uint using virXPathUInt()

2021-09-21 Thread Michal Privoznik
There is no need to use virXPathULong() and a temporary UL variable if we can use virXPathUInt() directly. Signed-off-by: Michal Privoznik --- src/conf/cpu_conf.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index

[PATCH v6 16/16] kbase: Document virtio-mem

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

[PATCH v6 15/16] news: document recent virtio memory addition

2021-09-21 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 fd20e50d18..62af02b33e 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -29,6 +29,13 @@ v7.8.0 (unreleased) active. This information can also be retrieved with the new

[PATCH v6 13/16] qemuDomainSetMemoryFlags: Take virtio-mem into consideration

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

[PATCH v6 14/16] virsh: Introduce update-memory-device command

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

[PATCH v6 12/16] qemu: Account for both memballoon and virtio-mem

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

[PATCH v6 11/16] qemu: Refresh the current size of virtio-mem on monitor reconnect

2021-09-21 Thread Michal Privoznik
If the QEMU driver restarts it loses the track of the current 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 v6 10/16] qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

2021-09-21 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 v6 08/16] Introduce property to virtio-mem

2021-09-21 Thread Michal Privoznik
The virtio-mem has another property that isn't exposed yet: current size exposed to the guest. Please note, that this is different to because esp. on sizing the memory down guest may refuse to release some blocks. Therefore, let's have another size to report in the XML. But because of its nature,

[PATCH v6 07/16] qemu: Wire up offline update

2021-09-21 Thread Michal Privoznik
Updating offline XML of devices might come handy when dealing with virtio-mem devices. But it's implemented to just replace one virDomainMemoryDef with another so it can be used to change almost anything. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 19 ++- 1

[PATCH v6 09/16] conf: Introduce virDomainMemoryFindByDeviceAlias()

2021-09-21 Thread Michal Privoznik
This function will be needed in the next commit where we will want to find virtio-mem given its alias by QEMU on the monitor. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 17 + src/conf/domain_conf.h | 5 + src/libvirt_private.syms | 1 + 3 files

[PATCH v6 06/16] qemu: Wire up live update

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

[PATCH v6 05/16] qemu: Build command line for virtio-mem

2021-09-21 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 v6 03/16] qemu_capabilities: Introduce QEMU_CAPS_MEMORY_BACKEND_RESERVE

2021-09-21 Thread Michal Privoznik
This capability tracks whether memory-backend-* supports .reserve attribute which is going to be important for backends associated with virtio-mem devices. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[PATCH v6 04/16] conf: Introduce virtio-mem model

2021-09-21 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 v6 02/16] qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI

2021-09-21 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 v6 01/16] virhostmem: Introduce virHostMemGetTHPSize()

2021-09-21 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 v6 00/16] Introduce virtio-mem model

2021-09-21 Thread Michal Privoznik
v6 of: https://listman.redhat.com/archives/libvir-list/2021-September/msg00333.html diff to v5: - Rebased onto current master - Produce warning (in 05/16) when prealloc was requested for virtio-mem (it's not officially supported by QEMU yet). Special thanks goes to David Hildebrand for

RE: [PATCH 0/5] qemu: add virtio-blk queue-size option

2021-09-21 Thread Hiroki Narukawa
Thank you for your review and pushing into master! -Original Message- From: Peter Krempa Sent: Tuesday, September 21, 2021 9:28 PM To: 成川 弘樹 Cc: libvir-list@redhat.com; 大岩 朗 Subject: Re: [PATCH 0/5] qemu: add virtio-blk queue-size option On Tue, Sep 21, 2021 at 02:13:57 +,

Re: [PATCH] virDevMapperGetTargets: Fix non-linux implementation

2021-09-21 Thread Ján Tomko
On a Tuesday in 2021, Peter Krempa wrote: s/GSlist/GSList/ Fixes: 6c49c2ee9fcb88de02cdc333f666a8e95d60a3b0 Signed-off-by: Peter Krempa --- src/util/virdevmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[PATCH] virDevMapperGetTargets: Fix non-linux implementation

2021-09-21 Thread Peter Krempa
s/GSlist/GSList/ Fixes: 6c49c2ee9fcb88de02cdc333f666a8e95d60a3b0 Signed-off-by: Peter Krempa --- src/util/virdevmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c index e42324fd19..7796e7719b 100644 ---

Re: [PATCH 0/5] qemu: add virtio-blk queue-size option

2021-09-21 Thread Peter Krempa
On Tue, Sep 21, 2021 at 02:13:57 +, Hiroki Narukawa wrote: > Hello, > > Can I know how is the status of this patchset? In this patchset all reviews I > received are applied, and this is ready for review. Pushed now.

Re: [PATCH 0/3] schemas: Couple of nodedev related fixes

2021-09-21 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: These three patches address the first three problems raised in https://bugzilla.redhat.com/show_bug.cgi?id=1999420 The fourth one is a bit different because I'm failing to find a path in the code that would allow empty for vdpa. Michal

Re: [PATCH 0/3] meson: Misc tweaks

2021-09-21 Thread Ján Tomko
On a Tuesday in 2021, Michal Privoznik wrote: Pipeline: https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/370312403 Michal Prívozník (3): lib: Use $PROG instead of $PROG_PATH meson: Don't set $PROG_PATH macros meson: Enable ZFS storage backend more often meson.build | 24

Re: [PATCH 01/14] qemu: command: Always assume 'QEMU_CAPS_BOOT_STRICT'

2021-09-21 Thread Peter Krempa
On Mon, Sep 20, 2021 at 18:28:47 +0200, Ján Tomko wrote: > On a Monday in 2021, Peter Krempa wrote: > > Added by c8a6ae8bb9 in qemu-v1.5.0 and can't be compiled out. Assume > > that it's present and fix all fake-caps tests. > > > > Signed-off-by: Peter Krempa > > --- > > src/qemu/qemu_command.c

Re: [private] Re: [PATCH v5 00/16] Introduce virtio-mem model

2021-09-21 Thread David Hildenbrand
On 21.09.21 11:33, David Hildenbrand wrote: On 13.09.21 16:52, Michal Privoznik wrote: v4 of: https://listman.redhat.com/archives/libvir-list/2021-June/msg00679.html diff to v4: - Rebased onto current master - Worked in David's suggestions, e.g. rename from to , implemented offline

Re: question: about the bug: current master had lost the ability "Cancel disk mirrors after libvirtd restart"

2021-09-21 Thread Peter Krempa
Please fix your address book, it's 'libvir-list@redhat.com' not 'libvirt-l...@redhat.com' On Tue, Sep 21, 2021 at 00:52:57 +0800, wangjie (P) wrote: > bug reproduce process: > 1、perform migrateToURI3. > 2、kill libvirtd when enter memory migration phase,and restart libvirtd. I presume this is a

[private] Re: [PATCH v5 00/16] Introduce virtio-mem model

2021-09-21 Thread David Hildenbrand
On 13.09.21 16:52, Michal Privoznik wrote: v4 of: https://listman.redhat.com/archives/libvir-list/2021-June/msg00679.html diff to v4: - Rebased onto current master - Worked in David's suggestions, e.g. rename from to , implemented offline memory update, implemented --node argument to

Re: [PATCH v5 05/16] qemu: Build command line for virtio-mem

2021-09-21 Thread David Hildenbrand
On 21.09.21 10:56, Michal Prívozník wrote: On 9/17/21 2:54 PM, David Hildenbrand wrote: On 15.09.21 13:07, Michal Prívozník wrote: On 9/14/21 3:05 PM, David Hildenbrand wrote: On 13.09.21 16:52, Michal Privoznik wrote: Nothing special is happening here. All important changes were done when

Re: [PATCH v5 05/16] qemu: Build command line for virtio-mem

2021-09-21 Thread Michal Prívozník
On 9/17/21 2:54 PM, David Hildenbrand wrote: > On 15.09.21 13:07, Michal Prívozník wrote: >> On 9/14/21 3:05 PM, David Hildenbrand wrote: >>> On 13.09.21 16:52, Michal Privoznik wrote: Nothing special is happening here. All important changes were done when for 'virtio-pmem' (adjusting

Re: RFC: revert to external snapshot API

2021-09-21 Thread Pavel Hrdina
On Thu, Sep 16, 2021 at 02:53:35PM +0300, Nikolay Shirokovskiy wrote: > [...] > > > > > > > > One thing you've missed though is that deletion of snapshots now > > becomes > > > > quite a challenge. > > > > > > > > > > Yeah I did not consider implementing deleting at that moment. However to > > >

Re: [PATCH 2/2] selinux: Don't ignore ENOENT in Permissive mode

2021-09-21 Thread Michal Prívozník
On 9/20/21 5:57 PM, Ján Tomko wrote: > On a Monday in 2021, Michal Privoznik wrote: >> In selinux driver there's virSecuritySELinuxSetFileconImpl() >> which is responsible for actual setting of SELinux label on given >> file and handling possible failures. In fhe failure handling code >> we decide

Re: [PATCH 5/5] qemu: add virtio-blk queue-size option

2021-09-21 Thread Peter Krempa
On Thu, Sep 09, 2021 at 12:34:48 +0900, Hiroki Narukawa wrote: > The option "queue-size" in virtio-blk was added in qemu-2.12.0, and default > value increased from qemu-5.0.0. > > However, increasing this value may lead to drop of random access performance. > > This is configurable value, so we

Re: [PATCH 2/5] qemu: add disk queue count ABI stability check

2021-09-21 Thread Peter Krempa
On Thu, Sep 09, 2021 at 12:34:45 +0900, Hiroki Narukawa wrote: In summary: ABI stability checks are not qemu specific so I'll update the summary. > virtio-blk num-queue is visible to guest OS, so this must be kept while live > migration. > > Signed-off-by: Hiroki Narukawa > --- >

Re: [PATCH 1/5] qemu: Make disk-virtio-queues tests use DO_TEST_CAPS_LATEST

2021-09-21 Thread Peter Krempa
On Thu, Sep 09, 2021 at 12:34:44 +0900, Hiroki Narukawa wrote: > Currently disk-virtio-queues test is now using specifying a fake capability. > > By this commit this test will make use of DO_TEST_CAPS_LATEST. > > Signed-off-by: Hiroki Narukawa > --- >