xen/arm64: io: Handle the abort due to access to stage1 translation table
authorAyan Kumar Halder <ayan.kumar.halder@xilinx.com>
Thu, 10 Mar 2022 17:45:00 +0000 (17:45 +0000)
committerJulien Grall <jgrall@amazon.com>
Mon, 14 Mar 2022 18:02:16 +0000 (18:02 +0000)
commitfef5531fd8f311b347970568d77e7bf4feffd7fb
treed77b9678e21c89804018a700b62e46e31b5e3948
parent9e5a68a6652cc54ce3cb3b0ce208eeed79d5aeb5
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 the 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 the
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>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/io.c