xen/arm: traps: Introduce a helper to read the hypersivor fault register
authorJulien Grall <julien.grall@arm.com>
Tue, 12 Sep 2017 10:03:16 +0000 (11:03 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 20 Sep 2017 00:26:05 +0000 (17:26 -0700)
commitc8a8923e15656e4424200d3215258fdb25d881eb
treeb4068c4797047fb67b9d91ff140c7956f02a2a7f
parentd7216b07e8e7c802801c91a9c0e5a97a59982753
xen/arm: traps: Introduce a helper to read the hypersivor fault register

While ARM32 has 2 distinct registers for the hypervisor fault register
(one for prefetch abort, the other for data abort), AArch64 has only
one.

Currently, the logic is open-code but a follow-up patch will require to
read it too. So move the logic in a separate helper and use it instead
of open-coding it.

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