Skip to content

Commit 8d8bd2a

Browse files
committed
Merge tag 'x86-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: - Improve Qemu MCE-injection behavior by only using AMD SMCA MSRs if the feature bit is set - Fix the relative path of gettimeofday.c inclusion in vclock_gettime.c - Fix a boot crash on UV clusters when a socket is marked as 'deconfigured' which are mapped to the SOCK_EMPTY node ID by the UV firmware, while Linux APIs expect NUMA_NO_NODE. The difference being (0xffff [unsigned short ~0]) vs [int -1] * tag 'x86-urgent-2026-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Handle deconfigured sockets x86/entry/vdso: Fix path of included gettimeofday.c x86/mce/amd: Check SMCA feature bit before accessing SMCA MSRs
2 parents ebfd9b7 + 1f6aa5b commit 8d8bd2a

3 files changed

Lines changed: 28 additions & 9 deletions

File tree

arch/x86/entry/vdso/common/vclock_gettime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <linux/types.h>
1414
#include <vdso/gettime.h>
1515

16-
#include "../../../../lib/vdso/gettimeofday.c"
16+
#include "lib/vdso/gettimeofday.c"
1717

1818
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
1919
{

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,8 +1708,22 @@ static void __init uv_system_init_hub(void)
17081708
struct uv_hub_info_s *new_hub;
17091709

17101710
/* Allocate & fill new per hub info list */
1711-
new_hub = (bid == 0) ? &uv_hub_info_node0
1712-
: kzalloc_node(bytes, GFP_KERNEL, uv_blade_to_node(bid));
1711+
if (bid == 0) {
1712+
new_hub = &uv_hub_info_node0;
1713+
} else {
1714+
int nid;
1715+
1716+
/*
1717+
* Deconfigured sockets are mapped to SOCK_EMPTY. Use
1718+
* NUMA_NO_NODE to allocate on a valid node.
1719+
*/
1720+
nid = uv_blade_to_node(bid);
1721+
if (nid == SOCK_EMPTY)
1722+
nid = NUMA_NO_NODE;
1723+
1724+
new_hub = kzalloc_node(bytes, GFP_KERNEL, nid);
1725+
}
1726+
17131727
if (WARN_ON_ONCE(!new_hub)) {
17141728
/* do not kfree() bid 0, which is statically allocated */
17151729
while (--bid > 0)

arch/x86/kernel/cpu/mce/amd.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,18 @@ void amd_clear_bank(struct mce *m)
875875
{
876876
amd_reset_thr_limit(m->bank);
877877

878-
/* Clear MCA_DESTAT for all deferred errors even those logged in MCA_STATUS. */
879-
if (m->status & MCI_STATUS_DEFERRED)
880-
mce_wrmsrq(MSR_AMD64_SMCA_MCx_DESTAT(m->bank), 0);
878+
if (mce_flags.smca) {
879+
/*
880+
* Clear MCA_DESTAT for all deferred errors even those
881+
* logged in MCA_STATUS.
882+
*/
883+
if (m->status & MCI_STATUS_DEFERRED)
884+
mce_wrmsrq(MSR_AMD64_SMCA_MCx_DESTAT(m->bank), 0);
881885

882-
/* Don't clear MCA_STATUS if MCA_DESTAT was used exclusively. */
883-
if (m->kflags & MCE_CHECK_DFR_REGS)
884-
return;
886+
/* Don't clear MCA_STATUS if MCA_DESTAT was used exclusively. */
887+
if (m->kflags & MCE_CHECK_DFR_REGS)
888+
return;
889+
}
885890

886891
mce_wrmsrq(mca_msr_reg(m->bank, MCA_STATUS), 0);
887892
}

0 commit comments

Comments
 (0)