[PATCH v2 06/31] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-02-24 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 v2 15/31] qapi/qom: Add ObjectOptions for pr-manager-helper

2021-02-24 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 e3357f5123..e7184122e9 100644 --- a/qapi/qom.json +++ b/qapi/qom.json

[PATCH v2 09/31] qapi/qom: Add ObjectOptions for throttle-group

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the throttle-group object. The only purpose of the x-* properties 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 will supports structs, though, so

[PATCH v2 00/31] qapi/qom: QAPIfy --object and object-add

2021-02-24 Thread Kevin Wolf
This series adds a QAPI type for the properties of all user creatable QOM types and finally makes the --object command line option (in all binaries) and the object-add monitor commands (in QMP and HMP) use the new ObjectOptions union. This change improves things in more than just one way: 1.

[PATCH v2 01/31] tests: Drop 'props' from object-add calls

2021-02-24 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 v2 04/31] qapi/qom: Add ObjectOptions for authz-*

2021-02-24 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 v2 02/31] qapi/qom: Drop deprecated 'props' from object-add

2021-02-24 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 | 5 - docs/system/removed-features.rst | 5 + qom/qom-qmp-cmds.c | 21 - 4 files

Re: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device

2021-02-24 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 - docs/system/removed-features.rst | 6 hw/i386/pc.c | 1 -

[PATCH 12/14] block: remove dirty bitmaps 'status' field

2021-02-24 Thread Daniel P . Berrangé
The same information is available via the 'recording' and 'busy' fields. Signed-off-by: Daniel P. Berrangé --- block/dirty-bitmap.c | 38 docs/system/deprecated.rst | 7 - docs/system/removed-features.rst | 7 + include/block/dirty-bitmap.h | 1 -

[PATCH 14/14] block: remove support for using "file" driver with block/char devices

2021-02-24 Thread Daniel P . Berrangé
The 'host_device' and 'host_cdrom' drivers must be used instead. Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 17 ++--- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++ tests/qemu-iotests/226.out | 10

[PATCH 06/14] machine: remove 'query-cpus' QMP command

2021-02-24 Thread Daniel P . Berrangé
The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 5 - docs/system/removed-features.rst

Re: [PATCH 08/14] chardev: reject use of 'wait' flag for socket client chardevs

2021-02-24 Thread Marc-André Lureau
On Wed, Feb 24, 2021 at 5:15 PM Daniel P. Berrangé wrote: > This only makes sense conceptually when used with listener chardevs. > > Signed-off-by: Daniel P. Berrangé > Reviewed-by: Marc-André Lureau --- > chardev/char-socket.c| 12 > docs/system/deprecated.rst

[PATCH 13/14] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-02-24 Thread Daniel P . Berrangé
The same data is available in the 'BlockDeviceInfo' struct. Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 5 - docs/system/deprecated.rst | 13 - docs/system/removed-features.rst | 13 + qapi/block-core.json | 11

Re: [PATCH 00/14] deprecations: remove many old deprecations

2021-02-24 Thread Philippe Mathieu-Daudé
On 2/24/21 3:38 PM, Peter Maydell wrote: > On Wed, 24 Feb 2021 at 13:21, Daniel P. Berrangé wrote: >> >> The following features have been deprecated for well over the 2 >> release cycle we promise >> >> ``-usbdevice`` (since 2.10.0) >> ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)

Re: [PATCH v2 16/31] qapi/qom: Add ObjectOptions for confidential-guest-support

2021-02-24 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > This adds a QAPI schema for the properties of the objects implementing > the confidential-guest-support interface. > > pef-guest and s390x-pv-guest don't have any properties, so they only > need to be added to the ObjectType enum without adding a new

[PATCH v2 05/12] tests: qemuxml2argv: Validate generation of JSON props for object-add

2021-02-24 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 v2 07/12] qemu: monitor: Make wrapping of 'props' of 'object-add' optional

2021-02-24 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 v2 11/12] tests: qemucapabilities: Update qemu caps for object-add qapification

2021-02-24 Thread Peter Krempa
qemu qapified object-add, which means that it's introspectable via query-qmp-schema. Update the qemu-6.0 capabilities to commit XX TODO: update to pushed version --- .../caps_6.0.0.x86_64.replies | 3238 - .../caps_6.0.0.x86_64.xml |

[PATCH v2 08/12] qemuMonitorCreateObjectPropsWrap: Open-code in qemuBuildMemoryBackendProps

2021-02-24 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 v2 10/12] qemumonitorjsontest: Remove bomb guarding object-add

2021-02-24 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 82c74e2ef9..48b41c908a 100644 ---

[PATCH v2 01/12] qemu: command: Generate commandline of 'masterKey0' secret via JSON

2021-02-24 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 v2 09/12] qemu: monitor: Don't add 'props' wrapper if qemu has QEMU_CAPS_OBJECT_QAPIFIED

2021-02-24 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 121c21be5c..1e4c4809b1 100644 --- a/src/qemu/qemu_monitor.c +++

[PATCH v2 00/12] qemu: Prepare for QAPIfied object-add

2021-02-24 Thread Peter Krempa
QEMU plans to QAPIfy object add. This series prepares for the API change (drop of 'props' wrapper for the object) and adds testing based on our qemuxml2argv test data which forces the output to JSON and validates it agains the schema. Based on Kevin's qemu patches:

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

2021-02-24 Thread Paolo Bonzini
On 24/02/21 14:11, Daniel P. Berrangé wrote: This was replaced by the '-device usb-DEV' option. Signed-off-by: Daniel P. Berrangé This is probably used in many tutorial as "-usbdevice tablet" (for example https://wiki.gentoo.org/wiki/QEMU/Options). Paolo --- docs/system/deprecated.rst

Re: [PATCH 00/14] deprecations: remove many old deprecations

2021-02-24 Thread Paolo Bonzini
On 24/02/21 14:11, Daniel P. Berrangé wrote: The following features have been deprecated for well over the 2 release cycle we promise ``-usbdevice`` (since 2.10.0) ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0) ``-mon

Re: [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands

2021-02-24 Thread Daniel P . Berrangé
On Wed, Feb 24, 2021 at 02:36:46PM +0100, Thomas Huth wrote: > On 24/02/2021 14.11, Daniel P. Berrangé wrote: > > The VNC ACL concept has been replaced by the pluggable "authz" framework > > which does not use monitor commands. > > > > Reviewed-by: Dr. David Alan Gilbert > > Signed-off-by:

Re: [PATCH 03/14] monitor: remove 'query-events' QMP command

2021-02-24 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Signed-off-by: Daniel P. Berrangé ---

[PATCH v2 27/31] qom: Add user_creatable_add_from_str()

2021-02-24 Thread Kevin Wolf
This is a version of user_creatable_process_cmdline() with an Error parameter that never calls exit() and is therefore usable in HMP. Signed-off-by: Kevin Wolf --- include/qom/object_interfaces.h | 16 qom/object_interfaces.c | 29 - 2 files

[PATCH v2 23/31] qom: Factor out user_creatable_process_cmdline()

2021-02-24 Thread Kevin Wolf
The implementation for --object can be shared between qemu-storage-daemon and other binaries, so move it into a function in qom/object_interfaces.c that is accessible from everywhere. This also requires moving the implementation of qmp_object_add() into a new user_creatable_add_qapi(), because

[PATCH v2 31/31] qom: Drop QemuOpts based interfaces

2021-02-24 Thread Kevin Wolf
user_creatable_add_opts() has only a single user left, which is a test case. Rewrite the test to use user_creatable_add_type() instead (which is the remaining function that doesn't require a QAPI schema) and drop the QemuOpts related functions. Signed-off-by: Kevin Wolf ---

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

2021-02-24 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: This was replaced by the '-device usb-DEV' option. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 --- docs/system/removed-features.rst | 9 +++ softmmu/vl.c | 42

[PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-02-24 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

Re: [PATCH v2] qemu: Add missing lock in qemuProcessHandleMonitorEOF

2021-02-24 Thread Michal Privoznik
On 2/24/21 12:28 PM, Peng Liang wrote: qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem

[PATCH v2 22/31] qom: Remove user_creatable_add_dict()

2021-02-24 Thread Kevin Wolf
This function is now unused and can be removed. Signed-off-by: Kevin Wolf --- include/qom/object_interfaces.h | 18 -- qom/object_interfaces.c | 32 2 files changed, 50 deletions(-) diff --git a/include/qom/object_interfaces.h

[PATCH v2 06/12] qemu: command: Introduce raw JSON passthrough for '-object' for testing

2021-02-24 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 v2 04/12] qemu: capabilities: Introduce QEMU_CAPS_OBJECT_QAPIFIED

2021-02-24 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 v2 02/12] qemu: command: Generate commandline of 'sev0' sev-guest object via JSON

2021-02-24 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 v2 03/12] qemu: command: Generate commandline of iothread objects JSON

2021-02-24 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

Re: [libvirt PATCH 0/2] Fix bonehead errors in support

2021-02-24 Thread Ján Tomko
On a Tuesday in 2021, Laine Stump wrote: I hadn't caught the code omission because my migration tester system was out of commission, and I stupidly assumed migration would work. The docs typo was pure lack of attention. This (sub) feature will be new for this release, and there is an open BZ

Re: [PATCH] NEW: Mention some bug fixes for the 7.1.0 dev cycle

2021-02-24 Thread Pavel Hrdina
On Tue, Feb 23, 2021 at 06:36:48PM -0700, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > NEWS.rst | 17 + > 1 file changed, 17 insertions(+) s/NEW/NEWS/ in subject Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Some confusion about lsilogic controller

2021-02-24 Thread xingchaochao
Hello, I have been confused by such a phenomenon recently. Libvirt is the master branch , and the VM is centos8.2(kernel is 4.18.0-193.el8.aarch64). When I hot-plug the scsi disk for a virtual machine without a virtio-scsi controller, libvirt will automatically generate an lsilogic controller

Re: [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP

2021-02-24 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This is only semantically useful for QMP. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Dr. David Alan Gilbert > --- > docs/system/deprecated.rst | 7 --- > docs/system/removed-features.rst | 6 ++ > monitor/monitor.c

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

2021-02-24 Thread Daniel P . Berrangé
On Wed, Feb 24, 2021 at 02:25:46PM +0100, Paolo Bonzini wrote: > On 24/02/21 14:11, Daniel P. Berrangé wrote: > > This was replaced by the '-device usb-DEV' option. > > > > Signed-off-by: Daniel P. Berrangé > > This is probably used in many tutorial as "-usbdevice tablet" (for example >

Re: [PATCH v2 4/4] utils: Deprecate inexact fractional suffix sizes

2021-02-24 Thread Eric Blake
On 2/23/21 11:20 AM, Daniel P. Berrangé wrote: > On Thu, Feb 11, 2021 at 02:44:38PM -0600, Eric Blake wrote: >> The value '1.1k' is inexact; 1126.4 bytes is not possible, so we >> happen to truncate it to 1126. Our use of fractional sizes is >> intended for convenience, but when a user specifies

Re: [PATCH v2 28/31] hmp: QAPIfy object_add

2021-02-24 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > This switches the HMP command object_add from a QemuOpts-based parser to > user_creatable_add_from_str() which uses a keyval parser and enforces > the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties and help > accessible. In

[PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-02-24 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 v2 14/31] qapi/qom: Add ObjectOptions for filter-*

2021-02-24 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 v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-02-24 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 v2 13/31] qapi/qom: Add ObjectOptions for colo-compare

2021-02-24 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 4b1cd4b8dc..8e4414f843 100644 ---

[PATCH v2 11/31] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-02-24 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 v2 16/31] qapi/qom: Add ObjectOptions for confidential-guest-support

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the objects implementing the confidential-guest-support interface. pef-guest and s390x-pv-guest don't have any properties, so they only need to be added to the ObjectType enum without adding a new branch to ObjectOptions. Signed-off-by: Kevin Wolf

[PATCH v2 17/31] qapi/qom: Add ObjectOptions for input-*

2021-02-24 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 v2 08/31] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened'

2021-02-24 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 v2 03/31] qapi/qom: Add ObjectOptions for iothread

2021-02-24 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 |

Re: [PATCH 11/14] block: remove 'encryption_key_missing' flag from QAPI

2021-02-24 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided upfront instead of using interactive prompts. Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 1 -

[PATCH 00/14] deprecations: remove many old deprecations

2021-02-24 Thread Daniel P . Berrangé
The following features have been deprecated for well over the 2 release cycle we promise ``-usbdevice`` (since 2.10.0) ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0) ``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)

[PATCH 03/14] monitor: remove 'query-events' QMP command

2021-02-24 Thread Daniel P . Berrangé
The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 6 -

[PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP

2021-02-24 Thread Daniel P . Berrangé
This is only semantically useful for QMP. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 6 ++ monitor/monitor.c| 4 ++-- qemu-options.hx | 5 +++-- 4 files changed, 11 insertions(+), 11

[PATCH] qemu_monitor: Document qemuMonitorUnregister()

2021-02-24 Thread Michal Privoznik
The most important bit is that the caller is expected to pass locked monitor. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index ed35da17e1..73f337a6be 100644 ---

Re: [PATCH 09/14] hw/ide: remove 'ide-drive' device

2021-02-24 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Signed-off-by: Daniel P. Berrangé --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 9

[PATCH 10/14] hw/scsi: remove 'scsi-disk' device

2021-02-24 Thread Daniel P . Berrangé
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 - docs/system/removed-features.rst | 6 hw/i386/pc.c | 1 - hw/scsi/scsi-disk.c | 62

[PATCH 04/14] softmmu: remove '-usbdevice' command line option

2021-02-24 Thread Daniel P . Berrangé
This was replaced by the '-device usb-DEV' option. Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 --- docs/system/removed-features.rst | 9 +++ softmmu/vl.c | 42 3 files changed, 9 insertions(+), 51

[PATCH 08/14] chardev: reject use of 'wait' flag for socket client chardevs

2021-02-24 Thread Daniel P . Berrangé
This only makes sense conceptually when used with listener chardevs. Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c| 12 docs/system/deprecated.rst | 6 -- docs/system/removed-features.rst | 6 ++ 3 files changed, 10 insertions(+), 14

[PATCH 09/14] hw/ide: remove 'ide-drive' device

2021-02-24 Thread Daniel P . Berrangé
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Signed-off-by: Daniel P. Berrangé --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 9 hw/i386/pc.c | 1 - hw/ide/qdev.c

[PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size

2021-02-24 Thread Daniel P . Berrangé
The generic 'migrate_set_parameters' command handle all types of param. Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so

[PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command

2021-02-24 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 6 + hw/core/machine-qmp-cmds.c | 41 qapi/machine.json| 22 - 4 files changed, 6 insertions(+), 69

[PATCH 11/14] block: remove 'encryption_key_missing' flag from QAPI

2021-02-24 Thread Daniel P . Berrangé
This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided upfront instead of using interactive prompts. Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 1 - docs/system/deprecated.rst | 10 ---

[PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands

2021-02-24 Thread Daniel P . Berrangé
The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 16 --- docs/system/removed-features.rst | 13 +++ hmp-commands.hx

Re: [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands

2021-02-24 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 16 ---

[PATCH v2 25/31] qemu-img: Use user_creatable_process_cmdline() for --object

2021-02-24 Thread Kevin Wolf
This switches qemu-img from a QemuOpts-based parser for --object to user_creatable_process_cmdline() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. Signed-off-by: Kevin Wolf --- qemu-img.c | 239

[PATCH v2 24/31] qemu-io: Use user_creatable_process_cmdline() for --object

2021-02-24 Thread Kevin Wolf
This switches qemu-io from a QemuOpts-based parser for --object to user_creatable_process_cmdline() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. Signed-off-by: Kevin Wolf --- qemu-io.c | 33

[PATCH v2 28/31] hmp: QAPIfy object_add

2021-02-24 Thread Kevin Wolf
This switches the HMP command object_add from a QemuOpts-based parser to user_creatable_add_from_str() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties and help accessible. In order for help to be printed to the monitor instead

[PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*

2021-02-24 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 v2 21/31] qemu-storage-daemon: Implement --object with qmp_object_add()

2021-02-24 Thread Kevin Wolf
This QAPIfies --object and ensures that QMP and the command line option behave the same. Signed-off-by: Kevin Wolf --- storage-daemon/qemu-storage-daemon.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/storage-daemon/qemu-storage-daemon.c

[PATCH v2 26/31] qemu-nbd: Use user_creatable_process_cmdline() for --object

2021-02-24 Thread Kevin Wolf
This switches qemu-nbd from a QemuOpts-based parser for --object to user_creatable_process_cmdline() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. Signed-off-by: Kevin Wolf --- qemu-nbd.c | 34

[PATCH v2 29/31] qom: Add user_creatable_parse_str()

2021-02-24 Thread Kevin Wolf
The system emulator has a more complicated way of handling command line options in that it reorders options before it processes them. This means that parsing object options and creating the object happen at two different points. Split the parsing part into a separate function that can be reused by

[PATCH v2 30/31] vl: QAPIfy -object

2021-02-24 Thread Kevin Wolf
This switches the system emulator from a QemuOpts-based parser for -object to user_creatable_parse_str() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. This adopts a similar model as -blockdev uses: When parsing

[PATCH v2 20/31] qom: Make "object" QemuOptsList optional

2021-02-24 Thread Kevin Wolf
This code is going away anyway, but for a few more commits, we'll be in a state where some binaries still use QemuOpts and others don't. If the "object" QemuOptsList doesn't even exist, we don't have to remove (or fail to remove, and therefore abort) a user creatable object from it.

[PATCH v2 05/31] qapi/qom: Add ObjectOptions for cryptodev-*

2021-02-24 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 v2 18/31] qapi/qom: Add ObjectOptions for x-remote-object

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the x-remote-object object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index f8ff322df0..6793342e81 100644 --- a/qapi/qom.json

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

2021-02-24 Thread Daniel P . Berrangé
On Wed, Feb 24, 2021 at 02:58:19PM +0100, Thomas Huth wrote: > On 24/02/2021 14.11, Daniel P. Berrangé wrote: > > This was replaced by the '-device usb-DEV' option. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > docs/system/deprecated.rst | 9 --- > >

Re: [PATCH 00/14] deprecations: remove many old deprecations

2021-02-24 Thread Peter Maydell
On Wed, 24 Feb 2021 at 13:21, Daniel P. Berrangé wrote: > > The following features have been deprecated for well over the 2 > release cycle we promise > > ``-usbdevice`` (since 2.10.0) > ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) > ``-vnc acl`` (since 4.0.0) > ``-mon

Re: [PATCH 00/14] deprecations: remove many old deprecations

2021-02-24 Thread Daniel P . Berrangé
On Wed, Feb 24, 2021 at 02:38:43PM +, Peter Maydell wrote: > On Wed, 24 Feb 2021 at 13:21, Daniel P. Berrangé wrote: > > > > The following features have been deprecated for well over the 2 > > release cycle we promise > > > > ``-usbdevice`` (since 2.10.0) > > ``-drive

Re: Some confusion about lsilogic controller

2021-02-24 Thread Daniel P . Berrangé
On Wed, Feb 24, 2021 at 09:11:03AM +, xingchaochao wrote: > > Hello, > I have been confused by such a phenomenon recently. > Libvirt is the master branch , and the VM is centos8.2(kernel is > 4.18.0-193.el8.aarch64). > When I hot-plug the scsi disk for a virtual machine without a virtio-scsi

Re: [PATCH] NEW: Mention some bug fixes for the 7.1.0 dev cycle

2021-02-24 Thread Ján Tomko
On a Tuesday in 2021, Jim Fehlig wrote: Signed-off-by: Jim Fehlig --- NEWS.rst | 17 + 1 file changed, 17 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[PATCH v2] qemu: Add missing lock in qemuProcessHandleMonitorEOF

2021-02-24 Thread Peng Liang
qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventually. Add the missing lock in

[PATCH 06/33] virCPUx86DataParse: Don't check error from x86FeatureNames

2021-02-24 Thread Peter Krempa
x86FeatureNames uses virBuffer and thus can't fail nowadays. Signed-off-by: Peter Krempa --- src/cpu/cpu_x86.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 92f945beb4..79c5868ae6 100644 --- a/src/cpu/cpu_x86.c +++

[PATCH 05/33] virCommandAddArgBuffer: Simplify clearing of @buf

2021-02-24 Thread Peter Krempa
Get the buffer contents into a temporary variable with automatic clearing so that the error branches don't have to reset the buffer. Additionally handle the NULL string case before assignment. Signed-off-by: Peter Krempa --- src/util/vircommand.c | 14 +++--- 1 file changed, 7

[PATCH 10/33] virDomainDefSetMetadata: Rework memory handling

2021-02-24 Thread Peter Krempa
Switch to use g_autoptr for 'doc' and 'new' local variables. Additionally report proper error when 'xmlAddChild' fails because OOM is not the only error it can report. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 34 -- 1 file changed, 16

[PATCH 09/33] lxc_process: Remove OOM handling from logging setup

2021-02-24 Thread Peter Krempa
'virLogGetFilters' doesn't return failure and 'virLogGetOutputs' reports it's own errors. Signed-off-by: Peter Krempa --- src/lxc/lxc_process.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index cbc04a3dcd..679709605e

[PATCH 11/33] util: vircommand: Remove OOM handling

2021-02-24 Thread Peter Krempa
The OOM error handling is dead code nowadays. Signed-off-by: Peter Krempa --- src/util/vircommand.c | 96 +-- 1 file changed, 20 insertions(+), 76 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index f11caf0d6e..1a4b77ea24 100644

[PATCH 02/33] util: xml: Introduce autoptr cleanup support for 'xmlNode'

2021-02-24 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/util/virxml.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virxml.h b/src/util/virxml.h index f73b8975ba..e696dd25f5 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -255,6 +255,7 @@

[PATCH 01/33] Remove useless comments for VIR_FROM_THIS definition

2021-02-24 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/util/virpci.c | 1 - src/util/virscsi.c | 1 - src/util/virscsivhost.c | 1 - 3 files changed, 3 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 8147ce11e9..3df4199532 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@

[PATCH 03/33] virDomainDefSetMetadata: Avoid temporary variable for string copy

2021-02-24 Thread Peter Krempa
Since error checking was removed when switching to g_strdup, it doesn't make much sense to have 'tmp' around. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c

[PATCH 00/33] Remove the now misleading virReportOOMError infra

2021-02-24 Thread Peter Krempa
'virReportOOMError' is nowadays mostly useless since an OOM error will trigger yet another allocation failure in the logger when attempting to log the error. Additionally it was also used in few places which can fail with other failures than OOM. To prevent both errorneous usage types, let's

[PATCH 04/33] virCommandAddEnv: Make stealing of argument more obvious

2021-02-24 Thread Peter Krempa
The function is supposed to always consume the passed environment variable string. Use a temp variable with autofree and g_steal_pointer to prevent having to free it manually. Signed-off-by: Peter Krempa --- src/util/vircommand.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[PATCH 07/33] virhostcputest: linuxCPUStatsCompareFiles: Don't check return value of virBufferContentAndReset

2021-02-24 Thread Peter Krempa
The buffer won't encounter OOM condition nowadays Signed-off-by: Peter Krempa --- tests/virhostcputest.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/virhostcputest.c b/tests/virhostcputest.c index 786a363e48..2608f0becc 100644 --- a/tests/virhostcputest.c +++

[PATCH 08/33] virBuildPath: Remove return value

2021-02-24 Thread Peter Krempa
The function can't fail nowadays, remove the return value and adjust callers. Signed-off-by: Peter Krempa --- docs/internals/command.html.in | 8 +--- src/util/virfcp.c | 3 +-- src/util/virfile.c | 7 +-- src/util/virfile.h | 2 +-

[PATCH 27/33] vbox: abort() on allocation failure in UTF8<->UTF16 conversion

2021-02-24 Thread Peter Krempa
Trying to report an error on OOM is pointless since error handling allocates memory. Signed-off-by: Peter Krempa --- src/vbox/vbox_common.c | 20 src/vbox/vbox_common.h | 15 +-- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git

[PATCH 24/33] virURIFormat: abort() on failure

2021-02-24 Thread Peter Krempa
If the argument of 'xmlSaveUri' is non-NULL the function returns NULL on OOM failure only. Thus we can directly abort rather than try to do the impossible recovery. Signed-off-by: Peter Krempa --- src/util/viruri.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

  1   2   >