@@ -2030,7 +2030,7 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
0, socket_id, NULL, 0);
}
- if (mc->smp_props.clusters_supported && mc->smp_props.has_clusters) {
+ if (mc->topo_props.clusters_supported && mc->topo_props.has_clusters) {
if (cpus->cpus[n].props.cluster_id != cluster_id) {
assert(cpus->cpus[n].props.cluster_id > cluster_id);
cluster_id = cpus->cpus[n].props.cluster_id;
@@ -2687,7 +2687,7 @@ static const CPUArchIdList *virt_possible_cpu_arch_ids(MachineState *ms)
ms->possible_cpus->cpus[n].arch_id =
virt_cpu_mp_affinity(vms, n);
- assert(!mc->smp_props.dies_supported);
+ assert(!mc->topo_props.dies_supported);
ms->possible_cpus->cpus[n].props.has_socket_id = true;
ms->possible_cpus->cpus[n].props.socket_id =
n / (smp_clusters * smp_cores * smp_threads);
@@ -3029,7 +3029,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
hc->unplug_request = virt_machine_device_unplug_request_cb;
hc->unplug = virt_machine_device_unplug_cb;
mc->nvdimm_supported = true;
- mc->smp_props.clusters_supported = true;
+ mc->topo_props.clusters_supported = true;
mc->auto_enable_numa_with_memhp = true;
mc->auto_enable_numa_with_memdev = true;
mc->default_ram_id = "mach-virt.ram";
@@ -3280,7 +3280,7 @@ static void virt_machine_6_1_options(MachineClass *mc)
virt_machine_6_2_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
- mc->smp_props.prefer_sockets = true;
+ mc->topo_props.prefer_sockets = true;
vmc->no_cpu_topology = true;
/* qemu ITS was introduced with 6.2 */
@@ -187,11 +187,11 @@ static char *cpu_hierarchy_to_string(MachineState *ms)
g_string_append_printf(s, "sockets (%u)", machine_topo_get_sockets(ms));
- if (mc->smp_props.dies_supported) {
+ if (mc->topo_props.dies_supported) {
g_string_append_printf(s, " * dies (%u)", machine_topo_get_dies(ms));
}
- if (mc->smp_props.clusters_supported) {
+ if (mc->topo_props.clusters_supported) {
g_string_append_printf(s, " * clusters (%u)",
machine_topo_get_clusters(ms));
}
@@ -256,11 +256,11 @@ void machine_parse_smp_config(MachineState *ms,
* If not supported by the machine, a topology parameter must be
* omitted or specified equal to 1.
*/
- if (!mc->smp_props.dies_supported && dies > 1) {
+ if (!mc->topo_props.dies_supported && dies > 1) {
error_setg(errp, "dies not supported by this machine's CPU topology");
return;
}
- if (!mc->smp_props.clusters_supported && clusters > 1) {
+ if (!mc->topo_props.clusters_supported && clusters > 1) {
error_setg(errp, "clusters not supported by this machine's CPU topology");
return;
}
@@ -276,7 +276,7 @@ void machine_parse_smp_config(MachineState *ms,
} else {
maxcpus = maxcpus > 0 ? maxcpus : cpus;
- if (mc->smp_props.prefer_sockets) {
+ if (mc->topo_props.prefer_sockets) {
/* prefer sockets over cores before 6.2 */
if (sockets == 0) {
cores = cores > 0 ? cores : 1;
@@ -315,7 +315,7 @@ void machine_parse_smp_config(MachineState *ms,
ms->topo.smp.cores = cores;
ms->topo.smp.threads = threads;
- mc->smp_props.has_clusters = config->has_clusters;
+ mc->topo_props.has_clusters = config->has_clusters;
/* sanity-check of the computed topology */
if (sockets * dies * clusters * cores * threads != maxcpus) {
@@ -1928,8 +1928,8 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
hc->unplug = pc_machine_device_unplug_cb;
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
mc->nvdimm_supported = true;
- mc->smp_props.dies_supported = true;
- mc->smp_props.clusters_supported = true;
+ mc->topo_props.dies_supported = true;
+ mc->topo_props.clusters_supported = true;
mc->default_ram_id = "pc.ram";
object_class_property_add(oc, PC_MACHINE_MAX_RAM_BELOW_4G, "size",
@@ -513,7 +513,7 @@ static void pc_i440fx_6_1_machine_options(MachineClass *m)
pc_i440fx_6_2_machine_options(m);
compat_props_add(m->compat_props, hw_compat_6_1, hw_compat_6_1_len);
compat_props_add(m->compat_props, pc_compat_6_1, pc_compat_6_1_len);
- m->smp_props.prefer_sockets = true;
+ m->topo_props.prefer_sockets = true;
}
DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", NULL,
@@ -432,7 +432,7 @@ static void pc_q35_6_1_machine_options(MachineClass *m)
pc_q35_6_2_machine_options(m);
compat_props_add(m->compat_props, hw_compat_6_1, hw_compat_6_1_len);
compat_props_add(m->compat_props, pc_compat_6_1, pc_compat_6_1_len);
- m->smp_props.prefer_sockets = true;
+ m->topo_props.prefer_sockets = true;
}
DEFINE_Q35_MACHINE(v6_1, "pc-q35-6.1", NULL,
@@ -4801,7 +4801,7 @@ static void spapr_machine_6_1_class_options(MachineClass *mc)
spapr_machine_6_2_class_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
smc->pre_6_2_numa_affinity = true;
- mc->smp_props.prefer_sockets = true;
+ mc->topo_props.prefer_sockets = true;
}
DEFINE_SPAPR_MACHINE(6_1, "6.1", false);
@@ -912,7 +912,7 @@ static void ccw_machine_6_1_class_options(MachineClass *mc)
{
ccw_machine_6_2_class_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len);
- mc->smp_props.prefer_sockets = true;
+ mc->topo_props.prefer_sockets = true;
}
DEFINE_CCW_MACHINE(6_1, "6.1", false);
@@ -288,7 +288,7 @@ struct MachineClass {
bool nvdimm_supported;
bool numa_mem_supported;
bool auto_enable_numa;
- TopoCompatProps smp_props;
+ TopoCompatProps topo_props;
const char *default_ram_id;
HotplugHandler *(*get_hotplug_handler)(MachineState *machine,
@@ -500,11 +500,11 @@ static void smp_parse_test(MachineState *ms, SMPTestData *data, bool is_valid)
{
MachineClass *mc = MACHINE_GET_CLASS(ms);
- mc->smp_props.prefer_sockets = true;
+ mc->topo_props.prefer_sockets = true;
check_parse(ms, &data->config, &data->expect_prefer_sockets,
data->expect_error, is_valid);
- mc->smp_props.prefer_sockets = false;
+ mc->topo_props.prefer_sockets = false;
check_parse(ms, &data->config, &data->expect_prefer_cores,
data->expect_error, is_valid);
}
@@ -512,12 +512,12 @@ static void smp_parse_test(MachineState *ms, SMPTestData *data, bool is_valid)
/* The parsed results of the unsupported parameters should be 1 */
static void unsupported_params_init(const MachineClass *mc, SMPTestData *data)
{
- if (!mc->smp_props.dies_supported) {
+ if (!mc->topo_props.dies_supported) {
data->expect_prefer_sockets.smp.dies = 1;
data->expect_prefer_cores.smp.dies = 1;
}
- if (!mc->smp_props.clusters_supported) {
+ if (!mc->topo_props.clusters_supported) {
data->expect_prefer_sockets.smp.clusters = 1;
data->expect_prefer_cores.smp.clusters = 1;
}
@@ -553,14 +553,14 @@ static void machine_with_dies_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
- mc->smp_props.dies_supported = true;
+ mc->topo_props.dies_supported = true;
}
static void machine_with_clusters_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
- mc->smp_props.clusters_supported = true;
+ mc->topo_props.clusters_supported = true;
}
static void test_generic_valid(const void *opaque)