aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/spapr.c2
-rw-r--r--hw/ppc/spapr_cpu_core.c50
2 files changed, 1 insertions, 51 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);
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 79a9615..b6610dd 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -21,56 +21,6 @@
#include "sysemu/hw_accel.h"
#include "qemu/error-report.h"
-void spapr_cpu_parse_features(sPAPRMachineState *spapr)
-{
- /*
- * Backwards compatibility hack:
- *
- * CPUs had a "compat=" property which didn't make sense for
- * anything except pseries. It was replaced by "max-cpu-compat"
- * machine option. This supports old command lines like
- * -cpu POWER8,compat=power7
- * By stripping the compat option and applying it to the machine
- * before passing it on to the cpu level parser.
- */
- gchar **inpieces;
- gchar *newprops;
- int i, j;
- gchar *compat_str = NULL;
-
- inpieces = g_strsplit(MACHINE(spapr)->cpu_model, ",", 0);
-
- /* inpieces[0] is the actual model string */
- i = 1;
- j = 1;
- while (inpieces[i]) {
- if (g_str_has_prefix(inpieces[i], "compat=")) {
- /* in case of multiple compat= options */
- g_free(compat_str);
- compat_str = inpieces[i];
- } else {
- j++;
- }
-
- i++;
- /* Excise compat options from list */
- inpieces[j] = inpieces[i];
- }
-
- if (compat_str) {
- char *val = compat_str + strlen("compat=");
-
- object_property_set_str(OBJECT(spapr), val, "max-cpu-compat",
- &error_fatal);
-
- }
-
- newprops = g_strjoinv(",", inpieces);
- cpu_parse_cpu_model(TYPE_POWERPC_CPU, newprops);
- g_free(newprops);
- g_strfreev(inpieces);
-}
-
static void spapr_cpu_reset(void *opaque)
{
PowerPCCPU *cpu = opaque;