]> rtime.felk.cvut.cz Git - jailhouse.git/commit
arm: restore kernel on setup failure
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Fri, 11 Jul 2014 12:40:54 +0000 (13:40 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Fri, 19 Dec 2014 10:04:08 +0000 (11:04 +0100)
commit029f8f25bb6c99b2b0d7e229ede0bff81de7bf50
tree29e1baad340cd87e36f7334526db714ab79ffc8b
parenta009606a8c461f0e4cddc1fc429443decabf330f
arm: restore kernel on setup failure

This patch implements two cases:
- When an error occurs before setting up EL2, there is nothing much
  to do except restore the linux registers stored in the per_cpu
  datas.
- When it happens after EL2 setup, arch_cpu_restore copies the saved
  registers on the stack, and continues into arch_shutdown_self

When it happens during the MMU setup, chances of recovering a clean
state are pretty thin anyway. The bootstrap vectors could be used to
catch and dump a minimal context (which would require a raw_printk
implementation), but we cowardly ignore this case for the moment.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
[Jan: fix memcpy size in cpu_return_el1]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/arm/entry.S
hypervisor/arch/arm/include/asm/setup.h
hypervisor/arch/arm/irqchip.c
hypervisor/arch/arm/setup.c