Re: [PATCH 3/3] qemu: Add support for virtio device option paeg-per-vq

2021-09-17 Thread Jonathon Jongsma
On Thu, Sep 9, 2021 at 6:51 AM Michal Prívozník wrote: > > On 9/6/21 4:06 PM, Han Han wrote: > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1925363 > > > > Signed-off-by: Han Han > > --- > > src/qemu/qemu_command.c | 4 ++ > > src/qemu/qemu_hotplug.c

Re: [PATCH 2/3] conf: Add page_per_vq for driver element

2021-09-17 Thread Jonathon Jongsma
On Mon, Sep 6, 2021 at 9:07 AM Han Han wrote: > > Signed-off-by: Han Han > --- > docs/formatdomain.rst | 9 + > docs/schemas/domaincommon.rng | 5 + > src/conf/domain_conf.c| 16 > src/conf/domain_conf.h| 1 + > src/conf/domain_validate.c

Re: [libvirt PATCH 2/2] conf: log error on attempts to modify ACPI index of active device

2021-09-17 Thread Laine Stump
On 9/17/21 3:22 AM, Peter Krempa wrote: On Thu, Sep 16, 2021 at 21:16:03 -0400, Laine Stump wrote: On 9/13/21 11:38 AM, Peter Krempa wrote: On Fri, Sep 10, 2021 at 11:18:20 -0400, Laine Stump wrote: On 9/10/21 3:30 AM, Peter Krempa wrote: On Thu, Sep 09, 2021 at 13:46:41 -0400, Laine Stump

Re: [libvirt PATCH 0/3] Reduce stack frame size of virNWFilterRuleDefFixup

2021-09-17 Thread Tim Wiederhake
On Fri, 2021-09-17 at 15:03 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 17, 2021 at 03:37:28PM +0200, Tim Wiederhake wrote: > > On Fri, 2021-09-17 at 14:10 +0100, Daniel P. Berrangé wrote: > > > On Fri, Sep 17, 2021 at 02:58:08PM +0200, Tim Wiederhake wrote: > > > > When libvirt is build with

Re: [PATCH RFC 2/5] qapi: Add feature flags to enum members

2021-09-17 Thread Peter Krempa
On Wed, Sep 15, 2021 at 21:24:22 +0200, Markus Armbruster wrote: > This is quite similar to commit 84ab008687 "qapi: Add feature flags to > struct members", only for enums instead of structs. For now in libvirt I've implemented the validator for the 'deprecated' flag:

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

2021-09-17 Thread Peter Krempa
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 showed > an array of objects

Re: [PATCH RFC 3/5] qapi: Move compat policy from QObject to generic visitor

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 09:24:23PM +0200, Markus Armbruster wrote: > The next commit needs to access compat policy from the generic visitor > core. Move it there from qobject input and output visitor. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -- Eric Blake,

Re: [PATCH RFC 2/5] qapi: Add feature flags to enum members

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 09:24:22PM +0200, Markus Armbruster wrote: > This is quite similar to commit 84ab008687 "qapi: Add feature flags to > struct members", only for enums instead of structs. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Eric Blake -- Eric Blake, Principal

Re: [libvirt PATCH 0/3] Reduce stack frame size of virNWFilterRuleDefFixup

2021-09-17 Thread Daniel P . Berrangé
On Fri, Sep 17, 2021 at 03:37:28PM +0200, Tim Wiederhake wrote: > On Fri, 2021-09-17 at 14:10 +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 17, 2021 at 02:58:08PM +0200, Tim Wiederhake wrote: > > > When libvirt is build with sanitizers enabled, in debug mode, on > > > clang, > > >

Re: [libvirt PATCH 1/3] virNWFilterRuleDefFixup: Factor out ethHdr as variable

2021-09-17 Thread Daniel P . Berrangé
On Fri, Sep 17, 2021 at 03:37:25PM +0200, Tim Wiederhake wrote: > On Fri, 2021-09-17 at 14:08 +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 17, 2021 at 02:58:09PM +0200, Tim Wiederhake wrote: > > > This helps to bring down the frame size of virNWFilterRuleDefFixup, > > > as it > > > exceeds

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

2021-09-17 Thread Eric Blake
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 showed > an array of

Re: [libvirt PATCH 1/3] virNWFilterRuleDefFixup: Factor out ethHdr as variable

2021-09-17 Thread Tim Wiederhake
On Fri, 2021-09-17 at 14:08 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 17, 2021 at 02:58:09PM +0200, Tim Wiederhake wrote: > > This helps to bring down the frame size of virNWFilterRuleDefFixup, > > as it > > exceeds 8192 bytes when libvirt is build with sanitizers enabled, > > in debug > >

[PATCH v2] virsh: Add QMP command wrapping for 'qemu-monitor-command'

2021-09-17 Thread Peter Krempa
Issuing simple QMP commands is pain as they need to be wrapped by the JSON wrapper: { "execute": "COMMAND" } and optionally also: { "execute": "COMMAND", "arguments":...} For simple commands without arguments we can add syntax sugar to virsh which allows simple usage of QMP and additionally

Re: [libvirt PATCH 0/3] Reduce stack frame size of virNWFilterRuleDefFixup

2021-09-17 Thread Tim Wiederhake
On Fri, 2021-09-17 at 14:10 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 17, 2021 at 02:58:08PM +0200, Tim Wiederhake wrote: > > When libvirt is build with sanitizers enabled, in debug mode, on > > clang, > > virNWFilterRuleDefFixup exceeds the maximum stack frame size of > > 8192 bytes, > > as

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

2021-09-17 Thread Kristina Hanicova
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 +++--- 1 file changed, 15 insertions(+), 28

Re: [libvirt PATCH 0/3] Reduce stack frame size of virNWFilterRuleDefFixup

2021-09-17 Thread Daniel P . Berrangé
On Fri, Sep 17, 2021 at 02:58:08PM +0200, Tim Wiederhake wrote: > When libvirt is build with sanitizers enabled, in debug mode, on clang, > virNWFilterRuleDefFixup exceeds the maximum stack frame size of 8192 bytes, > as specified in meson.build: > > ../src/conf/nwfilter_conf.c:2190:1: error:

Re: [libvirt PATCH 1/3] virNWFilterRuleDefFixup: Factor out ethHdr as variable

2021-09-17 Thread Daniel P . Berrangé
On Fri, Sep 17, 2021 at 02:58:09PM +0200, Tim Wiederhake wrote: > This helps to bring down the frame size of virNWFilterRuleDefFixup, as it > exceeds 8192 bytes when libvirt is build with sanitizers enabled, in debug > mode, on clang. > > Signed-off-by: Tim Wiederhake > --- >

[libvirt PATCH 3/3] virNWFilterRuleDefFixup: Factor out portData as variable

2021-09-17 Thread Tim Wiederhake
This helps to bring down the frame size of virNWFilterRuleDefFixup, as it exceeds 8192 bytes when libvirt is build with sanitizers enabled, in debug mode, on clang. Signed-off-by: Tim Wiederhake --- src/conf/nwfilter_conf.c | 31 +-- 1 file changed, 13 insertions(+),

[libvirt PATCH 2/3] virNWFilterRuleDefFixup: Factor out ipHdr as variable

2021-09-17 Thread Tim Wiederhake
This helps to bring down the frame size of virNWFilterRuleDefFixup, as it exceeds 8192 bytes when libvirt is build with sanitizers enabled, in debug mode, on clang. Signed-off-by: Tim Wiederhake --- src/conf/nwfilter_conf.c | 132 +++ 1 file changed, 52

[libvirt PATCH 1/3] virNWFilterRuleDefFixup: Factor out ethHdr as variable

2021-09-17 Thread Tim Wiederhake
This helps to bring down the frame size of virNWFilterRuleDefFixup, as it exceeds 8192 bytes when libvirt is build with sanitizers enabled, in debug mode, on clang. Signed-off-by: Tim Wiederhake --- src/conf/nwfilter_conf.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[libvirt PATCH 0/3] Reduce stack frame size of virNWFilterRuleDefFixup

2021-09-17 Thread Tim Wiederhake
When libvirt is build with sanitizers enabled, in debug mode, on clang, virNWFilterRuleDefFixup exceeds the maximum stack frame size of 8192 bytes, as specified in meson.build: ../src/conf/nwfilter_conf.c:2190:1: error: stack frame size of 10616 bytes in function 'virNWFilterRuleDefFixup'

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

2021-09-17 Thread David Hildenbrand
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 the code to put virtio memory on PCI bus, generating alias

Re: [libvirt PATCH v3 1/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Dmitrii Shcherbakov
Hi Peter, Thanks for the quick reply. > This is a quick note, not a full review Ack, appreciate the early feedback. > it can be properly split into multiple smaller chunks I will look into splitting it into parts related to the binary parser, XML handling and docs at least. There are some

Re: [libvirt PATCH] Fix typos

2021-09-17 Thread Erik Skultety
On Fri, Sep 17, 2021 at 01:07:02PM +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/ch/ch_monitor.c| 2 +- > tests/virstoragetest.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Trivial. Reviewed-by: Erik Skultety

Re: [libvirt PATCH v3 1/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Peter Krempa
On Fri, Sep 17, 2021 at 13:54:49 +0300, Dmitrii Shcherbakov wrote: > Add support for deserializing the binary PCI/PCIe VPD format and > exposing VPD resources as XML elements in a new nested capability > of PCI/PCIe devices called 'vpd'. > > The VPD format is specified in "I.3. VPD Definitions"

Re: [PATCH 00/14] virsh: Completion improvements and checking tool

2021-09-17 Thread Daniel P . Berrangé
On Fri, Sep 17, 2021 at 11:19:46AM +0200, Peter Krempa wrote: > On Fri, Sep 17, 2021 at 09:27:15 +0100, Daniel P. Berrangé wrote: > > On Thu, Sep 16, 2021 at 07:10:31PM +0200, Peter Krempa wrote: > > > When inspecting whether https://gitlab.com/libvirt/libvirt/-/issues/9 is > > > still valid I

Re: [PATCH 00/14] virsh: Completion improvements and checking tool

2021-09-17 Thread Daniel P . Berrangé
On Thu, Sep 16, 2021 at 07:10:31PM +0200, Peter Krempa wrote: > When inspecting whether https://gitlab.com/libvirt/libvirt/-/issues/9 is > still valid I wrote a tool which outputs command options missing > completers. Now that I had a bit of time with lot of interruptions which > is ideal for

[PATCH 3/4] vsh: Extend checks for aliased commands

2021-09-17 Thread Michal Privoznik
If a command is an alias, then it can only have .name, .flags and .alias set and .flags should contain just VSH_CMD_FLAG_ALIAS. Check if that's the case in self-test. Signed-off-by: Michal Privoznik --- tools/vsh.c | 20 1 file changed, 20 insertions(+) diff --git

[PATCH 2/4] virsh: Provide local path completer for vol-download --file

2021-09-17 Thread Michal Privoznik
The vol-download command takes mandatory --file argument which points to a local (possibly non-existent) path. If the file exists then it's overwritten. Set the argument's completer so that self-test doesn't report it as missing. Signed-off-by: Michal Privoznik --- tools/virsh-volume.c | 6

[PATCH 0/4] virsh: Follow up improvements

2021-09-17 Thread Michal Privoznik
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 commands vsh: Ensure that bool --options don't

[libvirt PATCH] Fix typos

2021-09-17 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/ch/ch_monitor.c| 2 +- tests/virstoragetest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 4ed7cbfee7..d277466262 100644 --- a/src/ch/ch_monitor.c +++ b/src/ch/ch_monitor.c @@

Re: [PATCH 00/14] virsh: Completion improvements and checking tool

2021-09-17 Thread Peter Krempa
On Fri, Sep 17, 2021 at 09:27:15 +0100, Daniel P. Berrangé wrote: > On Thu, Sep 16, 2021 at 07:10:31PM +0200, Peter Krempa wrote: > > When inspecting whether https://gitlab.com/libvirt/libvirt/-/issues/9 is > > still valid I wrote a tool which outputs command options missing > > completers. Now

[PATCH 1/4] virsh: Provide local path completer for screenshot --file

2021-09-17 Thread Michal Privoznik
The screenshot command takes optional --file argument which can point to an existing local path (in which case the file is overwritten). Set the argument's completer so that self-test doesn't report it as missing. Signed-off-by: Michal Privoznik --- tools/virsh-domain.c | 1 + 1 file changed, 1

[libvirt PATCH v3 1/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Dmitrii Shcherbakov
Add support for deserializing the binary PCI/PCIe VPD format and exposing VPD resources as XML elements in a new nested capability of PCI/PCIe devices called 'vpd'. The VPD format is specified in "I.3. VPD Definitions" in PCI specs (2.2+) and "6.28.1 VPD Format" PCIe 4.0. As section 6.28 in PCIe

[libvirt PATCH v3 0/1] Add a PCI/PCIe device VPD Capability

2021-09-17 Thread Dmitrii Shcherbakov
Add support for deserializing the binary PCI/PCIe VPD format and exposing VPD resources as XML elements in a new nested capability of PCI/PCIe devices called 'vpd'. The VPD format is specified in "I.3. VPD Definitions" in PCI specs (2.2+) and "6.28.1 VPD Format" PCIe 4.0. As section 6.28 in PCIe

[PATCH] vsh: Move 'vshReadlineOptionsGenerator' out of '#if WITH_READLINE'

2021-09-17 Thread Peter Krempa
It's now also used in vshCompleteHelpCommand which is outside of the conditionally compiled code. Fixes: 80f70c74a7 Signed-off-by: Peter Krempa --- Pushed under the build-fix rule. tools/vsh.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/vsh.c

[PATCH 4/4] vsh: Ensure that bool --options don't have completer

2021-09-17 Thread Michal Privoznik
Let's check whether a boolean --option doesn't have completer or completer_flags set. These options are just flags and don't accept any value, thus they can't have any completer. Signed-off-by: Michal Privoznik --- tools/vsh.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-)

Re: [PATCH 10/14] virsh: Expand VIRSH_COMMON_OPT_FILE for cases when it's not a local file used by virsh

2021-09-17 Thread Peter Krempa
On Fri, Sep 17, 2021 at 09:31:11 +0200, Michal Prívozník wrote: > On 9/16/21 7:10 PM, Peter Krempa wrote: > > In cases such as the APIs for managed save management, the file path > > provided via the '--file' option is passed to the API. > > > > We'll need to make them distinct from cases for

Re: [PATCH 05/14] vsh: Introduce '--completers-missing' for 'self-test' command

2021-09-17 Thread Michal Prívozník
On 9/17/21 9:36 AM, Peter Krempa wrote: > On Fri, Sep 17, 2021 at 09:31:13 +0200, Michal Prívozník wrote: >> On 9/16/21 7:10 PM, Peter Krempa wrote: >>> Make it simple to spot which options of which commands are missing >>> autocompletion functions by introducing this hidden option. >>> >>> In the

Re: [PATCH 05/14] vsh: Introduce '--completers-missing' for 'self-test' command

2021-09-17 Thread Peter Krempa
On Fri, Sep 17, 2021 at 09:31:13 +0200, Michal Prívozník wrote: > On 9/16/21 7:10 PM, Peter Krempa wrote: > > Make it simple to spot which options of which commands are missing > > autocompletion functions by introducing this hidden option. > > > > In the future when we'll have completers for

Re: [PATCH 00/14] virsh: Completion improvements and checking tool

2021-09-17 Thread Michal Prívozník
On 9/16/21 7:10 PM, Peter Krempa wrote: > When inspecting whether https://gitlab.com/libvirt/libvirt/-/issues/9 is > still valid I wrote a tool which outputs command options missing > completers. Now that I had a bit of time with lot of interruptions which > is ideal for going through such a thing

Re: [PATCH 05/14] vsh: Introduce '--completers-missing' for 'self-test' command

2021-09-17 Thread Michal Prívozník
On 9/16/21 7:10 PM, Peter Krempa wrote: > Make it simple to spot which options of which commands are missing > autocompletion functions by introducing this hidden option. > > In the future when we'll have completers for everything this can be also > used as a hard fail so that completers are

Re: [PATCH 10/14] virsh: Expand VIRSH_COMMON_OPT_FILE for cases when it's not a local file used by virsh

2021-09-17 Thread Michal Prívozník
On 9/16/21 7:10 PM, Peter Krempa wrote: > In cases such as the APIs for managed save management, the file path > provided via the '--file' option is passed to the API. > > We'll need to make them distinct from cases for when virsh is using the > file so that different completers can be used. > >

Re: [libvirt PATCH 2/2] conf: log error on attempts to modify ACPI index of active device

2021-09-17 Thread Peter Krempa
On Thu, Sep 16, 2021 at 21:16:03 -0400, Laine Stump wrote: > On 9/13/21 11:38 AM, Peter Krempa wrote: > > On Fri, Sep 10, 2021 at 11:18:20 -0400, Laine Stump wrote: > > > On 9/10/21 3:30 AM, Peter Krempa wrote: > > > > On Thu, Sep 09, 2021 at 13:46:41 -0400, Laine Stump wrote: Look, my problem is