OSDN Git Service

pseries: Reset CPU compatibility mode
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 13 Jun 2017 08:09:08 +0000 (16:09 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 30 Jun 2017 04:03:31 +0000 (14:03 +1000)
commit66d5c492dd3a92fbb6f01f3957fbe3fe5a18613e
treef61ad5d5e8d6be7c5e4f4367033d11308c0e3bc4
parent7843c0d60db694b6d97e14ec5538fb97424016c1
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>
hw/ppc/spapr.c
hw/ppc/spapr_cpu_core.c