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

2021-09-20 Thread Hiroki Narukawa
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. -Original Message- From: 成川 弘樹 Sent: Thursday, September 9, 2021 12:35 PM To: libvir-list@redhat.com Cc: 大岩 朗 ; 成川 弘樹 Subject: [PATCH 0/5] qemu: ad

[libvirt PATCH 2/2] virNWFilterRuleDefFixup: Replace macro with function

2021-09-20 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/nwfilter_conf.c | 284 --- 1 file changed, 143 insertions(+), 141 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index a3109962af..4c4e31d5cd 100644 --- a/src/conf/nwfilter_conf.c +++ b/

[libvirt PATCH 0/2] Random improvements to work around a build system issue

2021-09-20 Thread Tim Wiederhake
This is an alternative to https://listman.redhat.com/archives/libvir-list/2021-September/msg00522.html. When libvirt is build: * with sanitizers enabled, * buildtype explicitly set to "debug", * on clang, the build fails with: ../src/conf/nwfilter_conf.c:2190:1: error: stack frame size of 10

[libvirt PATCH 1/2] virDomainDefParseXML: Use automatic memory management

2021-09-20 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 208 - 1 file changed, 102 insertions(+), 106 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6c32609431..cdbc66d9fc 100644 --- a/src/conf/domain_conf.c +++ b/src/co

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

2021-09-20 Thread wangjie (P)
bug reproduce process: 1、perform migrateToURI3. 2、kill libvirtd when enter memory migration phase,and restart libvirtd. 3、perform migrateToURI3 again and again,migrateToURI3 will fail forever with err-msg "Requested operation is not valid: domain has active block job" I found the reasion which t

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

2021-09-20 Thread wangjie (P)
I think current master had lost the ability of the followed patch: https://github.com/libvirt/libvirt/commit/e8f263e0d006390c3764aaa07093b2d174b61379 On 2021/9/21 0:52, wangjie (P) wrote: > bug reproduce process: > 1、perform migrateToURI3. > 2、kill libvirtd when enter memory migration phase,and re

Re: [PATCH 0/4] virsh: Follow up improvements

2021-09-20 Thread Ján Tomko
On a Friday in 2021, Michal Privoznik wrote: These are the fixes I spotted when reviewing Peter's patchset earlier. Michal Prívozník (4): virsh: Provide local path completer for screenshot --file virsh: Provide local path completer for vol-download --file vsh: Extend checks for aliased comman

Re: [PATCH 00/14] qemu: more 'query-command-line-options' cleanups

2021-09-20 Thread Ján Tomko
On a Monday in 2021, Peter Krempa wrote: In a private conversation Markus dug out the history of certain of the flags we probe via 'query-command-line-options'. I already had some patches for this but without the history or justification. To prevent us going through this again I've decided to se

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

2021-09-20 Thread Ján Tomko
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| 10 +++--- tests/qemuxml2argvdata/aarch64-aavm

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

2021-09-20 Thread Daniel P . Berrangé
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 Signed-off-by: Daniel P. Berrangé --- scripts/apibuild.py | 13

Re: [PATCH 0/4] Various cleanups

2021-09-20 Thread Ján Tomko
On a Monday in 2021, Peter Krempa wrote: Few patches from old branches. Peter Krempa (4): util: virdevmapper: Sanitize use of macros for buffer size virDevMapperGetTargets: Use a linked list as return type util: virstring: Remove unused 'virStringListMerge' qemuMonitorJSONGetStatus: Refactor

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

2021-09-20 Thread Ján Tomko
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 whether failure is fatal or not. But there is a b

Re: [PATCH v3 0/5] Add support for two i386 pm options which control acpi hotplug

2021-09-20 Thread Ani Sinha
Ping On Mon, Sep 13, 2021 at 1:39 PM Ani Sinha wrote: > > > On Sun, 12 Sep 2021, Ani Sinha wrote: > > > Hi all: > > > > This patchset introduces libvirt xml support for the following two pm > conf > > options: > > > > > > > > > > > > > > Another option is to create a new xml tag and add

[PATCH 08/14] qemu: capabilities: Retire QEMU_CAPS_SPLASH_TIMEOUT

2021-09-20 Thread Peter Krempa
The code assumes that the feature tracked by this capability always exists. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 - tests/qemuc

[PATCH 14/14] qemu: capabilities: Retire QEMU_CAPS_FW_CFG

2021-09-20 Thread Peter Krempa
The code assumes that all supported qemu versions have this capability so we can retire it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml |

[PATCH 13/14] qemu: Assume QEMU_CAPS_FW_CFG

2021-09-20 Thread Peter Krempa
qemu supports this since 81b2b81062 ("fw_cfg: insert fw_cfg file blobs via qemu cmdline") released in qemu-v2.4.0 and it can't be compiled out. Assume that the option always works and remove the corresponding check. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 12 ++-- tes

[PATCH 12/14] qemu: capabilities: Assume QEMU_CAPS_LOADPARM for s390 only

2021-09-20 Thread Peter Krempa
Added to 'query-command-line-options' in qemu commit 5559716c98 ("util/qemu-config: Add loadparm to qemu machine_opts") released in qemu-v2.10.0 but makes sense for s390 only. Treat it the same as the keywrap capabilities in previous commit. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabili

[PATCH 11/14] qemu: capabilities: Assume QEMU_CAPS_AES_KEY_WRAP and QEMU_CAPS_DEA_KEY_WRAP for s390 only

2021-09-20 Thread Peter Krempa
qemu introduced these options in 2eb1cd0768 ("s390x: CPACF: Handle key wrap machine options") released in qemu-v2.3.0 but was exposed in query-command-line-options only in 5bcfa0c543 ("util/qemu-config: fix missing machine command line options"). The problem is that they are exposed even for archi

[PATCH 10/14] qemu: capabilities: QEMU_CAPS_MEM_MERGE

2021-09-20 Thread Peter Krempa
The code assumes that the feature tracked by this capability always exists. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 - tests/qemuc

[PATCH 09/14] qemu: Always assume QEMU_CAPS_MEM_MERGE

2021-09-20 Thread Peter Krempa
Supported since qemu commit 8490fc78e7 ("add -machine mem-merge=on|off option") released in qemu-v1.3.0 and can't be compiled out. Assume that it's present and remove the validation code. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 7 --- tests/qemuxml2argvtest.c | 2 +- 2 fi

Re: [PATCH 8/8] qapi: add blockdev-replace command

2021-09-20 Thread Vladimir Sementsov-Ogievskiy
02.08.2021 21:54, Vladimir Sementsov-Ogievskiy wrote: Add command that can add and remove filters. Key points of functionality: What the command does is simply replace some BdrvChild.bs by some other nodes. The tricky thing is selecting there BdrvChild objects. To be able to select any kind of

[PATCH 05/14] qemu: capabilities: Retire QEMU_CAPS_REBOOT_TIMEOUT

2021-09-20 Thread Peter Krempa
The code assumes that the feature tracked by this capability always exists. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 - tests/qemuc

[PATCH 04/14] qemu: Always assume QEMU_CAPS_REBOOT_TIMEOUT

2021-09-20 Thread Peter Krempa
Supported since ac05f34924 ("add a boot parameter to set reboot timeout") released in qemu-v1.3.0 and can't be compiled out. Assume that it's present and remove the validation code. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 9 - tests/qemuxml2argvtest.c | 4 ++-- tests/

[PATCH 02/14] qemu: capabilities: Retire QEMU_CAPS_BOOT_STRICT

2021-09-20 Thread Peter Krempa
It's not used since last commit. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1

[PATCH 06/14] qemuxml2argvtest: Remove negative case for 'boot-menu-enable-with-timeout'

2021-09-20 Thread Peter Krempa
The feature is now always present. Remove the negative test case as the upcomming commit will remove the checks. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/boot-menu-enable-with-timeout.err | 1 - tests/qemuxml2argvtest.c | 1 - 2 files changed, 2 dele

[PATCH 07/14] qemu: Always assume QEMU_CAPS_SPLASH_TIMEOUT

2021-09-20 Thread Peter Krempa
Supported since qemu commit 3d3b8303c6 ("showing a splash picture when start") released in qemu-v1.0 and can't be compiled out. Assume that it's present and remove the validation code. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 14 ++ tests/qemuxml2argvtest.c | 6 ++

[PATCH 03/14] tests: qemuxml2argv: Remove negative case for 'reboot-timeout-enabled'

2021-09-20 Thread Peter Krempa
All supported qemu versions now support this feature so this test is pointless. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/reboot-timeout-enabled.err | 1 - tests/qemuxml2argvtest.c | 1 - 2 files changed, 2 deletions(-) delete mode 100644 tests/qemuxml2argv

[PATCH 00/14] qemu: more 'query-command-line-options' cleanups

2021-09-20 Thread Peter Krempa
In a private conversation Markus dug out the history of certain of the flags we probe via 'query-command-line-options'. I already had some patches for this but without the history or justification. To prevent us going through this again I've decided to send some more removal of capability bits bas

Re: [PATCH 8/8] qapi: add blockdev-replace command

2021-09-20 Thread Vladimir Sementsov-Ogievskiy
Thanks a lot for reviewing! 20.09.2021 09:44, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command that can add and remove filters. Key points of functionality: What the command does is simply replace some BdrvChild.bs by some other nodes. The tricky thing is selecting

[PATCH 4/4] qemuMonitorJSONGetStatus: Refactor cleanup

2021-09-20 Thread Peter Krempa
Use g_autofree for the JSON values to remove cleanup label and ret variable. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 8d3c

[PATCH 3/4] util: virstring: Remove unused 'virStringListMerge'

2021-09-20 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virstring.c | 35 --- src/util/virstring.h | 3 --- 3 files changed, 39 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ace35d709f..25ee21463c 10

[PATCH 1/4] util: virdevmapper: Sanitize use of macros for buffer size

2021-09-20 Thread Peter Krempa
There are two distinct uses of an arbitrary buffers size when querying the device mapper. One is related to loading the /proc/devices file, while the other is used as buffer for ioctls to the devmapper. Split up the macros used here so that it's clear that they are not meant for the same thing. S

[PATCH 0/4] Various cleanups

2021-09-20 Thread Peter Krempa
Few patches from old branches. Peter Krempa (4): util: virdevmapper: Sanitize use of macros for buffer size virDevMapperGetTargets: Use a linked list as return type util: virstring: Remove unused 'virStringListMerge' qemuMonitorJSONGetStatus: Refactor cleanup src/libvirt_private.syms

[PATCH 2/4] virDevMapperGetTargets: Use a linked list as return type

2021-09-20 Thread Peter Krempa
Of the two callers one simply iterates over the returned paths and the second one appends the returned paths to another linked list. Simplify all of this by directly returning a linked list. Signed-off-by: Peter Krempa --- src/qemu/qemu_cgroup.c| 11 ++- src/qemu/qemu_namespace.c |

[RFC PATCH 7/7] testQEMUSchemaValidateEnum: Validate deprecated members

2021-09-20 Thread Peter Krempa
Starting from QEMU-6.2 enum members can be deprecated. Add support to the validator. Signed-off-by: Peter Krempa --- tests/testutilsqemuschema.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c index 38dd0e14bc..b4b5eb1ed6 100644

[RFC PATCH 6/7] testQEMUSchemaValidateDeprecated: Move to the top

2021-09-20 Thread Peter Krempa
Move the function to the top of the file so other functions placed towards the top will be able to reuse it. Signed-off-by: Peter Krempa --- tests/testutilsqemuschema.c | 82 ++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/tests/testutilsqemu

[RFC PATCH 5/7] testQEMUSchemaValidateEnum: Use new 'members' for 'enum' meta type

2021-09-20 Thread Peter Krempa
Switch to the new more featured way to report enum members which will also allow us to detect use of deprecated members. Signed-off-by: Peter Krempa --- tests/testutilsqemuschema.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/testutilsqemuschema.c b/tests/testutil

[RFC PATCH 1/7] virQEMUQAPISchemaTraverseEnum: Move helper variables into loop

2021-09-20 Thread Peter Krempa
Move them closer to where they are actually used. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 36b184b226..165ecf1180 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qem

[RFC PATCH 3/7] virQEMUQAPISchemaTraverseEnum: Allow query of enume type features

2021-09-20 Thread Peter Krempa
QEMU-6.2 added feature flags for enum types. Add support for querying them into our QMP schema query language. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu

[RFC PATCH 4/7] testQEMUSchemaValidateEnum: Refactor logic to simplify switching to new QMP schema format

2021-09-20 Thread Peter Krempa
QEMU-6.2 is reporting enum values in the new 'members' array which we'll be switching to. Rewrite the logic so that adding the new checker is more straightforward. Signed-off-by: Peter Krempa --- tests/testutilsqemuschema.c | 29 ++--- 1 file changed, 14 insertions(+), 15

[RFC PATCH 2/7] virQEMUQAPISchemaTraverseEnum: Use the modern 'members' array

2021-09-20 Thread Peter Krempa
Starting from QEMU-6.2 enum members are reported as an array of objects under new name "values" so that extra data can be reported for each member. Modify the code so that we prefer 'members' and skip 'values' completely if we've used 'members'. Signed-off-by: Peter Krempa --- src/qemu/qemu_qap

[RFC PATCH 0/7] qemu: QAPI-schema: Add support for enum value 'features'

2021-09-20 Thread Peter Krempa
This series is based on Markus' effort to add 'feature' flags to enum values so that e.g. they can be deprecated: https://listman.redhat.com/archives/libvir-list/2021-September/msg00453.html This series adapts both the schema query language to support querying for arbitrary feature flags and also

Re: [PATCH 13/14] virsh: Introduce virshCompleteEmpty and use it for places where we can't suggest anything

2021-09-20 Thread Ján Tomko
On a Thursday in 2021, Peter Krempa wrote: For now this serves just as an annotation because readline and also the bash completion script insist on completing local paths when an empty list is returned. This will serve for future reference once we'll be able to properly refuse to suggest anythin

Re: [PATCH 0/2] virsh: Fix fallback code path for vcpuinfo

2021-09-20 Thread Ján Tomko
On a Wednesday in 2021, Peter Krempa wrote: Peter Krempa (2): virshDomainGetVcpuBitmap: Return bitmap when taking the fallback path virshDomainGetVcpuBitmap: Refactor cleanup tools/virsh-domain.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) Reviewed-by: Ján Tomko J

Re: [libvirt PATCH] gitlab: remove obsolete job rules for TEMPORARILY_DISABLED variable

2021-09-20 Thread Jiri Denemark
On Mon, Sep 20, 2021 at 13:41:07 +0100, Daniel P. Berrangé wrote: > We previously had a 'rules:' entry that caused a job to be skipped if > the variable "TEMPORARILY_DISABLED" was set. This is no longer needed > since we can set a similar flag in ci/manifest.yml and re-generate > to temporarily ski

[libvirt PATCH] gitlab: remove obsolete job rules for TEMPORARILY_DISABLED variable

2021-09-20 Thread Daniel P . Berrangé
We previously had a 'rules:' entry that caused a job to be skipped if the variable "TEMPORARILY_DISABLED" was set. This is no longer needed since we can set a similar flag in ci/manifest.yml and re-generate to temporarily skip a job. Unfortunately the 'rules:' entry had an unexpected side-effect o

[PATCH 1/2] selinux: Swap two blocks handling setfilecon_raw() failure

2021-09-20 Thread Michal Privoznik
In virSecuritySELinuxSetFileconImpl() we have code that handles setfilecon_raw() failure. The code consists of two blocks: one for dealing with shared filesystem like NFS (errno is ENOTSUP or EROFS) and the other block that's dealing with EPERM for privileged daemon. Well, the order of these two bl

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

2021-09-20 Thread Michal Privoznik
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 whether failure is fatal or not. But there is a bug: depending on SELinux mode (Permissive vs. E

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

2021-09-20 Thread Michal Privoznik
See 2/2 for explanation. Michal Prívozník (2): selinux: Swap two blocks handling setfilecon_raw() failure selinux: Don't ignore ENOENT in Permissive mode src/security/security_selinux.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) -- 2.32.0

Re: [PATCH RFC 1/5] qapi: Enable enum member introspection to show more than name

2021-09-20 Thread Peter Krempa
On Mon, Sep 20, 2021 at 11:08:59 +0200, Markus Armbruster wrote: > Peter Krempa writes: > > > On Wed, Sep 15, 2021 at 21:24:21 +0200, Markus Armbruster wrote: > >> The next commit will add feature flags to enum members. There's a > >> problem, though: query-qmp-schema shows an enum type's member

Re: [PATCH RFC 1/5] qapi: Enable enum member introspection to show more than name

2021-09-20 Thread Markus Armbruster
Peter Krempa writes: > On Wed, Sep 15, 2021 at 21:24:21 +0200, Markus Armbruster wrote: >> The next commit will add feature flags to enum members. There's a >> problem, though: query-qmp-schema shows an enum type's members as an >> array of member names (SchemaInfoEnum member @values). If it sh

Re: [PATCH RFC 1/5] qapi: Enable enum member introspection to show more than name

2021-09-20 Thread Markus Armbruster
Eric Blake writes: > On Wed, Sep 15, 2021 at 09:24:21PM +0200, Markus Armbruster wrote: >> The next commit will add feature flags to enum members. There's a >> problem, though: query-qmp-schema shows an enum type's members as an >> array of member names (SchemaInfoEnum member @values). If it sh

Re: [PATCH] tools: virsh-snapshot: refactor small functions

2021-09-20 Thread Peter Krempa
On Mon, Sep 20, 2021 at 09:36:25 +0200, Michal Prívozník wrote: > On 9/17/21 3:23 PM, Kristina Hanicova wrote: > > This patch includes: > > * removal of dead code > > * simplifying nested if conditions > > * removal of unnecessary variables > > * usage of "direct" boolean return > > > > Signed-off

Re: [PATCH] tools: virsh-snapshot: refactor small functions

2021-09-20 Thread Michal Prívozník
On 9/17/21 3:23 PM, Kristina Hanicova wrote: > This patch includes: > * removal of dead code > * simplifying nested if conditions > * removal of unnecessary variables > * usage of "direct" boolean return > > Signed-off-by: Kristina Hanicova > --- > tools/virsh-snapshot.c | 43 +++