Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions arch/x86/pagetables.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ static inline bool is_canon_va(const void *va) {
static void dump_pagetable(mfn_t table, int level) {
pte_t *pt;

if (level == 0)
return;

BUG_ON(mfn_invalid(table));
pt = tmp_map_mfn(table);
BUG_ON(!pt);
Expand Down
2 changes: 2 additions & 0 deletions tests/unittests.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ int unit_tests(void *_unused) {
cpu_freq_expect("Prototyp Amazing Foo One @ 1GHz", 1000000000);
cpu_freq_expect("Prototyp Amazing Foo Two @ 1.00GHz", 1000000000);

dump_pagetables(&cr3);

map_pagetables(&cr3, NULL);
map_pagetables(&cr3, &user_cr3);
pte_t *pte = get_pte(unit_tests);
Expand Down