From: Zhao Liu <zhao1....@intel.com> As the generic code, kvm should respect the different topologies: smp or hybrid.
So improve the topology related informantion here. Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Zhao Liu <zhao1....@intel.com> --- accel/kvm/kvm-all.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9b2658265561..e62df7b579d0 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2361,12 +2361,13 @@ static int kvm_init(MachineState *ms) static const char upgrade_note[] = "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n" "(see http://sourceforge.net/projects/kvm).\n"; + const char *cpu_name = machine_topo_is_smp(ms) ? "SMP" : "Hybrid"; struct { const char *name; int num; } num_cpus[] = { - { "SMP", ms->smp.cpus }, - { "hotpluggable", ms->smp.max_cpus }, + { cpu_name, machine_topo_get_cpus(ms) }, + { "hotpluggable", machine_topo_get_max_cpus(ms) }, { NULL, } }, *nc = num_cpus; int soft_vcpus_limit, hard_vcpus_limit; -- 2.34.1