Skip to content

Commit

Permalink
Fix issue where Application Processors would sometimes use the physical
Browse files Browse the repository at this point in the history
address of LAPIC registers without translating it to virtual ones first.

That would happen if VM had changed the page tables before the APs
configured their LAPIC.
  • Loading branch information
Justinien Bouron committed Mar 10, 2019
1 parent 81ce1c3 commit dd0c109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions minix/kernel/arch/i386/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,6 @@ int arch_enable_paging(struct proc * caller)
}
#if CONFIG_SMP
barrier();

wait_for_APs_to_finish_booting();
#endif
#endif

Expand Down
3 changes: 3 additions & 0 deletions minix/kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ void bsp_finish_booting(void)

/* Kernel may no longer use bits of memory as VM will be running soon */
kernel_may_alloc = 0;
#ifdef CONFIG_SMP
wait_for_APs_to_finish_booting();
#endif

switch_to_user();
NOT_REACHABLE;
Expand Down

0 comments on commit dd0c109

Please sign in to comment.