Skip to content

Backport VeLinux k6.6 Venice IBS Enhancements - #125

Closed
PvsNarasimha wants to merge 34 commits into
openvelinux:6.6-velinuxfrom
PvsNarasimha:venice_ibs_enhancement
Closed

PvsNarasimha wants to merge 34 commits into
openvelinux:6.6-velinuxfrom
PvsNarasimha:venice_ibs_enhancement

Conversation

@PvsNarasimha

@PvsNarasimha PvsNarasimha commented May 27, 2026

Copy link
Copy Markdown
  1. perf/core: Export perf_exclude_event()
  2. perf/x86: Relax privilege filter restriction on AMD IBS
  3. perf/amd/ibs: Remove IBS_{FETCH|OP}_CONFIG_MASK macros
  4. perf/amd/ibs: Remove pointless sample period check
  5. perf/amd/ibs: Don't allow freq mode event creation through ->config interface
  6. perf/amd/ibs: Add PMU specific minimum period
  7. perf/amd/ibs: Add ->check_period() callback
  8. perf/amd/ibs: Ceil sample_period to min_period
  9. perf/amd/ibs: Add support for OP Load Latency Filtering
  10. perf/amd/ibs: Update DTLB/PageSize decode logic
  11. perf/x86: Check data address for IBS software filter
  12. perf/amd/ibs: Prevent leaking sensitive data to userspace
  13. x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>
  14. perf/amd/ibs: Account interrupt for discarded samples
  15. perf/amd/ibs: Preserve PhyAddrVal bit when clearing PhyAddr MSR
  16. perf/amd/ibs: Avoid calling perf_allow_kernel() from the IBS NMI handler
  17. perf/amd/ibs: Avoid race between event add and NMI
  18. perf/amd/ibs: Define macro for ldlat mask and shift
  19. perf/amd/ibs: Add new MSRs and CPUID bits definitions
  20. perf/amd/ibs: Support IBS_{FETCH|OP}_CTL2[Dis] to eliminate RMW race
  21. perf/amd/ibs: Enable fetch latency filtering
  22. perf/amd/ibs: Enable RIP bit63 hardware filtering
  23. perf/amd/ibs: Enable streaming store filter
  24. perf/amd/ibs: Advertise remote socket capability

Newly added and check-depend patches for resolving Build failures

  1. perf top: Remove needless malloc(0) call that triggers -Walloc-size

  2. perf tools: Fix calloc() arguments to address error introduced in gcc-14

  3. tools arch amd ibs: Sync ibs.h with the kernel sources

  4. tools/arch/x86: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>

  5. arm64: Convert SCTLR_EL2 to sysreg infrastructurex

  6. arm64/sysreg/tools: Move TRFCR definitions to sysreg

  7. KVM: arm64: Make EL2 exception entry and exit context-synchronization events

  8. coresight: Pass guest TRFCR value to KVM

  9. arm64/sysreg: Get rid of TRFCR_ELx SysregFields

  10. coresight: etm4x: Fix timestamp bit field handling

Unit test Results:

  • Enable fetch latency filtering
    $ ./perf record -e ibs_fetch/fetchlat=128/ -c 10000 -a -- sleep 5
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.817 MB perf.data ]

  • Enable RIP bit63 hardware filtering
    $./perf record -e ibs_op//u -- ./stream_store_test
    [ perf record: Woken up 3 times to write data ]
    [ perf record: Captured and wrote 0.022 MB perf.data ]

  • Enable streaming store filter
    $ ./perf record -e ibs_op/strmst=1/ -- ./stream_store_test
    [ perf record: Woken up 3 times to write data ]
    [ perf record: Captured and wrote 0.031 MB perf.data (2 samples) ]

  • perf/amd/ibs: Advertise remote socket capability.
    $ ls /sys/bus/event_source/devices/ibs_op/caps
    dtlb_pgsize ldlat rmtsocket strmst zen4_ibs_extensions

@guixiongwei

Copy link
Copy Markdown
Collaborator

Thanks for backporting this.
There is still a build issue on other architectures. Could you also backport this patch to fix it?
https://lore.kernel.org/linux-perf-users/20250424163033.6601-1-atrajeev@linux.ibm.com/
One more question: this PR have these four new features been covered by elves or kselftest? If so, we could include them in the follow-up ByteDance kernel release. If not, will it be including in elves?

@PvsNarasimha

PvsNarasimha commented Jun 23, 2026

Copy link
Copy Markdown
Author

Thanks for reviewing.

I checked this issue and found that the upstream fix has already been backported in this branch. The commit is:

dde994d ("perf build: Add tools/arch/x86/include/asm/amd/ibs.h to sync the headers")
and it is already present in origin/6.6-velinux.

Could you please let me know on which architecture and configuration you encountered the build failure? Also, if possible, could you share the build log or the exact error message? That would help me understand whether there is another missing dependency or a different issue causing the failure.

@guixiongwei

Copy link
Copy Markdown
Collaborator

Thanks for reviewing.

I checked this issue and found that the upstream fix has already been backported in this branch. The commit is:

dde994d ("perf build: Add tools/arch/x86/include/asm/amd/ibs.h to sync the headers") and it is already present in origin/6.6-velinux.

Could you please let me know on which architecture and configuration you encountered the build failure? Also, if possible, could you share the build log or the exact error message? That would help me understand whether there is another missing dependency or a different issue causing the failure.

The build failure is on aarch64. The error log:
In file included from util/amd-sample-raw.c:12:
/linux/src/tools/include/../../arch/x86/include/asm/amd/ibs.h:7:10: fatal error: asm/msr-index.h: No such file or directory
7 | #include <asm/msr-index.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
CC util/list_sort.o
CC util/sharded_mutex.o
LD util/perf-regs-arch/perf-in.o
CC util/mutex.o
CC util/bpf_map.o
CC util/symbol-elf.o
LD scripts/python/Perf-Trace-Util/perf-in.o
make[9]: *** [/linux/src/tools/build/Makefile.build:98: util/amd-sample-raw.o] Error 1
make[9]: *** Waiting for unfinished jobs....

@PvsNarasimha

Copy link
Copy Markdown
Author

Thanks for pointing out the issue.

I have addressed the problem with a few patches included in this PR and the cover letter, and it now appears to be resolved. Could you please verify it on your end?

Please find the relevant build log snippet below:

CC util/arm64-frame-pointer-unwind-support.o
CC util/addr_location.o
CC arch/arm64/util/header.o
CC ui/helpline.o
CC arch/arm64/util/perf_regs.o
CC ui/hist.o
CC arch/arm64/util/tsc.o
CC arch/arm64/util/pmu.o
CC arch/arm64/util/../../arm/util/pmu.o
CC arch/arm64/util/../../arm/util/auxtrace.o
CC arch/arm64/util/../../arm/util/cs-etm.o
CC bench/futex-wake.o
CC util/block-range.o
CC arch/arm64/util/arm-spe.o
CC arch/arm64/util/mem-events.o
CC arch/arm64/util/hisi-ptt.o
CC util/s390-sample-raw.o
CC util/amd-sample-raw.o
CC util/ordered-events.o
CC util/expr.o
LD util/perf-in.o
LD perf-in.o
LINK perf

As shown above, util/amd-sample-raw.o is now being compiled successfully, and the build completes without issues.

@guixiongwei

Copy link
Copy Markdown
Collaborator

Is the arm64 patch necessary?
Our CI will scan the fix which introduce by the PR:
missing d7396a72eae795d7f968fb451237b6ac1616d712 KVM: arm64: Make EL2 exception entry and exit context-synchronization events
missing ee811bc733be5c57a2bfecdf2f6f5d4db466200a coresight: etm4x: Fix timestamp bit field handling

@PvsNarasimha

Copy link
Copy Markdown
Author

Hi,

Thanks for pointing this out.

Yes, the two arm64/sysreg patches are necessary.

  • "arm64: Convert SCTLR_EL2 to sysreg infrastructure"
  • "arm64/sysreg/tools: Move TRFCR definitions to sysreg"

Without: arm64 patches the perf build fails on the target AArch64 VeLinux kernel.

Regarding the commits reported by CI:

  • d7396a72eae7 ("KVM: arm64: Make EL2 exception entry and exit context-synchronization events")
  • ee811bc733be ("coresight: etm4x: Fix timestamp bit field handling")

I verified that these commits are not required to resolve the build failure. The perf build succeeds without them, so they are not needed for this backport.

Thanks.

@guixiongwei

Copy link
Copy Markdown
Collaborator

Hi,

Thanks for pointing this out.

Yes, the two arm64/sysreg patches are necessary.

  • "arm64: Convert SCTLR_EL2 to sysreg infrastructure"
  • "arm64/sysreg/tools: Move TRFCR definitions to sysreg"

Without: arm64 patches the perf build fails on the target AArch64 VeLinux kernel.

Regarding the commits reported by CI:

  • d7396a72eae7 ("KVM: arm64: Make EL2 exception entry and exit context-synchronization events")
  • ee811bc733be ("coresight: etm4x: Fix timestamp bit field handling")

I verified that these commits are not required to resolve the build failure. The perf build succeeds without them, so they are not needed for this backport.

Thanks.

Hi,

Thanks for your clarification.
The d7396a72eae7 and ee811bc733be are fix patches for the "arm64: Convert SCTLR_EL2 to sysreg infrastructure"
and "arm64/sysreg/tools: Move TRFCR definitions to sysreg", so they also should be backport.

Thanks

@PvsNarasimha

Copy link
Copy Markdown
Author

Hi,

Okay, sure. I will backport the two Arm64 fix patches, d7396a72eae7 and ee811bc733be, and update the commit list accordingly.

@PvsNarasimha

PvsNarasimha commented Jun 25, 2026

Copy link
Copy Markdown
Author

Hi,

I've updated the patch list with the required dependencies, and the build is now successful.

Could you please review and verify it on your end?

@guixiongwei

Copy link
Copy Markdown
Collaborator

Hi,

Okay, sure. I will backport the two Arm64 fix patches, d7396a72eae7 and ee811bc733be, and update the commit list accordingly.

Thanks for your work, now CI and compiled are successfully.

@Liangyan-bd

Copy link
Copy Markdown

Hello, we have some failed tests on Venice when applying this PR, could you help to verify them. Thanks.

  1. cycles:u branch record report

perf record -q -e cycles:u -j any,u -a -o cycles-u-branch.data -- sleep 1
timeout 30 perf report -i cycles-u-branch.data --stdio --no-children --sort comm,dso,symbol

  1. AMD cycles:upp fp branch record

perf record --call-graph fp -j any,u -e cycles:upp -a -c 16009 -- sleep 1

  1. CPU LLC/L3 cache events

perf stat -e l3_cache_accesses,l3_misses -a -- sleep 1

  1. AMD Pipeline metrics

perf stat -M PipelineL1,PipelineL2 -- sleep 1

  1. AMD amd_umc

perf stat -e amd_umc_0// -a -- sleep 1

  1. Uncore memory bandwidth events

perf stat -e amd_umc_0/umc_cas_cmd.rd/,amd_umc_0/umc_cas_cmd.wr/ -a -- sleep 1

@PvsNarasimha

Copy link
Copy Markdown
Author

Hi,

These are usage issues, not bugs in the PR. Cases 2 and 3 fail the same way on the stock pre-PR perf too, so they're hardware/usage behavior rather than regressions.

/home/amd/Narasimha/kernel/tools/perf/perf # PR build, matches kernel

  1. raise timeout; report just needs more time for branch IPC disassembly
    $ ./perf record -q -e cycles:u -j any,u -a -o cycles-u-branch.data -- sleep 1
    timeout 180 $PERF report -i cycles-u-branch.data --stdio --no-children --sort comm,dso,symbol

  2. precise + branch-stack is unsupported on AMD; use ONE of these instead
    $ ./perf record --call-graph fp -e cycles:upp -a -c 16009 -- sleep 1 # precise, no -j
    $ ./perf record --call-graph fp -j any,u -e cycles:u -a -c 16009 -- sleep 1 # branch, non-precise

  3. these are metrics -> use -M, not -e
    $ ./perf stat -M l3_cache_accesses,l3_misses -a -- sleep 1

4,5,6 work as written
$ ./perf stat -M PipelineL1,PipelineL2 -- sleep 1
$ ./perf stat -e amd_umc_0// -a -- sleep 1
$ ./perf stat -e amd_umc_0/umc_cas_cmd.rd/,amd_umc_0/umc_cas_cmd.wr/ -a -- sleep 1

Summary

Not a failure — perf report does complete; the original timeout 30 just killed it early because -j any,u makes report disassemble every sampled DSO via objdump. timeout 180 resolves it.
cycles:upp + -j any,u is invalid on AMD: precise events go through IBS, which doesn't support branch-stack. Drop either :pp or -j.
l3_cache_accesses / l3_misses are metrics, so they need -M, not -e.

@Liangyan-bd

Liangyan-bd commented Jul 29, 2026

Copy link
Copy Markdown

I recheck the umc and failed again.

perf stat -a -e amd_umc_0/umc_mem_clk/ -- sleep 1

Performance counter stats for 'system wide':

 **<not counted>**      amd_umc_0/umc_mem_clk/                                                  (0.00%)

   1.001541709 seconds time elapsed

This is some ai analysis, it may be help.

• The root cause is clear: the kernel decodes the number of available UMC hardware counters as zero, so perf cannot assign a counter to the requested event.

This is not because the BSK kernel is missing the existing generic UMC support patches:

  • perf/x86/amd/uncore: Add memory controller support is already included.
  • perf/x86/amd/uncore: Fix DF and UMC domain identification is already included.
  • The UMC events and amd_umc_* sysfs PMU devices are registered correctly.

The problem is the CPUID encoding reported by this AMD Family 1Ah Model 50h engineering sample:

CPUID Fn80000022:
EBX = 0x00404106
ECX = 0x0000ffff # 16 active UMC instances

The current kernel reads the total number of UMC counters from EBX[21:16], which evaluates to zero. However, bit 22 is set. If the field is interpreted as a
seven-bit value, EBX[22:16] evaluates to 64:

64 total counters / 16 active UMCs = 4 counters per UMC

Because the kernel currently calculates:

0 total counters / 16 UMCs = 0 counters per UMC

it registers all 16 amd_umc_* PMUs with zero counters. When perf tries to schedule an event, no hardware counter can be allocated. The event therefore has
time_running=0 and is displayed as .

A more accurate conclusion is:

Support for the Family 1Ah Model 50h UMC CPUID enumeration appears to be missing. However, there is currently no evidence that an existing upstream patch was
simply omitted from the BSK kernel.

The latest upstream Linux code still defines num_umc_pmc as a six-bit field and uses the same UMC initialization logic: upstream field definition
(https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/perf_event.h#L264-L275), UMC initialization code
(https://github.com/torvalds/linux/blob/master/arch/x86/events/amd/uncore.c#L930-L987).

The next step is to confirm the official CPUID Fn80000022 EBX definition for Family 1Ah Model 50h with AMD or the platform team:

  • If bit 22 is an extension of NumUmcPmc, the kernel needs a seven-bit decoder or a model-specific decoding patch.
  • If bit 22 remains reserved, the engineering-sample firmware, AGESA, or microcode is reporting an invalid CPUID value and should be updated.

Because 64 = 16 × 4, the most likely explanation is missing seven-bit counter enumeration support for this new platform, rather than a perf command issue.

@PvsNarasimha

PvsNarasimha commented Jul 29, 2026

Copy link
Copy Markdown
Author

Hi @Liangyan-bd,

I tested this on my local machine, and the command is working as expected. Please find the validation details below.

Steps to Build and Test

  1. Install the kernel with the PR patches.
  2. Build perf from the tools/perf directory.
  3. Copy the generated perf binary to /usr/bin.

root@volcano9f8e-oshost:/home/amd/Narasimha/kernel/tools/perf# ./perf stat -a -e amd_umc_0/umc_mem_clk/ -- sleep 1

Performance counter stats for 'system wide':

2,98,47,72,674      amd_umc_0/umc_mem_clk/

   1.002922964 seconds time elapsed

root@volcano9f8e-oshost:/home/amd/Narasimha/kernel/tools/perf# dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected" on this box
[ 1.148184] amd_uncore: 16 amd_df counters detected
[ 1.148223] amd_uncore: 6 amd_l3 counters detected
[ 1.148273] amd_uncore: 4 amd_umc_0 counters detected
[ 1.148311] amd_uncore: 4 amd_umc_1 counters detected
[ 1.148338] amd_uncore: 4 amd_umc_2 counters detected
[ 1.148369] amd_uncore: 4 amd_umc_3 counters detected
[ 1.148400] amd_uncore: 4 amd_umc_4 counters detected
[ 1.148426] amd_uncore: 4 amd_umc_5 counters detected
[ 1.148454] amd_uncore: 4 amd_umc_6 counters detected
[ 1.148484] amd_uncore: 4 amd_umc_7 counters detected
[ 1.148514] amd_uncore: 4 amd_umc_8 counters detected
[ 1.148543] amd_uncore: 4 amd_umc_9 counters detected
[ 1.148570] amd_uncore: 4 amd_umc_10 counters detected
[ 1.148600] amd_uncore: 4 amd_umc_11 counters detected
[ 1.148624] amd_uncore: 4 amd_umc_12 counters detected
[ 1.148651] amd_uncore: 4 amd_umc_13 counters detected
[ 1.148683] amd_uncore: 4 amd_umc_14 counters detected
[ 1.148709] amd_uncore: 4 amd_umc_15 counters detected
[ 1.148754] amd_uncore: 4 amd_umc_16 counters detected
[ 1.148800] amd_uncore: 4 amd_umc_17 counters detected
[ 1.148836] amd_uncore: 4 amd_umc_18 counters detected
[ 1.148866] amd_uncore: 4 amd_umc_19 counters detected
[ 1.148892] amd_uncore: 4 amd_umc_20 counters detected
[ 1.148921] amd_uncore: 4 amd_umc_21 counters detected
[ 1.148951] amd_uncore: 4 amd_umc_22 counters detected
[ 1.148979] amd_uncore: 4 amd_umc_23 counters detected

The output confirms detection of:

16 AMD Data Fabric (DF) counters
6 AMD L3 counters
4 counters for each UMC instance (amd_umc_0 through amd_umc_23)

Test System Details:
Processor: AMD EPYC 9755 128-Core Processor (Turin)
CPU Family: 26 (0x1A)
Model: 2
Stepping: 1
Sockets: 2
Cores per Socket: 128
Threads per Core: 2
Logical CPUs: 512
NUMA Nodes: 2

The validation was performed on an AMD EPYC 9755 (Turin, Family 26) platform. The UMC performance events were detected correctly, and the perf stat command executed successfully without any issues.

Please let me know if you need any additional information or if you observe any issues while validating this on your setup.

namhyung and others added 16 commits July 29, 2026 20:49
commit 6057b90ecc84f232dd32a047a086a4c4c271765f upstream.

While at it, rename the same function in s390 cpum_sf PMU.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Ravi Bangoria <ravi.bangoria@amd.com>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Acked-by: Thomas Richter <tmricht@linux.ibm.com>
Link: https://lore.kernel.org/r/20241203180441.1634709-2-namhyung@kernel.org
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit d29e744c71673a71da8f8522799ee02744cad6c9 upstream.

While IBS is available for per-thread profiling, still regular users
cannot open an event due to the default paranoid setting (2) which
doesn't allow unprivileged users to get kernel samples.  That means
it needs to set exclude_kernel bit in the attribute but IBS driver
would reject it since it has PERF_PMU_CAP_NO_EXCLUDE.  This is not what
we want and I've been getting requests to fix this issue.

This should be done in the hardware, but until we get the HW fix we may
allow exclude_{kernel,user,hv} in the attribute and silently drop the
samples in the PMU IRQ handler.  It won't guarantee the sampling
frequency or even it'd miss some with fixed period too.  Not ideal,
but that'd still be helpful to regular users.

To minimize the confusion, let's add 'swfilt' bit to attr.config2 which
is exposed in the sysfs format directory so that users can figure out
if the kernel support the privilege filters by software.

  $ perf record -e ibs_op/swfilt=1/u true

This uses perf_exclude_event() which checks regs->cs.  But it should be
fine because set_linear_ip() also updates the CS according to the RIP
provided by IBS.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Ravi Bangoria <ravi.bangoria@amd.com>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20241203180441.1634709-3-namhyung@kernel.org
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 003c0414318a1829a1a5b195ad81e8a7960c3f5d upstream.

Definition of these macros are very simple and they are used at only one
place. Get rid of unnecessary redirection.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-2-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 88c7bcad71c83f52f24108dedcecae0d18dbc627 upstream.

Valid perf event sample period value for IBS PMUs (Fetch and Op both)
is limited to multiple of 0x10. perf_ibs_init() has this check:

  if (!event->attr.sample_freq && hwc->sample_period & 0x0f)
          return -EINVAL;

But it's broken since hwc->sample_period will always be 0 when
event->attr.sample_freq is 0 (irrespective of event->attr.freq value.)

One option to fix this is to change the condition:

  - if (!event->attr.sample_freq && hwc->sample_period & 0x0f)
  + if (!event->attr.freq && hwc->sample_period & 0x0f)

However, that will break all userspace tools which have been using IBS
event with sample_period not multiple of 0x10.

Another option is to remove the condition altogether and mask lower
nibble _silently_, same as what current code is inadvertently doing.
I'm preferring this approach as it keeps the existing behavior.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-3-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
…nterface

commit e1e7844ced88f9558a48579390a7d4eaac6a28eb upstream.

Most perf_event_attr->config bits directly maps to IBS_{FETCH|OP}_CTL
MSR. Since the sample period is programmed in these control registers,
IBS PMU driver allows opening an IBS event by setting sample period
value directly in perf_event_attr->config instead of using explicit
perf_event_attr->sample_period interface.

However, this logic is not applicable for freq mode events since the
semantics of control register fields are applicable only to fixed
sample period whereas the freq mode event adjusts sample period after
each and every sample. Currently, IBS driver (unintentionally) allows
creating freq mode event via ->config interface, which is semantically
wrong as well as detrimental because it can be misused to bypass
perf_event_max_sample_rate checks.

Don't allow freq mode event creation through perf_event_attr->config
interface.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-6-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit b2fc7b282bf7c1253b01c8da84e894539a3e709d upstream.

0x10 is the minimum sample period for IBS Fetch and 0x90 for IBS Op.
Current IBS PMU driver uses 0x10 for both the PMUs, which is incorrect.
Fix it by adding PMU specific minimum period values in struct perf_ibs.

Also, bail out opening a 'sample period mode' event if the user requested
sample period is less than PMU supported minimum value. For a 'freq mode'
event, start calibrating sample period from PMU specific minimum period.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-7-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 1afbdd970f50f2e0431fae26b25d4e54e561fa7f upstream.

IBS Fetch and IBS Op PMUs have constraints on sample period. The sample
period is verified at the time of opening an event but not at the ioctl()
interface. Hence, a user can open an event with valid period but change
it later with ioctl(). Add a ->check_period() callback to verify the
period provided at ioctl() is also valid.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-8-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit fa5d0a824e3bbd1f793d962f9e012ab0a8ee11c5 upstream.

The sample_period needs to be recalibrated after every sample to match
the desired sampling freq for a 'freq mode event'. Since the next
sample_period is calculated by generic kernel, PMU specific constraints
are not (explicitly) reckoned.

The sample_period value is programmed in a MaxCnt field of IBS PMUs, and
the MaxCnt field has following constraints:

1) MaxCnt must be multiple of 0x10.

  Kernel keeps track of residual / over-counted period into period_left,
  which should take care of this constraint by programming MaxCnt with
  (sample_period & ~0xF) and adding remaining period into the next sample.

2) MaxCnt must be >= 0x10 for IBS Fetch PMU and >= 0x90 for IBS Op PMU.

  Currently, IBS PMU driver allows sample_period below min_period, which
  is an undefined HW behavior. Reset sample_period to min_period whenever
  it's less than that.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250115054438.1021-9-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit d20610c19b4a22bc69085b7eb7a02741d51de30e upstream.

IBS Op PMU on Zen5 uarch added new Load Latency filtering capability. It's
advertised by CPUID_Fn8000001B_EAX bit 12. When enabled, IBS HW will raise
interrupt only for sample that had an IbsDcMissLat value greater than N
cycles, where N is a programmable value defined as multiples of 128 (i.e.
128, 256, 384 etc.) from 128-2048 cycles. Similar to L3MissOnly, IBS HW
internally drops the sample and restarts if the sample does not meet the
filtering criteria.

Add support for LdLat filtering in IBS Op PMU. Since hardware supports
threshold in multiple of 128, add a software filter on top to support
latency threshold with the granularity of 1 cycle between [128-2048].

Example usage:
  # perf record -a -e ibs_op/ldlat=128/ -- sleep 5

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250205060547.1337-2-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 0b347a4218da08b1eb400c259d193bff463dae87 upstream.

IBS Op PMU on Zen5 reports DTLB and page size information differently
compared to prior generation. The change is enumerated by
CPUID_Fn8000001B_EAX[19].

  IBS_OP_DATA3     Zen3/4                 Zen5
  ----------------------------------------------------------------
  19               IbsDcL2TlbHit1G        Reserved
  ----------------------------------------------------------------
   6               IbsDcL2tlbHit2M        Reserved
  ----------------------------------------------------------------
   5               IbsDcL1TlbHit1G        PageSize:
   4               IbsDcL1TlbHit2M          0 - 4K
                                            1 - 2M
                                            2 - 1G
                                            3 - Reserved
                                          Valid only if
                                            IbsDcPhyAddrValid = 1
  ----------------------------------------------------------------
   3               IbsDcL2TlbMiss         IbsDcL2TlbMiss
                                          Valid only if
                                            IbsDcPhyAddrValid = 1
  ----------------------------------------------------------------
   2               IbsDcL1tlbMiss         IbsDcL1tlbMiss
                                          Valid only if
                                            IbsDcPhyAddrValid = 1
  ----------------------------------------------------------------

o Currently, only bit 2 and 3 are interpreted by IBS NMI handler for
  PERF_SAMPLE_DATA_SRC. Add dependency on IbsDcPhyAddrValid for those
  bits.

o Introduce new IBS Op PMU capability and expose it to userspace via
  PMU's sysfs directory.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250205060547.1337-3-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 65a99264f5e5a2bcc8c905f7b2d633e8991672ac upstream.

The IBS software filter is filtering kernel samples for regular users in
the PMI handler.  It checks the instruction address in the IBS register to
determine if it was in kernel mode or not.

But it turns out that it's possible to report a kernel data address even
if the instruction address belongs to user-space.  Matteo Rizzo
found that when an instruction raises an exception, IBS can report some
kernel data addresses like IDT while holding the faulting instruction's
RIP.  To prevent an information leak, it should double check if the data
address in PERF_SAMPLE_DATA is in the kernel space as well.

[ mingo: Clarified the changelog ]

Suggested-by: Matteo Rizzo <matteorizzo@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250317163755.1842589-1-namhyung@kernel.org
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 50a53b60e141d7e31368a87e222e4dd5597bd4ae upstream.

Although IBS "swfilt" can prevent leaking samples with kernel RIP to the
userspace, there are few subtle cases where a 'data' address and/or a
'branch target' address can fall under kernel address range although RIP
is from userspace. Prevent leaking kernel 'data' addresses by discarding
such samples when {exclude_kernel=1,swfilt=1}.

IBS can now be invoked by unprivileged user with the introduction of
"swfilt". However, this creates a loophole in the interface where an
unprivileged user can get physical address of the userspace virtual
addresses through IBS register raw dump (PERF_SAMPLE_RAW). Prevent this
as well.

This upstream commit fixed the most obvious leak:

  65a99264f5e5 perf/x86: Check data address for IBS software filter

Follow that up with a more complete fix.

Fixes: d29e744c7167 ("perf/x86: Relax privilege filter restriction on AMD IBS")
Suggested-by: Matteo Rizzo <matteorizzo@google.com>
Co-developed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250321161251.1033-1-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 3846389c03a8518884f09056611619bd1461ffc7 upstream.

Collect AMD specific platform header files in <asm/amd/*.h>.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mario Limonciello <superm1@kernel.org>
Link: https://lore.kernel.org/r/20250413084144.3746608-2-mingo@kernel.org
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 01336b5559785a136de1cac49705f63a70a755bc upstream.

Add interrupt throttling accounting for below cases:

  o IBS Op PMU: A software filter (in addition to the hardware filter)
    drops samples whose load latency is below the user-specified
    threshold.

  o IBS Fetch PMU: Samples discarded due to the zero-RIP erratum (#1197).

Although these samples are discarded, the NMI cost is still incurred, so
they should be counted for interrupt throttling.

Fixes: 26db2e0 ("perf/x86/amd/ibs: Work around erratum #1197")
Fixes: d20610c19b4a22bc69085b7eb7a02741d51de30e ("perf/amd/ibs: Add support for OP Load Latency Filtering")
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://patch.msgid.link/20260216042216.1440-2-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 723a290326e015b07931eabc603d3735999377be upstream.

Commit 50a53b60e141 ("perf/amd/ibs: Prevent leaking sensitive data to
userspace") zeroed the physical address and also cleared the PhyAddrVal
flag before copying the value into a perf sample to avoid exposing
physical addresses to unprivileged users.

Clearing PhyAddrVal, however, has an unintended side-effect: several
other IBS fields are considered valid only when this bit is set. As a
result, those otherwise correct fields are discarded, reducing IBS
functionality.

Continue to zero the physical address, but keep the PhyAddrVal bit
intact so the related fields remain usable while still preventing any
address leak.

Fixes: 50a53b60e141 ("perf/amd/ibs: Prevent leaking sensitive data to userspace")
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://patch.msgid.link/20260216042216.1440-4-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit b0a09142622a994c4f4088c3f61db5da87cfc711 upstream.

Calling perf_allow_kernel() from the NMI context is unsafe and could be
fatal. Capture the permission at event-initialization time by storing it
in event->hw.flags, and have the NMI handler rely on that cached flag
instead of making the call directly.

[Backport Changes]

In file arch/x86/events/amd/ibs.c, within the function perf_ibs_init(),
the upstream code adds conditional block with perf_allow_kernel().
However, in our codebase perf_allow_kernel() is implemented as
perf_allow_kernel(&event->attr). Therefore the call was adjusted
accordingly during the backport.

Fixes: 50a53b60e141d ("perf/amd/ibs: Prevent leaking sensitive data to userspace")
Reported-by: Sadasivan Shaiju <sadasivan.shaiju2@amd.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: https://patch.msgid.link/20260216042216.1440-5-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
Ravi Bangoria and others added 12 commits July 29, 2026 20:49
commit 8ae68bfec97596a3656ce8d0a7b1240d888eab10 upstream.

IBS OP on future hardware supports recording samples only for instructions
that does streaming store. Like the existing IBS filters, samples pointing
to instruction which does not cause streaming store are discarded and IBS
restarts internally.

Example:

  $ perf record -e ibs_op/strmst=1/ -- <workload>

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260216042530.1546-7-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit b2ea0f541d354c10186a894e8bf5bf83abf8a517 upstream.

IBS OP on future hardware can indicate data source from remote socket
as well. Advertise this capability to userspace so that userspace tools
can decode IBS data accordingly.

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260216042530.1546-8-ravi.bangoria@amd.com
Signed-off-by: suryasaimadhu <SaiMadhu.KoyyalaHariVenkata@amd.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 79baac8 upstream.

GCC 14 introduces a new -Walloc-size included in -Wextra which errors out
like:

  builtin-top.c: In function ‘prompt_integer’:
  builtin-top.c:360:21: error: allocation of insufficient size ‘0’ for
  type ‘char’ with size ‘1’ [-Werror=alloc-size]
    360 |         char *buf = malloc(0), *p;
        |                     ^~~~~~

Just set it to NULL, getline() will do the allocation.

Signed-off-by: Sun Haiyong <sunhaiyong@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231204082055.91877-1-siyanteng@loongson.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 7bbe8f0 upstream.

the definition of calloc is as follows:

    void *calloc(size_t nmemb, size_t size);

number of members is in the first parameter and the size is in the
second parameter.

Fix error messages on gcc 14 20240102:

  error: 'calloc' sizes specified with 'sizeof' in the earlier argument and
  not in the later argument [-Werror=calloc-transposed-args]

Committer notes:

I noticed this on fedora 40 and rawhide.

Signed-off-by: Sun Haiyong <sunhaiyong@loongson.cn>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240106094129.3337057-1-siyanteng@loongson.cn
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit bb6b4143503750318a3f85975186db899a3caaf2 upstream.

To pick up the changes from:

  861c6b1185fbb2e3 ("x86/platform/amd: Add standard header guards to <asm/amd/ibs.h>")

A small change to tools/perf/check-headers.sh was made to cope with the
move of this header done in:

  3846389c03a85188 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")

That don't result in any changes in the tools, just address this perf
build warning:

Warning: Kernel ABI header differences:
  diff -u tools/arch/x86/include/asm/amd/ibs.h arch/x86/include/asm/amd/ibs.h

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/aEtCi0pup5FEwnzn@x1
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit c1ab4ce3cb759f69fb9085a060e568b73e8f5cd8 upstream.

Synchronize with what we did with the kernel side header in:

  3846389c03a8 ("x86/platform/amd: Move the <asm/amd-ibs.h> header to <asm/amd/ibs.h>")

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 0a35bd285f43c26ccec33872fc6bb679069eaea8 upstream.

Convert SCTLR_EL2 to the sysreg infrastructure, as per the 2025-12_rel
revision of the Registers.json file.

Note that we slightly deviate from the above, as we stick to the ARM
ARM M.a definition of SCTLR_EL2[9], which is RES0, in order to avoid
dragging the POE2 definitions...

Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260202184329.2724080-2-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit c382ee674c8b5005798606267d660cf995218b18 upstream.

Convert TRFCR to automatic generation. Add separate definitions for ELx
and EL2 as TRFCR_EL1 doesn't have CX. This also mirrors the previous
definition so no code change is required.

Also add TRFCR_EL12 which will start to be used in a later commit.

Unfortunately, to avoid breaking the Perf build with duplicate
definition errors, the tools copy of the sysreg.h header needs to be
updated at the same time rather than the usual second commit. This is
because the generated version of sysreg
(arch/arm64/include/generated/asm/sysreg-defs.h), is currently shared
and tools/ does not have its own copy.

Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: James Clark <james.clark@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250106142446.628923-4-james.clark@linaro.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
… events

commit d7396a72eae795d7f968fb451237b6ac1616d712 upstream.

SCTLR_EL2.EIS and SCTLR_EL2.EOS control whether exception entry and
exit at EL2 are Context Synchronisation Events (CSEs). Per ARM DDI
0487 M.b D24.2.175 (p. D24-9754):

  - !FEAT_ExS: the bit is RES1, so the entry/exit is unconditionally
    a CSE.
  - FEAT_ExS: the reset value is architecturally UNKNOWN; software
    must set the bit to make the entry/exit a CSE.

INIT_SCTLR_EL2_MMU_ON in arch/arm64/include/asm/sysreg.h sets neither
bit. KVM/arm64 hot paths rely on ERET from EL2 being a CSE, and on
synchronous EL1->EL2 entry being a CSE, to elide explicit ISBs after
MSRs to context-switching system registers (HCR_EL2, ZCR_EL2,
ptrauth keys, etc.). On FEAT_ExS hardware those reliances are not
architecturally backed unless EOS=1 (and, for entry, EIS=1).

Until commit 0a35bd285f43 ("arm64: Convert SCTLR_EL2 to sysreg
infrastructure"), SCTLR_EL2_RES1 was a hand-rolled mask that
included BIT(11) (EOS) and BIT(22) (EIS), so INIT_SCTLR_EL2_MMU_ON
was setting both unconditionally. The conversion made
SCTLR_EL2_RES1 auto-generated; because the sysreg tooling only
models unconditionally-RES1 fields and EIS/EOS are RES1 only when
FEAT_ExS is absent, the auto-generated mask is UL(0). The seven
other bits dropped from the old mask (positions 4, 5, 16, 18, 23,
28, 29) are unconditionally RES1 in the E2H=0 SCTLR_EL2 layout per
DDI 0487 M.b D24.2.175, so dropping them is harmless. EIS and EOS
are the only bits whose semantics changed for FEAT_ExS hardware
and where the kernel relies on the value being 1.

Make the guarantee explicit: include SCTLR_ELx_EIS | SCTLR_ELx_EOS in
INIT_SCTLR_EL2_MMU_ON so that EL2 exception entry and exit are
unconditionally CSEs regardless of whether FEAT_ExS is implemented.
This matches the pairing in arch/arm64/kvm/config.c which treats EIS
and EOS together as RES1 under !FEAT_ExS.

Fixes: 0a35bd285f43 ("arm64: Convert SCTLR_EL2 to sysreg infrastructure")
Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>
Assisted-by: Gemini:gemini-3.1-pro review-prompts
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://patch.msgid.link/20260501112149.2824881-2-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit aaf69eff6cdb8613ff1f6a520821f769dc92f969 upstream.

Currently the userspace and kernel filters for guests are never set, so
no trace will be generated for them. Add support for tracing guests by
passing the desired TRFCR value to KVM so it can be applied to the
guest.

By writing either E1TRE or E0TRE, filtering on either guest kernel or
guest userspace is also supported. And if both E1TRE and E0TRE are
cleared when exclude_guest is set, that option is supported too. This
change also brings exclude_host support which is difficult to add as a
separate commit without excess churn and resulting in no trace at all.

cpu_prohibit_trace() gets moved to TRBE because the ETM driver doesn't
need the read, it already has the base TRFCR value. TRBE only needs
the read to disable it and then restore.

Testing
=======

The addresses were counted with the following:

  $ perf report -D | grep -Eo 'EL2|EL1|EL0' | sort | uniq -c

Guest kernel only:

  $ perf record -e cs_etm//Gk -a -- true
    535 EL1
      1 EL2

Guest user only (only 5 addresses because the guest runs slowly in the
model):

  $ perf record -e cs_etm//Gu -a -- true
    5 EL0

Host kernel only:

  $  perf record -e cs_etm//Hk -a -- true
   3501 EL2

Host userspace only:

  $  perf record -e cs_etm//Hu -a -- true
    408 EL0
      1 EL2

Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20250106142446.628923-8-james.clark@linaro.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit 01009b06a6b52d8439c55b530633a971c13b6cb2 upstream.

There is no such thing as TRFCR_ELx in the architecture.
What we have is TRFCR_EL1, for which TRFCR_EL12 is an accessor.

Rename TRFCR_ELx_* to TRFCR_EL1_*, and fix the bit of code using
these names.

Similarly, TRFCR_EL12 is redefined as a mapping to TRFCR_EL1.

Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/87cygsqgkh.wl-maz@kernel.org
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
commit ee811bc733be5c57a2bfecdf2f6f5d4db466200a upstream.

Timestamps in the trace data appear as all zeros on recent kernels,
although the feature works correctly on old kernels (e.g., v6.12).

Since commit c382ee674c8b ("arm64/sysreg/tools: Move TRFCR definitions
to sysreg"), the TRFCR_ELx_TS_{VIRTUAL|GUEST_PHYSICAL|PHYSICAL} macros
were updated to remove the bit shift. As a result, the driver no longer
shifts bits when operates the timestamp field.

Fix this by using the FIELD_PREP() and FIELD_GET() helpers.

Reported-by: Tamas Zsoldos <tamas.zsoldos@arm.com>
Fixes: c382ee674c8b ("arm64/sysreg/tools: Move TRFCR definitions to sysreg")
Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250519174945.2245271-2-leo.yan@arm.com
Signed-off-by: PvsNarasimha <PVS.NarasimhaRao@amd.com>
@PvsNarasimha
PvsNarasimha force-pushed the venice_ibs_enhancement branch from 4dc566f to 2ad7f78 Compare July 29, 2026 16:12
@Liangyan-bd

Copy link
Copy Markdown

Hi @Liangyan-bd,

I tested this on my local machine, and the command is working as expected. Please find the validation details below.

Steps to Build and Test

  1. Install the kernel with the PR patches.
  2. Build perf from the tools/perf directory.
  3. Copy the generated perf binary to /usr/bin.

root@volcano9f8e-oshost:/home/amd/Narasimha/kernel/tools/perf# ./perf stat -a -e amd_umc_0/umc_mem_clk/ -- sleep 1

Performance counter stats for 'system wide':

2,98,47,72,674      amd_umc_0/umc_mem_clk/

   1.002922964 seconds time elapsed

root@volcano9f8e-oshost:/home/amd/Narasimha/kernel/tools/perf# dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected" on this box [ 1.148184] amd_uncore: 16 amd_df counters detected [ 1.148223] amd_uncore: 6 amd_l3 counters detected [ 1.148273] amd_uncore: 4 amd_umc_0 counters detected [ 1.148311] amd_uncore: 4 amd_umc_1 counters detected [ 1.148338] amd_uncore: 4 amd_umc_2 counters detected [ 1.148369] amd_uncore: 4 amd_umc_3 counters detected [ 1.148400] amd_uncore: 4 amd_umc_4 counters detected [ 1.148426] amd_uncore: 4 amd_umc_5 counters detected [ 1.148454] amd_uncore: 4 amd_umc_6 counters detected [ 1.148484] amd_uncore: 4 amd_umc_7 counters detected [ 1.148514] amd_uncore: 4 amd_umc_8 counters detected [ 1.148543] amd_uncore: 4 amd_umc_9 counters detected [ 1.148570] amd_uncore: 4 amd_umc_10 counters detected [ 1.148600] amd_uncore: 4 amd_umc_11 counters detected [ 1.148624] amd_uncore: 4 amd_umc_12 counters detected [ 1.148651] amd_uncore: 4 amd_umc_13 counters detected [ 1.148683] amd_uncore: 4 amd_umc_14 counters detected [ 1.148709] amd_uncore: 4 amd_umc_15 counters detected [ 1.148754] amd_uncore: 4 amd_umc_16 counters detected [ 1.148800] amd_uncore: 4 amd_umc_17 counters detected [ 1.148836] amd_uncore: 4 amd_umc_18 counters detected [ 1.148866] amd_uncore: 4 amd_umc_19 counters detected [ 1.148892] amd_uncore: 4 amd_umc_20 counters detected [ 1.148921] amd_uncore: 4 amd_umc_21 counters detected [ 1.148951] amd_uncore: 4 amd_umc_22 counters detected [ 1.148979] amd_uncore: 4 amd_umc_23 counters detected

The output confirms detection of:

16 AMD Data Fabric (DF) counters 6 AMD L3 counters 4 counters for each UMC instance (amd_umc_0 through amd_umc_23)

Test System Details: Processor: AMD EPYC 9755 128-Core Processor (Turin) CPU Family: 26 (0x1A) Model: 2 Stepping: 1 Sockets: 2 Cores per Socket: 128 Threads per Core: 2 Logical CPUs: 512 NUMA Nodes: 2

The validation was performed on an AMD EPYC 9755 (Turin, Family 26) platform. The UMC performance events were detected correctly, and the perf stat command executed successfully without any issues.

Please let me know if you need any additional information or if you observe any issues while validating this on your setup.

Actually i did the test as the same above but still failed.
Could you help to provide the result of "taskset -c 0 cpuid -1 -r -l 0x80000022 -s 0"
I suspect the result is not the same with your test machine.

The below is the result from my test machine.
taskset -c 0 cpuid -1 -r -l 0x80000022 -s 0
CPU:
0x80000022 0x00: eax=0x00000017 ebx=0x00404106 ecx=0x0000ffff edx=0x00000f84

@Liangyan-bd

Copy link
Copy Markdown

And could you tell us what's the update for the latest change?

@PvsNarasimha

Copy link
Copy Markdown
Author

Hi @Liangyan-bd,
I tested this on my local machine, and the command is working as expected. Please find the validation details below.
Steps to Build and Test

  1. Install the kernel with the PR patches.
  2. Build perf from the tools/perf directory.
  3. Copy the generated perf binary to /usr/bin.

root@volcano9f8e-oshost:/home/amd/Narasimha/kernel/tools/perf# ./perf stat -a -e amd_umc_0/umc_mem_clk/ -- sleep 1
Performance counter stats for 'system wide':

2,98,47,72,674      amd_umc_0/umc_mem_clk/

   1.002922964 seconds time elapsed

root@volcano9f8e-oshost:/home/amd/Narasimha/kernel/tools/perf# dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected" on this box [ 1.148184] amd_uncore: 16 amd_df counters detected [ 1.148223] amd_uncore: 6 amd_l3 counters detected [ 1.148273] amd_uncore: 4 amd_umc_0 counters detected [ 1.148311] amd_uncore: 4 amd_umc_1 counters detected [ 1.148338] amd_uncore: 4 amd_umc_2 counters detected [ 1.148369] amd_uncore: 4 amd_umc_3 counters detected [ 1.148400] amd_uncore: 4 amd_umc_4 counters detected [ 1.148426] amd_uncore: 4 amd_umc_5 counters detected [ 1.148454] amd_uncore: 4 amd_umc_6 counters detected [ 1.148484] amd_uncore: 4 amd_umc_7 counters detected [ 1.148514] amd_uncore: 4 amd_umc_8 counters detected [ 1.148543] amd_uncore: 4 amd_umc_9 counters detected [ 1.148570] amd_uncore: 4 amd_umc_10 counters detected [ 1.148600] amd_uncore: 4 amd_umc_11 counters detected [ 1.148624] amd_uncore: 4 amd_umc_12 counters detected [ 1.148651] amd_uncore: 4 amd_umc_13 counters detected [ 1.148683] amd_uncore: 4 amd_umc_14 counters detected [ 1.148709] amd_uncore: 4 amd_umc_15 counters detected [ 1.148754] amd_uncore: 4 amd_umc_16 counters detected [ 1.148800] amd_uncore: 4 amd_umc_17 counters detected [ 1.148836] amd_uncore: 4 amd_umc_18 counters detected [ 1.148866] amd_uncore: 4 amd_umc_19 counters detected [ 1.148892] amd_uncore: 4 amd_umc_20 counters detected [ 1.148921] amd_uncore: 4 amd_umc_21 counters detected [ 1.148951] amd_uncore: 4 amd_umc_22 counters detected [ 1.148979] amd_uncore: 4 amd_umc_23 counters detected
The output confirms detection of:
16 AMD Data Fabric (DF) counters 6 AMD L3 counters 4 counters for each UMC instance (amd_umc_0 through amd_umc_23)
Test System Details: Processor: AMD EPYC 9755 128-Core Processor (Turin) CPU Family: 26 (0x1A) Model: 2 Stepping: 1 Sockets: 2 Cores per Socket: 128 Threads per Core: 2 Logical CPUs: 512 NUMA Nodes: 2
The validation was performed on an AMD EPYC 9755 (Turin, Family 26) platform. The UMC performance events were detected correctly, and the perf stat command executed successfully without any issues.
Please let me know if you need any additional information or if you observe any issues while validating this on your setup.

Actually i did the test as the same above but still failed. Could you help to provide the result of "taskset -c 0 cpuid -1 -r -l 0x80000022 -s 0" I suspect the result is not the same with your test machine.

The below is the result from my test machine. taskset -c 0 cpuid -1 -r -l 0x80000022 -s 0 CPU: 0x80000022 0x00: eax=0x00000017 ebx=0x00404106 ecx=0x0000ffff edx=0x00000f84

Hi,

I ran the requested command on our validation system. The CPUID leaf 0x80000022 results are indeed different from the results you shared.

Command:

taskset -c 0 cpuid -1 -r -l 0x80000022 -s 0

Output from our system:

CPU:
0x80000022 0x00: eax=0x00000007 ebx=0x00304106 ecx=0x00000fff edx=0x00000000

Kernel Version:

6.6.122veniceibs

Test System Details:

Processor: AMD EPYC 9755 128-Core Processor (Turin)
CPU Family: 26 (0x1A)
Model: 2
Stepping: 1
Sockets: 2
Cores per Socket: 128
Threads per Core: 2
Logical CPUs: 512

Compared to your system, the CPUID values for leaf 0x80000022 are different, which indicates that the reported IBS capabilities differ between the two platforms.

Could you also please share the following information from your system?

$ lscpu

@PvsNarasimha

Copy link
Copy Markdown
Author

And could you tell us what's the update for the latest change?

I found one minor conflict with the following patch:

  1. arm64/sysreg/tools: Move TRFCR definitions to sysreg

I have resolved the conflict by rebasing the PR on the latest 6.6-velinux tip. The PR has now been updated with the latest changes.

@Liangyan-bd

Copy link
Copy Markdown

lscpu

Please check below. Thanks!
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 288
On-line CPU(s) list: 0-287
Vendor ID: AuthenticAMD
Model name: AMD Eng Sample: 100-000001045-02
CPU family: 26
Model: 80
Thread(s) per core: 2
Core(s) per socket: 144
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU(s) scaling MHz: 38%
CPU max MHz: 4015.6250
CPU min MHz: 1500.0000
BogoMIPS: 4000.09
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb
rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf rapl pni pclmulqdq monitor
ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a mis
alignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssb
d mba perfmon_v2 ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx sma
p avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_m
bm_local avx_vnni avx512_bf16 fred clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vm
cb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke
avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect movdiri movdir64b overflow_recov suc
cor smca fsrm avx512_vp2intersect avx512_fp16 flush_l1d debug_swap amd_lbr_pmc_freeze
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 6.8 MiB (144 instances)
L1i: 4.5 MiB (144 instances)
L2: 144 MiB (144 instances)
L3: 384 MiB (6 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-287
Vulnerabilities:
Gather data sampling: Not affected
Indirect target selection: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Vulnerable; IBPB: conditional; IBRS_FW; STIBP: always-on; PBRSB-eIBRS: Not affected; BHI: Not affected
Srbds: Not affected
Tsa: Not affected
Tsx async abort: Not affected
Vmscape: Not affected

@Liangyan-bd

Copy link
Copy Markdown

CPU:
0x80000022 0x00: eax=0x00000007 ebx=0x00304106 ecx=0x00000fff edx=0x00000000

May i ask the CPUID leaf 0x80000022 results of Venice shoule be like what you provided?

@PvsNarasimha

PvsNarasimha commented Jul 30, 2026

Copy link
Copy Markdown
Author

dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected"

I performed the validation on a Venice system (Family 26, Model 80), which matches your platform.

Test Environment
Kernel: 6.6.122veniceibs
Processor: AMD Eng Sample: 100-000001051-02
CPU Family: 26
Model: 80
Stepping: 0
Validation

The UMC performance event works correctly on our Venice system.

root@venice-host:/home/amd/Narasimha/kernel/tools/perf# ./perf stat -a -e amd_umc_0/umc_mem_clk/ -- sleep 1

Performance counter stats for 'system wide':

 3,198,838,076      amd_umc_0/umc_mem_clk/

   1.001147710 seconds time elapsed

root@venice-host:/home/amd/Narasimha/kernel/tools/perf# uname -r
6.6.122veniceibs
root@venice-host:/home/amd/Narasimha/kernel/tools/perf# dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected"
[ 0.646729] amd_uncore: 16 amd_df counters detected
[ 0.646755] amd_uncore: 6 amd_l3 counters detected
[ 0.646779] amd_uncore: 4 amd_umc_0 counters detected
[ 0.646802] amd_uncore: 4 amd_umc_1 counters detected

For reference, the CPUID leaf 0x80000022 on our Venice system reports:
Although both systems are Family 26, Model 80, the CPUID values still differ from those reported on your machine:

root@venice-host:/home/amd/Narasimha/kernel/tools/perf# lscpu | egrep "Model name|CPU family|Model|Stepping"
Model name: AMD Eng Sample: 100-000001051-02
BIOS Model name: AMD Eng Sample: 100-000001051-02 To be filled by O.E.M. CPU @ 2.0GHz
BIOS CPU family: 107
CPU family: 26
Model: 80
Stepping: 0
root@venice-host:/home/amd/Narasimha/kernel/tools/perf# taskset -c 0 cpuid -1 -r -l 0x80000022 -s 0
CPU:
0x80000022 0x00: eax=0x00000017 ebx=0x00084106 ecx=0x0000000c edx=0x000005e4

Despite these differences in the reported CPUID capabilities, the amd_umc_0/umc_mem_clk event works correctly on our Venice system with the PR kernel.

@Liangyan-bd

Liangyan-bd commented Jul 30, 2026

Copy link
Copy Markdown

dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected"
Actually in my test machine, the driver can detect the hw counters as below.

root@xxxx:~# dmesg | grep amd_uncore
[ 7.546139] amd_uncore: 16 amd_df counters detected
[ 7.552467] amd_uncore: 6 amd_l3 counters detected
[ 7.558678] amd_uncore: 0 amd_umc_0 counters detected
[ 7.565206] amd_uncore: 0 amd_umc_1 counters detected
[ 7.571699] amd_uncore: 0 amd_umc_2 counters detected
[ 7.578189] amd_uncore: 0 amd_umc_3 counters detected
[ 7.584671] amd_uncore: 0 amd_umc_4 counters detected
[ 7.591152] amd_uncore: 0 amd_umc_5 counters detected
[ 7.597639] amd_uncore: 0 amd_umc_6 counters detected
[ 7.604118] amd_uncore: 0 amd_umc_7 counters detected
[ 7.610603] amd_uncore: 0 amd_umc_8 counters detected
[ 7.617086] amd_uncore: 0 amd_umc_9 counters detected
[ 7.623570] amd_uncore: 0 amd_umc_10 counters detected
[ 7.630150] amd_uncore: 0 amd_umc_11 counters detected
[ 7.636736] amd_uncore: 0 amd_umc_12 counters detected
[ 7.643321] amd_uncore: 0 amd_umc_13 counters detected
[ 7.649903] amd_uncore: 0 amd_umc_14 counters detected
[ 7.656482] amd_uncore: 0 amd_umc_15 counters detected

@PvsNarasimha

Copy link
Copy Markdown
Author

dmesg | grep amd_uncore # should show "4 amd_umc_N counters detected"
Actually in my test machine, the driver can detect the hw counters as below.

root@xxxx:~# dmesg | grep amd_uncore [ 7.546139] amd_uncore: 16 amd_df counters detected [ 7.552467] amd_uncore: 6 amd_l3 counters detected [ 7.558678] amd_uncore: 0 amd_umc_0 counters detected [ 7.565206] amd_uncore: 0 amd_umc_1 counters detected [ 7.571699] amd_uncore: 0 amd_umc_2 counters detected [ 7.578189] amd_uncore: 0 amd_umc_3 counters detected [ 7.584671] amd_uncore: 0 amd_umc_4 counters detected [ 7.591152] amd_uncore: 0 amd_umc_5 counters detected [ 7.597639] amd_uncore: 0 amd_umc_6 counters detected [ 7.604118] amd_uncore: 0 amd_umc_7 counters detected [ 7.610603] amd_uncore: 0 amd_umc_8 counters detected [ 7.617086] amd_uncore: 0 amd_umc_9 counters detected [ 7.623570] amd_uncore: 0 amd_umc_10 counters detected [ 7.630150] amd_uncore: 0 amd_umc_11 counters detected [ 7.636736] amd_uncore: 0 amd_umc_12 counters detected [ 7.643321] amd_uncore: 0 amd_umc_13 counters detected [ 7.649903] amd_uncore: 0 amd_umc_14 counters detected [ 7.656482] amd_uncore: 0 amd_umc_15 counters detected

Can you Please share me the .config file for your installed kernel ?

Run below command ?
$ grep AMD_UNCORE /boot/config-$(uname -r)

@Liangyan-bd

Liangyan-bd commented Jul 30, 2026

Copy link
Copy Markdown

grep AMD_UNCORE /boot/config-$(uname -r)

root@xxx:~#grep AMD_UNCORE /boot/config-$(uname -r)
CONFIG_PERF_EVENTS_AMD_UNCORE=y

@PvsNarasimha

Copy link
Copy Markdown
Author

Hi,

Could you please share the following information from your system? It will be helpful for our further investigation.

$ lscpu
$ cat /proc/cpuinfo | grep "model name" | head -1

$ find /sys/bus/event_source/devices/ -name "amd_umc*"

$ cpuid -1 | grep 80000022

$ dmesg | grep -i amd

$ perf list | grep umc

These details will help us compare the hardware capabilities and verify whether the UMC PMUs are being detected and initialized correctly on your platform.

Thank you in advance!

@Liangyan-bd

Copy link
Copy Markdown

root@xxx:# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 288
On-line CPU(s) list: 0-287
Vendor ID: AuthenticAMD
Model name: AMD Eng Sample: 100-000001045-02
CPU family: 26
Model: 80
Thread(s) per core: 2
Core(s) per socket: 144
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU(s) scaling MHz: 37%
CPU max MHz: 4015.6250
CPU min MHz: 1500.0000
BogoMIPS: 4000.09
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx
mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apici
d amd_dcm aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave
avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit
wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v
2 ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdsee
d adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc
cqm_occup_llc cqm_mbm_total cqm_mbm_local avx_vnni avx512_bf16 fred clzero irperf xsaveerptr rdpru wbnoinvd amd
_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthres
hold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmul
qdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect movdiri movdir64b overflow_recov succor sm
ca fsrm avx512_vp2intersect avx512_fp16 flush_l1d debug_swap amd_lbr_pmc_freeze
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 6.8 MiB (144 instances)
L1i: 4.5 MiB (144 instances)
L2: 144 MiB (144 instances)
L3: 384 MiB (6 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-287
Vulnerabilities:
Gather data sampling: Not affected
Indirect target selection: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Vulnerable; IBPB: conditional; IBRS_FW; STIBP: always-on; PBRSB-eIBRS: Not affected; BHI: Not affected
Srbds: Not affected
Tsa: Not affected
Tsx async abort: Not affected
Vmscape: Not affected
root@n154-133-070:
# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 288
On-line CPU(s) list: 0-287
Vendor ID: AuthenticAMD
Model name: AMD Eng Sample: 100-000001045-02
CPU family: 26
Model: 80
Thread(s) per core: 2
Core(s) per socket: 144
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU(s) scaling MHz: 38%
CPU max MHz: 4015.6250
CPU min MHz: 1500.0000
BogoMIPS: 4000.09
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx
mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apici
d amd_dcm aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave
avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit
wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v
2 ibrs ibpb stibp vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdsee
d adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc
cqm_occup_llc cqm_mbm_total cqm_mbm_local avx_vnni avx512_bf16 fred clzero irperf xsaveerptr rdpru wbnoinvd amd
_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthres
hold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmul
qdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect movdiri movdir64b overflow_recov succor sm
ca fsrm avx512_vp2intersect avx512_fp16 flush_l1d debug_swap amd_lbr_pmc_freeze
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 6.8 MiB (144 instances)
L1i: 4.5 MiB (144 instances)
L2: 144 MiB (144 instances)
L3: 384 MiB (6 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-287
Vulnerabilities:
Gather data sampling: Not affected
Indirect target selection: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Vulnerable; IBPB: conditional; IBRS_FW; STIBP: always-on; PBRSB-eIBRS: Not affected; BHI: Not affected
Srbds: Not affected
Tsa: Not affected
Tsx async abort: Not affected
Vmscape: Not affected
root@xxx:# cat /proc/cpuinfo | grep "model name" | head -1
model name : AMD Eng Sample: 100-000001045-02
root@xxx:
# find /sys/bus/event_source/devices/ -name "amd_umc*"
/sys/bus/event_source/devices/amd_umc_9
/sys/bus/event_source/devices/amd_umc_7
/sys/bus/event_source/devices/amd_umc_5
/sys/bus/event_source/devices/amd_umc_14
/sys/bus/event_source/devices/amd_umc_3
/sys/bus/event_source/devices/amd_umc_12
/sys/bus/event_source/devices/amd_umc_1
/sys/bus/event_source/devices/amd_umc_10
/sys/bus/event_source/devices/amd_umc_8
/sys/bus/event_source/devices/amd_umc_6
/sys/bus/event_source/devices/amd_umc_15
/sys/bus/event_source/devices/amd_umc_4
/sys/bus/event_source/devices/amd_umc_13
/sys/bus/event_source/devices/amd_umc_2
/sys/bus/event_source/devices/amd_umc_11
/sys/bus/event_source/devices/amd_umc_0
root@xxx:# cpuid -1 | grep 80000022
Extended Performance Monitoring and Debugging (0x80000022):
root@n154-133-070:
# dmesg | grep -i amd
[ 0.000000] Linux version 6.6.95.bsk.2-rc4-5583-g265650d1371b3-amd64 (STE-Kernel@ByteDance) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #g265650d1371b3 SMP PREEMPT_DYNAMIC Debian 6.6.95.bsk.2-rc4-5583
[ 0.000000] Command line: root=UUID=9e298504-27a3-400e-96a3-68f804ba9592 ro intel_idle.max_cstate=1 processor.max_cstate=1 iommu=pt swapaccount=1 net.ifnames=0 biosdevname=0 transparent_hugepage=madvise cgroup_enable=memory edac_report=force scsi_mod.use_blk_mq=0 nopti amd_pstate=active console=tty0 console=ttyS0,115200 crashkernel=128M,low crashkernel=224M,high
[ 0.012548] RAMDISK: [mem 0x80419d1000-0x8043ffffff]
[ 0.012561] ACPI: RSDP 0x000000009C56C014 000024 (v02 AMD )
[ 0.012569] ACPI: XSDT 0x000000009C56B728 00011C (v01 AMD Kenya 03042021 AMI 01000013)
[ 0.012580] ACPI: FACP 0x000000009C87F000 000114 (v06 AMD Kenya 03042021 AMI 00010013)
[ 0.012589] ACPI: DSDT 0x000000009C870000 00EF70 (v02 AMD Kenya 03042021 INTL 20230628)
[ 0.012597] ACPI: _SDM 0x000000009FD3A000 000055 (v03 AMD A M I 03042021 AMI 01000013)
[ 0.012602] ACPI: SPMI 0x000000009C884000 000041 (v05 AMD Kenya 00000000 AMI. 00000000)
[ 0.012607] ACPI: SSDT 0x000000009C883000 0000AC (v02 AMDINC MPDMA 00000001 AMD 00000001)
[ 0.012612] ACPI: SSDT 0x000000009C882000 0000F3 (v02 AMDINC SMU-HSMP 00000001 INTL 20230628)
[ 0.012616] ACPI: HSMP 0x000000009C881000 000044 (v01 AMDINC AMDCRB 00000000 AMD 00000001)
[ 0.012621] ACPI: SSDT 0x000000009C880000 000067 (v02 AMDINC CPMDSM 00000001 INTL 20230628)
[ 0.012625] ACPI: FIDT 0x000000009C86F000 00009D (v01 AMD Kenya 03042021 AMI 00010013)
[ 0.012628] ACPI: MCFG 0x000000009C86E000 00004C (v01 AMD Kenya 03042021 MSFT 00010013)
[ 0.012633] ACPI: SSDT 0x000000009C86B000 0021ED (v02 AMD CPUSSDT 03042021 AMI 03042021)
[ 0.012637] ACPI: HPET 0x000000009C86A000 000038 (v01 AMD Kenya 03042021 AMI 00000005)
[ 0.012641] ACPI: SSDT 0x000000009C869000 00042E (v02 AMDINC CPMRAS 00000001 INTL 20230628)
[ 0.012645] ACPI: BERT 0x000000009C868000 000030 (v01 AMDINC AmdTable 00000001 AMD 00000001)
[ 0.012649] ACPI: PHAT 0x000000009C866000 000150 (v01 AMDINC AMDCRB 00000000 AMD 00000001)
[ 0.012653] ACPI: SSDT 0x000000009C865000 000067 (v02 AMDINC SFS-UPV2 00000001 INTL 20230628)
[ 0.012657] ACPI: HEST 0x000000009C867000 000A14 (v02 AMDINC AmdTable 00000000 AMD 00000001)
[ 0.012661] ACPI: FPDT 0x000000009C864000 000034 (v01 AMD A M I 01072009 AMI 01000013)
[ 0.012666] ACPI: PRMT 0x000000009C863000 000196 (v01 AMD Kenya 01072009 AMI 01000013)
[ 0.012669] ACPI: IVRS 0x000000009C862000 000534 (v02 AMD AMDCRB 00000001 AMD 00000001)
[ 0.012673] ACPI: ASPT 0x000000009C861000 000098 (v02 AMD AMD ASPT 00000001 AMD 00000001)
[ 0.012678] ACPI: SSDT 0x000000009C81C000 044C6E (v02 AMD AMD SSDT 00000001 AMD 00000001)
[ 0.012682] ACPI: SRAT 0x000000009C81A000 001BA8 (v03 AMD AMD SRAT 00000001 AMD 00000001)
[ 0.012686] ACPI: MSCT 0x000000009C819000 00004E (v01 AMD AMD MSCT 00000000 AMD 00000001)
[ 0.012689] ACPI: SLIT 0x000000009C818000 00002D (v01 AMD AMD SLIT 00000001 AMD 00000001)
[ 0.012694] ACPI: HMAT 0x000000009C817000 0000A4 (v02 AMD AMD HMAT 00000001 AMD 00000001)
[ 0.012698] ACPI: BDAT 0x000000009C816000 000030 (v01 AMD AMD BDAT 00000000 AMD 00000001)
[ 0.012702] ACPI: SSDT 0x000000009C78D000 088A44 (v02 AMDINC AmdFwCfg 00001030 AMD 20240326)
[ 0.012706] ACPI: WSMT 0x000000009C78C000 000028 (v01 AMD Kenya 03042021 AMI 00010013)
[ 0.012710] ACPI: APIC 0x000000009C78A000 001292 (v06 AMD Kenya 03042021 AMI 00010013)
[ 0.012719] ACPI: SSDT 0x000000009C786000 002AEA (v02 AMDINC RASEDR 00000001 AMDI 00000001)
[ 0.037516] Kernel command line: root=UUID=9e298504-27a3-400e-96a3-68f804ba9592 ro intel_idle.max_cstate=1 processor.max_cstate=1 iommu=pt swapaccount=1 net.ifnames=0 biosdevname=0 transparent_hugepage=madvise cgroup_enable=memory edac_report=force scsi_mod.use_blk_mq=0 nopti amd_pstate=active console=tty0 console=ttyS0,115200 crashkernel=128M,low crashkernel=224M,high
[ 0.037762] Unknown kernel command line parameters "nopti biosdevname=0 cgroup_enable=memory edac_report=force amd_pstate=active", will be passed to user space.
[ 4.663446] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID00, rdevid:160
[ 4.670985] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID01, rdevid:160
[ 4.678520] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID02, rdevid:160
[ 4.686054] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID03, rdevid:160
[ 4.693589] AMD-Vi: ivrs, add hid:MSFT0201, uid:_SB.XHSP, rdevid:96
[ 4.701514] AMD-Vi: ivrs, add hid:AMDI0095, uid:ID00, rdevid:0
[ 4.709436] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID00, rdevid:160
[ 4.716972] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID01, rdevid:160
[ 4.724508] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID02, rdevid:160
[ 4.732044] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID03, rdevid:160
[ 4.739576] AMD-Vi: ivrs, add hid:MSFT0201, uid:_SB.XHSP, rdevid:96
[ 4.748286] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID00, rdevid:65696
[ 4.756017] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID01, rdevid:65696
[ 4.763746] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID02, rdevid:65696
[ 4.771476] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID03, rdevid:65696
[ 4.779204] AMD-Vi: ivrs, add hid:MSFT0201, uid:_SB.XHSP, rdevid:65632
[ 4.787422] AMD-Vi: ivrs, add hid:AMDI0096, uid:ID01, rdevid:65536
[ 4.795734] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID00, rdevid:65696
[ 4.803469] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID01, rdevid:65696
[ 4.811200] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID02, rdevid:65696
[ 4.818930] AMD-Vi: ivrs, add hid:AMDI0020, uid:ID03, rdevid:65696
[ 4.826658] AMD-Vi: ivrs, add hid:MSFT0201, uid:_SB.XHSP, rdevid:65632
[ 4.834877] AMD-Vi: Using global IVHD EFR:0x253f732fa2295ade, EFR2:0x1352d
[ 5.012161] smpboot: CPU0: AMD Eng Sample: 100-000001045-02 (family: 0x1a, model: 0x50, stepping: 0x0)
[ 5.015878] Performance Events: Fam17h+ 16-deep LBR, core perfctr, AMD PMU driver.
[ 6.806886] AMD-Vi: [Firmware Warn]: EFR mismatch. Use IVHD EFR (0x253f732fa2295ade : 0x253f732fa2295ade), EFR2 (0x36af3a680001352d : 0x1352d).
[ 6.822136] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 6.837540] platform AMDI0095:00: Adding to iommu group 0
[ 7.067666] AMD-Vi: [Firmware Warn]: EFR mismatch. Use IVHD EFR (0x253f732fa2295ade : 0x253f732fa2295ade), EFR2 (0xd2a9c6fb0001352d : 0x1352d).
[ 7.082917] pci 0000:80:00.2: AMD-Vi: IOMMU performance counters supported
[ 7.091448] platform AMDI0020:00: Adding to iommu group 15
[ 7.182886] AMD-Vi: [Firmware Warn]: EFR mismatch. Use IVHD EFR (0x253f732fa2295ade : 0x253f732fa2295ade), EFR2 (0x818408c00001352d : 0x1352d).
[ 7.198137] pci 0001:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 7.206665] platform AMDI0096:00: Adding to iommu group 27
[ 7.398206] AMD-Vi: [Firmware Warn]: EFR mismatch. Use IVHD EFR (0x253f732fa2295ade : 0x253f732fa2295ade), EFR2 (0xd9c9c7f80001352d : 0x1352d).
[ 7.413454] pci 0001:80:00.2: AMD-Vi: IOMMU performance counters supported
[ 7.481589] AMD-Vi: Extended features (0x253f732fa2295ade, 0x1352d): PPR X2APIC NX GT IA GA PC GA_vAPIC
[ 7.492922] AMD-Vi: Interrupt remapping enabled
[ 7.498785] AMD-Vi: X2APIC enabled
[ 7.504533] AMD-Vi: Virtual APIC enabled
[ 7.537376] perf: AMD IBS detected (0x000ffbff)
[ 7.546139] amd_uncore: 16 amd_df counters detected
[ 7.552467] amd_uncore: 6 amd_l3 counters detected
[ 7.558678] amd_uncore: 0 amd_umc_0 counters detected
[ 7.565206] amd_uncore: 0 amd_umc_1 counters detected
[ 7.571699] amd_uncore: 0 amd_umc_2 counters detected
[ 7.578189] amd_uncore: 0 amd_umc_3 counters detected
[ 7.584671] amd_uncore: 0 amd_umc_4 counters detected
[ 7.591152] amd_uncore: 0 amd_umc_5 counters detected
[ 7.597639] amd_uncore: 0 amd_umc_6 counters detected
[ 7.604118] amd_uncore: 0 amd_umc_7 counters detected
[ 7.610603] amd_uncore: 0 amd_umc_8 counters detected
[ 7.617086] amd_uncore: 0 amd_umc_9 counters detected
[ 7.623570] amd_uncore: 0 amd_umc_10 counters detected
[ 7.630150] amd_uncore: 0 amd_umc_11 counters detected
[ 7.636736] amd_uncore: 0 amd_umc_12 counters detected
[ 7.643321] amd_uncore: 0 amd_umc_13 counters detected
[ 7.649903] amd_uncore: 0 amd_umc_14 counters detected
[ 7.656482] amd_uncore: 0 amd_umc_15 counters detected
[ 7.667198] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[ 7.676024] perf/amd_iommu: Detected AMD IOMMU #1 (2 banks, 4 counters/bank).
[ 7.684844] perf/amd_iommu: Detected AMD IOMMU #2 (2 banks, 4 counters/bank).
[ 7.693665] perf/amd_iommu: Detected AMD IOMMU #3 (2 banks, 4 counters/bank).
[ 9.819681] AMDI0020:00: ttyS1 at MMIO 0xfedc9000 (irq = 3, base_baud = 3000000) is a 16550A
[ 9.837326] AMD-Vi: AMD IOMMUv2 loaded and initialized
[ 10.276037] amd_pstate=active
[ 10.717123] usb usb1: Manufacturer: Linux 6.6.95.bsk.2-rc4-5583-g265650d1371b3-amd64 xhci-hcd
[ 10.776391] usb usb2: Manufacturer: Linux 6.6.95.bsk.2-rc4-5583-g265650d1371b3-amd64 ehci_hcd
[ 10.838244] usb usb3: Manufacturer: Linux 6.6.95.bsk.2-rc4-5583-g265650d1371b3-amd64 xhci-hcd
[ 10.948929] usb usb4: Manufacturer: Linux 6.6.95.bsk.2-rc4-5583-g265650d1371b3-amd64 xhci-hcd
[ 11.010921] usb usb5: Manufacturer: Linux 6.6.95.bsk.2-rc4-5583-g265650d1371b3-amd64 xhci-hcd
[ 15.234390] kvm_amd: TSC scaling supported
[ 15.239794] kvm_amd: Nested Virtualization enabled
[ 15.245965] kvm_amd: Nested Paging enabled
[ 15.251354] kvm_amd: LBR virtualization supported
[ 15.257530] kvm_amd: Virtual VMLOAD VMSAVE supported
[ 15.263899] kvm_amd: Virtual GIF supported
[ 15.269289] kvm_amd: Virtual NMI enabled
[ 15.310195] AMD Address Translation Library initialized
[ 15.345137] EDAC MC0: Giving out device to module amd64_edac controller F1Ah_M50h: DEV 0000:00:18.3 (INTERRUPT)
[ 15.364032] EDAC amd64: F1Ah_M50h detected (node 0).
[ 15.370653] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.376975] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.376978] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.376979] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.376980] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.376980] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.376983] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.421412] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.428945] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.435158] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.441373] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.447665] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.453874] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.460123] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.466325] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.472573] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.478767] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.484979] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.491171] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.497361] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.503569] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.509756] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.515944] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.522118] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.528293] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.534464] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.540691] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.546866] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.553031] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.559182] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.565347] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.571507] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.578212] EDAC MC1: Giving out device to module amd64_edac controller F1Ah_M50h: DEV 0000:00:19.3 (INTERRUPT)
[ 15.590425] EDAC amd64: F1Ah_M50h detected (node 1).
[ 15.596882] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.603070] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.609230] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.615389] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.621546] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.627690] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.633845] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.640048] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.646236] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.652425] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.658598] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.664754] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.670898] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.677038] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.683203] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.689332] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.695456] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.701589] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.707726] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.713864] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.719991] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.726130] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.732269] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.738398] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.744539] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.750679] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.756820] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.762987] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.769122] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.775268] EDAC amd64: MC: 2: 0MB 3: 0MB
[ 15.781402] EDAC amd64: MC: 0: 8192MB 1: 8192MB
[ 15.787540] EDAC amd64: MC: 2: 0MB 3: 0MB
root@xxx:~# perf list | grep umc
amd_umc_0/umc_act_cmd.all/
amd_umc_0/umc_act_cmd.rd/
amd_umc_0/umc_act_cmd.wr/
amd_umc_0/umc_cas_cmd.all/
amd_umc_0/umc_cas_cmd.rd/
amd_umc_0/umc_cas_cmd.wr/
amd_umc_0/umc_data_slot_clks.all/
amd_umc_0/umc_data_slot_clks.rd/
amd_umc_0/umc_data_slot_clks.wr/
amd_umc_0/umc_mem_clk/
amd_umc_0/umc_pchg_cmd.all/
amd_umc_0/umc_pchg_cmd.rd/
amd_umc_0/umc_pchg_cmd.wr/
amd_umc_1/umc_act_cmd.all/
amd_umc_1/umc_act_cmd.rd/
amd_umc_1/umc_act_cmd.wr/
amd_umc_1/umc_cas_cmd.all/
amd_umc_1/umc_cas_cmd.rd/
amd_umc_1/umc_cas_cmd.wr/
amd_umc_1/umc_data_slot_clks.all/
amd_umc_1/umc_data_slot_clks.rd/
amd_umc_1/umc_data_slot_clks.wr/
amd_umc_1/umc_mem_clk/
amd_umc_1/umc_pchg_cmd.all/
amd_umc_1/umc_pchg_cmd.rd/
amd_umc_1/umc_pchg_cmd.wr/
amd_umc_10/umc_act_cmd.all/
amd_umc_10/umc_act_cmd.rd/
amd_umc_10/umc_act_cmd.wr/
amd_umc_10/umc_cas_cmd.all/
amd_umc_10/umc_cas_cmd.rd/
amd_umc_10/umc_cas_cmd.wr/
amd_umc_10/umc_data_slot_clks.all/
amd_umc_10/umc_data_slot_clks.rd/
amd_umc_10/umc_data_slot_clks.wr/
amd_umc_10/umc_mem_clk/
amd_umc_10/umc_pchg_cmd.all/
amd_umc_10/umc_pchg_cmd.rd/
amd_umc_10/umc_pchg_cmd.wr/
amd_umc_11/umc_act_cmd.all/
amd_umc_11/umc_act_cmd.rd/
amd_umc_11/umc_act_cmd.wr/
amd_umc_11/umc_cas_cmd.all/
amd_umc_11/umc_cas_cmd.rd/
amd_umc_11/umc_cas_cmd.wr/
amd_umc_11/umc_data_slot_clks.all/
amd_umc_11/umc_data_slot_clks.rd/
amd_umc_11/umc_data_slot_clks.wr/
amd_umc_11/umc_mem_clk/
amd_umc_11/umc_pchg_cmd.all/
amd_umc_11/umc_pchg_cmd.rd/
amd_umc_11/umc_pchg_cmd.wr/
amd_umc_12/umc_act_cmd.all/
amd_umc_12/umc_act_cmd.rd/
amd_umc_12/umc_act_cmd.wr/
amd_umc_12/umc_cas_cmd.all/
amd_umc_12/umc_cas_cmd.rd/
amd_umc_12/umc_cas_cmd.wr/
amd_umc_12/umc_data_slot_clks.all/
amd_umc_12/umc_data_slot_clks.rd/
amd_umc_12/umc_data_slot_clks.wr/
amd_umc_12/umc_mem_clk/
amd_umc_12/umc_pchg_cmd.all/
amd_umc_12/umc_pchg_cmd.rd/
amd_umc_12/umc_pchg_cmd.wr/
amd_umc_13/umc_act_cmd.all/
amd_umc_13/umc_act_cmd.rd/
amd_umc_13/umc_act_cmd.wr/
amd_umc_13/umc_cas_cmd.all/
amd_umc_13/umc_cas_cmd.rd/
amd_umc_13/umc_cas_cmd.wr/
amd_umc_13/umc_data_slot_clks.all/
amd_umc_13/umc_data_slot_clks.rd/
amd_umc_13/umc_data_slot_clks.wr/
amd_umc_13/umc_mem_clk/
amd_umc_13/umc_pchg_cmd.all/
amd_umc_13/umc_pchg_cmd.rd/
amd_umc_13/umc_pchg_cmd.wr/
amd_umc_14/umc_act_cmd.all/
amd_umc_14/umc_act_cmd.rd/
amd_umc_14/umc_act_cmd.wr/
amd_umc_14/umc_cas_cmd.all/
amd_umc_14/umc_cas_cmd.rd/
amd_umc_14/umc_cas_cmd.wr/
amd_umc_14/umc_data_slot_clks.all/
amd_umc_14/umc_data_slot_clks.rd/
amd_umc_14/umc_data_slot_clks.wr/
amd_umc_14/umc_mem_clk/
amd_umc_14/umc_pchg_cmd.all/
amd_umc_14/umc_pchg_cmd.rd/
amd_umc_14/umc_pchg_cmd.wr/
amd_umc_15/umc_act_cmd.all/
amd_umc_15/umc_act_cmd.rd/
amd_umc_15/umc_act_cmd.wr/
amd_umc_15/umc_cas_cmd.all/
amd_umc_15/umc_cas_cmd.rd/
amd_umc_15/umc_cas_cmd.wr/
amd_umc_15/umc_data_slot_clks.all/
amd_umc_15/umc_data_slot_clks.rd/
amd_umc_15/umc_data_slot_clks.wr/
amd_umc_15/umc_mem_clk/
amd_umc_15/umc_pchg_cmd.all/
amd_umc_15/umc_pchg_cmd.rd/
amd_umc_15/umc_pchg_cmd.wr/
amd_umc_2/umc_act_cmd.all/
amd_umc_2/umc_act_cmd.rd/
amd_umc_2/umc_act_cmd.wr/
amd_umc_2/umc_cas_cmd.all/
amd_umc_2/umc_cas_cmd.rd/
amd_umc_2/umc_cas_cmd.wr/
amd_umc_2/umc_data_slot_clks.all/
amd_umc_2/umc_data_slot_clks.rd/
amd_umc_2/umc_data_slot_clks.wr/
amd_umc_2/umc_mem_clk/
amd_umc_2/umc_pchg_cmd.all/
amd_umc_2/umc_pchg_cmd.rd/
amd_umc_2/umc_pchg_cmd.wr/
amd_umc_3/umc_act_cmd.all/
amd_umc_3/umc_act_cmd.rd/
amd_umc_3/umc_act_cmd.wr/
amd_umc_3/umc_cas_cmd.all/
amd_umc_3/umc_cas_cmd.rd/
amd_umc_3/umc_cas_cmd.wr/
amd_umc_3/umc_data_slot_clks.all/
amd_umc_3/umc_data_slot_clks.rd/
amd_umc_3/umc_data_slot_clks.wr/
amd_umc_3/umc_mem_clk/
amd_umc_3/umc_pchg_cmd.all/
amd_umc_3/umc_pchg_cmd.rd/
amd_umc_3/umc_pchg_cmd.wr/
amd_umc_4/umc_act_cmd.all/
amd_umc_4/umc_act_cmd.rd/
amd_umc_4/umc_act_cmd.wr/
amd_umc_4/umc_cas_cmd.all/
amd_umc_4/umc_cas_cmd.rd/
amd_umc_4/umc_cas_cmd.wr/
amd_umc_4/umc_data_slot_clks.all/
amd_umc_4/umc_data_slot_clks.rd/
amd_umc_4/umc_data_slot_clks.wr/
amd_umc_4/umc_mem_clk/
amd_umc_4/umc_pchg_cmd.all/
amd_umc_4/umc_pchg_cmd.rd/
amd_umc_4/umc_pchg_cmd.wr/
amd_umc_5/umc_act_cmd.all/
amd_umc_5/umc_act_cmd.rd/
amd_umc_5/umc_act_cmd.wr/
amd_umc_5/umc_cas_cmd.all/
amd_umc_5/umc_cas_cmd.rd/
amd_umc_5/umc_cas_cmd.wr/
amd_umc_5/umc_data_slot_clks.all/
amd_umc_5/umc_data_slot_clks.rd/
amd_umc_5/umc_data_slot_clks.wr/
amd_umc_5/umc_mem_clk/
amd_umc_5/umc_pchg_cmd.all/
amd_umc_5/umc_pchg_cmd.rd/
amd_umc_5/umc_pchg_cmd.wr/
amd_umc_6/umc_act_cmd.all/
amd_umc_6/umc_act_cmd.rd/
amd_umc_6/umc_act_cmd.wr/
amd_umc_6/umc_cas_cmd.all/
amd_umc_6/umc_cas_cmd.rd/
amd_umc_6/umc_cas_cmd.wr/
amd_umc_6/umc_data_slot_clks.all/
amd_umc_6/umc_data_slot_clks.rd/
amd_umc_6/umc_data_slot_clks.wr/
amd_umc_6/umc_mem_clk/
amd_umc_6/umc_pchg_cmd.all/
amd_umc_6/umc_pchg_cmd.rd/
amd_umc_6/umc_pchg_cmd.wr/
amd_umc_7/umc_act_cmd.all/
amd_umc_7/umc_act_cmd.rd/
amd_umc_7/umc_act_cmd.wr/
amd_umc_7/umc_cas_cmd.all/
amd_umc_7/umc_cas_cmd.rd/
amd_umc_7/umc_cas_cmd.wr/
amd_umc_7/umc_data_slot_clks.all/
amd_umc_7/umc_data_slot_clks.rd/
amd_umc_7/umc_data_slot_clks.wr/
amd_umc_7/umc_mem_clk/
amd_umc_7/umc_pchg_cmd.all/
amd_umc_7/umc_pchg_cmd.rd/
amd_umc_7/umc_pchg_cmd.wr/
amd_umc_8/umc_act_cmd.all/
amd_umc_8/umc_act_cmd.rd/
amd_umc_8/umc_act_cmd.wr/
amd_umc_8/umc_cas_cmd.all/
amd_umc_8/umc_cas_cmd.rd/
amd_umc_8/umc_cas_cmd.wr/
amd_umc_8/umc_data_slot_clks.all/
amd_umc_8/umc_data_slot_clks.rd/
amd_umc_8/umc_data_slot_clks.wr/
amd_umc_8/umc_mem_clk/
amd_umc_8/umc_pchg_cmd.all/
amd_umc_8/umc_pchg_cmd.rd/
amd_umc_8/umc_pchg_cmd.wr/
amd_umc_9/umc_act_cmd.all/
amd_umc_9/umc_act_cmd.rd/
amd_umc_9/umc_act_cmd.wr/
amd_umc_9/umc_cas_cmd.all/
amd_umc_9/umc_cas_cmd.rd/
amd_umc_9/umc_cas_cmd.wr/
amd_umc_9/umc_data_slot_clks.all/
amd_umc_9/umc_data_slot_clks.rd/
amd_umc_9/umc_data_slot_clks.wr/
amd_umc_9/umc_mem_clk/
amd_umc_9/umc_pchg_cmd.all/
amd_umc_9/umc_pchg_cmd.rd/
amd_umc_9/umc_pchg_cmd.wr/
umc_activate_cmd_rate
umc_cas_cmd_rate
umc_cas_cmd_read_ratio
umc_cas_cmd_write_ratio
umc_data_bus_utilization
umc_mem_bandwidth
umc_mem_read_bandwidth
umc_mem_write_bandwidth
umc_precharge_cmd_rate

@PvsNarasimha

Copy link
Copy Markdown
Author

Thank you for the confirmation!

I'm currently working on the fix. Once it is finalized, I'll submit it as a formal patch for your review.

@Liangyan-bd

Copy link
Copy Markdown

Could you also upstream this patch? We would like to upstream first. Thanks!

@PvsNarasimha
PvsNarasimha force-pushed the venice_ibs_enhancement branch from f5f37d1 to 2ad7f78 Compare August 4, 2026 14:30
@guixiongwei

Copy link
Copy Markdown
Collaborator

Thanks for your work, this PR has merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants