]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen/arm: mm: Allow dump_hyp_walk() to work on the current root table
authorJulien Grall <jgrall@amazon.com>
Thu, 15 Dec 2022 11:45:18 +0000 (11:45 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 15 Dec 2022 11:46:37 +0000 (11:46 +0000)
dump_hyp_walk() is used to print the tables walk in case of the data or
instruction abort.

Those abort are not limited to the runtime and could happen at early
boot. However, the current implementation of dump_hyp_walk() check
that the TTBR matches the runtime page tables.

Therefore, early abort will result to a secondary abort and not
print the table walks.

Given that the function is called in the abort path, there is no
reason for us to keep the BUG_ON() in any form. So drop it.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/mm.c

index 16ec1d0fe9e5a8577c4eb6c79bb03cc0c575f232..0fc6f2992dd1c5e45b685e805fb5e81cd8dcb38d 100644 (file)
@@ -266,13 +266,11 @@ void dump_pt_walk(paddr_t ttbr, paddr_t addr,
 void dump_hyp_walk(vaddr_t addr)
 {
     uint64_t ttbr = READ_SYSREG64(TTBR0_EL2);
-    lpae_t *pgtable = THIS_CPU_PGTABLE;
 
     printk("Walking Hypervisor VA 0x%"PRIvaddr" "
            "on CPU%d via TTBR 0x%016"PRIx64"\n",
            addr, smp_processor_id(), ttbr);
 
-    BUG_ON( virt_to_maddr(pgtable) != ttbr );
     dump_pt_walk(ttbr, addr, HYP_PT_ROOT_LEVEL, 1);
 }