Răsfoiți Sursa

hw/core: Introduce module-id as the topology subindex

Add module-id in CpuInstanceProperties, to locate the CPU with module
level.

Suggested-by: Xiaoyao Li <xiaoyao.li@intel.com>
Tested-by: Yongwei Ma <yongwei.ma@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240424154929.1487382-4-zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Zhao Liu 1 an în urmă
părinte
comite
989bb312b0
2 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 4 0
      hw/core/machine-hmp-cmds.c
  2. 4 0
      qapi/machine.json

+ 4 - 0
hw/core/machine-hmp-cmds.c

@@ -87,6 +87,10 @@ void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict)
             monitor_printf(mon, "    cluster-id: \"%" PRIu64 "\"\n",
             monitor_printf(mon, "    cluster-id: \"%" PRIu64 "\"\n",
                            c->cluster_id);
                            c->cluster_id);
         }
         }
+        if (c->has_module_id) {
+            monitor_printf(mon, "    module-id: \"%" PRIu64 "\"\n",
+                           c->module_id);
+        }
         if (c->has_core_id) {
         if (c->has_core_id) {
             monitor_printf(mon, "    core-id: \"%" PRIu64 "\"\n", c->core_id);
             monitor_printf(mon, "    core-id: \"%" PRIu64 "\"\n", c->core_id);
         }
         }

+ 4 - 0
qapi/machine.json

@@ -988,6 +988,9 @@
 # @cluster-id: cluster number within the parent container the CPU
 # @cluster-id: cluster number within the parent container the CPU
 #     belongs to (since 7.1)
 #     belongs to (since 7.1)
 #
 #
+# @module-id: module number within the parent container the CPU belongs
+#     to (since 9.1)
+#
 # @core-id: core number within the parent container the CPU belongs to
 # @core-id: core number within the parent container the CPU belongs to
 #
 #
 # @thread-id: thread number within the core the CPU  belongs to
 # @thread-id: thread number within the core the CPU  belongs to
@@ -1005,6 +1008,7 @@
             '*socket-id': 'int',
             '*socket-id': 'int',
             '*die-id': 'int',
             '*die-id': 'int',
             '*cluster-id': 'int',
             '*cluster-id': 'int',
+            '*module-id': 'int',
             '*core-id': 'int',
             '*core-id': 'int',
             '*thread-id': 'int'
             '*thread-id': 'int'
   }
   }