--- v5
+++ v11
@@ -49,21 +49,24 @@
tracefs mount point. Each remote is like an instance and you'll find
there a subset of the regular Tracefs user-space interface:
- remotes/test/
- buffer_size_kb
- trace_clock
- trace_pipe
- trace
- per_cpu/
- cpuX/
- trace
- trace_pipe
- events/
-
- test/
- selftest/
- enable
- id
+ remotes/test
+ |-- buffer_size_kb
+ |-- events
+ | |-- enable
+ | |-- header_event
+ | |-- header_page
+ | `-- test
+ | `-- selftest
+ | |-- enable
+ | |-- format
+ | `-- id
+ |-- per_cpu
+ | `-- cpu0
+ | |-- trace
+ | `-- trace_pipe
+ |-- trace
+ |-- trace_pipe
+ |-- tracing_on
Behind the scenes, kernel/trace/trace_remote.c creates this tracefs
hierarchy without relying on kernel/trace/trace.c. This is due to
@@ -121,6 +124,63 @@
[1] https://tracingsummit.org/ts/2022/hypervisortracing/
[2] https://lore.kernel.org/all/20240510140435.3550353-1-vdonnefort@google.com/
+
+changes since v10
+
+ - Move kerneldoc to .c files (Steven)
+ - Return EBUSY on buffer_size_kb write if buffer is loaded (Steven)
+ - Remove rb_iter/rb_iters union in trace_remote_iterator (Steven)
+ - Rename a refactor trace file seq_operations (Steven)
+ - Make trace_get_cpu() accessible to trace_remote.c (Steven)
+ - Remove unnecessary cpus_read_unlock() (Steven)
+ - !preempt on remote_test driver buffer writing (Steven)
+ - Do not fail selftest if cpu/online is unavailable (Steven)
+ - Add rational for trace_remote into documentation (Steven)
+
+changes since v9
+
+ - Add vCPU PID to hyp_enter/hyp_exit (Marc)
+ - Remove useless X1 setting for tracing HVCs (Marc)
+ - Fix REMOTE_PRINTK_COUNT_ARGS()
+ - Rebase on 6.19-rc7
+
+Changes since v8
+
+ - Do not enable tracing if unstable cnvct (Marc)
+ - Add support for nVHE (Marc)
+ - Add PKVM_DISABLE_STAGE2_ON_PANIC (Marc)
+ - NVHE_EL2_TRACING depends on NVHE_EL2_DEBUG (Marc)
+ - Add a reason for hyp_enter/hyp_exit events (Marc)
+ - Remove PKVM_SELFTESTS in favour of NVHE_EL2_DEBUG
+ - Add wrapper for arm_smccc_1_2, now used in nvhe/ffa.c
+
+Changes since v7
+
+ - Add missing EXPORT_SYMBOL_GPL for remote_test.ko
+ - Rebase on 6.18-rc4
+
+Changes since v6
+
+ - Add requires field to the selftest (Masami)
+ - Use guard() for ring_buffer_poll_remote (Steven)
+ - Rename ring_buffer_remote() to ring_buffer_alloc_remote() (Steven)
+ - kerneldoc for trace_buffer_remote and simple_ring_buffer (Steven)
+ - Validate trace_buffer_desc size in trace_remote_alloc_buffer
+ (Steven)
+ - Add non-consuming ring-buffer read (Steven)
+ - Add spinning failsafe in simple_ring_buffer (Steven)
+ - Range check for hyp_trace_desc::bpages_backing_* in hyp_trace_desc_validate()
+ - unsigned int cpu in hyp_trace_desc_validate()
+ - Fix event/format file
+ - Add tests with an offline CPU
+ - Add tests for non-consuming read
+ - Add documentation
+ - Rebase on 6.17
+
+Changes since v5 (https://lore.kernel.org/all/20250516134031.661124-1-vdonnefort@google.com/)
+
+ - Add tishift lib to the hyp (Aneesh)
+ - Rebase on 6.17-rc2
Changes since v4 (https://lore.kernel.org/all/20250506164820.515876-1-vdonnefort@google.com/)
@@ -176,14 +236,14 @@
- Extend tests to cover reset and unload.
- CC timekeeping folks on relevant patches (Marc)
-David Brazdil (1):
- KVM: arm64: Add .hyp.data section
-
-Vincent Donnefort (24):
+Vincent Donnefort (30):
ring-buffer: Add page statistics to the meta-page
+ ring-buffer: Store bpage pointers into subbuf_ids
ring-buffer: Introduce ring-buffer remotes
+ ring-buffer: Add non-consuming read for ring-buffer remotes
tracing: Introduce trace remotes
tracing: Add reset to trace remotes
+ tracing: Add non-consuming read to trace remotes
tracing: Add init callback to trace remotes
tracing: Add events to trace remotes
tracing: Add events/ root files to trace remotes
@@ -192,74 +252,87 @@
tracing: Introduce simple_ring_buffer
tracing: Add a trace remote module for testing
tracing: selftests: Add trace remote tests
+ Documentation: tracing: Add tracing remotes
tracing: load/unload page callbacks for simple_ring_buffer
tracing: Check for undefined symbols in simple_ring_buffer
+ KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC
+ KVM: arm64: Add clock support to nVHE/pKVM hyp
+ KVM: arm64: Initialise hyp_nr_cpus for nVHE hyp
KVM: arm64: Support unaligned fixmap in the pKVM hyp
- KVM: arm64: Add clock support for the pKVM hyp
- KVM: arm64: Add tracing capability for the pKVM hyp
- KVM: arm64: Add trace remote for the pKVM hyp
- KVM: arm64: Sync boot clock with the pKVM hyp
- KVM: arm64: Add trace reset to the pKVM hyp
- KVM: arm64: Add event support to the pKVM hyp and trace remote
- KVM: arm64: Add hyp_enter/hyp_exit events to pKVM hyp
- KVM: arm64: Add selftest event support to pKVM hyp
- tracing: selftests: Add pKVM trace remote tests
-
- arch/arm64/include/asm/kvm_asm.h | 8 +
- arch/arm64/include/asm/kvm_define_hypevents.h | 21 +
- arch/arm64/include/asm/kvm_hyp.h | 1 -
- arch/arm64/include/asm/kvm_hypevents.h | 41 +
- arch/arm64/include/asm/kvm_hyptrace.h | 26 +
- arch/arm64/include/asm/sections.h | 1 +
- arch/arm64/kernel/image-vars.h | 6 +
- arch/arm64/kernel/vmlinux.lds.S | 36 +-
- arch/arm64/kvm/Kconfig | 18 +
- arch/arm64/kvm/Makefile | 2 +
- arch/arm64/kvm/arm.c | 11 +
- arch/arm64/kvm/hyp/include/nvhe/arm-smccc.h | 13 +
- arch/arm64/kvm/hyp/include/nvhe/clock.h | 16 +
- .../kvm/hyp/include/nvhe/define_events.h | 21 +
- arch/arm64/kvm/hyp/include/nvhe/trace.h | 60 ++
- arch/arm64/kvm/hyp/nvhe/Makefile | 1 +
- arch/arm64/kvm/hyp/nvhe/clock.c | 65 ++
- arch/arm64/kvm/hyp/nvhe/events.c | 36 +
- arch/arm64/kvm/hyp/nvhe/ffa.c | 2 +-
- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 86 ++
- arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 8 +
- arch/arm64/kvm/hyp/nvhe/mm.c | 2 +-
- arch/arm64/kvm/hyp/nvhe/psci-relay.c | 5 +-
- arch/arm64/kvm/hyp/nvhe/setup.c | 4 +
- arch/arm64/kvm/hyp/nvhe/switch.c | 5 +-
- arch/arm64/kvm/hyp/nvhe/trace.c | 286 ++++++
- arch/arm64/kvm/hyp_trace.c | 385 ++++++++
- arch/arm64/kvm/hyp_trace.h | 11 +
- arch/arm64/kvm/pkvm.c | 1 +
- include/linux/ring_buffer.h | 58 ++
- include/linux/ring_buffer_types.h | 41 +
- include/linux/simple_ring_buffer.h | 58 ++
- include/linux/trace_remote.h | 27 +
- include/linux/trace_remote_event.h | 33 +
- include/trace/define_remote_events.h | 73 ++
- include/uapi/linux/trace_mmap.h | 8 +-
- kernel/trace/Kconfig | 14 +
- kernel/trace/Makefile | 20 +
- kernel/trace/remote_test.c | 263 +++++
- kernel/trace/remote_test_events.h | 10 +
- kernel/trace/ring_buffer.c | 259 ++++-
- kernel/trace/simple_ring_buffer.c | 413 ++++++++
- kernel/trace/trace.c | 2 +-
- kernel/trace/trace.h | 6 +
- kernel/trace/trace_remote.c | 923 ++++++++++++++++++
- .../ftrace/test.d/remotes/buffer_size.tc | 24 +
- .../selftests/ftrace/test.d/remotes/functions | 33 +
- .../ftrace/test.d/remotes/pkvm/buffer_size.tc | 10 +
- .../ftrace/test.d/remotes/pkvm/reset.tc | 10 +
- .../ftrace/test.d/remotes/pkvm/trace_pipe.tc | 10 +
- .../ftrace/test.d/remotes/pkvm/unloading.tc | 10 +
- .../selftests/ftrace/test.d/remotes/reset.tc | 105 ++
- .../ftrace/test.d/remotes/trace_pipe.tc | 57 ++
- .../ftrace/test.d/remotes/unloading.tc | 40 +
- 54 files changed, 3629 insertions(+), 56 deletions(-)
+ KVM: arm64: Add tracing capability for the nVHE/pKVM hyp
+ KVM: arm64: Add trace remote for the nVHE/pKVM hyp
+ KVM: arm64: Sync boot clock with the nVHE/pKVM hyp
+ KVM: arm64: Add trace reset to the nVHE/pKVM hyp
+ KVM: arm64: Add event support to the nVHE/pKVM hyp and trace remote
+ KVM: arm64: Add hyp_enter/hyp_exit events to nVHE/pKVM hyp
+ KVM: arm64: Add selftest event support to nVHE/pKVM hyp
+ tracing: selftests: Add hypervisor trace remote tests
+
+ Documentation/trace/index.rst | 11 +
+ Documentation/trace/remotes.rst | 66 +
+ arch/arm64/include/asm/kvm_asm.h | 8 +
+ arch/arm64/include/asm/kvm_define_hypevents.h | 16 +
+ arch/arm64/include/asm/kvm_host.h | 3 +
+ arch/arm64/include/asm/kvm_hyp.h | 4 +-
+ arch/arm64/include/asm/kvm_hypevents.h | 60 +
+ arch/arm64/include/asm/kvm_hyptrace.h | 26 +
+ arch/arm64/kernel/image-vars.h | 4 +
+ arch/arm64/kernel/vmlinux.lds.S | 18 +
+ arch/arm64/kvm/Kconfig | 64 +-
+ arch/arm64/kvm/Makefile | 2 +
+ arch/arm64/kvm/arm.c | 12 +-
+ arch/arm64/kvm/handle_exit.c | 2 +-
+ arch/arm64/kvm/hyp/include/nvhe/arm-smccc.h | 23 +
+ arch/arm64/kvm/hyp/include/nvhe/clock.h | 16 +
+ .../kvm/hyp/include/nvhe/define_events.h | 14 +
+ arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 -
+ arch/arm64/kvm/hyp/include/nvhe/trace.h | 70 +
+ arch/arm64/kvm/hyp/nvhe/Makefile | 6 +-
+ arch/arm64/kvm/hyp/nvhe/clock.c | 65 +
+ arch/arm64/kvm/hyp/nvhe/events.c | 25 +
+ arch/arm64/kvm/hyp/nvhe/ffa.c | 28 +-
+ arch/arm64/kvm/hyp/nvhe/host.S | 2 +-
+ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 87 +-
+ arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 6 +
+ arch/arm64/kvm/hyp/nvhe/mm.c | 4 +-
+ arch/arm64/kvm/hyp/nvhe/psci-relay.c | 7 +-
+ arch/arm64/kvm/hyp/nvhe/setup.c | 4 +-
+ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 6 +-
+ arch/arm64/kvm/hyp/nvhe/switch.c | 5 +-
+ arch/arm64/kvm/hyp/nvhe/trace.c | 306 ++++
+ arch/arm64/kvm/hyp_trace.c | 443 ++++++
+ arch/arm64/kvm/hyp_trace.h | 11 +
+ arch/arm64/kvm/stacktrace.c | 8 +-
+ fs/tracefs/inode.c | 1 +
+ include/linux/ring_buffer.h | 58 +
+ include/linux/ring_buffer_types.h | 41 +
+ include/linux/simple_ring_buffer.h | 65 +
+ include/linux/trace_remote.h | 49 +
+ include/linux/trace_remote_event.h | 33 +
+ include/trace/define_remote_events.h | 73 +
+ include/uapi/linux/trace_mmap.h | 8 +-
+ kernel/trace/Kconfig | 14 +
+ kernel/trace/Makefile | 20 +
+ kernel/trace/remote_test.c | 261 ++++
+ kernel/trace/remote_test_events.h | 10 +
+ kernel/trace/ring_buffer.c | 356 ++++-
+ kernel/trace/simple_ring_buffer.c | 519 +++++++
+ kernel/trace/trace.c | 4 +-
+ kernel/trace/trace.h | 7 +
+ kernel/trace/trace_remote.c | 1371 +++++++++++++++++
+ .../ftrace/test.d/remotes/buffer_size.tc | 25 +
+ .../selftests/ftrace/test.d/remotes/functions | 88 ++
+ .../test.d/remotes/hypervisor/buffer_size.tc | 11 +
+ .../ftrace/test.d/remotes/hypervisor/reset.tc | 11 +
+ .../ftrace/test.d/remotes/hypervisor/trace.tc | 11 +
+ .../test.d/remotes/hypervisor/trace_pipe.tc | 11 +
+ .../test.d/remotes/hypervisor/unloading.tc | 11 +
+ .../selftests/ftrace/test.d/remotes/reset.tc | 90 ++
+ .../selftests/ftrace/test.d/remotes/trace.tc | 127 ++
+ .../ftrace/test.d/remotes/trace_pipe.tc | 127 ++
+ .../ftrace/test.d/remotes/unloading.tc | 41 +
+ 63 files changed, 4757 insertions(+), 120 deletions(-)
+ create mode 100644 Documentation/trace/remotes.rst
create mode 100644 arch/arm64/include/asm/kvm_define_hypevents.h
create mode 100644 arch/arm64/include/asm/kvm_hypevents.h
create mode 100644 arch/arm64/include/asm/kvm_hyptrace.h
@@ -283,16 +356,18 @@
create mode 100644 kernel/trace/trace_remote.c
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/buffer_size.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/functions
- create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/pkvm/buffer_size.tc
- create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/pkvm/reset.tc
- create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/pkvm/trace_pipe.tc
- create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/pkvm/unloading.tc
+ create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/hypervisor/buffer_size.tc
+ create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/hypervisor/reset.tc
+ create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/hypervisor/trace.tc
+ create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/hypervisor/trace_pipe.tc
+ create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/hypervisor/unloading.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/reset.tc
+ create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/trace.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/trace_pipe.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/remotes/unloading.tc
-base-commit: 088d13246a4672bc03aec664675138e3f5bff68c
+base-commit: 8dfce8991b95d8625d0a1d2896e42f93b9d7f68d
--
-2.49.0.1101.gccaa498523-goog
-
+2.53.0.rc1.225.gd81095ad13-goog
+