]> git.baikalelectronics.ru Git - kernel.git/commit
s390: add support for BEAR enhancement facility
authorSven Schnelle <svens@linux.ibm.com>
Wed, 7 Apr 2021 07:20:17 +0000 (09:20 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 26 Oct 2021 13:21:29 +0000 (15:21 +0200)
commit5ada639bed73d981a36b547c5024f4fc15bdea66
treead9a4dc6ce89d26aaf92d530d48df8e992c629e6
parent8f27c8b946976f8817fddc1e8bd24616863d8dd7
s390: add support for BEAR enhancement facility

The Breaking-Event-Address-Register (BEAR) stores the address of the
last breaking event instruction. Breaking events are usually instructions
that change the program flow - for example branches, and instructions
that modify the address in the PSW like lpswe. This is useful for debugging
wild branches, because one could easily figure out where the wild branch
was originating from.

What is problematic is that lpswe is considered a breaking event, and
therefore overwrites BEAR on kernel exit. The BEAR enhancement facility
adds new instructions that allow to save/restore BEAR and also an lpswey
instruction that doesn't cause a breaking event. So we can save BEAR on
kernel entry and restore it on exit to user space.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/cpu.h
arch/s390/include/asm/lowcore.h
arch/s390/kernel/asm-offsets.c
arch/s390/kernel/entry.S
arch/s390/kernel/irq.c
arch/s390/kernel/process.c
arch/s390/kernel/setup.c
arch/s390/kernel/syscall.c
arch/s390/kernel/traps.c
arch/s390/mm/dump_pagetables.c
arch/s390/mm/vmem.c