atomicity fix when enabling paging

- before enabling paging VM asks kernel to resize its segments. This
  may cause kernel to segfault if APIC is used and an interrupt
  happens between this and paging enabled. As these are 2 separate
  vmctl calls it is not atomic. This patch fixes this problem. VM does
  not ask kernel to resize the segments in a separate call anymore.
  The new segments limit is part of the "enable paging" call. It
  generalizes this call in such a way that more information can be
  passed as need be or the information may be completely different if
  another architecture requires this.
This commit is contained in:
Tomas Hruby
2010-03-22 07:42:52 +00:00
parent a5094f7d7f
commit 12ef495cac
7 changed files with 55 additions and 23 deletions

View File

@@ -173,7 +173,7 @@ _PROTOTYPE( void arch_do_syscall, (struct proc *proc) );
_PROTOTYPE( int arch_phys_map, (int index, phys_bytes *addr,
phys_bytes *len, int *flags));
_PROTOTYPE( int arch_phys_map_reply, (int index, vir_bytes addr));
_PROTOTYPE( int arch_enable_paging, (void));
_PROTOTYPE( int arch_enable_paging, (struct proc * caller, message * m_ptr));
_PROTOTYPE( int copy_msg_from_user, (struct proc * p, message * user_mbuf,
message * dst));