From: Antonios Motakis <[email protected]> Currently during a panic, panic_stop will print the current cell on the CPU where the panic occurred. However, if the hypervisor panics sufficiently early during initialization, we may end up in a situation where the root cell has not been initialized. This can easily cause a trap loop, making the panic output less useful.
Signed-off-by: Antonios Motakis <[email protected]> --- hypervisor/control.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hypervisor/control.c b/hypervisor/control.c index 94ed6c6..39d293e 100644 --- a/hypervisor/control.c +++ b/hypervisor/control.c @@ -814,8 +814,10 @@ long hypercall(unsigned long code, unsigned long arg1, unsigned long arg2) */ void __attribute__((noreturn)) panic_stop(void) { + struct cell *cell = this_cell(); + panic_printk("Stopping CPU %d (Cell: \"%s\")\n", this_cpu_id(), - this_cell()->config->name); + cell && cell->config ? cell->config->name : "<UNSET>"); if (phys_processor_id() == panic_cpu) panic_in_progress = 0; -- 2.8.0.rc3 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
