Virtual and physical page address
From: Mike Krinkin <hidden>
Date: 2016-02-07 21:43:30
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 kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies