Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Set up the segment descriptors in the same way you set up the GDT entries for the OS, but with the difference that they will have a privilege level of 3 instead of 0. And the user/supervisor bit in the page tables is set to 1 for user pages.