We know this following function from Linux kernel, which takes a pointer to the struct page and outputs the virtual address of the page frame:
void * page_address(struct page *page) So I wonder if a function in a reserved version is available: taking a virtual memory address and outputting the corresponding virtual page id? (The output should not be a struct page in-memory data structure because of the assumption, that a page could be swapped to the disk.)
Thanks. Correct me, if I am wrong or have a duplicated question over SO.