KVM: arm64: Trim guest debug exception handling
authorRaghavendra Rao Ananta <rananta@google.com>
Mon, 23 Aug 2021 22:39:40 +0000 (22:39 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 26 Aug 2021 10:33:32 +0000 (11:33 +0100)
commit8ce8a6fce9bfd3fcabe230ad104e2caf08b2e58d
tree65c58566b453c6b2a6e3a72d7fa34ffe8bc41294
parent6e73bc90ec447b8fcec5fd22fa49e100f3b4f909
KVM: arm64: Trim guest debug exception handling

The switch-case for handling guest debug exception covers
all the debug exception classes, but functionally, doesn't
do anything with them other than ESR_ELx_EC_WATCHPT_LOW.
Moreover, even though handled well, the 'default' case
could be confusing from a security point of view, stating
that the guests' actions can potentially flood the syslog.
But in reality, the code is unreachable.

Hence, trim down the function to only handle the case with
ESR_ELx_EC_WATCHPT_LOW with a simple 'if' check.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210823223940.1878930-1-rananta@google.com
arch/arm64/kvm/handle_exit.c