spapr: Simplify handling of pre ISA 3.0 guest workaround handling
commitdaa36379ce1a0a683562d40ca20f9b722ef595e1
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 28 Aug 2019 03:59:27 +0000 (28 13:59 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Oct 2019 00:25:23 +0000 (4 10:25 +1000)
tree9ac074b4e71f53fe1ffe869b43afda7b0923befb
parent972bd57689f1e11311d86b290134ea2ed9c7c11e
spapr: Simplify handling of pre ISA 3.0 guest workaround handling

Certain old guest versions don't understand the radix MMU introduced with
POWER ISA 3.0, but incorrectly select it if presented with the option at
CAS time.  We workaround this in qemu by explicitly excluding the radix
(and other ISA 3.0 linked) options if the guest doesn't explicitly note
support for ISA 3.0.

This is handled by the 'cas_legacy_guest_workaround' flag, which is pretty
vague.  Rename it to 'cas_pre_isa3_guest' to be clearer about what it's for.

In addition, we unnecessarily call spapr_populate_pa_features() with
different options when initially constructing the device tree and when
adjusting it at CAS time.  At the initial construct time cas_pre_isa3_guest
is already false, so we can still use the flag, rather than explicitly
overriding it to be false at the callsite.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr.h