pseries: Move CPU compatibility property to machine
commit7843c0d60db694b6d97e14ec5538fb97424016c1
authorDavid Gibson <david@gibson.dropbear.id.au>
Sun, 11 Jun 2017 12:33:59 +0000 (11 20:33 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 30 Jun 2017 04:03:31 +0000 (30 14:03 +1000)
tree8b01e6524df27e8e46f5ad77696a11dd9701c4ee
parenta733371214b68881d84725a3c71f60e2faf3b8e2
pseries: Move CPU compatibility property to machine

Server class POWER CPUs have a "compat" property, which is used to set the
backwards compatibility mode for the processor.  However, this only makes
sense for machine types which don't give the guest access to hypervisor
privilege - otherwise the compatibility level is under the guest's control.

To reflect this, this removes the CPU 'compat' property and instead
creates a 'max-cpu-compat' property on the pseries machine.  Strictly
speaking this breaks compatibility, but AFAIK the 'compat' option was
never (directly) used with -device or device_add.

The option was used with -cpu.  So, to maintain compatibility, this
patch adds a hack to the cpu option parsing to strip out any compat
options supplied with -cpu and set them on the machine property
instead of the now deprecated cpu property.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Tested-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
Tested-by: Andrea Bolognani <abologna@redhat.com>
hw/ppc/spapr.c
hw/ppc/spapr_cpu_core.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr.h
target/ppc/compat.c
target/ppc/cpu.h
target/ppc/translate_init.c