diff options
author | Igor Mammedov <imammedo@redhat.com> | 2018-01-10 16:22:50 +0100 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-01-19 11:18:51 -0200 |
commit | d342eb7662bcfe47c26615b67025ae59a383489d (patch) | |
tree | e328f69c3382a3d3e6fa8ea9255a68cf9884c303 /include | |
parent | cb836434cda103fac3c06174e70bf5c9b7083b8e (diff) |
possible_cpus: add CPUArchId::type field
Remove dependency of possible_cpus on 1st CPU instance,
which decouples configuration data from CPU instances that
are created using that data.
Also later it would be used for enabling early cpu to numa node
configuration at runtime qmp_query_hotpluggable_cpus() should
provide a list of available cpu slots at early stage,
before machine_init() is called and the 1st cpu is created,
so that mgmt might be able to call it and use output to set
numa mapping.
Use MachineClass::possible_cpu_arch_ids() callback to set
cpu type info, along with the rest of possible cpu properties,
to let machine define which cpu type* will be used.
* for SPAPR it will be a spapr core type and for ARM/s390x/x86
a respective descendant of CPUClass.
Move parse_numa_opts() in vl.c after cpu_model is parsed into
cpu_type so that possible_cpu_arch_ids() would know which
cpu_type to use during layout initialization.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <1515597770-268979-1-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/boards.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 041bc08971..efb0a9edfd 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -83,6 +83,7 @@ void machine_class_allow_dynamic_sysbus_dev(MachineClass *mc, const char *type); * CPUArchId: * @arch_id - architecture-dependent CPU ID of present or possible CPU * @cpu - pointer to corresponding CPU object if it's present on NULL otherwise + * @type - QOM class name of possible @cpu object * @props - CPU object properties, initialized by board * #vcpus_count - number of threads provided by @cpu object */ @@ -91,6 +92,7 @@ typedef struct { int64_t vcpus_count; CpuInstanceProperties props; Object *cpu; + const char *type; } CPUArchId; /** |