• Sven Schnelle's avatar
    s390: add support for BEAR enhancement facility · 3b051e89
    Sven Schnelle authored
    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: default avatarSven Schnelle <svens@linux.ibm.com>
    Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    3b051e89
process.c 5.92 KB