xen/arm64: Added handling of the trapped access to OSLSR register
authorMirela Simonovic <mirela.simonovic@aggios.com>
Fri, 1 Jun 2018 13:17:41 +0000 (15:17 +0200)
committerJulien Grall <julien.grall@arm.com>
Tue, 5 Jun 2018 18:06:13 +0000 (19:06 +0100)
commit87f1b7632c0270bf6bcee575d7af981345917669
tree47754da20a2b63c77068853b55f7ad1f64d56f11
parent24d41ffaeb22d6147668ecaf72a135d6e2527b6c
xen/arm64: Added handling of the trapped access to OSLSR register

Linux/dom0 accesses OSLSR register when saving CPU context during the
suspend procedure. Xen traps access to this register, but has no handling
for it. Consequently, Xen injects undef exception to linux, causing it to
crash. This patch adds handling of the trapped access to OSLSR as read
only as a fixed value.

For convenience, introduce a new helper handle_ro_read_val() based on
handle_ro_raz() that will return a specified value on read and
re-implement handle_ro_raz() based on the new helper.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Julien Grall <julien.grall@arm.com>
[julien: Add a word about the new helper]
xen/arch/arm/arm64/vsysreg.c
xen/arch/arm/traps.c
xen/include/asm-arm/traps.h