linux-stable/arch/x86/kernel
Thomas Gleixner 5754ace3c3 x86/topology/amd: Ensure that LLC ID is initialized
The original topology evaluation code initialized cpu_data::topo::llc_id
with the die ID initialy and then eventually overwrite it with information
gathered from a CPUID leaf.

The conversion analysis failed to spot that particular detail and omitted
this initial assignment under the assumption that each topology evaluation
path will set it up. That assumption is mostly correct, but turns out to be
wrong in case that the CPUID leaf 0x80000006 does not provide a LLC ID.

In that case, LLC ID is invalid and as a consequence the setup of the
scheduling domain CPU masks is incorrect which subsequently causes the
scheduler core to complain about it during CPU hotplug:

  BUG: arch topology borken
       the CLS domain not a subset of the MC domain

Cure it by reusing legacy_set_llc() and assigning the die ID if the LLC ID
is invalid after all possible parsers have been tried.

Fixes: f7fb3b2dd9 ("x86/cpu: Provide an AMD/HYGON specific topology parser")
Reported-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Link: https://lore.kernel.org/r/PUZPR04MB63168AC442C12627E827368581292@PUZPR04MB6316.apcprd04.prod.outlook.com
2024-05-10 17:42:50 +02:00
..
acpi ACPI updates for 6.9-rc1 2024-03-13 11:54:05 -07:00
apic x86/apic: Don't access the APIC when disabling x2APIC 2024-04-30 07:51:34 +02:00
cpu x86/topology/amd: Ensure that LLC ID is initialized 2024-05-10 17:42:50 +02:00
fpu x86/fpu: Keep xfd_state in sync with MSR_IA32_XFD 2024-03-24 04:03:54 +01:00
kprobes kprobes/x86: Use copy_from_kernel_nofault() to read from unsafe address 2024-03-22 11:40:56 +01:00
.gitignore
Makefile - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
alternative.c - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
amd_gart_64.c arch/x86: Fix typos 2024-01-03 11:46:22 +01:00
amd_nb.c x86/amd_nb: Add new PCI IDs for AMD family 0x1a 2024-05-10 14:52:46 +02:00
aperture_64.c x86/pci: Use PCI_HEADER_TYPE_* instead of literals 2023-12-01 15:00:43 -06:00
apm_32.c x86/apm_32: Remove dead function apm_get_battery_status() 2024-02-21 19:38:03 +01:00
asm-offsets.c x86/bugs: Rename CONFIG_CALL_DEPTH_TRACKING => CONFIG_MITIGATION_CALL_DEPTH_TRACKING 2024-01-10 10:52:28 +01:00
asm-offsets_32.c
asm-offsets_64.c x86: Fixup asm-offsets duplicate 2022-10-17 16:41:06 +02:00
audit_64.c x86/audit: Fix -Wmissing-variable-declarations warning for ia32_xyz_class 2023-08-30 10:11:16 +02:00
bootflag.c
callthunks.c x86/bpf: Fix IP for relocating call depth accounting 2024-04-01 20:37:56 -07:00
cet.c x86/ibt: Convert IBT selftest to asm 2023-08-17 17:07:09 +02:00
cfi.c cfi: Flip headers 2023-12-15 16:25:55 -08:00
check.c
cpuid.c x86/cpuid: make cpuid_class a static const structure 2023-08-05 08:31:41 +02:00
crash.c x86/build changes for v6.9: 2024-03-11 19:23:16 -07:00
crash_dump_32.c
crash_dump_64.c use less confusing names for iov_iter direction initializers 2022-11-25 13:01:55 -05:00
devicetree.c Devicetree updates for v6.9: 2024-03-15 12:37:59 -07:00
doublefault_32.c x86: Avoid missing-prototype warnings for doublefault code 2023-05-18 11:56:18 -07:00
dumpstack.c x86/bugs: Rename CONFIG_PAGE_TABLE_ISOLATION => CONFIG_MITIGATION_PAGE_TABLE_ISOLATION 2024-01-10 10:52:28 +01:00
dumpstack_32.c x86/percpu: Move irq_stack variables next to current_task 2022-10-17 16:41:05 +02:00
dumpstack_64.c x86/percpu: Move irq_stack variables next to current_task 2022-10-17 16:41:05 +02:00
e820.c x86/e820: Add a new e820 table update helper 2024-04-29 11:15:31 +02:00
early-quirks.c x86/pci: Use PCI_HEADER_TYPE_* instead of literals 2023-12-01 15:00:43 -06:00
early_printk.c
ebda.c
eisa.c x86/sev: Skip ROM range scans and validation for SEV-SNP guests 2024-03-26 15:22:35 +01:00
espfix_64.c x86/fred: No ESPFIX needed when FRED is enabled 2024-01-31 22:01:51 +01:00
fred.c x86/fred: Add FRED initialization functions 2024-01-31 22:03:32 +01:00
ftrace.c x86/bugs: Rename CONFIG_SLS => CONFIG_MITIGATION_SLS 2024-01-10 10:52:28 +01:00
ftrace_32.S x86/headers: Replace #include <asm/export.h> with #include <linux/export.h> 2023-10-03 10:38:07 +02:00
ftrace_64.S x86/headers: Replace #include <asm/export.h> with #include <linux/export.h> 2023-10-03 10:38:07 +02:00
head32.c x86/microcode/32: Move early loading after paging enable 2023-10-18 22:15:01 +02:00
head64.c x86/boot/64: Move 5-level paging global variable assignments back 2024-03-24 05:00:36 +01:00
head_32.S x86/bugs: Rename CONFIG_PAGE_TABLE_ISOLATION => CONFIG_MITIGATION_PAGE_TABLE_ISOLATION 2024-01-10 10:52:28 +01:00
head_64.S Merge branch 'linus' into x86/boot, to resolve conflict 2024-03-12 09:55:57 +01:00
hpet.c x86/apic/msi: Use DOMAIN_BUS_GENERIC_MSI for HPET/IO-APIC domain search 2024-02-25 18:53:08 +01:00
hw_breakpoint.c x86/amd: Cache debug register values in percpu variables 2023-01-31 20:09:26 +01:00
i8237.c
i8253.c
i8259.c x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility 2023-10-27 20:36:49 +02:00
ibt_selftest.S x86/ibt: Convert IBT selftest to asm 2023-08-17 17:07:09 +02:00
idt.c S390: 2024-03-15 13:03:13 -07:00
io_delay.c
ioport.c
irq.c x86: replace CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM) 2024-02-08 08:45:35 -05:00
irq_32.c x86/percpu: Move irq_stack variables next to current_task 2022-10-17 16:41:05 +02:00
irq_64.c x86/percpu: Move irq_stack variables next to current_task 2022-10-17 16:41:05 +02:00
irq_work.c x86/apic: Wrap IPI calls into helper functions 2023-08-09 12:00:55 -07:00
irqflags.S x86/headers: Replace #include <asm/export.h> with #include <linux/export.h> 2023-10-03 10:38:07 +02:00
irqinit.c x86/fred: Invoke FRED initialization code to enable FRED 2024-01-31 22:03:36 +01:00
itmt.c arch/x86: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
jailhouse.c x86/jailhouse: Use new APIC registration function 2024-02-15 22:07:42 +01:00
jump_label.c
kdebugfs.c
kexec-bzimage64.c - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
kgdb.c x86/kgdb: Fix a kerneldoc warning when build with W=1 2023-09-24 11:00:13 +02:00
ksysfs.c
kvm.c Guest-side KVM async #PF ABI cleanup for 6.9 2024-03-18 19:03:42 -04:00
kvmclock.c kvmclock: Unexport kvmclock clocksource 2024-02-07 17:05:21 +01:00
ldt.c x86/bugs: Rename CONFIG_PAGE_TABLE_ISOLATION => CONFIG_MITIGATION_PAGE_TABLE_ISOLATION 2024-01-10 10:52:28 +01:00
machine_kexec_32.c
machine_kexec_64.c x86, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
mmconf-fam10h_64.c
module.c x86/paravirt: Switch mixed paravirt/alternative calls to alternatives 2023-12-10 23:33:09 +01:00
mpparse.c x86/mpparse: Register APIC address only once 2024-03-23 12:41:48 +01:00
msr.c x86/MSR: make msr_class a static const structure 2023-08-05 08:31:42 +02:00
nmi.c x86/nmi: Upgrade NMI backtrace stall checks & messages 2024-03-26 10:07:59 +01:00
nmi_selftest.c x86/apic: Wrap IPI calls into helper functions 2023-08-09 12:00:55 -07:00
paravirt-spinlocks.c
paravirt.c x86/paravirt: Remove no longer needed paravirt patching code 2023-12-10 23:34:37 +01:00
pci-dma.c x86: always initialize xen-swiotlb when xen-pcifront is enabling 2023-07-31 17:54:27 +02:00
pcspeaker.c
perf_regs.c
platform-quirks.c x86/quirks: Include linux/pnp.h for arch_pnpbios_disabled() 2023-05-18 11:56:18 -07:00
pmem.c
probe_roms.c x86/sev: Skip ROM range scans and validation for SEV-SNP guests 2024-03-26 15:22:35 +01:00
process.c Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
process.h
process_32.c x86/fpu: Clean up FPU switching in the middle of task switching 2023-10-20 11:24:22 +02:00
process_64.c x86/cpu: Fix check for RDPKRU in __show_regs() 2024-04-24 14:30:21 +02:00
ptrace.c x86: Add PTRACE interface for shadow stack 2023-08-02 15:01:51 -07:00
pvclock.c locking/atomic: treewide: use raw_atomic*_<op>() 2023-06-05 09:57:20 +02:00
quirks.c
reboot.c x86, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
reboot_fixups_32.c
relocate_kernel_32.S
relocate_kernel_64.S x86,objtool: Split UNWIND_HINT_EMPTY in two 2023-03-23 23:18:58 +01:00
resource.c x86/PCI: Tidy E820 removal messages 2022-12-10 10:33:11 -06:00
rethook.c
rtc.c rtc: Extend timeout for waiting for UIP to clear to 1s 2023-12-17 22:33:55 +01:00
setup.c x86/coco: Require seeding RNG with RDRAND on CoCo systems 2024-04-04 10:40:19 +02:00
setup_percpu.c x86/asm: Add DB flag to 32-bit percpu GDT entry 2023-12-20 10:57:51 +01:00
sev-shared.c x86/sev: Check for MWAITX and MONITORX opcodes in the #VC handler 2024-04-22 18:38:28 +02:00
sev.c x86/CPU/AMD: Track SNP host status with cc_platform_*() 2024-04-04 10:40:30 +02:00
sev_verify_cbit.S x86/boot: Use 32-bit XOR to clear registers 2024-03-01 12:47:37 +01:00
shstk.c x86/shstk: Add warning for shadow stack double unmap 2023-09-19 09:18:34 -07:00
signal.c rseq: Split out rseq.h from sched.h 2023-12-27 11:49:56 -05:00
signal_32.c x86/shstk: Add user control-protection fault handler 2023-08-02 15:01:50 -07:00
signal_64.c x86/shstk: Delay signal entry SSP write until after user accesses 2023-11-08 08:55:37 -08:00
smp.c - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
smpboot.c x86/cpu: Ensure that CPU info updates are propagated on UP 2024-03-23 12:22:04 +01:00
stacktrace.c
static_call.c x86/bugs: Rename CONFIG_RETHUNK => CONFIG_MITIGATION_RETHUNK 2024-01-10 10:52:29 +01:00
step.c x86/msr: Prepare for including <linux/percpu.h> into <asm/msr.h> 2024-03-04 12:01:39 +01:00
sys_ia32.c
sys_x86_64.c x86/vdso: Move vDSO to mmap region 2024-02-27 00:23:55 +01:00
tboot.c
time.c
tls.c x86/gsseg: Move load_gs_index() to its own new header file 2023-01-12 13:06:36 +01:00
tls.h
topology.c x86/topology: convert to use arch_cpu_is_hotpluggable() 2023-12-06 12:41:49 +09:00
trace.c
trace_clock.c
tracepoint.c
traps.c Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
tsc.c treewide: Remove system_counterval_t.cs, which is never read 2024-02-07 17:05:21 +01:00
tsc_msr.c
tsc_sync.c x86/tsc: Defer marking TSC unstable to a worker 2023-10-27 20:36:57 +02:00
umip.c
unwind_frame.c
unwind_guess.c
unwind_orc.c x86/unwind/orc: Remove redundant initialization of 'mid' pointer in __orc_find() 2023-09-21 08:41:23 +02:00
uprobes.c uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix 2022-12-05 11:55:18 +01:00
verify_cpu.S
vm86_32.c
vmcore_info_32.c crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
vmcore_info_64.c crash: split vmcoreinfo exporting code out from crash_core.c 2024-02-23 17:48:22 -08:00
vmlinux.lds.S Merge branch 'x86/bugs' into x86/core, to pick up pending changes before dependent patches 2024-02-14 10:49:37 +01:00
vsmp_64.c x86/apic: Remove unused phys_pkg_id() callback 2024-02-15 22:07:38 +01:00
x86_init.c x86/sev: Skip ROM range scans and validation for SEV-SNP guests 2024-03-26 15:22:35 +01:00