xen/arm64: io: Handle the abort due to access to stage1 translation table
authorAyan Kumar Halder <ayan.kumar.halder@xilinx.com>
Thu, 17 Mar 2022 14:00:45 +0000 (14:00 +0000)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Sat, 19 Mar 2022 04:17:34 +0000 (21:17 -0700)
commitfdfb07eb28e42b456e5e1ce999a47cc3ea439f7f
treec3145614c782df78cc769e6b1b5074ecd81f90aa
parent5e9c429ad41f03740817ed370119f9f9f2a3a68f
xen/arm64: io: Handle the abort due to access to stage1 translation table

If the abort was caused due to access to stage1 translation table, Xen
will try to set the p2m entry (assuming that the Stage 1 translation
table is in a non MMIO region).
If there is no such entry found, then Xen will try to map the address as
a MMIO region (assuming that the Stage 1 translation table is in a
direct MMIO region).

If that fails as well, then there are the two following scenarios:-
1. Stage 1 translation table being in an emulated MMIO region - Xen
can read the region, but it has no way to return the value read to the
CPU page table walker (which tries to go through the stage1 tables to
resolve the translation fault).

2. Stage 1 translation table address is invalid.

In both the above scenarios, Xen will forward the abort to the guest.

Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/io.c