Hi,

I am trying to obtain the physical address translation of a virtual address 
after a page fault is handled in the kernel.
I have added the 3 lines following this sentence after the __do_page_fault call 
in the do_page_fault function in arch/arm64/mm/fault.c in the linux sources 
provided here (https://github.com/gem5/linux-arm-gem5.git).

                        vma = find_vma(mm, addr);
                        phy_pg = follow_page(vma, addr, FOLL_NOWAIT);
                        phy_addr = (unsigned long long) page_to_phys(phy_pg);
                        show_pte(mm, addr);

The problem is follow-page always returns NULL, meaning it couldn't find the 
page table entry for that virtual address. The show_pte confirms this as it 
shows that pte value is 0.
Now when I put these modifications in the sources of a linux kernel to run in 
qemu I actually get values for pte, and thus a non-NULL value for follow_page, 
at each resolution of a major page fault, which is what one would expect.
Is there something special in how gem5's ARM model handles page faults?

Thanks,
-Zaid
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to