]> xenbits.xensource.com Git - xen.git/commit
xen/arm: traps: Correctly interpret the content of the register HPFAR_EL2
authorJulien Grall <julien.grall@arm.com>
Fri, 22 Apr 2016 15:58:33 +0000 (16:58 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 27 Apr 2016 15:44:25 +0000 (16:44 +0100)
commitc0516182ff86d77375c35517036535c0df61c7e1
tree7d59600904f34731bce50b8cf0c62c43336ff125
parentedd429c9cc2af99df9dda10002cc59011edf0cac
xen/arm: traps: Correctly interpret the content of the register HPFAR_EL2

The register HPFAR_EL2 (resp. HPFAR on arm32) contains the bits [47:12]
(resp. [39:12]) of the faulting IPA. Unlike other registers that represent
an address, the upper bits of the IPA are stored in the register bits
[4:39] (resp. [4:21]).

However, Xen assumes that the register contains the faulting IPA correctly
offsetted. This will result to get a wrong IPA when the fault is happening
during a translation table walk. Note this is only affecting  memaccess.

Introduce a new helper to get the faulting IPA from HPFAR_EL2 and
replace direct read from the register by the helper.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c
xen/include/asm-arm/processor.h