]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/loongarch: Add RAMFB to dynamic_sysbus_devices list
authorXiaojuan Yang <yangxiaojuan@loongson.cn>
Wed, 10 Aug 2022 08:41:52 +0000 (16:41 +0800)
committerSong Gao <gaosong@loongson.cn>
Tue, 20 Sep 2022 07:44:25 +0000 (15:44 +0800)
Add RAMFB device to dynamic_sysbus_devices list so that it can be
hotpluged to the machine.

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Acked-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220908094623.73051-7-yangxiaojuan@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
hw/loongarch/virt.c

index eedff107589b4eca68f4a57f89b5bea5f1658740..0dd57935b04b77a75963540bf65eb75b7d3ad180 100644 (file)
@@ -39,6 +39,7 @@
 #include <libfdt.h>
 #include "hw/core/sysbus-fdt.h"
 #include "hw/platform-bus.h"
+#include "hw/display/ramfb.h"
 
 static void create_fdt(LoongArchMachineState *lams)
 {
@@ -852,6 +853,7 @@ static void loongarch_class_init(ObjectClass *oc, void *data)
         NULL, NULL);
     object_class_property_set_description(oc, "acpi",
         "Enable ACPI");
+    machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
 }
 
 static const TypeInfo loongarch_machine_types[] = {