Re: [PATCH 09/11] qemuhotplugtest: Don't overwrite vm->def->id in testQemuHotplugCheckResult()

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > This is a leftover from v2.0.0-rc1~300. In v1.2.12-rc1~43 we've > introduced a code that explicitly sets vm->def->id to -1 to force > generation of inactive XML. But this was removed in the later > commit, which forgot to remove the

Re: [PATCH 08/11] qemuhotplugtest: Fix misleading comment on monitor unlock

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > There's a comment in testQemuHotplug() trying to explain why we > need to unlock the monitor object. Well, while it might have been > correct when being introduced, it's no long factually correct as > *no longer > just any function

Re: [PATCH 07/11] qemu_hotplug.h: Expose less functions

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > After previous cleanups a lot of functions from qemu_hotplug.c > are called only within the file. Make them static and drop their > declaration from the header file. > *declarations > > Signed-off-by: Michal Privoznik > --- >

Re: [PATCH 06/11] qemuhotplugtest: Call qemuDomainUpdateDeviceLive() directly

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > There's no reason for qemuhotplugtest to reimplement which device > update function to call (testQemuHotplugUpdate()) when > qemuDomainUpdateDeviceLive() already does that. Thus, drop > testQemuHotplugUpdate() and call

Re: [PATCH 05/11] qemuhotplugtest: Call qemuDomainAttachDeviceLive() directly

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > There's no reason for qemuhotplugtest to reimplement which device > attach function to call (testQemuHotplugAttach()) when > qemuDomainAttachDeviceLive() already does that. Thus, drop > testQemuHotplugAttach() and call

Re: [PATCH 04/11] qemuhotplugtest: Call qemuDomainDetachDeviceLive() directly

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > The testQemuHotplugDetach() already does call > qemuDomainDetachDeviceLive() but only for some device types. For > the rest it reports an error (but only if running test > verbosely). This makes no sense. Just call >

Re: [PATCH 2/4] qemu: Move PCI backend setting into qemuDomainPrepareHostdev()

2023-04-21 Thread Martin Kletzander
On Fri, Apr 14, 2023 at 03:44:16PM +0200, Michal Privoznik wrote: From: Zhenzhong Duan virsh command domxml-to-native failed with below error but start command succeed for same domain xml. "internal error: invalid PCI passthrough type 'default'" If a PCI backend is not set in the XML, the

Re: [PATCH 03/11] qemu: Move qemuDomainUpdateDeviceLive() into qemu_hotplug.c

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > There is no good reason for qemuDomainUpdateDeviceLive() to live > in (ever growing) qemu_driver.c while we have qemu_hotplug.c > which already contains the rest of hotplug code. Move the > function to its new home. > > Signed-off-by:

Re: [PATCH] meson: Work around configure_file(copy:true) deprecation

2023-04-21 Thread Martin Kletzander
On Thu, Apr 20, 2023 at 02:30:46PM +0200, Michal Prívozník wrote: On 4/20/23 14:07, Martin Kletzander wrote: On Thu, Mar 23, 2023 at 05:01:26PM +0100, Michal Privoznik wrote: In our meson scripts, we use configure_file(copy:true) to copy files from srcdir into builddir. However, as of

Re: [PATCH V3 0/3] migration: add qemu parallel migration options

2023-04-21 Thread Jiang Jiacheng
Thank you for your reply and review, I'd appreciate for you to do that. And I'd also like to confirm that we have the following usages after the modification. for non-parallel migration, we can use --compressed default to use XBZRLE for migration --compressed --comp-methods ...

Re: [PATCH 02/11] qemu: Move qemuDomainAttachDeviceLive() into qemu_hotplug.c

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > There is no good reason for qemuDomainAttachDeviceLive() to live > in (ever growing) qemu_driver.c while we have qemu_hotplug.c > which already contains the rest of hotplug code. Move the > function to its new home. > > Signed-off-by:

Re: [PATCH 01/11] qemu: Replace @dom argument with @driver in qemuDomainUpdateDeviceLive()

2023-04-21 Thread Kristina Hanicova
On Fri, Apr 21, 2023 at 10:25 AM Michal Privoznik wrote: > The qemuDomainUpdateDeviceLive() accepts virDomainPtr as one of > its arguments, but use it only to get QEMU driver out of it. > Well, the only caller already done that and thus can pass it > *does > instead of virDomainPtr. > > This

Re: [libvirt PATCH v2 6/6] Move src/keycodemapdb -> subprojects/keycodemapdb

2023-04-21 Thread Boris Fiuczynski
On 4/20/23 5:34 PM, Michal Prívozník wrote: On 4/20/23 17:10, Boris Fiuczynski wrote: With this code in master I am no longer able to build rpms from the tarball with rpmbuild. Am I the only one? This is the pipeline that run after this very patch:

[PATCH 06/11] qemuhotplugtest: Call qemuDomainUpdateDeviceLive() directly

2023-04-21 Thread Michal Privoznik
There's no reason for qemuhotplugtest to reimplement which device update function to call (testQemuHotplugUpdate()) when qemuDomainUpdateDeviceLive() already does that. Thus, drop testQemuHotplugUpdate() and call qemuDomainUpdateDeviceLive() directly. BTW: this also shows why reimplementing

[PATCH 11/11] qemuhotplugtest: Verify domain XML on UPDATE

2023-04-21 Thread Michal Privoznik
Just like we check the resulting domain XML after ATTACH and DETACH, we should do the same after UPDATE action. This is as simple as calling testQemuHotplugCheckResult() and providing missing XMLs. For those test cases where no change is done, we can just make the expected XML a symlink to the

[PATCH 09/11] qemuhotplugtest: Don't overwrite vm->def->id in testQemuHotplugCheckResult()

2023-04-21 Thread Michal Privoznik
This is a leftover from v2.0.0-rc1~300. In v1.2.12-rc1~43 we've introduced a code that explicitly sets vm->def->id to -1 to force generation of inactive XML. But this was removed in the later commit, which forgot to remove the restoration of the original dom ID. Signed-off-by: Michal Privoznik

[PATCH 10/11] qemuhotplugtest: use g_autoptr(virDomainDeviceDef)

2023-04-21 Thread Michal Privoznik
This brings us one step closer to the caller of qemuDomainAttachDeviceLive() (qemuDomainAttachDeviceLiveAndConfig()). Signed-off-by: Michal Privoznik --- tests/qemuhotplugtest.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/qemuhotplugtest.c

[PATCH 03/11] qemu: Move qemuDomainUpdateDeviceLive() into qemu_hotplug.c

2023-04-21 Thread Michal Privoznik
There is no good reason for qemuDomainUpdateDeviceLive() to live in (ever growing) qemu_driver.c while we have qemu_hotplug.c which already contains the rest of hotplug code. Move the function to its new home. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 299

[PATCH 04/11] qemuhotplugtest: Call qemuDomainDetachDeviceLive() directly

2023-04-21 Thread Michal Privoznik
The testQemuHotplugDetach() already does call qemuDomainDetachDeviceLive() but only for some device types. For the rest it reports an error (but only if running test verbosely). This makes no sense. Just call qemuDomainDetachDeviceLive() directly and drop testQemuHotplugDetach(). Signed-off-by:

[PATCH 08/11] qemuhotplugtest: Fix misleading comment on monitor unlock

2023-04-21 Thread Michal Privoznik
There's a comment in testQemuHotplug() trying to explain why we need to unlock the monitor object. Well, while it might have been correct when being introduced, it's no long factually correct as just any function (attach/detach/update) might talk to the monitor and it expects the monitor to be

[PATCH 05/11] qemuhotplugtest: Call qemuDomainAttachDeviceLive() directly

2023-04-21 Thread Michal Privoznik
There's no reason for qemuhotplugtest to reimplement which device attach function to call (testQemuHotplugAttach()) when qemuDomainAttachDeviceLive() already does that. Thus, drop testQemuHotplugAttach() and call qemuDomainAttachDeviceLive() directly. There's one small catch though,

[PATCH 07/11] qemu_hotplug.h: Expose less functions

2023-04-21 Thread Michal Privoznik
After previous cleanups a lot of functions from qemu_hotplug.c are called only within the file. Make them static and drop their declaration from the header file. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 56 + src/qemu/qemu_hotplug.h | 61

[PATCH 01/11] qemu: Replace @dom argument with @driver in qemuDomainUpdateDeviceLive()

2023-04-21 Thread Michal Privoznik
The qemuDomainUpdateDeviceLive() accepts virDomainPtr as one of its arguments, but use it only to get QEMU driver out of it. Well, the only caller already done that and thus can pass it instead of virDomainPtr. This also makes it look like the rest of device hot(un-)plug functions:

[PATCH 00/11] qemuhotplugtest: Various cleanups and improvements

2023-04-21 Thread Michal Privoznik
While working on something else, I've taken a look at qemuhotplugtest and realized we can do various cleanups and improvements. The test still covers just live attach/detach/update, but after this it's prepared better to test also config attach/detach/update. Michal Prívozník (11): qemu:

[PATCH 02/11] qemu: Move qemuDomainAttachDeviceLive() into qemu_hotplug.c

2023-04-21 Thread Michal Privoznik
There is no good reason for qemuDomainAttachDeviceLive() to live in (ever growing) qemu_driver.c while we have qemu_hotplug.c which already contains the rest of hotplug code. Move the function to its new home. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 170