linux/arch/s390/mm
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
..
cmm.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
dump_pagetables.c s390: unify identity mapping limits handling 2020-11-20 19:19:10 +01:00
extmem.c s390/extmem: remove stale -ENOSPC comment and handling 2020-07-03 10:49:16 +02:00
fault.c s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
gmap.c s390/uv: add destroy page call 2020-09-14 11:38:35 +02:00
hugetlbpage.c s390/mm: fix huge pte soft dirty copying 2020-07-09 15:18:23 +02:00
init.c s390/kasan: remove obvious parameter with the only possible value 2020-11-09 11:20:59 +01:00
kasan_init.c s390: unify identity mapping limits handling 2020-11-20 19:19:10 +01:00
maccess.c s390/maccess: add no DAT mode to kernel_write 2020-06-29 16:26:36 +02:00
Makefile s390: add ARCH_HAS_DEBUG_WX support 2020-09-14 11:38:35 +02:00
mmap.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
page-states.c arch, mm: replace for_each_memblock() with for_each_mem_pfn_range() 2020-10-13 18:38:35 -07:00
pageattr.c s390/mm,ptdump: hold cpa mutex while walking for kernel page table dump 2020-09-14 11:38:34 +02:00
pgalloc.c s390/mm: remove set_fs / rework address space handling 2020-11-23 12:01:12 +01:00
pgtable.c s390/pci: Implement ioremap_wc/prot() with MIO 2020-09-14 10:30:07 +02:00
vmem.c s390/vmem: make variable and function names consistent 2020-11-20 19:19:12 +01:00