On 10/29/21 16:22, Damien Hedde wrote: > Right now the allowance check for adding a sysbus device using > -device cli option (or device_add qmp command) is done well after > the device has been created. It is done during the machine init done > notifier: machine_init_notify() in hw/core/machine.c > > This new function will allow us to do the check at the right time and > issue an error if it fails. > > Also make device_is_dynamic_sysbus() use the new function. > > Signed-off-by: Damien Hedde <[email protected]> > --- > Cc: Ani Sinha <[email protected]> > > v3: change the function name (Ani) > --- > include/hw/boards.h | 15 +++++++++++++++ > hw/core/machine.c | 13 ++++++++++--- > 2 files changed, 25 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
