@@ -307,7 +307,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info,
}
/* Just warn about overflow */
- if (info->system.smp_vcpus > 64 ||
+ if (info->system.vcpus > 64 ||
info->system.max_vcpus > 64) {
fprintf(stderr, "hwprofile: can only track up to 64 CPUs\n");
}
@@ -74,8 +74,8 @@ typedef struct qemu_info_t {
union {
/** @system: information relevant to system emulation */
struct {
- /** @system.smp_vcpus: initial number of vCPUs */
- int smp_vcpus;
+ /** @system.vcpus: initial number of vCPUs */
+ int vcpus;
/** @system.max_vcpus: maximum possible number of vCPUs */
int max_vcpus;
} system;
@@ -374,7 +374,7 @@ int qemu_plugin_n_vcpus(void)
#ifdef CONFIG_USER_ONLY
return -1;
#else
- return get_ms()->smp.cpus;
+ return machine_topo_get_cpus(get_ms());
#endif
}
@@ -383,7 +383,7 @@ int qemu_plugin_n_max_vcpus(void)
#ifdef CONFIG_USER_ONLY
return -1;
#else
- return get_ms()->smp.max_cpus;
+ return machine_topo_get_max_cpus(get_ms());
#endif
}
@@ -298,8 +298,8 @@ int qemu_plugin_load_list(QemuPluginList *head, Error **errp)
#ifndef CONFIG_USER_ONLY
MachineState *ms = MACHINE(qdev_get_machine());
info->system_emulation = true;
- info->system.smp_vcpus = ms->smp.cpus;
- info->system.max_vcpus = ms->smp.max_cpus;
+ info->system.vcpus = machine_topo_get_cpus(ms);
+ info->system.max_vcpus = machine_topo_get_max_cpus(ms);
#else
info->system_emulation = false;
#endif