powerpc/64s: handle ISA v3.1 local copy-paste context switches
authorNicholas Piggin <npiggin@gmail.com>
Tue, 25 Aug 2020 07:55:35 +0000 (17:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Sep 2020 12:57:12 +0000 (22:57 +1000)
commitdc462267d2d7aacffc3c1d99b02d7a7c59db7c66
tree0a3be518b53b3d0d4f4e1874f829b6221ddaf2a1
parenta02f6d42357acf6e5de6ffc728e6e77faf3ad217
powerpc/64s: handle ISA v3.1 local copy-paste context switches

The ISA v3.1 the copy-paste facility has a new memory move functionality
which allows the copy buffer to be pasted to domestic memory (RAM) as
opposed to foreign memory (accelerator).

This means the POWER9 trick of avoiding the cp_abort on context switch if
the process had not mapped foreign memory does not work on POWER10. Do the
cp_abort unconditionally there.

KVM must also cp_abort on guest exit to prevent copy buffer state leaking
between contexts.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200825075535.224536-1-npiggin@gmail.com
arch/powerpc/kernel/process.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S