If the hypervisor setup procedures fails before irqchip_init was called,
arch_shutdown will still invoke irqchip_cell_exit. If we run this
function, we'll crash latest when trying to access the not yet mapped
GIC. Leave irqchip_cell_exit early in this case.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
const struct jailhouse_irqchip *root_pins =
irqchip_find_config(root_cell.config);
+ /* might be called by arch_shutdown while rolling back
+ * a failed setup */
+ if (!irqchip_is_init)
+ return;
+
if (root_pins)
root_cell.arch.spis |= cell->arch.spis & root_pins->pin_bitmap;