s390/cpum_sf: diagnostic sampling buffer setup to handle virtual addresses
authorThomas Richter <tmricht@linux.ibm.com>
Fri, 13 Jan 2023 11:29:55 +0000 (12:29 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Sun, 22 Jan 2023 17:42:35 +0000 (18:42 +0100)
commitd924ecdb703765cdc75be5f28aaa1140b9106f84
tree4b97a7250556ac7fbdb799ea09cc092b9073fd3a
parent78157b4791a3e37659b33388fb639a2defc6e6e9
s390/cpum_sf: diagnostic sampling buffer setup to handle virtual addresses

The CPU Measurement Sampling Facility (CPUM_SF) installs large buffers
to save samples collected by hardware. These buffers are organized
as Sample Data Buffer Tables (SDBT) and Sample Data Buffers (SDB).
SDBs contain the samples which are extracted and saved in the perf
ring buffer.
The SDBTs are chained using real addresses and refer to SDBs using
real addresses.

The diagnostic sampling setup uses buffers provided by the process
which invokes perf_event_open system call. The buffers are memory
mapped. The buffers have been allocated by the kernel event
subsystem.

Add proper virtual to phyiscal address translation to the buffer
chaining. The current constraint which requires virtual equals
real address layout is removed.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/perf_cpum_sf.c