Hi Daisuke,On Oct 28, 2020, at 4:37 AM, d.hatayama@xxxxxxxxxxx wrote: Good point, thanks!
There are no technical challenges. I just do not have Ice lake machine to test it. Do you know how I can get dump/vmlinux with 5-level paging enabled?
Once 5-level paging support is done, this method can be used as default, as there are
no limitations.
As I understand machdep->pgd is a buffer, cached value of some pgd table from the dump.
machdep->pgd does not have to be aligned in the memory.
We just need to read at specific offset "pgd_idx * sizeof(uint64_t)” to get our pgd_pte.
I think " & PHYSICAL_PAGE_MASK” is not needed here.
Let me know if I wrong.
But i’m going to introduce pgd prefetch from inside find_kernel_start() to do not depend on
prefetch from the caller. So caller must provide top pgd physical address
* does not support 5-level paging. */ static int -find_kernel_start(ulong *va, ulong *pa) +find_kernel_start(uint64_t pgd, ulong *va, ulong *pa) { int i, pgd_idx, pud_idx, pmd_idx, pte_idx; uint64_t pgd_pte, pud_pte, pmd_pte, pte; @@ -361,6 +358,7 @@ find_kernel_start(ulong *va, ulong *pa) pmd_idx = pmd_index(__START_KERNEL_map); pte_idx = pte_index(__START_KERNEL_map); + FILL_PGD(pgd & PHYSICAL_PAGE_MASK, PHYSADDR, PAGESIZE()); for (; pgd_idx < PTRS_PER_PGD; pgd_idx++) { pgd_pte = ULONG(machdep->pgd + pgd_idx * sizeof(uint64_t)); if (pgd_pte & _PAGE_PRESENT) Thanks for review. Again will wait for 5-level paging dump/machine availability and send the improved patch.
Do you want me to switch to this method as default (to use it before IDTR method)?
Regards,
—Alexey
|
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility