Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6130fb7
perf/core: Export perf_exclude_event()
namhyung Dec 3, 2024
d7d7d38
perf/x86: Relax privilege filter restriction on AMD IBS
namhyung Dec 3, 2024
f368811
perf/amd/ibs: Remove IBS_{FETCH|OP}_CONFIG_MASK macros
Jan 15, 2025
63c3a7a
perf/amd/ibs: Remove pointless sample period check
Jan 15, 2025
0edf68e
perf/amd/ibs: Don't allow freq mode event creation through ->config i…
Jan 15, 2025
37d6ab5
perf/amd/ibs: Add PMU specific minimum period
Jan 15, 2025
da30273
perf/amd/ibs: Add ->check_period() callback
Jan 15, 2025
54c6502
perf/amd/ibs: Ceil sample_period to min_period
Jan 15, 2025
c8927b0
perf/amd/ibs: Add support for OP Load Latency Filtering
Feb 5, 2025
60deade
perf/amd/ibs: Update DTLB/PageSize decode logic
Feb 5, 2025
9fd4f01
perf/x86: Check data address for IBS software filter
namhyung Mar 17, 2025
b45981d
perf/amd/ibs: Prevent leaking sensitive data to userspace
namhyung Mar 22, 2025
1457492
x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>
ingomolnar Apr 13, 2025
592d8bd
perf/amd/ibs: Account interrupt for discarded samples
Feb 16, 2026
62622b9
perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR
Feb 16, 2026
0948b3e
perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler
Feb 16, 2026
0108cfc
perf/amd/ibs: Avoid race between event add and NMI
Feb 16, 2026
7544604
perf/amd/ibs: Define macro for ldlat mask and shift
Feb 16, 2026
2dc4dea
perf/amd/ibs: Add new MSRs and CPUID bits definitions
Feb 16, 2026
da6aac9
perf/amd/ibs: Support IBS_{FETCH|OP}_CTL2[Dis] to eliminate RMW race
Feb 16, 2026
6d82dbf
perf/amd/ibs: Enable fetch latency filtering
Feb 16, 2026
c6bea8d
perf/amd/ibs: Enable RIP bit63 hardware filtering
Feb 16, 2026
f5e8464
perf/amd/ibs: Enable streaming store filter
Feb 16, 2026
b1e627c
perf/amd/ibs: Advertise remote socket capability
Feb 16, 2026
ffc33d4
perf top: Remove needless malloc(0) call that triggers -Walloc-size
Dec 4, 2023
1e88f43
perf tools: Fix calloc() arguments to address error introduced in gcc-14
Jan 6, 2024
abfb974
tools arch amd ibs: Sync ibs.h with the kernel sources
acmel Jun 12, 2025
2418e2a
tools/arch/x86: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>
ingomolnar May 6, 2025
e3f937a
arm64: Convert SCTLR_EL2 to sysreg infrastructure
Feb 2, 2026
16ecb8b
arm64/sysreg/tools: Move TRFCR definitions to sysreg
James-A-Clark Jan 6, 2025
df6d74c
KVM: arm64: Make EL2 exception entry and exit context-synchronization…
May 1, 2026
3e3f3eb
coresight: Pass guest TRFCR value to KVM
James-A-Clark Jan 6, 2025
ccf4097
arm64/sysreg: Get rid of TRFCR_ELx SysregFields
Jan 12, 2025
2ad7f78
coresight: etm4x: Fix timestamp bit field handling
Leo-Yan May 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions arch/arm64/include/asm/sysreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@
#define SYS_RGSR_EL1 sys_reg(3, 0, 1, 0, 5)
#define SYS_GCR_EL1 sys_reg(3, 0, 1, 0, 6)

#define SYS_TRFCR_EL1 sys_reg(3, 0, 1, 2, 1)

#define SYS_TCR_EL1 sys_reg(3, 0, 2, 0, 2)

#define SYS_APIAKEYLO_EL1 sys_reg(3, 0, 2, 1, 0)
Expand Down Expand Up @@ -484,7 +482,6 @@
#define SYS_VPIDR_EL2 sys_reg(3, 4, 0, 0, 0)
#define SYS_VMPIDR_EL2 sys_reg(3, 4, 0, 0, 5)

#define SYS_SCTLR_EL2 sys_reg(3, 4, 1, 0, 0)
#define SYS_ACTLR_EL2 sys_reg(3, 4, 1, 0, 1)
#define SYS_SCTLR2_EL2 sys_reg(3, 4, 1, 0, 3)
#define SYS_HCR_EL2 sys_reg(3, 4, 1, 1, 0)
Expand All @@ -499,7 +496,6 @@
#define SYS_VTTBR_EL2 sys_reg(3, 4, 2, 1, 0)
#define SYS_VTCR_EL2 sys_reg(3, 4, 2, 1, 2)

#define SYS_TRFCR_EL2 sys_reg(3, 4, 1, 2, 1)
#define SYS_VNCR_EL2 sys_reg(3, 4, 2, 2, 0)
#define SYS_HAFGRTR_EL2 sys_reg(3, 4, 3, 1, 6)
#define SYS_SPSR_EL2 sys_reg(3, 4, 4, 0, 0)
Expand Down Expand Up @@ -810,12 +806,6 @@
#define SCTLR_ELx_A (BIT(1))
#define SCTLR_ELx_M (BIT(0))

/* SCTLR_EL2 specific flags. */
#define SCTLR_EL2_RES1 ((BIT(4)) | (BIT(5)) | (BIT(11)) | (BIT(16)) | \
(BIT(18)) | (BIT(22)) | (BIT(23)) | (BIT(28)) | \
(BIT(29)))

#define SCTLR_EL2_BT (BIT(36))
#ifdef CONFIG_CPU_BIG_ENDIAN
#define ENDIAN_SET_EL2 SCTLR_ELx_EE
#else
Expand All @@ -825,7 +815,7 @@
#define INIT_SCTLR_EL2_MMU_ON \
(SCTLR_ELx_M | SCTLR_ELx_C | SCTLR_ELx_SA | SCTLR_ELx_I | \
SCTLR_ELx_IESB | SCTLR_ELx_WXN | ENDIAN_SET_EL2 | \
SCTLR_ELx_ITFSB | SCTLR_EL2_RES1)
SCTLR_ELx_ITFSB | SCTLR_ELx_EIS | SCTLR_ELx_EOS | SCTLR_EL2_RES1)

#define INIT_SCTLR_EL2_MMU_OFF \
(SCTLR_EL2_RES1 | ENDIAN_SET_EL2)
Expand Down Expand Up @@ -950,15 +940,6 @@
/* Safe value for MPIDR_EL1: Bit31:RES1, Bit30:U:0, Bit24:MT:0 */
#define SYS_MPIDR_SAFE_VAL (BIT(31))

#define TRFCR_ELx_TS_SHIFT 5
#define TRFCR_ELx_TS_MASK ((0x3UL) << TRFCR_ELx_TS_SHIFT)
#define TRFCR_ELx_TS_VIRTUAL ((0x1UL) << TRFCR_ELx_TS_SHIFT)
#define TRFCR_ELx_TS_GUEST_PHYSICAL ((0x2UL) << TRFCR_ELx_TS_SHIFT)
#define TRFCR_ELx_TS_PHYSICAL ((0x3UL) << TRFCR_ELx_TS_SHIFT)
#define TRFCR_EL2_CX BIT(3)
#define TRFCR_ELx_ExTRE BIT(1)
#define TRFCR_ELx_E0TRE BIT(0)

/* GIC Hypervisor interface registers */
/* ICH_MISR_EL2 bit definitions */
#define ICH_MISR_EOI (1 << 0)
Expand Down
101 changes: 101 additions & 0 deletions arch/arm64/tools/sysreg
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,18 @@ Sysreg CPACR_EL1 3 0 1 0 2
Fields CPACR_ELx
EndSysreg

Sysreg TRFCR_EL1 3 0 1 2 1
Res0 63:7
UnsignedEnum 6:5 TS
0b0001 VIRTUAL
0b0010 GUEST_PHYSICAL
0b0011 PHYSICAL
EndEnum
Res0 4:2
Field 1 ExTRE
Field 0 E0TRE
EndSysreg

Sysreg SMPRI_EL1 3 0 1 2 4
Res0 63:4
Field 3:0 PRIORITY
Expand Down Expand Up @@ -2024,6 +2036,75 @@ Field 1 ZA
Field 0 SM
EndSysreg

Sysreg SCTLR_EL2 3 4 1 0 0
Field 63 TIDCP
Field 62 SPINTMASK
Field 61 NMI
Field 60 EnTP2
Field 59 TCSO
Field 58 TCSO0
Field 57 EPAN
Field 56 EnALS
Field 55 EnAS0
Field 54 EnASR
Res0 53:50
Field 49:46 TWEDEL
Field 45 TWEDEn
Field 44 DSSBS
Field 43 ATA
Field 42 ATA0
Enum 41:40 TCF
0b00 NONE
0b01 SYNC
0b10 ASYNC
0b11 ASYMM
EndEnum
Enum 39:38 TCF0
0b00 NONE
0b01 SYNC
0b10 ASYNC
0b11 ASYMM
EndEnum
Field 37 ITFSB
Field 36 BT
Field 35 BT0
Field 34 EnFPM
Field 33 MSCEn
Field 32 CMOW
Field 31 EnIA
Field 30 EnIB
Field 29 LSMAOE
Field 28 nTLSMD
Field 27 EnDA
Field 26 UCI
Field 25 EE
Field 24 E0E
Field 23 SPAN
Field 22 EIS
Field 21 IESB
Field 20 TSCXT
Field 19 WXN
Field 18 nTWE
Res0 17
Field 16 nTWI
Field 15 UCT
Field 14 DZE
Field 13 EnDB
Field 12 I
Field 11 EOS
Field 10 EnRCTX
Res0 9
Field 8 SED
Field 7 ITD
Field 6 nAA
Field 5 CP15BEN
Field 4 SA0
Field 3 SA
Field 2 C
Field 1 A
Field 0 M
EndSysreg

SysregFields HFGxTR_EL2
Field 63 nAMAIR2_EL1
Field 62 nMAIR2_EL1
Expand Down Expand Up @@ -2164,6 +2245,22 @@ Field 1 ICIALLU
Field 0 ICIALLUIS
EndSysreg

Sysreg TRFCR_EL2 3 4 1 2 1
Res0 63:7
UnsignedEnum 6:5 TS
0b0000 USE_TRFCR_EL1_TS
0b0001 VIRTUAL
0b0010 GUEST_PHYSICAL
0b0011 PHYSICAL
EndEnum
Res0 4
Field 3 CX
Res0 2
Field 1 E2TRE
Field 0 E0HTRE
EndSysreg


Sysreg HDFGRTR_EL2 3 4 3 1 4
Field 63 PMBIDR_EL1
Field 62 nPMSNEVFR_EL1
Expand Down Expand Up @@ -2401,6 +2498,10 @@ Sysreg ZCR_EL12 3 5 1 2 0
Fields ZCR_ELx
EndSysreg

Sysreg TRFCR_EL12 3 5 1 2 1
Fields TRFCR_EL1
EndSysreg

Sysreg SMCR_EL12 3 5 1 2 6
Fields SMCR_ELx
EndSysreg
Expand Down
6 changes: 3 additions & 3 deletions arch/s390/kernel/perf_cpum_sf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ static void cpumsf_pmu_disable(struct pmu *pmu)
cpuhw->flags &= ~PMU_F_ENABLED;
}

/* perf_exclude_event() - Filter event
/* perf_event_exclude() - Filter event
* @event: The perf event
* @regs: pt_regs structure
* @sde_regs: Sample-data-entry (sde) regs structure
Expand All @@ -1083,7 +1083,7 @@ static void cpumsf_pmu_disable(struct pmu *pmu)
*
* Return non-zero if the event shall be excluded.
*/
static int perf_exclude_event(struct perf_event *event, struct pt_regs *regs,
static int perf_event_exclude(struct perf_event *event, struct pt_regs *regs,
struct perf_sf_sde_regs *sde_regs)
{
if (event->attr.exclude_user && user_mode(regs))
Expand Down Expand Up @@ -1166,7 +1166,7 @@ static int perf_push_sample(struct perf_event *event,
data.tid_entry.pid = basic->hpp & LPP_PID_MASK;

overflow = 0;
if (perf_exclude_event(event, &regs, sde_regs))
if (perf_event_exclude(event, &regs, sde_regs))
goto out;
if (perf_event_overflow(event, &data, &regs)) {
overflow = 1;
Expand Down
Loading