linux-stable/arch/x86
Kan Liang 5dac20360a perf/x86/intel: Fix unchecked MSR access error for Alder Lake N
[ Upstream commit 24919fdea6 ]

For some Alder Lake N machine, the below unchecked MSR access error may be
triggered.

[ 0.088017] rcu: Hierarchical SRCU implementation.
[ 0.088017] unchecked MSR access error: WRMSR to 0x38f (tried to write
0x0001000f0000003f) at rIP: 0xffffffffb5684de8 (native_write_msr+0x8/0x30)
[ 0.088017] Call Trace:
[ 0.088017] <TASK>
[ 0.088017] __intel_pmu_enable_all.constprop.46+0x4a/0xa0

The Alder Lake N only has e-cores. The X86_FEATURE_HYBRID_CPU flag is
not set. The perf cannot retrieve the correct CPU type via
get_this_hybrid_cpu_type(). The model specific get_hybrid_cpu_type() is
hardcode to p-core. The wrong CPU type is given to the PMU of the
Alder Lake N.

Since Alder Lake N isn't in fact a hybrid CPU, remove ALDERLAKE_N from
the rest of {ALDER,RAPTOP}LAKE and create a non-hybrid PMU setup.

The differences between Gracemont and the previous Tremont are,
- Number of GP counters
- Load and store latency Events
- PEBS event_constraints
- Instruction Latency support
- Data source encoding
- Memory access latency encoding

Fixes: c2a960f7c5 ("perf/x86: Add new Alder Lake and Raptor Lake support")
Reported-by: Jianfeng Gao <jianfeng.gao@intel.com>
Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220831142702.153110-1-kan.liang@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-12 09:51:25 +02:00
..
boot x86/boot: Don't propagate uninitialized boot_params->cc_blob_address 2022-08-31 17:18:13 +02:00
coco x86/tdx: Handle load_unaligned_zeropad() page-cross to a shared page 2022-06-17 15:37:33 -07:00
configs x86/config: Make the x86 defconfigs a bit more usable 2022-03-27 20:58:35 +02:00
crypto crypto: blake2s - remove shash module 2022-08-17 15:16:07 +02:00
entry x86/entry: Fix entry_INT80_compat for Xen PV guests 2022-08-31 17:18:13 +02:00
events perf/x86/intel: Fix unchecked MSR access error for Alder Lake N 2022-10-12 09:51:25 +02:00
hyperv x86/Hyper-V: Add SEV negotiate protocol support in Isolation VM 2022-06-15 18:27:40 +00:00
ia32 x86: Remove a.out support 2022-04-11 18:04:27 +02:00
include x86/cacheinfo: Add a cpu_llc_shared_mask() UP variant 2022-10-05 10:40:54 +02:00
kernel x86/alternative: Fix race in try_get_desc() 2022-10-05 10:40:54 +02:00
kvm KVM: x86: Hide IA32_PLATFORM_DCA_CAP[31:0] from the guest 2022-10-05 10:40:54 +02:00
lib x86/uaccess: avoid check_object_size() in copy_from_user_nmi() 2022-10-05 10:40:44 +02:00
math-emu x86/32: Remove lazy GS macros 2022-04-14 14:09:43 +02:00
mm x86/PAT: Have pat_enabled() properly reflect state when running on Xen 2022-08-31 17:18:14 +02:00
net bpf, x86: fix freeing of not-finalized bpf_prog_pack 2022-08-17 15:14:48 +02:00
pci x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions" 2022-06-17 14:24:14 -05:00
platform x86/olpc: fix 'logical not is only applied to the left hand side' 2022-08-17 15:16:05 +02:00
power x86/cpu: Load microcode during restore_processor_state() 2022-04-19 19:37:05 +02:00
purgatory
ras
realmode Intel Trust Domain Extensions 2022-05-23 17:51:12 -07:00
tools
um arch: um: Mark the stack non-executable to fix a binutils warning 2022-10-12 09:51:24 +02:00
video
virt/vmx/tdx x86/tdx: Provide common base for SEAMCALL and TDCALL C wrappers 2022-04-07 08:27:50 -07:00
xen xen: don't require virtio with grants for non-PV guests 2022-08-17 15:15:41 +02:00
.gitignore
Kbuild
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 15:13:59 +02:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 15:13:59 +02:00
Makefile lkdtm: Disable return thunks in rodata.c 2022-07-20 19:24:53 +02:00
Makefile.um
Makefile_32.cpu