@@ -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;
/*
@@ -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;
@@ -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",
};
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@intel.com> --- hw/cpu/cpu-topology.c | 2 +- include/hw/qdev-core.h | 1 + system/qdev-monitor.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)