linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] coresight: Support exclude_guest with Feat_TRF and nVHE
@ 2023-08-04 10:13 James Clark
  2023-08-04 10:13 ` [RFC PATCH 1/3] arm64: KVM: Add support for exclude_guest and exclude_host for ETM James Clark
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: James Clark @ 2023-08-04 10:13 UTC (permalink / raw)
  To: coresight, linux-arm-kernel, kvmarm
  Cc: James Clark, Marc Zyngier, Oliver Upton, James Morse,
	Suzuki K Poulose, Zenghui Yu, Catalin Marinas, Will Deacon,
	Mike Leach, Leo Yan, Alexander Shishkin, Anshuman Khandual,
	Rob Herring, linux-kernel

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/20230804085219.260790-3-james.clark@arm.com/

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

-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-08-09 14:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 10:13 [RFC PATCH 0/3] coresight: Support exclude_guest with Feat_TRF and nVHE James Clark
2023-08-04 10:13 ` [RFC PATCH 1/3] arm64: KVM: Add support for exclude_guest and exclude_host for ETM James Clark
2023-08-08  8:27   ` Marc Zyngier
2023-08-09 14:17     ` James Clark
2023-08-04 10:13 ` [RFC PATCH 2/3] arm64: KVM: Support exclude_guest for Coresight trace in nVHE James Clark
2023-08-08 11:04   ` Marc Zyngier
2023-08-09 14:20     ` James Clark
2023-08-04 10:13 ` [RFC PATCH 3/3] coresight: Support exclude_guest with Feat_TRF and nVHE James Clark
2023-08-04 19:09 ` [RFC PATCH 0/3] " Marc Zyngier
2023-08-05 10:28   ` Suzuki K Poulose
2023-08-08 11:06     ` Marc Zyngier
2023-08-05 10:14 ` Suzuki K Poulose

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).