> > What type of device is only sometimes hotpluggable ?
> > The commit message says "display devices" and "consoles",
> > but I would expect those to both be types of device which
> > have a class which is never hotpluggable, so you can mark
> > them non-hotpluggable with the existing class flag rather
> > than needing a per-instance flag.
> With this series, a vfio-pci device optionally supports a display. The
> vfio-pci device is hotpluggable, but QEMU display support is not. So
> the solution here is to make the vfio-pci device non-hotpluggable only
> when it supports and enables a display.
> Gerd, is there another solution that the display object is instantiated
> separately from the vfio-pci object and the display support in the
> vfio-pci device references the display object via an id.
Well, not really. At least not without putting much of qemu display
support upside down. The qemu display (aka QemuConsole) is created and
managed by the display devices, they can't be created independant from
a device ...
The connection between QemuConsole and User Interface (i.e. gtk, spice,
...) is a bit more flexible. But also not really designed for hotplug
as QemuConsole is not hotpluggable in the first place ...
We could drop the display property and use two devices instead.
new vfio-pci would behave like display=off with this series.
added vfio-pci-display has display=on behavior.
display=auto is not possible.