Skip to content

Commit bba42af

Browse files
jgross1KAGA-KOKO
authored andcommitted
x86/mm: Fix dump_pagetables with Xen PV
Commit 2ae2713 ("x86: mm: convert dump_pagetables to use walk_page_range") broke Xen PV guests as the hypervisor reserved hole in the memory map was not taken into account. Fix that by starting the kernel range only at GUARD_HOLE_END_ADDR. Fixes: 2ae2713 ("x86: mm: convert dump_pagetables to use walk_page_range") Reported-by: Julien Grall <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Julien Grall <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 99bcd4a commit bba42af

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

arch/x86/mm/dump_pagetables.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,8 @@ static void ptdump_walk_pgd_level_core(struct seq_file *m,
363363
{
364364
const struct ptdump_range ptdump_ranges[] = {
365365
#ifdef CONFIG_X86_64
366-
367-
#define normalize_addr_shift (64 - (__VIRTUAL_MASK_SHIFT + 1))
368-
#define normalize_addr(u) ((signed long)((u) << normalize_addr_shift) >> \
369-
normalize_addr_shift)
370-
371366
{0, PTRS_PER_PGD * PGD_LEVEL_MULT / 2},
372-
{normalize_addr(PTRS_PER_PGD * PGD_LEVEL_MULT / 2), ~0UL},
367+
{GUARD_HOLE_END_ADDR, ~0UL},
373368
#else
374369
{0, ~0UL},
375370
#endif

0 commit comments

Comments
 (0)