Skip to content

RFC coresight: Support exclude_guest with Feat_TRF and nVHE

James Clark kvmarm linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm64: KVM: Add support for exclude_guest and exclude_host for ETMarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/Makefile arch/arm64/kvm/arm.c +2 more+102 -12 replies
2/3arm64: KVM: Support exclude_guest for Coresight trace in nVHEarch/arm64/kvm/debug.c arch/arm64/kvm/hyp/nvhe/debug-sr.c+59 -42 replies
3/3coresight: Support exclude_guest with Feat_TRF and nVHEdrivers/hwtracing/coresight/coresight-etm-perf.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] coresight: Support exclude_guest with Feat_TRF and nVHE

Hi,

I'm looking for help in testing this and for feedback on whether it's useful to anyone. Testing it requires hardware that has Feat_TRF (v8.4) but no TRBE. This is because TRBE usage is disabled in nVHE guests.

I don't currently have any access to any hardware, and the FVP model can only do self hosted trace using TRBE.

Currently with nVHE you would always get trace from guests, and filtering out isn't possible without this patchset. In comparison, with VHE guests, they never generate guest trace without [1]. I think the existence of trace rather than lack of could suggest that this change is less useful than [1]. Also the restricted set of hardware that it works on supports that too.

Apart from compilation and checking that the exclude guest settings are correctly programmed on guest switch, this is untested by me.

Applies to kvmarm/next (3b4e3afb2032)

[1]: https://lore.kernel.org/linux-arm-kernel/[email protected]/

James Clark (3):
arm64: KVM: Add support for exclude_guest and exclude_host for ETM
arm64: KVM: Support exclude_guest for Coresight trace in nVHE
coresight: Support exclude_guest with Feat_TRF and nVHE

 arch/arm64/include/asm/kvm_host.h             | 10 +++-
 arch/arm64/kvm/Makefile                       |  1 +
 arch/arm64/kvm/arm.c                          |  1 +
 arch/arm64/kvm/debug.c                        |  7 +++
 arch/arm64/kvm/etm.c                          | 48 ++++++++++++++++
 arch/arm64/kvm/hyp/nvhe/debug-sr.c            | 56 +++++++++++++++++--
 .../hwtracing/coresight/coresight-etm-perf.c  |  4 ++
 include/kvm/etm.h                             | 43 ++++++++++++++
 8 files changed, 165 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm64/kvm/etm.c
 create mode 100644 include/kvm/etm.h
Signature · 1 line
2.34.1