On Mon, Oct 21, 2019 at 01:53:58PM +0100, Peter Maydell wrote:
On Fri, 18 Oct 2019 at 21:22, Jens Freimann <jfreim...@redhat.com> wrote:
This adds support for hiding a device to the qbus and qdev APIs. The
first user of this will be the virtio-net failover feature but the API
introduced with this patch could be used to implement other features as
well, for example hiding pci devices when a pci bus is powered off.
In what sense is a hidden device hidden? Is it hidden from
the guest (in what way) ? Is it hidden from the QMP/HMP monitor
commands? Is it hidden from QEMU functions that iterate through
the qbus, or that walk the QOM tree ? What does a hidden device
have to do to be successfully hidden ? Is it completely disconnected
from the rest of the simulation, or does it itself have to avoid
doing things like asserting IRQ lines ?
Expanding the DeviceClass doc comment might be a good place to answer
questions like the above and generally describe the 'hidden device'
mechanism.
ok, I will add to the DeviceClass comment.
};
@@ -451,4 +457,6 @@ static inline bool qbus_is_hotpluggable(BusState *bus)
void device_listener_register(DeviceListener *listener);
void device_listener_unregister(DeviceListener *listener);
+bool qdev_should_hide_device(QemuOpts *opts);
New globally visible functions should always have doc-comment
format documentation comments, please.
Will add this too. Thanks for the review!
regards,
Jens