]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: kvm: s390: Add debug print functions
authorChristoph Schlameuss <schlameuss@linux.ibm.com>
Wed, 7 Aug 2024 15:45:07 +0000 (17:45 +0200)
committerJanosch Frank <frankja@linux.ibm.com>
Mon, 19 Aug 2024 07:51:15 +0000 (07:51 +0000)
commit100932fc37d468bfa80b5675b653ff65f7bafba7
treeb285f0bf52e948c9108f00baed3d1b4c84cbe19f
parentd4f8592f6c42a6df7f570be6c4ccf8bd40838aab
selftests: kvm: s390: Add debug print functions

Add functions to simply print some basic state information in selftests.

The output can be enabled by setting:

    #define TH_LOG_ENABLED 1
    #define DEBUG 1

* print_psw: current SIE state description and VM run state
* print_hex_bytes: print memory with some counting markers
* print_hex: PRINT_HEX with 512 bytes
* print_run: use print_psw and print_hex to print contents of VM run
  state and SIE state description
* print_regs: print content of general and control registers

All prints use pr_debug for the output and can be configured using
DEBUG.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20240807154512.316936-6-schlameuss@linux.ibm.com
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Message-ID: <20240807154512.316936-6-schlameuss@linux.ibm.com>
tools/testing/selftests/kvm/include/s390x/debug_print.h [new file with mode: 0644]