Topology devices are used to define CPUs and need to be created and realized earlier than current qemu_create_cli_devices(). Use this new catogory to identify such special devices, which allows to create them earlier in subsequent change. Signed-off-by: Zhao Liu <zhao1.liu@xxxxxxxxx> --- hw/cpu/cpu-topology.c | 2 +- include/hw/qdev-core.h | 1 + system/qdev-monitor.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/cpu/cpu-topology.c b/hw/cpu/cpu-topology.c index 3e8982ff7e6c..ce3da844a7d8 100644 --- a/hw/cpu/cpu-topology.c +++ b/hw/cpu/cpu-topology.c @@ -164,7 +164,7 @@ static void cpu_topo_class_init(ObjectClass *oc, void *data) DeviceClass *dc = DEVICE_CLASS(oc); CPUTopoClass *tc = CPU_TOPO_CLASS(oc); - set_bit(DEVICE_CATEGORY_CPU, dc->categories); + set_bit(DEVICE_CATEGORY_CPU_DEF, dc->categories); dc->realize = cpu_topo_realize; /* diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 77223b28c788..ddcaa329e3ec 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -86,6 +86,7 @@ typedef enum DeviceCategory { DEVICE_CATEGORY_SOUND, DEVICE_CATEGORY_MISC, DEVICE_CATEGORY_CPU, + DEVICE_CATEGORY_CPU_DEF, DEVICE_CATEGORY_WATCHDOG, DEVICE_CATEGORY_MAX } DeviceCategory; diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index fe120353fedc..07863d4e650a 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -179,6 +179,7 @@ static void qdev_print_devinfos(bool show_no_user) [DEVICE_CATEGORY_SOUND] = "Sound", [DEVICE_CATEGORY_MISC] = "Misc", [DEVICE_CATEGORY_CPU] = "CPU", + [DEVICE_CATEGORY_CPU_DEF] = "CPU Definition", [DEVICE_CATEGORY_WATCHDOG]= "Watchdog", [DEVICE_CATEGORY_MAX] = "Uncategorized", }; -- 2.34.1