qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/11] qdev/qbus: add hidden device support


From: Peter Maydell
Subject: Re: [PATCH 01/11] qdev/qbus: add hidden device support
Date: Mon, 21 Oct 2019 13:53:58 +0100

On Fri, 18 Oct 2019 at 21:22, Jens Freimann <address@hidden> 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.

>  };
>
> @@ -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.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]