From: Athira Rajeev <atrajeev@linux.ibm.com>
To: maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org
Cc: atrajeev@linux.ibm.com, disgoel@linux.vnet.ibm.com,
hbathini@linux.vnet.ibm.com, Aditya.Bodkhe1@ibm.com,
adubey@linux.ibm.com, skb99@linux.ibm.com, sshegde@linux.ibm.com,
riteshh@linux.ibm.com, Tejas.Manhas1@ibm.com
Subject: [PATCH 0/9] Add support for configure and control of Hardware Trace Macro(HTM)
Date: Fri, 14 Mar 2025 19:25:32 +0530 [thread overview]
Message-ID: <20250314135541.1831-1-atrajeev@linux.ibm.com> (raw)
H_HTM (Hardware Trace Macro) hypervisor call is an HCALL to export
data from Hardware Trace Macro (HTM) function. The debugfs interface
to export the HTM function data in a partition currently supports only
dumping of HTM data in an lpar. Patchset add support for configuration
and control of HTM function via debugfs interface.
With the patchset, after loading htmdump module,
below files are present:
ls /sys/kernel/debug/powerpc/htmdump/
coreindexonchip htmcaps htmconfigure htmflags htminfo htmsetup
htmstart htmstatus htmtype nodalchipindex nodeindex trace
- nodeindex, nodalchipindex, coreindexonchip specifies which
partition to configure the HTM for.
- htmtype: specifies the type of HTM. Supported target is
hardwareTarget.
- trace: is to read the HTM data.
- htmconfigure: Configure/Deconfigure the HTM. Writing 1 to
the file will configure the trace, writing 0 to the file
will do deconfigure.
- htmstart: start/Stop the HTM. Writing 1 to the file will
start the tracing, writing 0 to the file will stop the tracing.
- htmstatus: get the status of HTM. This is needed to understand
the HTM state after each operation.
- htmsetup: set the HTM buffer size. Size of HTM buffer is in
power of 2.
- htminfo: provides the system processor configuration details.
This is needed to understand the appropriate values for nodeindex,
nodalchipindex, coreindexonchip.
- htmcaps : provides the HTM capabilities like minimum/maximum buffer
size, what kind of tracing the HTM supports etc.
- htmflags : allows to pass flags to hcall. Currently supports
controlling the wrapping of HTM buffer.
Example usage:
To collect HTM traces for a partition represented by nodeindex as
zero, nodalchipindex as 1 and coreindexonchip as 12.
# cd /sys/kernel/debug/powerpc/htmdump/
# echo 2 > htmtype
# echo 0 > nodeindex
# echo 1 > nodalchipindex
# echo 12 > coreindexonchip
# echo 1 > htmflags # to set noWrap for HTM buffers
# echo 1 > htmconfigure # Configure the HTM
# echo 1 > htmstart # Start the HTM
# echo 0 > htmstart # Stop the HTM
# echo 0 > htmconfigure # Deconfigure the HTM
# cat htmstatus # Dump the status of HTM entries as data
Athira Rajeev (9):
powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm
operations
powerpc/pseries/htmdump: Add htm configure support to htmdump module
powerpc/pseries/htmdump: Add htm start support to htmdump module
powerpc/pseries/htmdump: Add htm status support to htmdump module
powerpc/pseries/htmdump: Add htm info support to htmdump module
powerpc/pseries/htmdump: Add htm setup support to htmdump module
powerpc/pseries/htmdump: Add htm flags support to htmdump module
powerpc/pseries/htmdump: Add htm capabilities support to htmdump
module
powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface
Documentation/arch/powerpc/htm.rst | 104 ++++++
arch/powerpc/include/asm/plpar_wrappers.h | 20 +-
arch/powerpc/platforms/pseries/htmdump.c | 370 +++++++++++++++++++++-
3 files changed, 475 insertions(+), 19 deletions(-)
create mode 100644 Documentation/arch/powerpc/htm.rst
--
2.43.5
next reply other threads:[~2025-03-14 13:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 13:55 Athira Rajeev [this message]
2025-03-14 13:55 ` [PATCH 1/9] powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm operations Athira Rajeev
2025-03-14 13:55 ` [PATCH 2/9] powerpc/pseries/htmdump: Add htm configure support to htmdump module Athira Rajeev
2025-03-14 13:55 ` [PATCH 3/9] powerpc/pseries/htmdump: Add htm start " Athira Rajeev
2025-03-14 13:55 ` [PATCH 4/9] powerpc/pseries/htmdump: Add htm status " Athira Rajeev
2025-03-14 13:55 ` [PATCH 5/9] powerpc/pseries/htmdump: Add htm info " Athira Rajeev
2025-03-14 13:55 ` [PATCH 6/9] powerpc/pseries/htmdump: Add htm setup " Athira Rajeev
2025-03-14 13:55 ` [PATCH 7/9] powerpc/pseries/htmdump: Add htm flags " Athira Rajeev
2025-03-14 13:55 ` [PATCH 8/9] powerpc/pseries/htmdump: Add htm capabilities " Athira Rajeev
2025-03-14 13:55 ` [PATCH 9/9] powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface Athira Rajeev
2025-03-20 13:13 ` [PATCH 0/9] Add support for configure and control of Hardware Trace Macro(HTM) Venkat Rao Bagalkote
2025-03-20 14:51 ` Athira Rajeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250314135541.1831-1-atrajeev@linux.ibm.com \
--to=atrajeev@linux.ibm.com \
--cc=Aditya.Bodkhe1@ibm.com \
--cc=Tejas.Manhas1@ibm.com \
--cc=adubey@linux.ibm.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=riteshh@linux.ibm.com \
--cc=skb99@linux.ibm.com \
--cc=sshegde@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).