X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=blobdiff_plain;f=kernel%2Farch%2Fx64%2Fthread.cc;fp=kernel%2Farch%2Fx64%2Fthread.cc;h=8fccb617817159bf9c09a45e1a8b57b9292cf654;hp=f4c80b45975cb827847646a6786aa5d67f295fc7;hb=1ac390fe1e18444008857b056c947710be9621a8;hpb=6e64b28821757af60447c790ae52a91831a9d4f0 diff --git a/kernel/arch/x64/thread.cc b/kernel/arch/x64/thread.cc index f4c80b4..8fccb61 100644 --- a/kernel/arch/x64/thread.cc +++ b/kernel/arch/x64/thread.cc @@ -21,16 +21,16 @@ namespace Arch { { u64 dummy1, dummy2; - if (dest->addr_space) { - assert(dest->addr_space == dest->active_addr_space); + if (dest->aspace) { + assert(dest->aspace == dest->active_aspace); - if (dest->addr_space != src->active_addr_space) { - u64 cr3 = Mem::kvirt_to_phys(dest->addr_space-> + if (dest->aspace != src->active_aspace) { + u64 cr3 = Mem::kvirt_to_phys(dest->aspace-> page_table->toplevel); asm volatile("movq %0, %%cr3" : : "r" (cr3) : "memory"); } } else { - dest->active_addr_space = src->active_addr_space; + dest->active_aspace = src->active_aspace; } Priv::tss.rsp[0] = reinterpret_cast(dest);