[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: |
Markus Armbruster |
Subject: |
Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events |
Date: |
Tue, 14 Feb 2023 09:54:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Daniel P. Berrangé <berrange@redhat.com> writes:
> 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.
QOM path is a reliable way to identify a device. Device ID isn't:
devices need not have one. Therefore, dropping the QOM path would be
wrong.
> Is there any real benefit to dropping this ?
The device ID is a trap for the unwary: relying on it is fine until you
run into a scenario where you have to deal with devices lacking IDs.
I suggested to deprecate it in review of "[PATCH v3 14/15] qapi:
introduce DEVICE_ON event" (Message-ID: <873579x67l.fsf@pond.sub.org>).
Quote:
We commonly send both device ID and QOM path, mostly for historical
reasons: the former precede the latter.
There are exceptions, such as query-cpus-fast. Can't say offhand
whether CPUs can be created with IDs.
[...]
I'd be in favour of deprecating and deleting redundant device IDs in QMP
output.
- [PATCH v4 03/16] pci/shpc: shpc_slot_command(): handle PWRONLY -> ENABLED transition, (continued)
- [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é, 2023/02/13
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events,
Markus Armbruster <=
- 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
- Re: [PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events, Markus Armbruster, 2023/02/14