[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events |
Date: |
Mon, 13 Feb 2023 14:13:15 +0000 |
User-agent: |
Mutt/2.2.9 (2022-11-12) |
On Mon, Feb 13, 2023 at 05:01:01PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> The device field is redundant, because QOM path always include device
> ID when this ID exist.
The flipside to that view is that applications configuring QEMU are
specifying the device ID for -device (CLI) / device_add (QMP) and
not the QOM path. IOW, the device ID is the more interesting field
than QOM path, so feels like the wrong one to be dropping.
Is there any real benefit to dropping this ?
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> docs/about/deprecated.rst | 9 +++++++++
> qapi/qdev.json | 12 ++++++++++--
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index da2e6fe63d..b389934691 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -171,6 +171,15 @@ accepted incorrect commands will return an error. Users
> should make sure that
> all arguments passed to ``device_add`` are consistent with the documented
> property types.
>
> +QEMU Machine Protocol (QMP) events
> +----------------------------------
> +
> +``DEVICE_DELETED`` & ``DEVICE_UNPLUG_GUEST_ERROR`` field ``device`` (since
> 8.0)
> +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +Devices that has ``ID`` always has QOM path `/machine/peripheral/ID`. So, the
> +``device`` field is redundant and deprecated. Use the ``path`` field instead.
> +
> Host Architectures
> ------------------
>
> diff --git a/qapi/qdev.json b/qapi/qdev.json
> index 2708fb4e99..325ef554f9 100644
> --- a/qapi/qdev.json
> +++ b/qapi/qdev.json
> @@ -124,6 +124,9 @@
> #
> # @path: the device's QOM path
> #
> +# Features:
> +# @deprecated: Member @device is deprecated as redundant. Use @path instead.
> +#
> # Since: 1.5
> #
> # Example:
> @@ -135,7 +138,8 @@
> #
> ##
> { 'event': 'DEVICE_DELETED',
> - 'data': { '*device': 'str', 'path': 'str' } }
> + 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] },
> + 'path': 'str' } }
>
> ##
> # @DEVICE_UNPLUG_GUEST_ERROR:
> @@ -146,6 +150,9 @@
> #
> # @path: the device's QOM path
> #
> +# Features:
> +# @deprecated: Member @device is deprecated as redundant. Use @path instead.
> +#
> # Since: 6.2
> #
> # Example:
> @@ -157,4 +164,5 @@
> #
> ##
> { 'event': 'DEVICE_UNPLUG_GUEST_ERROR',
> - 'data': { '*device': 'str', 'path': 'str' } }
> + 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] },
> + 'path': 'str' } }
> --
> 2.34.1
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH v4 06/16] pci/shpc: refactor shpc_device_plug_common(), (continued)
- [PATCH v4 06/16] pci/shpc: refactor shpc_device_plug_common(), Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 03/16] pci/shpc: shpc_slot_command(): handle PWRONLY -> ENABLED transition, Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 07/16] pcie: pcie_cap_slot_write_config(): use correct macro, Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 10/16] pcie: pcie_cap_slot_enable_power() use correct helper, Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 01/16] pci/shpc: set attention led to OFF on reset, Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 04/16] pci/shpc: more generic handle hot-unplug in shpc_slot_command(), Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 05/16] pci/shpc: pass PCIDevice pointer to shpc_slot_command(), Vladimir Sementsov-Ogievskiy, 2023/02/13
- [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Vladimir Sementsov-Ogievskiy, 2023/02/13
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events,
Daniel P . Berrangé <=
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Markus Armbruster, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Peter Krempa, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Daniel P . Berrangé, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Markus Armbruster, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Philippe Mathieu-Daudé, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Markus Armbruster, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Philippe Mathieu-Daudé, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Markus Armbruster, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Markus Armbruster, 2023/02/14
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Daniel P . Berrangé, 2023/02/14