aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-03-25 15:33:07 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-04-06 11:49:14 +0100
commit387c0e8b41ac30ea0791bbd12fefcfc7ea93a436 (patch)
tree96f68a9eb8b9f171147d2ffedd2f73cca55f1e0d
parent109918d24a3bb9ed3d05beb34ea4ac6be443c138 (diff)
downloadqemu-387c0e8b41ac30ea0791bbd12fefcfc7ea93a436.zip
qemu-387c0e8b41ac30ea0791bbd12fefcfc7ea93a436.tar.gz
qemu-387c0e8b41ac30ea0791bbd12fefcfc7ea93a436.tar.bz2
include/hw/boards.h: Document machine_class_allow_dynamic_sysbus_dev()
The function machine_class_allow_dynamic_sysbus_dev() is currently undocumented; add a doc comment. 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-2-peter.maydell@linaro.org
-rw-r--r--include/hw/boards.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 4a90549..6fc5cef 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -36,7 +36,22 @@ void machine_set_cpu_numa_node(MachineState *machine,
const CpuInstanceProperties *props,
Error **errp);
+/**
+ * machine_class_allow_dynamic_sysbus_dev: Add type to list of valid devices
+ * @mc: Machine class
+ * @type: type to allow (should be a subtype of TYPE_SYS_BUS_DEVICE)
+ *
+ * Add the QOM type @type to the list of devices of which are subtypes
+ * of TYPE_SYS_BUS_DEVICE but which are still permitted to be dynamically
+ * created (eg by the user on the command line with -device).
+ * By default if the user tries to create any devices on the command line
+ * that are subtypes of TYPE_SYS_BUS_DEVICE they will get an error message;
+ * for the special cases which are permitted for this machine model, the
+ * machine model class init code must call this function to add them
+ * to the list of specifically permitted devices.
+ */
void machine_class_allow_dynamic_sysbus_dev(MachineClass *mc, const char *type);
+
/*
* Checks that backend isn't used, preps it for exclusive usage and
* returns migratable MemoryRegion provided by backend.