OSDN Git Service

machine: remove the done notifier for dynamic sysbus device type check
authorDamien Hedde <damien.hedde@greensocs.com>
Fri, 29 Oct 2021 14:22:58 +0000 (16:22 +0200)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Mon, 1 Nov 2021 18:44:11 +0000 (19:44 +0100)
commitdb78a6055994d20350a4c2131d67aeec303a7931
tree5190807ba19c5ee770e1a026999935444ca4f978
parent312e1b1f3e8400cbba9fb59a57729768e72003ee
machine: remove the done notifier for dynamic sysbus device type check

Now that we check sysbus device types during device creation, we
can remove the check in the machine init done notifier.
This was the only thing done by this notifier, so we remove the
whole sysbus_notifier structure of the MachineState.

Note: This notifier was checking all /peripheral and /peripheral-anon
sysbus devices. Now we only check those added by -device cli option or
device_add qmp command when handling the command/option. So if there
are some devices added in one of these containers manually (eg in
machine C code), these will not be checked anymore.
This use case does not seem to appear apart from
hw/xen/xen-legacy-backend.c (it uses qdev_set_id() and in this case,
not for a sysbus device, so it's ok).

Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20211029142258.484907-4-damien.hedde@greensocs.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/core/machine.c
include/hw/boards.h