On Tue, Mar 06, 2018 at 05:56:03PM +0000, Mark Cave-Ayland wrote: > On 06/03/18 17:47, Thomas Huth wrote: > > > > It seems that the error is being raised when setting the property rather > > > than during realize so I'm not sure what I can do to handle this. Any > > > thoughts? > > > > Does the device need to be hot-pluggable or even user_creatable at all? > > It seems like it is also using serial_hds[] directly, so that is a good > > indication that it is *not* user creatable. So maybe the easiest fix is > > to simply set > > > > dc->user_creatable = false; > > > > in macio_class_init() ? > > (Added Daniel to CC) > > I believe it should fail anyhow during realize because both macio devices > (newworld and oldworld) requires an object link to the PIC which won't be > set when using device_add via the monitor as in your example. > > But it still doesn't quite feel right that just setting a property value > should abort() immediately. Daniel, any thoughts?
Setting user_creatable = false is important, as that flag is used to filter the list of permitted devices when doing monitor readline completion for 'device_add' and when printing available devices with '-device ?' 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 :|