ppc: move '-cpu foo,compat=xxx' parsing into ppc_cpu_parse_featurestr()
commitb8e999673bd479eed7e71a5e8bc468bca4e31d7d
authorIgor Mammedov <imammedo@redhat.com>
Mon, 9 Oct 2017 19:50:59 +0000 (9 21:50 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 16 Oct 2017 23:34:00 +0000 (17 10:34 +1100)
treef0a0b41845a6746c950abedc256ce069ae83a195
parenta1063aa8a5e7bb66f7d2ea1da335d856df0b6f23
ppc: move '-cpu foo,compat=xxx' parsing into ppc_cpu_parse_featurestr()

there is a dedicated callback CPUClass::parse_features
which purpose is to convert -cpu features into a set of
global properties AND deal with compat/legacy features
that couldn't be directly translated into CPU's properties.

Create ppc variant of it (ppc_cpu_parse_featurestr) and
move 'compat=val' handling from spapr_cpu_core.c into it.
That removes a dependency of board/core code on cpu_model
parsing and would let to reuse common -cpu parsing
introduced by 6063d4c0

Set "max-cpu-compat" property only if it exists, in practice
it should limit 'compat' hack to spapr machine and allow
to avoid including machine/spapr headers in target/ppc/cpu.c

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_cpu_core.c
include/hw/ppc/spapr.h
target/ppc/cpu-qom.h
target/ppc/translate_init.c