From: Jan Kiszka <[email protected]> This is possible because no one needs the initialization results of cell_init() early. These results are more precisely the cpu_set bitmap and the mmio subsystem setup for the root cell. At the a same time, cell_init() will later on benefit from having all CPUs initialized.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/setup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hypervisor/setup.c b/hypervisor/setup.c index 91f1ae1a..7f7cf041 100644 --- a/hypervisor/setup.c +++ b/hypervisor/setup.c @@ -59,10 +59,6 @@ static void init_early(unsigned int cpu_id) root_cell.config = &system_config->root_cell; - error = cell_init(&root_cell); - if (error) - return; - error = arch_init_early(); if (error) return; @@ -168,6 +164,10 @@ static void init_late(void) const struct jailhouse_memory *mem; struct unit *unit; + error = cell_init(&root_cell); + if (error) + return; + for_each_cpu(cpu, &root_cell.cpu_set) expected_cpus++; if (hypervisor_header.online_cpus != expected_cpus) { -- 2.36.1 -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20220627131329.3659-12-ralf.ramsauer%40oth-regensburg.de.
