WSL2-Linux-Kernel/arch/s390
Michael Holzheu b2a68c2356 s390: allow absolute memory access for /dev/mem
Currently dev/mem for s390 provides only real memory access. This means
that the CPU prefix pages are swapped. The prefix swap for real memory
works as follows:

Each CPU owns a prefix register that points to a page aligned memory
location "P". If this CPU accesses the address range [0,0x1fff], it is
translated by the hardware to [P,P+0x1fff]. Accordingly if this CPU
accesses the address range [P,P+0x1fff], it is translated by the hardware
to [0,0x1fff].  Therefore, if [P,P+0x1fff] or [0,0x1fff] is read from
the current /dev/mem device, the incorrectly swapped memory content is
returned.

With this patch the /dev/mem architecture code is modified to provide
absolute memory access. This is done via the arch specific functions
xlate_dev_mem_ptr() and unxlate_dev_mem_ptr(). For swapped pages on
s390 the function xlate_dev_mem_ptr() now returns a new buffer with a
copy of the requested absolute memory. In case the buffer was allocated,
the unxlate_dev_mem_ptr() function frees it after /dev/mem code has
called copy_to_user().

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-05-16 14:42:38 +02:00
..
appldata sched/accounting: Change cpustat fields to an array 2011-12-06 09:06:38 +01:00
boot [S390] Remove Kerntypes leftovers 2011-12-27 11:27:12 +01:00
crypto Disintegrate asm/system.h for S390 2012-03-28 18:30:02 +01:00
hypfs switch open-coded instances of d_make_root() to new helper 2012-03-20 21:29:35 -04:00
include/asm s390: allow absolute memory access for /dev/mem 2012-05-16 14:42:38 +02:00
kernel s390: make sie intercept independent of thread_info 2012-05-16 14:42:38 +02:00
kvm Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
lib [S390] rework idle code 2012-03-11 11:59:28 -04:00
math-emu s390: change to new flag variable 2011-03-17 14:02:57 +01:00
mm s390: allow absolute memory access for /dev/mem 2012-05-16 14:42:38 +02:00
oprofile Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
Kbuild [S390] make arch/s390 subdirectories depend on config option 2011-12-27 11:27:12 +01:00
Kconfig s390/crash dump: add missing SMP dependency 2012-05-16 14:42:37 +02:00
Kconfig.debug [S390] Write protect module text and RO data 2011-03-15 17:08:23 +01:00
Makefile [S390] cleanup entry point definition 2012-01-18 18:03:41 +01:00
defconfig s390/crypto des: add missing select statement 2012-05-16 14:42:36 +02:00