linux-stable/tools
Kan Liang dff5463bc7 perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform
[ Upstream commit 01b28e4a58 ]

The X86 specific arch__intr_reg_mask() is to check whether the kernel
and hardware can collect XMM registers. But it doesn't work on some
hybrid platform.

Without the patch on ADL-N:

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10
  R11 R12 R13 R14 R15

The config of the test event doesn't contain the PMU information. The
kernel may fail to initialize it on the correct hybrid PMU and return
the wrong non-supported information.

Add the PMU information into the config for the hybrid platform. The
same register set is supported among different hybrid PMUs. Checking
the first available one is good enough.

With the patch on ADL-N:

  $ perf record -I?
  available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10
  R11 R12 R13 R14 R15 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 XMM9
  XMM10 XMM11 XMM12 XMM13 XMM14 XMM15

Fixes: 6466ec14aa ("perf regs x86: Add X86 specific arch__intr_reg_mask()")
Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20220518145125.1494156-1-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:57:34 +02:00
..
accounting
arch tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' 2022-05-15 20:18:51 +02:00
bootconfig tools/bootconfig: Define memblock_free_ptr() to fix build error 2021-09-15 09:49:48 -07:00
bpf bpftool: Fix the error when lookup in no-btf maps 2022-04-08 14:23:31 +02:00
build perf build: Fix check for btf__load_from_kernel_by_id() in libbpf 2022-05-25 09:57:34 +02:00
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include bpf: Fix comment for helper bpf_current_task_under_cgroup() 2022-04-08 14:24:14 +02:00
io_uring tools/io_uring/io_uring-cp: sync with liburing example 2021-08-13 08:58:11 -06:00
kvm/kvm_stat KVM: kvm_stat: do not show halt_wait_ns 2021-10-18 14:07:18 -04:00
laptop
leds
lib perf tools: Fix segfault accessing sample_id xyarray 2022-04-27 14:38:50 +02:00
memory-model tools/memory-model: Document data_race(READ_ONCE()) 2021-07-27 11:48:55 -07:00
objtool objtool: Fix SLS validation for kcov tail-call replacement 2022-05-15 20:18:51 +02:00
pci tools: PCI: Zero-initialize param 2021-08-05 11:01:30 +01:00
pcmcia
perf perf regs x86: Fix arch__intr_reg_mask() for the hybrid platform 2022-05-25 09:57:34 +02:00
power
rcu
scripts
spi
testing selftests: vm: Makefile: rename TARGETS to VMTARGETS 2022-05-18 10:26:50 +02:00
thermal/tmon tools/thermal/tmon: Add cross compiling support 2021-08-14 15:33:19 +02:00
time
tracing tools/latency-collector: Use correct size when writing queue_full_warning 2021-11-18 19:16:19 +01:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: compile with -pthread 2022-05-25 09:57:25 +02:00
vm tools/vm/page-types: remove dependency on opt_file for idle page tracking 2021-09-24 16:13:35 -07:00
wmi
Makefile