linux-stable/arch/x86
Kan Liang f51d194b19 perf/x86/uncore: Correct the number of CHAs on EMR
commit 6f7f984fa8 upstream.

Starting from SPR, the basic uncore PMON information is retrieved from
the discovery table (resides in an MMIO space populated by BIOS). It is
called the discovery method. The existing value of the type->num_boxes
is from the discovery table.

On some SPR variants, there is a firmware bug that makes the value from the
discovery table incorrect. We use the value from the
SPR_MSR_UNC_CBO_CONFIG MSR to replace the one from the discovery table:

   38776cc45e ("perf/x86/uncore: Correct the number of CHAs on SPR")

Unfortunately, the SPR_MSR_UNC_CBO_CONFIG isn't available for the EMR
XCC (Always returns 0), but the above firmware bug doesn't impact the
EMR XCC.

Don't let the value from the MSR replace the existing value from the
discovery table.

Fixes: 38776cc45e ("perf/x86/uncore: Correct the number of CHAs on SPR")
Reported-by: Stephane Eranian <eranian@google.com>
Reported-by: Yunying Sun <yunying.sun@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Yunying Sun <yunying.sun@intel.com>
Link: https://lore.kernel.org/r/20230905134248.496114-1-kan.liang@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:48:44 +02:00
..
boot x86/decompressor: Don't rely on upper 32 bits of GPRs being preserved 2023-09-13 09:47:58 +02:00
coco x86/tdx: Fix race between set_memory_encrypted() and load_unaligned_zeropad() 2023-07-19 16:35:14 +02:00
configs
crypto This push fixes an alignment crash in x86/aria. 2023-05-29 07:05:49 -04:00
entry x86/mm: Fix VDSO and VVAR placement on 5-level paging machines 2023-08-16 18:32:22 +02:00
events perf/x86/uncore: Correct the number of CHAs on EMR 2023-09-13 09:48:44 +02:00
hyperv x86/hyperv: add noop functions to x86_init mpparse functions 2023-09-13 09:47:53 +02:00
ia32
include x86/sev: Make enc_dec_hypercall() accept a size instead of npages 2023-09-13 09:48:41 +02:00
kernel x86/build: Fix linker fill bytes quirk/incompatibility for ld.lld 2023-09-13 09:48:44 +02:00
kvm KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages 2023-09-13 09:47:56 +02:00
lib x86/retpoline,kprobes: Fix position of thunk sections with CONFIG_LTO_CLANG 2023-08-23 17:32:41 +02:00
math-emu
mm x86/sev: Make enc_dec_hypercall() accept a size instead of npages 2023-09-13 09:48:41 +02:00
net bpf: Fix a bpf_jit_dump issue for x86_64 with sysctl bpf_jit_enable. 2023-06-12 16:47:18 +02:00
pci xen: branch for v6.4-rc4 2023-05-27 09:42:56 -07:00
platform x86/efi: Make efi_set_virtual_address_map IBT safe 2023-07-19 16:36:25 +02:00
power x86/cpu: Mark {hlt,resume}_play_dead() __noreturn 2023-04-14 17:31:27 +02:00
purgatory x86/purgatory: remove PGO flags 2023-06-12 11:31:50 -07:00
ras
realmode
tools ELF: fix all "Elf" typos 2023-04-08 13:45:37 -07:00
um um: make stub data pages size tweakable 2023-04-20 23:08:43 +02:00
video
virt/vmx/tdx
xen x86/xen: Fix secondary processors' FPU initialization 2023-08-08 20:04:51 +02:00
.gitignore
Kbuild
Kconfig x86/srso: Add a Speculative RAS Overflow mitigation 2023-08-08 20:04:51 +02:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
Makefile x86/unwind/orc: Add ELF section with ORC version identifier 2023-06-16 17:17:42 +02:00
Makefile.um um: Only disable SSE on clang to work around old GCC bugs 2023-04-04 09:57:05 +02:00
Makefile_32.cpu