aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-10-09 21:50:59 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-10-17 10:34:00 +1100
commitb8e999673bd479eed7e71a5e8bc468bca4e31d7d (patch)
treef0a0b41845a6746c950abedc256ce069ae83a195 /hw/ppc/spapr.c
parenta1063aa8a5e7bb66f7d2ea1da335d856df0b6f23 (diff)
downloadqemu-b8e999673bd479eed7e71a5e8bc468bca4e31d7d.zip
qemu-b8e999673bd479eed7e71a5e8bc468bca4e31d7d.tar.gz
qemu-b8e999673bd479eed7e71a5e8bc468bca4e31d7d.tar.bz2
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>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r--hw/ppc/spapr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 147fd2c..112dd91 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2373,7 +2373,7 @@ static void ppc_spapr_init(MachineState *machine)
machine->cpu_model = kvm_enabled() ? "host" : smc->tcg_default_cpu;
}
- spapr_cpu_parse_features(spapr);
+ cpu_parse_cpu_model(TYPE_POWERPC_CPU, machine->cpu_model);
spapr_set_vsmt_mode(spapr, &error_fatal);