x86 page table management
x86 page table management
Hello I have a question about page table management on x86. To allocate a page, is it enough to add a page table entry with the physical address and the right bits? To free a page, is it enough to set a page table entry to zero and to use invlpg? How do I use invlpg (physical or virtual page address)?
Re: x86 page table management
Allocating a page means picking some free page and deciding that you want to use it. When you refer to it from a page table, it's called mapping the page, and when you stop referring to it, it is called unmapping. Invlpg is used with a memory operand and applies to the page that contains the address. For example, if the DS base is 0, the instruction invlpg ds:[12345678h] will invalidate the TLB entry for linear address 12345000h.
Re: x86 page table management
So invlpg takes a virtual page address?
Re: x86 page table management
Naturally. But have you heard of Intel® 64 and IA-32 Architectures Software Developer Manuals?