Re: [libvirt PATCH 0/9] qemu: report guest disks informations

2020-11-30 Thread Marc-André Lureau
Hi On Mon, Nov 30, 2020 at 11:16 PM Michal Privoznik wrote: > > On 11/20/20 7:09 PM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Hi, > > > > The following series extends virDomainGetGuestInfo to report disk > > informations > > provided by the new QGA

Re: [libvirt PATCH 9/9] virsh: add --disk informations to guestinfo command

2020-11-30 Thread Marc-André Lureau
Hi On Mon, Nov 30, 2020 at 11:16 PM Michal Privoznik wrote: > > On 11/20/20 7:09 PM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Signed-off-by: Marc-André Lureau > > --- > > tools/virsh-domain.c | 6 ++ > > 1 file changed, 6 insertions(+) > > Missing manpage

Re: [libvirt PATCH 5/9] qemu: use virJSONValueObjectGetStringArray

2020-11-30 Thread Marc-André Lureau
On Mon, Nov 30, 2020 at 11:16 PM Michal Privoznik wrote: > > On 11/20/20 7:09 PM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > There might be more potential users around, I haven't looked thoroughly. > > > Quick git grep showed two more: qemuAgentSSHGetAuthorizedKeys()

[PATCH v2 0/2] gitlab: Add issue templates

2020-11-30 Thread Peter Krempa
Gitlab allows projects to define templates for filing issues [1]. Libvirt didn't have them yet. We can use them to encourage users to file better bug reports and feature requests. Differences to v1: - dropped bug-qemu.md template - vastly shortened comment blocks - all comments are single line

[PATCH v2 1/2] gitlab: Add issue template for reporting a generic bug

2020-11-30 Thread Peter Krempa
When reporting an issue in gitlab, the project can define a template for various scenarios which are meant to guide the users to add the relevant information the project needs to the reported issue. Add a template for a generic bug report against libvirt. The template adds sections which motivate

[PATCH v2 2/2] gitlab: Add issue template for a feature request

2020-11-30 Thread Peter Krempa
Try to motivate the users to describe what they want to achieve before diving down into technical specifics. Signed-off-by: Peter Krempa --- .gitlab/issue_templates/feature.md | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 .gitlab/issue_templates/feature.md diff

[PATCH] polkit: Allow libvirt group access to libvirtd ro socket

2020-11-30 Thread Jim Fehlig
As a normal user, 'virsh connect qemu:///system' and 'virsh connect --readonly qemu:///system' will prompt for root password. If the user is added to the libvirt group, only 'virsh connect --readonly qemu:///system' will prompt for root password. The libvirt polkit rules already allow libvirt

Re: [PATCH] polkit: Allow libvirt group access to libvirtd ro socket

2020-11-30 Thread Neal Gompa
On Mon, Nov 30, 2020 at 7:29 PM Jim Fehlig wrote: > > As a normal user, 'virsh connect qemu:///system' and > 'virsh connect --readonly qemu:///system' will prompt for root password. > If the user is added to the libvirt group, only > 'virsh connect --readonly qemu:///system' will prompt for root

RE: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares

2020-11-30 Thread Tuguoyi
> -Original Message- > From: Ján Tomko [mailto:jto...@redhat.com] > Sent: Tuesday, November 24, 2020 6:57 PM > To: tuguoyi (Cloud) > Cc: libvir-list@redhat.com > Subject: Re: [PATCH] qemu_conf: Fix double free problem for cfg->firmwares > > On a Tuesday in 2020, Tuguoyi wrote: >

Re: [PATCH for 7.0.0 v1 00/26] Introduce virtio memory support

2020-11-30 Thread Daniel Henrique Barboza
On 11/27/20 12:02 PM, Michal Privoznik wrote: Available also here: https://gitlab.com/MichalPrivoznik/libvirt/-/commits/virtio_mem/ There are new virtio variants of pc-dimm and nvdimm devices. This is the first attempt to impalement support for them in libvirt. Thanks to David Hildenbrand

Re: [PATCH v1 23/26] qemu: Wire up MEMORY_DEVICE_SIZE_CHANGE event

2020-11-30 Thread Daniel Henrique Barboza
On 11/27/20 12:03 PM, Michal Privoznik wrote: 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

Re: [PATCH v1 22/26] qemu: Wire up live update

2020-11-30 Thread Daniel Henrique Barboza
On 11/27/20 12:03 PM, Michal Privoznik wrote: As advertised in the previous commit, we want' to be able to Extra ' after "want". Reviewed-by: Daniel Henrique Barboza change 'requested-size' attribute of virtio-mem on the fly. This commit does exactly that. Changing anything else is

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Paolo Bonzini
On 30/11/20 19:10, Kevin Wolf wrote: Am 30.11.2020 um 17:57 hat Paolo Bonzini geschrieben: The main problem is that it wouldn't extend well, if at all, to machines and devices. So those would still not be integrated into the QAPI schema. What do you think is the biggest difference there?

Re: [PATCH v1 04/26] domain_conf: Check NVDIMM UUID in ABI stability

2020-11-30 Thread Daniel Henrique Barboza
On 11/27/20 12:02 PM, Michal Privoznik wrote: The UUID is guest visible and thus shouldn't change if we want to not break guest ABI. Fixes: 08ed673901bb5b4f419b37bcce9b11d31ce370e6 Thanks for fixing this up. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Michal Privoznik ---

Re: [libvirt PATCH 0/9] qemu: report guest disks informations

2020-11-30 Thread Michal Privoznik
On 11/20/20 7:09 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, The following series extends virDomainGetGuestInfo to report disk informations provided by the new QGA "guest-get-disks" command in QEMU 5.2. Please review, Fixes:

Re: [libvirt PATCH 5/9] qemu: use virJSONValueObjectGetStringArray

2020-11-30 Thread Michal Privoznik
On 11/20/20 7:09 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau There might be more potential users around, I haven't looked thoroughly. Quick git grep showed two more: qemuAgentSSHGetAuthorizedKeys() and qemuMonitorJSONGetStringListProperty(). But that can be done in a

Re: [libvirt PATCH 9/9] virsh: add --disk informations to guestinfo command

2020-11-30 Thread Michal Privoznik
On 11/20/20 7:09 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tools/virsh-domain.c | 6 ++ 1 file changed, 6 insertions(+) Missing manpage addition. How about: diff --git i/docs/manpages/virsh.rst w/docs/manpages/virsh.rst index

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Peter Krempa
On Mon, Nov 30, 2020 at 13:25:20 +0100, Kevin Wolf wrote: > This series adds a QAPI type for the properties of all user creatable > QOM types and finally makes QMP object-add use the new ObjectOptions > union so that QAPI introspection can be used for user creatable objects. FYI, here's a libvirt

[PATCH 17/24] tests: qemuxml2argv: Validate generation of JSON props for object-add

2020-11-30 Thread Peter Krempa
Similarly to the validation for blockdev-add and netdev_add, use the qemuxml2argv test repository to drive validation of props for object-add. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 20 1 file changed, 20 insertions(+) diff --git

[PATCH 13/24] qemu: command: Generate commandline of 'masterKey0' secret via JSON

2020-11-30 Thread Peter Krempa
While the 'masterKey0' secret object will never be hotplugged we want to generate it through JSON so that we'll be able to validate all parameters of '-object' against the QAPI schema once 'object-add' is qapified in qemu. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 12

[PATCH 20/24] qemuMonitorCreateObjectPropsWrap: Open-code in qemuBuildMemoryBackendProps

2020-11-30 Thread Peter Krempa
There's just one caller left. Since qemuBuildMemoryBackendProps is too complex to be modified for now, just move the adding of 'id' and 'qom' type directly into the function. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 6 -- src/qemu/qemu_monitor.c | 15 ---

[PATCH 24/24] [DONTMERGE] qemuxml2argvtest: Force QMP validation with latest caps

2020-11-30 Thread Peter Krempa
Note that it's expected that the 'vxhs' and 'sev-guest' test cases fail as this overrides just the QMP schema but not the qemu capabilities which result in enabling the features that are missing. --- tests/qemuxml2argvtest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 22/24] qemumonitorjsontest: Remove bomb guarding object-add

2020-11-30 Thread Peter Krempa
Libvirt is now prepared for QAPIfied object-add. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 5a3926bb11..47c909fd7a 100644 ---

[PATCH 21/24] qemu: monitor: Don't add 'props' wrapper if qemu has QEMU_CAPS_OBJECT_QAPIFIED

2020-11-30 Thread Peter Krempa
Set 'objectAddNoWrap' when the capability is present. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index e0eee3ce9e..145c03413f 100644 --- a/src/qemu/qemu_monitor.c +++

[PATCH 19/24] qemu: monitor: Make wrapping of 'props' of 'object-add' optional

2020-11-30 Thread Peter Krempa
Construct the JSON object which is used for object-add without the 'props' wrapper and add the wrapper only in the monitor code. This simplifies the JSON->commandline generator in the first place and also prepares for upcoming qemu where 'props' will be removed. Signed-off-by: Peter Krempa ---

[PATCH 16/24] qemu: capabilities: Introduce QEMU_CAPS_OBJECT_QAPIFIED

2020-11-30 Thread Peter Krempa
Starting from qemu-6.0 the parameters of -object/object-add are formally described by the QAPI schema. Additionally this changes the nesting of the properties as the 'props' nested object will be flattened to the parent. We'll need to detect whether qemu switched to this new approach to generate

[PATCH 09/24] util: json: Replace virJSONValueObjectSteal by virJSONValueObjectRemoveKey

2020-11-30 Thread Peter Krempa
virJSONValueObjectRemoveKey can be used as direct replacement. Fix the one caller and remove the duplicate function. Signed-off-by: Peter Krempa --- src/util/virjson.c | 29 - 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/util/virjson.c

[PATCH 10/24] tests: qemuxml2argv: Don't check whether -netdev was QAPIfied repeatedly

2020-11-30 Thread Peter Krempa
Check once before looping through the args. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 42d147243e..ae8eaa7768 100644 ---

[PATCH 18/24] qemu: command: Introduce raw JSON passthrough for '-object' for testing

2020-11-30 Thread Peter Krempa
The qemu commandline builder's QEMU_BUILD_COMMANDLINE_VALIDATE_KEEP_JSON flag disables JSON->commandline conversion so that our qemuxml2argvtest can use the commandline test repostitory for validating our JSON props generators which are in many cases used on the montitor where we need to conform

[PATCH 15/24] qemu: command: Generate commandline of iothread objects JSON

2020-11-30 Thread Peter Krempa
The commandline generator for 'iothread' objects has a private implementation of the properties. Convert it to JSON so that it can be later validated. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git

[PATCH 08/24] qemuMonitorAddObject: Refactor cleanup

2020-11-30 Thread Peter Krempa
Remove freeing/clearing of @props as the function doesn't guarantee that it happens on success, rename the variable hodling copy of the alias and use g_autofree to automatically free it and remove the cleanup label as well as 'ret' variable. Signed-off-by: Peter Krempa ---

[PATCH 07/24] qemuMonitorAddObject: Fix semantics of @alias

2020-11-30 Thread Peter Krempa
The callers of qemuMonitorAddObject rely on the fact that @alias is filled only when the object is added successfully. This is documented but the code didn't behave like that. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH 11/24] qemuBuildChrChardevStr: Rename 'flags' to 'cdevflags'

2020-11-30 Thread Peter Krempa
The monitor code uses 'flags' for the flags of the monitor builder, while in this function it's a different set of flags. All callers pass a variable named 'cdevflags', so rename the argument to suit. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 10 +- 1 file changed, 5

[PATCH 14/24] qemu: command: Generate commandline of 'sev0' sev-guest object via JSON

2020-11-30 Thread Peter Krempa
While the 'sev0' sev-guest object will never be hotplugged, but we want to generate it through JSON so that we'll be able to validate all parameters of '-object' against the QAPI schema once 'object-add' is qapified in qemu. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c

[PATCH 04/24] testQemuMonitorJSONqemuMonitorJSONGetMigrationCapabilities: refactor cleanup

2020-11-30 Thread Peter Krempa
Use automatic memory freeing to remove the 'cleanup:' label and 'ret' variable. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c

[PATCH 06/24] qemuMonitorJSONMakeCommandInternal: Clear @arguments when stolen

2020-11-30 Thread Peter Krempa
All callers of qemuMonitorJSONMakeCommandInternal will benefit from making @arguments a double pointer and passing it to virJSONValueObjectCreate directly which will clear it if it steals the value. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 32

[PATCH 05/24] qemuMonitorJSONAddObject: Take double pointer for @props

2020-11-30 Thread Peter Krempa
Prepare for a refactor of qemuMonitorJSONMakeCommandInternal. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 3 +-- src/qemu/qemu_monitor_json.c | 5 +++-- src/qemu/qemu_monitor_json.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_monitor.c

[PATCH 12/24] testCompareXMLToArgvValidateSchema: Populate autoNodeset

2020-11-30 Thread Peter Krempa
We create a new 'vm' so we must also fake the nodeset. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ae8eaa7768..225cb70edf 100644 --- a/tests/qemuxml2argvtest.c +++

[PATCH 01/24] qemuMonitorJSONSetMigrationParams: Take double pointer for @params

2020-11-30 Thread Peter Krempa
This allows simplification of the caller as well as will enable a later refactor of qemuMonitorJSONMakeCommandInternal. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_params.c | 9 +++-- src/qemu/qemu_monitor.c | 11 +++ src/qemu/qemu_monitor.h | 2 +-

[PATCH 03/24] qemuMonitorJSONSetMigrationCapabilities: Refactor cleanup

2020-11-30 Thread Peter Krempa
Use automatic memory freeing and remove the 'cleanup' label and 'ret' variable. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c

[PATCH 00/24] qemu: Prepare for QAPIfied 'object-add'

2020-11-30 Thread Peter Krempa
Prepare libvirt for the changes proposed for qemu: https://www.redhat.com/archives/libvir-list/2020-November/msg01580.html Patches 1-12/24 are pure refactors and can be merged right away. Patches 13-15/24 can be merged, but the justification will be weak without the rest. Patches 16-22/24 are

[PATCH 02/24] qemuMonitorSetMigrationCapabilities: Take double pointer for @caps

2020-11-30 Thread Peter Krempa
This allows simplification of the callers. Signed-off-by: Peter Krempa --- src/qemu/qemu_migration_params.c | 13 - src/qemu/qemu_monitor.c | 11 +++ src/qemu/qemu_monitor.h | 2 +- src/qemu/qemu_monitor_json.c | 5 ++--- src/qemu/qemu_monitor_json.h

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Kevin Wolf
Am 30.11.2020 um 17:57 hat Paolo Bonzini geschrieben: > On 30/11/20 16:46, Kevin Wolf wrote: > > Am 30.11.2020 um 15:58 hat Paolo Bonzini geschrieben: > > > With this series it's basically pointless to have QOM properties at > > > all. > > > > Not entirely, because there are still some writable

Re: [PATCH 0/3] qemu: Remove caching in handler for query-command-line-options

2020-11-30 Thread Michal Privoznik
On 11/30/20 6:25 PM, Peter Krempa wrote: Shuffle around where we extract the data, so that we don't have to call the monitor multiple times which necessitates caching. Peter Krempa (3): qemu: monitor: Implement new handlers for 'query-command-line-options' virQEMUCapsProbeQMPCommandLine:

[PATCH 2/3] virQEMUCapsProbeQMPCommandLine: Rewrite using qemuMonitorGetCommandLineOptions

2020-11-30 Thread Peter Krempa
Use the new handler to fetch the required data and do the extraction locally without conversion to string list. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git

[PATCH 0/3] qemu: Remove caching in handler for query-command-line-options

2020-11-30 Thread Peter Krempa
Shuffle around where we extract the data, so that we don't have to call the monitor multiple times which necessitates caching. Peter Krempa (3): qemu: monitor: Implement new handlers for 'query-command-line-options' virQEMUCapsProbeQMPCommandLine: Rewrite using

[PATCH 1/3] qemu: monitor: Implement new handlers for 'query-command-line-options'

2020-11-30 Thread Peter Krempa
Add a new set hander for getting the data for 'query-command-line-options' which returns everything at once and lets the caller extract the data. This way we don't need to cache the output of the monitor command for repeated calls. Note that we will have enough testing of this code path via

[PATCH 3/3] qemuMonitorGetCommandLineOptionParameters: remove the unused function and helpers

2020-11-30 Thread Peter Krempa
Remove the function along with helpers for caching the reply and tests. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 35 -- src/qemu/qemu_monitor.h | 8 --- src/qemu/qemu_monitor_json.c | 120 --- src/qemu/qemu_monitor_json.h |

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Paolo Bonzini
On 30/11/20 16:46, Kevin Wolf wrote: Am 30.11.2020 um 15:58 hat Paolo Bonzini geschrieben: With this series it's basically pointless to have QOM properties at all. Not entirely, because there are still some writable properties that can be changed later on. Are there really any (that are not

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Daniel P . Berrangé
On Mon, Nov 30, 2020 at 05:13:57PM +0100, Kevin Wolf wrote: > Am 30.11.2020 um 16:30 hat Daniel P. Berrangé geschrieben: > > On Mon, Nov 30, 2020 at 03:58:23PM +0100, Paolo Bonzini wrote: > > > On 30/11/20 13:25, Kevin Wolf wrote: > > > > This series adds a QAPI type for the properties of all

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Paolo Bonzini
On 30/11/20 16:30, Daniel P. Berrangé wrote: { 'struct': 'QCryptoSecretCommon', 'base': 'Object', 'state': { 'rawdata': '*uint8_t', 'rawlen': 'size_t' }, 'data': { '*format': 'QCryptoSecretFormat', '*keyid': 'str', '*iv': 'str' } } { 'struct':

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Kevin Wolf
Am 30.11.2020 um 16:30 hat Daniel P. Berrangé geschrieben: > On Mon, Nov 30, 2020 at 03:58:23PM +0100, Paolo Bonzini wrote: > > On 30/11/20 13:25, Kevin Wolf wrote: > > > This series adds a QAPI type for the properties of all user creatable > > > QOM types and finally makes QMP object-add use the

Re: [PATCH for-6.0 6/6] qapi: Deprecate 'query-kvm'

2020-11-30 Thread Markus Armbruster
Peter Krempa writes: > On Mon, Nov 30, 2020 at 10:21:08 +0100, Markus Armbruster wrote: >> Peter Krempa writes: >> >> > On Fri, Nov 27, 2020 at 16:44:05 +0100, Markus Armbruster wrote: >> >> Peter Krempa writes: > > [...] > >> > I know it's hard to enforce, but probably the cheapest in terms

Re: [PATCH 01/18] qapi/qom: Add ObjectOptions for iothread

2020-11-30 Thread Kevin Wolf
Am 30.11.2020 um 16:00 hat Paolo Bonzini geschrieben: > On 30/11/20 13:25, Kevin Wolf wrote: > > +## > > +# @IothreadProperties: > > +# > > +# Properties for iothread objects. > > +# > > +# @poll-max-ns: the maximum number of nanoseconds to busy wait for events. > > +# 0 means

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Kevin Wolf
Am 30.11.2020 um 15:58 hat Paolo Bonzini geschrieben: > On 30/11/20 13:25, Kevin Wolf wrote: > > This series adds a QAPI type for the properties of all user creatable > > QOM types and finally makes QMP object-add use the new ObjectOptions > > union so that QAPI introspection can be used for user

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Daniel P . Berrangé
On Mon, Nov 30, 2020 at 03:58:23PM +0100, Paolo Bonzini wrote: > On 30/11/20 13:25, Kevin Wolf wrote: > > This series adds a QAPI type for the properties of all user creatable > > QOM types and finally makes QMP object-add use the new ObjectOptions > > union so that QAPI introspection can be used

Re: [PATCH for-6.0 6/6] qapi: Deprecate 'query-kvm'

2020-11-30 Thread Eric Blake
On 11/27/20 10:30 AM, Peter Krempa wrote: > On Fri, Nov 27, 2020 at 16:44:05 +0100, Markus Armbruster wrote: >> Peter Krempa writes: >> >>> On Fri, Nov 27, 2020 at 14:45:12 +0300, Roman Bolshakov wrote: On Fri, Nov 27, 2020 at 12:21:54PM +0100, Peter Krempa wrote: > > [...] > >>> As you

Re: [PATCH 01/18] qapi/qom: Add ObjectOptions for iothread

2020-11-30 Thread Paolo Bonzini
On 30/11/20 13:25, Kevin Wolf wrote: +## +# @IothreadProperties: +# +# Properties for iothread objects. +# +# @poll-max-ns: the maximum number of nanoseconds to busy wait for events. +# 0 means polling is disabled (default: 32768 on POSIX hosts, +# 0 otherwise) +# +#

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Paolo Bonzini
On 30/11/20 13:25, Kevin Wolf wrote: This series adds a QAPI type for the properties of all user creatable QOM types and finally makes QMP object-add use the new ObjectOptions union so that QAPI introspection can be used for user creatable objects. After this series, there is least one obvious

Re: [PATCH libvirt v3 03/11] nodedev: detect AP queues

2020-11-30 Thread Erik Skultety
On Tue, Nov 17, 2020 at 01:10:57PM +0100, Shalini Chellathurai Saroja wrote: > Each AP card device can support upto 256 AP queues. AP queues are > also detected by udev, so add support for libvirt nodedev driver. > > Signed-off-by: Farhan Ali > Signed-off-by: Shalini Chellathurai Saroja >

Re: [PATCH libvirt v3 01/11] nodedev: detect AP card device

2020-11-30 Thread Erik Skultety
On Tue, Nov 17, 2020 at 01:10:55PM +0100, Shalini Chellathurai Saroja wrote: > Introduce support for the Adjunct Processor (AP) crypto card device. > Udev already detects the device, so add support for libvirt nodedev > driver. > > Signed-off-by: Farhan Ali > Signed-off-by: Shalini Chellathurai

Re: [PATCH libvirt v2 06/11] nodedev: detect AP matrix device

2020-11-30 Thread Erik Skultety
On Fri, Nov 13, 2020 at 03:45:33PM +0100, Shalini Chellathurai Saroja wrote: > > On 11/12/20 9:29 PM, Jonathon Jongsma wrote: > > > diff --git a/src/node_device/node_device_udev.c > > > b/src/node_device/node_device_udev.c index 6bbff571..5f57000e 100644 > > > ---

Re: [libvirt PATCH] vircgroupv2: fix virCgroupV2DenyDevice

2020-11-30 Thread Michal Privoznik
On 11/30/20 8:22 AM, Pavel Hrdina wrote: The original logic is incorrect. We would delete the device entry from eBPF map only if the newval would be same as current val in the map. In case that the device was allowed only as read-only but later we remove all permissions for that device it would

Re: [PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Michal Privoznik
On 11/30/20 12:14 PM, Daniel P. Berrangé wrote: On Mon, Nov 30, 2020 at 11:48:28AM +0100, Michal Privoznik wrote: On 11/30/20 11:16 AM, Daniel P. Berrangé wrote: On Mon, Nov 30, 2020 at 11:06:14AM +0100, Michal Privoznik wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894053

Re: Adding an nftables backend in addition to iptables?

2020-11-30 Thread Daniel P . Berrangé
On Sat, Nov 28, 2020 at 04:39:26PM +0100, Aljoscha Lautenbach wrote: > Hi! > > First of all, thanks for your work on libvirt, it is highly appreciated! > > When I wanted to create a new VM using virt-manager on my Debian > Testing machine yesterday, I ran into the following problem: > > ~#

Adding an nftables backend in addition to iptables?

2020-11-30 Thread Aljoscha Lautenbach
Hi! First of all, thanks for your work on libvirt, it is highly appreciated! When I wanted to create a new VM using virt-manager on my Debian Testing machine yesterday, I ran into the following problem: ~# virsh net-list --all Name State Autostart Persistent

[PATCH] coding-style: Document 80 chars limit for line length

2020-11-30 Thread Michal Privoznik
The idea is to have it like a soft limit: if possible then break lines, if not then have a long line instead of some creative approach. Signed-off-by: Michal Privoznik --- docs/coding-style.rst | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v1 05/26] qemu_domain_address: Reformat qemuDomainAssignS390Addresses()

2020-11-30 Thread Michal Privoznik
On 11/30/20 12:48 PM, Thomas Huth wrote: On 30/11/2020 11.18, Michal Privoznik wrote: On 11/30/20 10:38 AM, Thomas Huth wrote: On 27/11/2020 16.02, Michal Privoznik wrote: Signed-off-by: Michal Privoznik ---   src/qemu/qemu_domain_address.c | 10 --   1 file changed, 4

[PATCH 18/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Kevin Wolf
This converts object-add from 'gen': false to the ObjectOptions QAPI type. As an immediate benefit, clients can now use QAPI schema introspection for user creatable QOM objects. It is also the first step towards making the QAPI schema the only external interface for the creation of user creatable

[PATCH 17/18] qapi/qom: Drop deprecated 'props' from object-add

2020-11-30 Thread Kevin Wolf
The option has been deprecated in QEMU 5.0, remove it. Signed-off-by: Kevin Wolf --- qapi/qom.json | 6 +- docs/system/deprecated.rst | 10 +- qom/qom-qmp-cmds.c | 21 - 3 files changed, 6 insertions(+), 31 deletions(-) diff --git

[PATCH 16/18] tests: Drop 'props' from object-add calls

2020-11-30 Thread Kevin Wolf
The 'props' option has been deprecated in 5.0 in favour of a flattened object-add command. Time to change our test cases to drop the deprecated option. Signed-off-by: Kevin Wolf --- tests/qtest/qmp-cmd-test.c | 16 +-- tests/qtest/test-netfilter.c | 54

[PATCH 15/18] qapi/qom: Add ObjectOptions for input-*

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the input-* objects. ui.json cannot be included in qom.json because the storage daemon can't use it, so move GrabToggleKeys to common.json. Signed-off-by: Kevin Wolf --- qapi/common.json | 12 ++ qapi/qom.json| 58

[PATCH 14/18] qapi/qom: Add ObjectOptions for sev-guest

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the sev-guest object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 35 +++ 1 file changed, 35 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 24bfa83af5..43d081cb42 100644 --- a/qapi/qom.json +++

[PATCH 13/18] qapi/qom: Add ObjectOptions for pr-manager-helper

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the pr-manager-helper object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index c8ee02081c..24bfa83af5 100644 --- a/qapi/qom.json +++ b/qapi/qom.json

[PATCH 12/18] qapi/qom: Add ObjectOptions for filter-*

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the filter-* objects. Some parts of the interface (in particular NetfilterProperties.position) are very unusual for QAPI, but for now just describe the existing interface. net.json can't be included in qom.json because the storage daemon doesn't have

[PATCH 11/18] qapi/qom: Add ObjectOptions for colo-compare

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the colo-compare object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 49 + 1 file changed, 49 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index ff9e51ee19..4c4f2841c3 100644 ---

[PATCH 10/18] qapi/qom: Add ObjectOptions for can-*

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the can-* objects. can-bus doesn't have any properties, so it only needs to be added to the ObjectType enum without adding a new branch to ObjectOptions. Signed-off-by: Kevin Wolf --- qapi/qom.json | 18 ++ 1 file changed, 18

[PATCH 09/18] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the tls-* objects. The 'loaded' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that additional options will be silently ignored. In

[PATCH 08/18] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the secret* objects. The 'loaded' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that additional options will be silently ignored.

[PATCH 07/18] qapi/qom: Add ObjectOptions for throttle-group

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the throttle-group object. The x-* properties are not represented in the schema. Their only purpose is to make the nested options in 'limits' available for a command line parser that doesn't support structs. Any parser that will use the QAPI schema

[PATCH 06/18] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened'

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the rng-* objects. The 'opened' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that trying to set additional options will result in

[PATCH 05/18] qapi/qom: Add ObjectOptions for memory-backend-*

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the memory-backend-* objects. HostMemPolicy has to be moved to an include file that can be used by the storage daemon, too, because ObjectOptions must be the same in all binaries if we don't want to compile the whole code multiple times.

[PATCH 04/18] qapi/qom: Add ObjectOptions for dbus-vmstate

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the dbus-vmstate object. A list represented as a comma separated string is clearly not very QAPI-like, but for now just describe the existing interface. Signed-off-by: Kevin Wolf --- qapi/qom.json | 18 ++ 1 file changed, 18

[PATCH 03/18] qapi/qom: Add ObjectOptions for cryptodev-*

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the cryptodev-* objects. These interfaces have some questionable aspects (cryptodev-backend is really an abstract base class without function, and the queues option only makes sense for cryptodev-vhost-user), but as the goal is to represent the

[PATCH 02/18] qapi/qom: Add ObjectOptions for authz-*

2020-11-30 Thread Kevin Wolf
This adds a QAPI schema for the properties of the authz-* objects. Signed-off-by: Kevin Wolf --- qapi/authz.json | 62 qapi/qom.json| 10 + storage-daemon/qapi/qapi-schema.json | 1 + 3 files changed, 73

[PATCH 01/18] qapi/qom: Add ObjectOptions for iothread

2020-11-30 Thread Kevin Wolf
Add an ObjectOptions union that will eventually describe the options of all user creatable object types. As unions can't exist without any branches, also add the first object type. This adds a QAPI schema for the properties of the iothread object. Signed-off-by: Kevin Wolf --- qapi/qom.json |

[PATCH 00/18] qapi/qom: QAPIfy object-add

2020-11-30 Thread Kevin Wolf
This series adds a QAPI type for the properties of all user creatable QOM types and finally makes QMP object-add use the new ObjectOptions union so that QAPI introspection can be used for user creatable objects. If you are in the CC list and didn't expect this series, it's probably because you're

Re: [PATCH v1 05/26] qemu_domain_address: Reformat qemuDomainAssignS390Addresses()

2020-11-30 Thread Thomas Huth
On 30/11/2020 11.18, Michal Privoznik wrote: > On 11/30/20 10:38 AM, Thomas Huth wrote: >> On 27/11/2020 16.02, Michal Privoznik wrote: >>> Signed-off-by: Michal Privoznik >>> --- >>>   src/qemu/qemu_domain_address.c | 10 -- >>>   1 file changed, 4 insertions(+), 6 deletions(-) >>> >>>

Re: [libvirt PATCH 0/9] qemu: report guest disks informations

2020-11-30 Thread Marc-André Lureau
On Fri, Nov 20, 2020 at 10:10 PM wrote: > From: Marc-André Lureau > > Hi, > > The following series extends virDomainGetGuestInfo to report disk > informations > provided by the new QGA "guest-get-disks" command in QEMU 5.2. > > Please review, > ping > Fixes: >

Re: [PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Daniel P . Berrangé
On Mon, Nov 30, 2020 at 11:48:28AM +0100, Michal Privoznik wrote: > On 11/30/20 11:16 AM, Daniel P. Berrangé wrote: > > On Mon, Nov 30, 2020 at 11:06:14AM +0100, Michal Privoznik wrote: > > > Currently, we configure QEMU to prealloc memory almost by > > > default. Well, by default for NVDIMMs,

Re: [PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Michal Privoznik
On 11/30/20 11:21 AM, Peter Krempa wrote: On Mon, Nov 30, 2020 at 11:06:14 +0100, Michal Privoznik wrote: Currently, we configure QEMU to prealloc memory almost by default. Well, by default for NVDIMMs, hugepages and if user asked us to (via memoryBacking ). However, there are two cases where

Re: [PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Michal Privoznik
On 11/30/20 11:16 AM, Daniel P. Berrangé wrote: On Mon, Nov 30, 2020 at 11:06:14AM +0100, Michal Privoznik wrote: Currently, we configure QEMU to prealloc memory almost by default. Well, by default for NVDIMMs, hugepages and if user asked us to (via memoryBacking ). However, there are two

Re: [PATCH v1 05/26] qemu_domain_address: Reformat qemuDomainAssignS390Addresses()

2020-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2020 11:18:20 +0100 Michal Privoznik wrote: > On 11/30/20 10:38 AM, Thomas Huth wrote: > > On 27/11/2020 16.02, Michal Privoznik wrote: > >> Signed-off-by: Michal Privoznik > >> --- > >> src/qemu/qemu_domain_address.c | 10 -- > >> 1 file changed, 4 insertions(+), 6

Re: [PATCH v1 05/26] qemu_domain_address: Reformat qemuDomainAssignS390Addresses()

2020-11-30 Thread Daniel P . Berrangé
On Mon, Nov 30, 2020 at 11:18:20AM +0100, Michal Privoznik wrote: > On 11/30/20 10:38 AM, Thomas Huth wrote: > > On 27/11/2020 16.02, Michal Privoznik wrote: > > > Signed-off-by: Michal Privoznik > > > --- > > > src/qemu/qemu_domain_address.c | 10 -- > > > 1 file changed, 4

Re: [PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Peter Krempa
On Mon, Nov 30, 2020 at 11:06:14 +0100, Michal Privoznik wrote: > Currently, we configure QEMU to prealloc memory almost by > default. Well, by default for NVDIMMs, hugepages and if user > asked us to (via memoryBacking ). > > However, there are two cases where this approach is not the best: > >

Re: [PATCH v1 05/26] qemu_domain_address: Reformat qemuDomainAssignS390Addresses()

2020-11-30 Thread Michal Privoznik
On 11/30/20 10:38 AM, Thomas Huth wrote: On 27/11/2020 16.02, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain_address.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_domain_address.c

Re: [PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Daniel P . Berrangé
On Mon, Nov 30, 2020 at 11:06:14AM +0100, Michal Privoznik wrote: > Currently, we configure QEMU to prealloc memory almost by > default. Well, by default for NVDIMMs, hugepages and if user > asked us to (via memoryBacking ). > > However, there are two cases where this approach is not the best: >

Re: [PATCH for-6.0 6/6] qapi: Deprecate 'query-kvm'

2020-11-30 Thread Peter Krempa
On Mon, Nov 30, 2020 at 10:21:08 +0100, Markus Armbruster wrote: > Peter Krempa writes: > > > On Fri, Nov 27, 2020 at 16:44:05 +0100, Markus Armbruster wrote: > >> Peter Krempa writes: [...] > > I know it's hard to enforce, but probably the cheapest in terms of > > drawbacks any other

[PATCH] qemu: Relax memory pre-allocation rules

2020-11-30 Thread Michal Privoznik
Currently, we configure QEMU to prealloc memory almost by default. Well, by default for NVDIMMs, hugepages and if user asked us to (via memoryBacking ). However, there are two cases where this approach is not the best: 1) in case when guest's NVDIMM is backed by real life NVDIMM. In this case

Re: [PATCH 0/3] gitlab: Add issue templates

2020-11-30 Thread Peter Krempa
On Mon, Nov 30, 2020 at 09:51:26 +0100, Pavel Hrdina wrote: > On Fri, Nov 27, 2020 at 06:05:41PM +0100, Peter Krempa wrote: > > On Fri, Nov 27, 2020 at 16:50:01 +, Daniel Berrange wrote: [...] > > > > > ## Software

  1   2   >