machine: Provide a function to check the dynamic sysbus allowlist
commit0fb124dbfa135945fb892d0d2b7a427cdc59220d
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 25 Mar 2021 15:33:08 +0000 (25 15:33 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 6 Apr 2021 10:49:14 +0000 (6 11:49 +0100)
treea15eeb324467b89df7b34a5a405076c04a0d6b78
parent387c0e8b41ac30ea0791bbd12fefcfc7ea93a436
machine: Provide a function to check the dynamic sysbus allowlist

Provide a new function dynamic_sysbus_dev_allowed() which checks the
per-machine list of permitted dynamic sysbus devices and returns a
boolean result indicating whether the device is allowed.  We can use
this in the implementation of validate_sysbus_device(), but we will
also need it so that machine hotplug callbacks can validate devices
rather than assuming that any sysbus device might be hotpluggable
into the platform bus.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20210325153310.9131-3-peter.maydell@linaro.org
hw/core/machine.c
include/hw/boards.h