diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-06-13 16:09:08 +0800 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-06-30 14:03:31 +1000 |
commit | 66d5c492dd3a92fbb6f01f3957fbe3fe5a18613e (patch) | |
tree | f61ad5d5e8d6be7c5e4f4367033d11308c0e3bc4 /hw/ppc/spapr.c | |
parent | 7843c0d60db694b6d97e14ec5538fb97424016c1 (diff) | |
download | qemu-66d5c492dd3a92fbb6f01f3957fbe3fe5a18613e.zip qemu-66d5c492dd3a92fbb6f01f3957fbe3fe5a18613e.tar.gz qemu-66d5c492dd3a92fbb6f01f3957fbe3fe5a18613e.tar.bz2 |
pseries: Reset CPU compatibility mode
Currently, the CPU compatibility mode is set when the cpu is initialized,
then again when the guest negotiates features. This means if a guest
negotiates a compatibility mode, then reboots, that compatibility mode
will be retained across the reset.
Usually that will get overridden when features are negotiated on the next
boot, but it's still not really correct. This patch moves the initial set
up of the compatibility mode from cpu init to reset time. The mode *is*
retained if the reboot was caused by the feature negotiation (it might
be important in that case, though it's unlikely).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Tested-by: Andrea Bolognani <abologna@redhat.com>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 67d4c13..81007b9 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1346,6 +1346,8 @@ static void ppc_spapr_reset(void) if (!spapr->cas_reboot) { spapr_ovec_cleanup(spapr->ov5_cas); spapr->ov5_cas = spapr_ovec_new(); + + ppc_set_compat_all(spapr->max_compat_pvr, &error_fatal); } fdt = spapr_build_fdt(spapr, rtas_addr, spapr->rtas_size); |