diff options
author | Will Deacon <will@kernel.org> | 2021-08-13 14:03:36 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-08-18 10:10:16 +0100 |
commit | ccac96977243d7916053550f62e6489760ad0adc (patch) | |
tree | 4015300e57259a0f622b5f1b059b9c093c2e9260 /drivers/net/wwan/iosm/iosm_ipc_flash.c | |
parent | 12593568d7319c34c72038ea799ab1bd0f0eb01c (diff) |
KVM: arm64: Make hyp_panic() more robust when protected mode is enabled
When protected mode is enabled, the host is unable to access most parts
of the EL2 hypervisor image, including 'hyp_physvirt_offset' and the
contents of the hypervisor's '.rodata.str' section. Unfortunately,
nvhe_hyp_panic_handler() tries to read from both of these locations when
handling a BUG() triggered at EL2; the former for converting the ELR to
a physical address and the latter for displaying the name of the source
file where the BUG() occurred.
Hack the EL2 panic asm to pass both physical and virtual ELR values to
the host and utilise the newly introduced CONFIG_NVHE_EL2_DEBUG so that
we disable stage-2 protection for the host before returning to the EL1
panic handler. If the debug option is not enabled, display the address
instead of the source file:line information.
Cc: Andrew Scull <ascull@google.com>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210813130336.8139-1-will@kernel.org
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_flash.c')
0 files changed, 0 insertions, 0 deletions