[PATCH] qemuProcessSetupDisksTransientHotplug: skip system_reset when the all disks have transient shareBacking option

2021-07-06 Thread Masayoshi Mizuma
From: Masayoshi Mizuma When both destroy and is set to the domain xml, the guest doesn't start. # virsh start Guest error: Failed to start domain 'Guest' error: internal error: qemu unexpectedly closed the monitor # That's because libvirt does system_reset qmp command when is set, and the

[PATCH 4/6] libxl: Introduce libxlDomainStartPrepare

2021-07-06 Thread Jim Fehlig
Introduce libxlDomainStartPrepare as part of decomposing libxlDomainStart. Perform all prepratory operations such as hostdevs, network devs, etc. Also ensure all such operations are properly unwound on error. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 99

[PATCH 6/6] libxl: Add helper function for running the hook script

2021-07-06 Thread Jim Fehlig
The same pattern of retrieving the domXML, running the hook script, and checking for error is used throughout the libxl driver. Remove some repetitive code by adding a helper function to perform these tasks. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c| 102

[PATCH 1/6] libxl: Drop unused 'cfg' parameter from libxlDomainSaveImageOpen

2021-07-06 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 4 +--- src/libxl/libxl_domain.h | 3 +-- src/libxl/libxl_driver.c | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index af20434843..336b67b129 100644 ---

[PATCH 5/6] libxl: Introduce libxlDomainStartPerform

2021-07-06 Thread Jim Fehlig
Introduce libxlDomainStartPerform as part of decomposing libxlDomainStart. Perform all operations that are part of starting a domain. On error the domain is destroyed from libxl's perspective, but the operations perfomed in libxlDomainStartPrepare must be unwound by libxlDomainStart.

[PATCH 2/6] libxl: Move managed save logic to libxlDomainStartNew

2021-07-06 Thread Jim Fehlig
the logic to check for existence of a managed save image and use it to start the VM can be moved to libxlDomainStartNew. libxlDomainStart has become unwieldy and this is a small step to make it more manageable. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 97

[PATCH 0/6] libxl: Misc cleanups and improvements

2021-07-06 Thread Jim Fehlig
My main objective with this series was to decompose libxlDomainStart a bit, as it had become quite unwieldy. Along the way I made a few other small improvements to the code. Jim Fehlig (6): libxl: Drop unused 'cfg' parameter from libxlDomainSaveImageOpen libxl: Move managed save logic to

[PATCH 3/6] libxl: Add a helper function to unprepare network devices

2021-07-06 Thread Jim Fehlig
Move network device cleanup code from libxlDomainCleanup to a helper function for use in a subsequent patch. Signed-off-by: Jim Fehlig --- src/libxl/libxl_domain.c | 49 +++- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git

[libvirt PATCH] nodedev: Handle inactive mdevs with the same UUID

2021-07-06 Thread Jonathon Jongsma
Unfortunately, mdevctl supports defining more than one mdev with the same UUID as long as they have different parent devices. So we can't use the UUID alone as a way to uniquely identify these node devices. Append the parent name to ensure uniqueness. For example: Before:

Re: [PATCH V3 0/2] Apparmor: Add profiles for hypervisor daemons

2021-07-06 Thread Jim Fehlig
Hi All, Is it fine to push these patches now that the release is out? Christian E. has ACKed 1/2 and Christian B. has 'LGTM' both. Anyone brave enough to ACK 2/2, or have further comments? I'd like to get these in since modular daemons are now prime-time. Regards, Jim On 6/24/21 2:48 PM,

[PATCH 3/3] softmmu/vl: Deprecate the -sdl and -curses option

2021-07-06 Thread Thomas Huth
It's not that much complicated to type "-display sdl" or "-display curses", so we should not clutter our main option name space with such simple wrapper options and rather present the users with a concise interface instead. Thus let's deprecate the "-sdl" and "-curses" wrapper options now.

[PATCH 2/3] softmmu/vl: Deprecate the old grab options

2021-07-06 Thread Thomas Huth
The alt_grab and ctrl_grab parameter of the -display sdl option prevent the QAPIfication of the "sdl" part of the -display option, so we should eventually remove them. And since this feature is also rather niche anyway, we should not clutter the top-level option list with these, so let's also

[PATCH 1/3] softmmu/vl: Add a "grab-mod" parameter to the -display sdl option

2021-07-06 Thread Thomas Huth
The -display sdl option is not using QAPI internally yet, and uses hand- crafted parsing instead (see parse_display() in vl.c), which is quite ugly, since most of the other code is using the QAPIfied DisplayOption already. Unfortunately, the "alt_grab" and "ctrl_grab" use underscores in their

[PATCH 0/3] softmmu/vl: Deprecate old and crufty display options

2021-07-06 Thread Thomas Huth
-display sdl uses a hand-crafted parser in vl.c, which is quite ugly since the other parts of -display have been QAPIfied already. A straight conversion to QAPI is not advisable since the "alt_grab" and "ctrl_grab" parameters are not the best solution anyway. So this patch series introduces a new

[libvirt PATCH v2 11/11] qemuMonitorGetChardevInfo: `virHashNew` cannot return NULL

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 4489b809f4..ef24b2ca1e 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2884,16 +2884,13

[libvirt PATCH v2 10/11] qemuMonitorGetChardevInfo: Use automatic memory management

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index cb59fc7b7b..4489b809f4 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@

[libvirt PATCH v2 07/11] qemuMonitorGetBlockInfo: Use automatic memory management

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 933d4a0154..2253c96cb5 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,7 +2103,7

[libvirt PATCH v2 09/11] qemuMonitorGetChardevInfo: Remove superfluous variable "ret"

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f2c35ab173..cb59fc7b7b 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2884,7 +2884,6

[libvirt PATCH v2 05/11] qemuMonitorGetAllBlockStatsInfo: `virHashNew` cannot return NULL

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 6ff7302360..dd0658f93c 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2155,15 +2155,12

[libvirt PATCH v2 06/11] qemuMonitorGetBlockInfo: Remove superfluous variable "ret"

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index dd0658f93c..933d4a0154 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,7 +2103,6

[libvirt PATCH v2 08/11] qemuMonitorGetBlockInfo: `virHashNew` cannot return NULL

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 2253c96cb5..f2c35ab173 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2103,13 +2103,10

[libvirt PATCH v2 04/11] qemuMonitorGetAllBlockStatsInfo: Use automatic memory management

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index d24531832b..6ff7302360 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@

[libvirt PATCH v2 03/11] qemuMonitorGetAllBlockStatsInfo: Assign hash table only on success

2021-07-06 Thread Tim Wiederhake
`virHashNew` cannot return NULL, the check is not needed. Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 19fcc5658b..d24531832b 100644 ---

[libvirt PATCH v2 02/11] qemuMonitorGetAllBlockStatsInfo: Remove superfluous variable initialization

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index df1e41f68f..19fcc5658b 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2154,7 +2154,7 @@

[libvirt PATCH v2 01/11] qemuMonitorGetAllBlockStatsInfo: Clean up line break

2021-07-06 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 8f35b4240f..df1e41f68f 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2162,8 +2162,7 @@

[libvirt PATCH v2 00/11] virHashNew refactorings

2021-07-06 Thread Tim Wiederhake
"virHashNew" cannot return NULL, yet we check for NULL in various places. This series is the first of several that remove these checks. Where applicable, the functions are refactored to use automatic memory management by means of g_autoptr etc. as well. v1:

[PATCH 4/5] test_driver: Implement virDomainGetIOThreadInfo

2021-07-06 Thread Luke Yue
Signed-off-by: Luke Yue --- src/test/test_driver.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6573ee3d61..20aee59f98 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -9304,6 +9304,31 @@

[PATCH 2/5] test_driver: Implement virDomainAddIOThread and virDomainDelIOThread

2021-07-06 Thread Luke Yue
Signed-off-by: Luke Yue --- src/test/test_driver.c | 160 + 1 file changed, 160 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ef0ddab54d..6573ee3d61 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@

[PATCH 3/5] conf: domain: Introduce and use virDomainGetIOThreadsConfig()

2021-07-06 Thread Luke Yue
The test driver can share the same code with qemu driver when implement testDomainGetIOThreadsConfig, so extract it for test driver to use. Signed-off-by: Luke Yue --- src/conf/domain_conf.c | 60 src/conf/domain_conf.h | 4 +++

[PATCH 5/5] tests: Test IOThread related functions for test driver

2021-07-06 Thread Luke Yue
Signed-off-by: Luke Yue --- examples/xml/test/testdomfc4.xml | 4 tests/virshtest.c| 40 2 files changed, 44 insertions(+) diff --git a/examples/xml/test/testdomfc4.xml b/examples/xml/test/testdomfc4.xml index 26b7f25a06..25ad45365a 100644

[PATCH 1/5] conf: domain: Introduce and use virDomainAddIOThreadCheck()

2021-07-06 Thread Luke Yue
The test driver can share the same code with qemu driver when implement testDomainAddIOThreadCheck and testDomainDelIOThreadCheck, so extract them for test driver to use. Signed-off-by: Luke Yue --- src/conf/domain_conf.c | 66 src/conf/domain_conf.h

[PATCH 0/5] Implement some IOThread related APIs for test driver

2021-07-06 Thread Luke Yue
- Implement virDomainAddIOThread - Implement virDomainDelIOThread - Implement virDomainGetIOThreadInfo - Add tests for these APIs Luke Yue (5): conf: domain: Introduce and use virDomainAddIOThreadCheck() test_driver: Implement virDomainAddIOThread and virDomainDelIOThread conf: domain: