All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: James Clark <james.clark@arm.com>
Cc: Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf docs: arm_spe: Clarify more SPE requirements
Date: Fri, 15 Mar 2024 17:32:04 -0300	[thread overview]
Message-ID: <ZfSwRP5B1G5RvpOR@x1> (raw)
In-Reply-To: <0c503c64-133a-705f-9dc4-47c623dacd2c@arm.com>

On Wed, Mar 13, 2024 at 09:41:54AM +0000, James Clark wrote:
> 
> 
> On 12/03/2024 19:56, Ian Rogers wrote:
> > On Tue, Mar 12, 2024 at 6:25 AM James Clark <james.clark@arm.com> wrote:
> >>
> >> The question of exactly when KPTI needs to be disabled comes up a lot
> >> because it doesn't always need to be done. Add the relevant kernel
> >> function and some examples that describe the behavior.
> >>
> >> Also describe the interrupt requirement and that no error message will
> >> be printed if this isn't met.
> >>
> >> Signed-off-by: James Clark <james.clark@arm.com>
> > 
> > Reviewed-by: Ian Rogers <irogers@google.com>
 
> Thanks for the review

Thanks, applied to perf-tools-next,

- Arnaldo
 
> >> ---
> >>  tools/perf/Documentation/perf-arm-spe.txt | 12 +++++++++++-
> >>  1 file changed, 11 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/tools/perf/Documentation/perf-arm-spe.txt b/tools/perf/Documentation/perf-arm-spe.txt
> >> index bf03222e9a68..0a3eda482307 100644
> >> --- a/tools/perf/Documentation/perf-arm-spe.txt
> >> +++ b/tools/perf/Documentation/perf-arm-spe.txt
> >> @@ -116,6 +116,15 @@ Depending on CPU model, the kernel may need to be booted with page table isolati
> >>  (kpti=off). If KPTI needs to be disabled, this will fail with a console message "profiling buffer
> >>  inaccessible. Try passing 'kpti=off' on the kernel command line".
> >>
> >> +For the full criteria that determine whether KPTI needs to be forced off or not, see function
> >> +unmap_kernel_at_el0() in the kernel sources. Common cases where it's not required
> >> +are on the CPUs in kpti_safe_list, or on Arm v8.5+ where FEAT_E0PD is mandatory.
> >> +
> >> +The SPE interrupt must also be described by the firmware. If the module is loaded and KPTI is
> >> +disabled (or isn't required to be disabled) but the SPE PMU still doesn't show in
> >> +/sys/bus/event_source/devices/, then it's possible that the SPE interrupt isn't described by
> >> +ACPI or DT. In this case no warning will be printed by the driver.
> >> +
> >>  Capturing SPE with perf command-line tools
> >>  ------------------------------------------
> >>
> >> @@ -199,7 +208,8 @@ Common errors
> >>
> >>   - "Cannot find PMU `arm_spe'. Missing kernel support?"
> >>
> >> -   Module not built or loaded, KPTI not disabled (see above), or running on a VM
> >> +   Module not built or loaded, KPTI not disabled, interrupt not described by firmware,
> >> +   or running on a VM. See 'Kernel Requirements' above.
> >>
> >>   - "Arm SPE CONTEXT packets not found in the traces."
> >>
> >> --
> >> 2.34.1
> >>
> > 

      reply	other threads:[~2024-03-15 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 13:25 [PATCH] perf docs: arm_spe: Clarify more SPE requirements James Clark
2024-03-12 19:56 ` Ian Rogers
2024-03-13  9:41   ` James Clark
2024-03-15 20:32     ` Arnaldo Carvalho de Melo [this message]

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=ZfSwRP5B1G5RvpOR@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.