powerpc/mm: Flush radix process translations when setting MMU type
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Thu, 1 Feb 2018 05:09:44 +0000 (16:09 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 14:42:16 +0000 (15:42 +0100)
commit892674b5058a2b15d35d1185f5d09d8f4c257a7e
tree5ff6a8ff3df2d909bbd900ee7a115f76429accc6
parent4386f223b41868197080bd74882c2d31aca92a1a
powerpc/mm: Flush radix process translations when setting MMU type

commit 62e984ddfd6b056d399e24113f5e6a7145e579d8 upstream.

Radix guests do normally invalidate process-scoped translations when a
new pid is allocated but migrated guests do not invalidate these so
migrated guests crash sometime, especially easy to reproduce with
migration happening within first 10 seconds after the guest boot start
on the same machine.

This adds the "Invalidate process-scoped translations" flush to fix
radix guests migration.

Fixes: 2ee13be34b13 ("KVM: PPC: Book3S HV: Update kvmppc_set_arch_compat() for ISA v3.00")
Cc: stable@vger.kernel.org # v4.10+
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/pgtable_64.c