[PATCH v4 14/16] qapi: deprecate "device" field of DEVICE_* events

Daniel P. Berrangé berrange at redhat.com
Tue Feb 14 11:14:14 UTC 2023


On Tue, Feb 14, 2023 at 10:25:22AM +0100, Peter Krempa wrote:
> On Tue, Feb 14, 2023 at 09:54:22 +0100, Markus Armbruster wrote:
> > Daniel P. Berrangé <berrange at 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.
> 
> Note that libvirt's code is still using the 'device' bit rather than QOM
> path and the fix might not be entirely trivial although should not be
> too hard.

What's the documented way to construct a QOM path, given only an ID  as
input ?

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 :|


More information about the libvir-list mailing list