Greg Kurz e17a87792d spapr: fix check of cpu alias name in spapr_get_cpu_core_type()
If the user passes an alias name and a property to -cpu, QEMU fails to
find the CPU definition and exits.

$ qemu-system-ppc64 -cpu POWER8E,compat=power7
qemu-system-ppc64: Unable to find sPAPR CPU Core definition

This happens because spapr_get_cpu_core_type() passes the full string from
the command line (i.e. "POWER8E,compat=power7") to ppc_cpu_lookup_alias(),
instead of the alias name piece only (i.e. "POWER8E").

The fix is to pass model_pieces[0] to ppc_cpu_lookup_alias().

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-06 16:15:53 +11:00
..
2016-09-24 01:02:01 +03:00
2016-10-04 13:28:07 +01:00
2016-10-04 13:28:09 +01:00
2016-09-22 18:13:08 +01:00
2016-09-29 12:07:51 +01:00
2016-10-04 14:25:08 +01:00
2016-10-04 14:25:08 +01:00
2016-10-04 13:28:08 +01:00
2016-09-23 11:42:52 +08:00
2016-09-23 11:42:52 +08:00
2016-09-22 18:13:08 +01:00
2016-09-29 11:43:22 +08:00
2016-10-04 13:28:07 +01:00
2016-10-04 13:28:07 +01:00