linux/arch/s390/kernel
Heiko Carstens 87d5986345 s390/mm: remove set_fs / rework address space handling
Remove set_fs support from s390. With doing this rework address space
handling and simplify it. As a result address spaces are now setup
like this:

CPU running in              | %cr1 ASCE | %cr7 ASCE | %cr13 ASCE
----------------------------|-----------|-----------|-----------
user space                  |  user     |  user     |  kernel
kernel, normal execution    |  kernel   |  user     |  kernel
kernel, kvm guest execution |  gmap     |  user     |  kernel

To achieve this the getcpu vdso syscall is removed in order to avoid
secondary address mode and a separate vdso address space in for user
space. The getcpu vdso syscall will be implemented differently with a
subsequent patch.

The kernel accesses user space always via secondary address space.
This happens in different ways:
- with mvcos in home space mode and directly read/write to secondary
  address space
- with mvcs/mvcp in primary space mode and copy from primary space to
  secondary space or vice versa
- with e.g. cs in secondary space mode and access secondary space

Switching translation modes happens with sacf before and after
instructions which access user space, like before.

Lazy handling of control register reloading is removed in the hope to
make everything simpler, but at the cost of making kernel entry and
exit a bit slower. That is: on kernel entry the primary asce is always
changed to contain the kernel asce, and on kernel exit the primary
asce is changed again so it contains the user asce.

In kernel mode there is only one exception to the primary asce: when
kvm guests are executed the primary asce contains the gmap asce (which
describes the guest address space). The primary asce is reset to
kernel asce whenever kvm guest execution is interrupted, so that this
doesn't has to be taken into account for any user space accesses.

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2020-11-23 12:01:12 +01:00
..
syscalls mm/madvise: introduce process_madvise() syscall: an external memory hinting API 2020-10-18 09:27:10 -07:00
vdso64 s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
.gitignore
alternative.c
asm-offsets.c s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
audit.c
audit.h
base.S s390: remove unused s390_base_ext_handler 2020-11-09 11:20:58 +01:00
cache.c
compat_audit.c
compat_linux.c
compat_linux.h
compat_ptrace.h
compat_signal.c
cpcmd.c
crash_dump.c s390/nvme: support firmware-assisted dump to NVMe disks 2020-10-02 14:40:48 +02:00
debug.c s390/debug: debug feature version 3 2020-08-11 18:16:43 +02:00
diag.c s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro 2020-09-17 14:11:03 +02:00
dis.c s390/dis: get rid of set_fs() usage 2020-09-17 14:11:03 +02:00
dumpstack.c
early.c s390: remove unused s390_base_ext_handler 2020-11-09 11:20:58 +01:00
early_printk.c s390/sclp: remove unused sclp_early_printk_forced 2020-09-21 08:08:44 +02:00
ebcdic.c
entry.h s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
entry.S s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
fpu.c
ftrace.c s390/ftrace: assume -mhotpatch or -mrecord-mcount always available 2020-11-20 19:19:11 +01:00
guarded_storage.c
head64.S s390/early: rewrite program parameter setup in C 2020-11-09 11:21:00 +01:00
idle.c s390/idle: fix suspicious RCU usage 2020-09-14 10:08:07 +02:00
ima_arch.c
ipl.c s390/ipl: add support to control memory clearing for nvme re-IPL 2020-10-02 14:40:48 +02:00
ipl_vmparm.c
irq.c
jump_label.c
kdebugfs.c
kexec_elf.c
kexec_image.c
kprobes.c s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
kprobes_insn_page.S s390/kprobes: move insn_page to text segment 2020-10-09 23:45:30 +02:00
lgr.c s390: convert to msecs_to_jiffies() 2020-06-29 16:31:46 +02:00
machine_kexec.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
machine_kexec_file.c
machine_kexec_reloc.c
Makefile s390/kprobes: move insn_page to text segment 2020-10-09 23:45:30 +02:00
mcount.S s390/ftrace: assume -mhotpatch or -mrecord-mcount always available 2020-11-20 19:19:11 +01:00
module.c
nmi.c
nospec-branch.c
nospec-sysfs.c
numa.c s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
os_info.c
perf_cpum_cf.c
perf_cpum_cf_common.c
perf_cpum_cf_diag.c
perf_cpum_cf_events.c s390/cpum_cf,perf: change DFLT_CCERROR counter name 2020-07-21 13:53:56 +02:00
perf_cpum_sf.c s390/cpum_sf.c: fix file permission for cpum_sfb_size 2020-11-12 12:10:36 +01:00
perf_event.c
perf_regs.c
pgm_check.S s390: add 3f program exception handler 2020-09-14 10:08:07 +02:00
process.c s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
processor.c
ptrace.c s390/ptrace: fix storage key handling 2020-08-17 13:17:14 +02:00
reipl.S
relocate_kernel.S
runtime_instr.c s390/runtime_instrumentation: fix storage key handling 2020-08-17 13:17:10 +02:00
setup.c s390: unify identity mapping limits handling 2020-11-20 19:19:10 +01:00
signal.c tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume() 2020-10-17 15:04:36 -06:00
smp.c s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
stacktrace.c stacktrace: Remove reliable argument from arch_stack_walk() callback 2020-09-18 14:24:16 +01:00
sthyi.c
sys_s390.c
sysinfo.c
time.c s390/stp: let subsys_system_register() sysfs attributes 2020-11-20 19:19:11 +01:00
topology.c s390: convert to msecs_to_jiffies() 2020-06-29 16:31:46 +02:00
trace.c
traps.c s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
unwind_bc.c
uprobes.c
uv.c s390/kasan: support protvirt with 4-level paging 2020-09-16 14:08:48 +02:00
vdso.c s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
vmlinux.lds.S vmlinux.lds.h: Split ELF_DETAILS from STABS_DEBUG 2020-09-01 09:50:35 +02:00
vtime.c