target/ppc: Fix backwards migration of msr_mask
commitefb7db250adad82c4bb302f0a80e4ae0c641f0d6
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Mar 2018 02:01:18 +0000 (20 13:01 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 10 Apr 2018 00:05:38 +0000 (10 10:05 +1000)
tree1cc846e98c364cf46366a749b00ca621bdd88ade
parentddd835f32a18c087d3161213f47e89566ce05cc8
target/ppc: Fix backwards migration of msr_mask

21b786f "PowerPC: Add TS bits into msr_mask" added the transaction states
to msr_mask for recent POWER CPUs to allow correct migration of machines
that are in certain interim transactional memory states.

This was correct, but unfortunately breaks backwards of pseries-2.7 and
earlier machine types which (stupidly) transferred the msr_mask in the
migration stream and failed if it wasn't equal on each end.

This works around the problem by masking out the new MSR bits in the
compatibility code to send the msr_mask on old machine types.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
Tested-by: Lukáš Doktor <ldoktor@redhat.com>
target/ppc/machine.c