KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from debug-exceptions
authorReiji Watanabe <reijiw@google.com>
Thu, 20 Oct 2022 05:41:56 +0000 (22:41 -0700)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 19:03:54 +0000 (19:03 +0000)
commit700b8860e02cbaa7dd1181a914ff38e0fae18bf0
tree2a839abeef2a736be0258355ad93d450c9998047
parentf6d02aa28ae21161d64300bac62b2dde85584004
KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from debug-exceptions

Remove the hard-coded {break,watch}point #0 from the guest_code() in
debug-exceptions to allow {break,watch}point number to be specified.
Change reset_debug_state() to zeroing all dbg{b,w}{c,v}r_el0 registers
so that guest_code() can use the function to reset those registers
even when non-zero {break,watch}points are specified for guest_code().
Subsequent patches will add test cases for non-zero {break,watch}points.

Signed-off-by: Reiji Watanabe <reijiw@google.com>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221020054202.2119018-4-reijiw@google.com
tools/testing/selftests/kvm/aarch64/debug-exceptions.c