Virtual and physical page address

Mike Krinkin krinkin.m.u at
Sun Feb 7 16:43:30 EST 2016

On Sun, Feb 07, 2016 at 04:24:08PM -0500, Mohammad A Khasawneh wrote:
> Hello everyone,
> I am attempting to dump the page table of a process in terms of virtual
> addresses and the corresponding physical addresses. I am looking for
> information whether the pointers I am using are correct for this purpose:
> 1. Can I say that pte_page(pte_t) returns the virtual address of the page
> that the PTE points at?

pte_page returns struct page pointer (virtual address of the struct page, but
i suppose it's not the virtual address you need), it has nothing to do with a
virtual address the pte corresponds to.

> 2. can I say that page_to_phys(struct page) returns the physical address of
> that same entry?

page_to_phys returns physical address the struct page corresponds to, so yes.

> Thank you,
> Mohammad

> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at

More information about the Kernelnewbies mailing list