linux_dsm_epyc7002/arch/powerpc
Chris Smart 8a649045e7 powerpc: Add support for userspace P9 copy paste
The copy paste facility introduced in POWER9 provides an optimised
mechanism for a userspace application to copy a cacheline. This is
provided by a pair of instructions, copy and paste, while a third,
cp_abort (copy paste abort), provides a clean up of the state in case of
a failure.

The copy instruction will read a 128 byte cacheline and store it in an
internal buffer. The subsequent paste instruction will store this
internal buffer to memory and set a CR field if the paste succeeds.

Since the state of the copy paste buffer is internal (and not
architecturally visible), in the unlikely event of a context switch, the
state cannot be stored and the paste should therefore fail.

The cp_abort instruction exists to fail and clean up any such
interrupted copy paste sequence and is to be called by the kernel as
part of the context switch. Doing so prevents data from a preceding copy
in one process leaking into the paste of another.

This code enables use of the cp_abort instruction if a supported
processor is detected.

NOTE: this is for userspace only, not in kernel, and does not deal
with KVM guests.

Patch created with much assistance from Michael Neuling
<mikey@neuling.org>

Signed-off-by: Chris Smart <chris@distroguy.com>
Reviewed-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-04-27 09:28:07 +10:00
..
boot powerpc/fsl/dts: Add "jedec,spi-nor" flash compatible 2016-03-11 20:06:41 -06:00
configs powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
crypto powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
include powerpc: Add support for userspace P9 copy paste 2016-04-27 09:28:07 +10:00
kernel powerpc: Add support for userspace P9 copy paste 2016-04-27 09:28:07 +10:00
kvm KVM: PPC: do not compile in vfio.o unconditionally 2016-03-22 16:38:38 +01:00
lib powerpc: Make generic_memcpy() private to copy_32.S 2016-04-11 20:30:41 +10:00
math-emu
mm powerpc: sparse: Include headers for __weak symbols 2016-04-12 21:05:19 +10:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-06 00:43:52 -05:00
oprofile powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
perf powerpc/perf: Add support for sampling interrupt register state 2016-04-21 23:32:59 +10:00
platforms powerpc/cell: Make spu_base.c explicitly non-modular 2016-04-11 20:30:42 +10:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc/mpic: handle subsys_system_register() failure 2016-04-27 09:23:41 +10:00
xmon powerpc/xmon: Add xmon command to dump process/task similar to ps(1) 2016-02-10 10:22:04 +11:00
Kconfig powerpc/perf: Add support for sampling interrupt register state 2016-04-21 23:32:59 +10:00
Kconfig.debug powerpc updates for 4.5 2016-01-15 13:18:47 -08:00
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-03-14 20:05:14 +11:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00