On the 80386 processor, there is a trick for mapping the page tables into memory: You set a slot in the top-level page directory to point to… the page directory itself. When you follow through this page directory entry, you end up back at the page directory, and the effect is that the process of mapping a linear address to a physical page ends one stop early.¹ You end up pointing not at the destination page, but at the page table that points at the destination page. From the point of view of the address space, it looks like all of the page tables have been mapped into memory. This makes it easier to edit page directory entries² because you can do it within the address space.
I learned about this trick from the developer in charge of the Windows 95 memory manager.³ He said that this technique was actually suggested by Intel itself. In the literature, it appears to be known as fractal page mapping.
Seeing as Intel itself suggested the use of this trick, it is hardly a coincidence that the page table and page directory entry formats are conducive to it. The trick carries over to the x86-64 page table structure, and my understanding is that it works for most other processor architectures as well.
¹ And if you access an address within that loopback page directory entry that itself corresponds to the loopback page directory entry, then you stop two steps early, allowing you to access the page directory entry.
² Or page table entries.
³ It appears that Windows NT uses the same trick. See slides 36 and 37 of Dave Probert’s 2008 presentation titled Architecture of the Windows Kernel.
Note that, when dealing with PAE in 32-bit mode, you need a slightly different fractal mapping, or you'll end up losing 1GB of address space if you take the naive route of mapping the Page Directory Pointer Table into itself. The key, which, at least, going by conversations in the OSDev community, I was one of the few to come up with, is to map the four entries of the PDPT into the last four entries of whichever Page Directory you decide to use for the kernel. This way, you still only use as much virtual memory as the paging...
The link to the PDF of the presentation is failing, I get a 403 error.