diff options
Diffstat (limited to 'sys/arch/amd64/amd64/vm_machdep.c')
-rw-r--r-- | sys/arch/amd64/amd64/vm_machdep.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/amd64/amd64/vm_machdep.c b/sys/arch/amd64/amd64/vm_machdep.c index 5eba51d5c8d..0351ff860b6 100644 --- a/sys/arch/amd64/amd64/vm_machdep.c +++ b/sys/arch/amd64/amd64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.18 2009/04/27 17:48:22 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.19 2009/05/28 09:05:33 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.1 2003/04/26 18:39:33 fvdl Exp $ */ /*- @@ -106,10 +106,9 @@ cpu_fork(struct proc *p1, struct proc *p2, void *stack, size_t stacksize, #endif *pcb = p1->p_addr->u_pcb; - /* - * Activate the address space. Note this will refresh pcb_ldt_sel. - */ - pmap_activate(p2); + pcb->pcb_pmap = p2->p_vmspace->vm_map.pmap; + pcb->pcb_ldt_sel = p2->p_vmspace->vm_map.pmap->pm_ldt_sel; + pcb->pcb_cr3 = p2->p_vmspace->vm_map.pmap->pm_pdirpa; /* Fix up the TSS. */ pcb->pcb_tss.tss_rsp0 = (u_int64_t)p2->p_addr + USPACE - 16; @@ -159,7 +158,7 @@ cpu_exit(struct proc *p) if (p->p_md.md_flags & MDP_USEDMTRR) mtrr_clean(p); - pmap_deactivate(p); + pmap_tlb_droppmap(p->p_vmspace->vm_map.pmap); tss_free(p->p_md.md_tss_sel); sched_exit(p); } |