Skip to content

Commit

Permalink
Revert "core: Only park CPUs in cell_set_loadable if really necessary"
Browse files Browse the repository at this point in the history
This reverts commit ed4c781.

We do need the parking in order to resume the target cell's CPUs. Since
that commit, duplicate "cell shutdown" caused the target cell to spin
in suspension.

Leave a comment in the code as well to avoid future confusion.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
jan-kiszka committed Jan 1, 2018
1 parent 07341fa commit 8d7da7d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hypervisor/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,14 +598,18 @@ static int cell_set_loadable(struct per_cpu *cpu_data, unsigned long id)
if (err)
return err;

if (cell->loadable)
goto out_resume;

/*
* Unconditionally park so that the target cell's CPUs don't stay in
* suspension mode.
*/
for_each_cpu(cpu, cell->cpu_set) {
per_cpu(cpu)->failed = false;
arch_park_cpu(cpu);
}

if (cell->loadable)
goto out_resume;

cell->comm_page.comm_region.cell_state = JAILHOUSE_CELL_SHUT_DOWN;
cell->loadable = true;

Expand Down

0 comments on commit 8d7da7d

Please sign in to comment.