mbox series

[v2,0/9] KVM: arm64: selftests: Test linked {break,watch}points

Message ID 20221020054202.2119018-1-reijiw@google.com (mailing list archive)
Headers show
Series KVM: arm64: selftests: Test linked {break,watch}points | expand

Message

Reiji Watanabe Oct. 20, 2022, 5:41 a.m. UTC
This series adds test cases for linked {break,watch}points to the
debug-exceptions test, and expands {break,watch}point tests to
use non-zero {break,watch}points (the current test always uses
{break,watch}point#0).

Patches 1-6 add some helpers or do minor refactoring for
preparation of adding test cases in subsequent patches.
Patches 7-8 add test cases for a linked {break,watch}point.
Patch 9 expands {break,watch}point test cases to use non-zero
{break,watch}points.

The series is based on v6.1-rc1 with the patch [1] applied.

v2:
 - Use FIELD_GET() to extract ID register fields (Oliver, Ricardo)
 - Try to make function/variable names more clear (Oliver, Ricardo)
 - Make the context number more unlikely to happen by mistake (Ricardo)
 - Remove unnecessary GUEST_SYNC for test stage tracking
 - Collect Reviewed-bys from Oliver and Ricardo (thanks!)

v1: https://lore.kernel.org/all/20220825050846.3418868-1-reijiw@google.com/

[1] https://lore.kernel.org/all/20221017195834.2295901-6-ricarkol@google.com/

Reiji Watanabe (9):
  KVM: arm64: selftests: Use FIELD_GET() to extract ID register fields
  KVM: arm64: selftests: Add write_dbg{b,w}{c,v}r helpers in
    debug-exceptions
  KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from
    debug-exceptions
  KVM: arm64: selftests: Add helpers to enable debug exceptions
  KVM: arm64: selftests: Stop unnecessary test stage tracking of
    debug-exceptions
  KVM: arm64: selftests: Change debug_version() to take ID_AA64DFR0_EL1
  KVM: arm64: selftests: Add a test case for a linked breakpoint
  KVM: arm64: selftests: Add a test case for a linked watchpoint
  KVM: arm64: selftests: Test with every breakpoint/watchpoint

 .../selftests/kvm/aarch64/aarch32_id_regs.c   |   3 +-
 .../selftests/kvm/aarch64/debug-exceptions.c  | 311 ++++++++++++++----
 .../selftests/kvm/lib/aarch64/processor.c     |   7 +-
 3 files changed, 245 insertions(+), 76 deletions(-)


base-commit: 0ecb0791b2af9bde4389d5ee9ee2a64ddf55ea85

Comments

Marc Zyngier Nov. 10, 2022, 7:07 p.m. UTC | #1
On Wed, 19 Oct 2022 22:41:53 -0700, Reiji Watanabe wrote:
> This series adds test cases for linked {break,watch}points to the
> debug-exceptions test, and expands {break,watch}point tests to
> use non-zero {break,watch}points (the current test always uses
> {break,watch}point#0).
> 
> Patches 1-6 add some helpers or do minor refactoring for
> preparation of adding test cases in subsequent patches.
> Patches 7-8 add test cases for a linked {break,watch}point.
> Patch 9 expands {break,watch}point test cases to use non-zero
> {break,watch}points.
> 
> [...]

Applied to next, thanks!

[1/9] KVM: arm64: selftests: Use FIELD_GET() to extract ID register fields
      commit: 1a6182033f2d5c481aec1f8c1c26ebc649693d57
[2/9] KVM: arm64: selftests: Add write_dbg{b,w}{c,v}r helpers in debug-exceptions
      commit: f6d02aa28ae21161d64300bac62b2dde85584004
[3/9] KVM: arm64: selftests: Remove the hard-coded {b,w}pn#0 from debug-exceptions
      commit: 700b8860e02cbaa7dd1181a914ff38e0fae18bf0
[4/9] KVM: arm64: selftests: Add helpers to enable debug exceptions
      commit: 152880d8edf5ad6df5b4b4915a4d9f9085ab8fef
[5/9] KVM: arm64: selftests: Stop unnecessary test stage tracking of debug-exceptions
      commit: 948f439c9d0080972ec937f4aefbe51229546510
[6/9] KVM: arm64: selftests: Change debug_version() to take ID_AA64DFR0_EL1
      commit: 5dd544e882d96d43b363c5ef64683281f2a386d9
[7/9] KVM: arm64: selftests: Add a test case for a linked breakpoint
      commit: 142365932f5f296df593dd653d79194ff5457722
[8/9] KVM: arm64: selftests: Add a test case for a linked watchpoint
      commit: 5ced4e533b676b1a582d89aba5328e4b316957e0
[9/9] KVM: arm64: selftests: Test with every breakpoint/watchpoint
      commit: ebb8cc10316de3040efc4cfb40030f374cbbaa3b

Cheers,

	M.