On Mon, 6 Jul 2026 at 18:29, Philippe Mathieu-Daudé
<[email protected]> wrote:
> - Bus capacity is odd. We have a generic Bus-class @max_dev field but
>    do not use it with PCI variants. If set, it limit the instances
>    capacity. The capacity is tracked in the instance state, and when
>    no @max_dev is set the only way to mark a bus full is using the
>    qbus_mark_full() helper. Then if we remove devices, the bus remains
>    full, and there is no helper to restore available slots.

The qbus_mark_full() function is intended for the use case where
a machine has a bus which in real hardware is entirely internal,
so you have something like an I2C bus which has some on-board
I2C devices connected to it, but there's no external socket
that the user could add more to the bus for. The idea is that
the machine model creates all the devices for this bus, then
marks it as full. The devices never get removed from the bus,
because they're hardwired in, not user-unpluggable.

thanks
-- PMM

Reply via email to