1
0
Fork 0
alistair23-linux/arch/x86/xen
Brian Masney 204dbc26f1 x86/xen: don't unbind uninitialized lock_kicker_irq
[ Upstream commit 65cae18882 ]

When booting a hyperthreaded system with the kernel parameter
'mitigations=auto,nosmt', the following warning occurs:

    WARNING: CPU: 0 PID: 1 at drivers/xen/events/events_base.c:1112 unbind_from_irqhandler+0x4e/0x60
    ...
    Hardware name: Xen HVM domU, BIOS 4.2.amazon 08/24/2006
    ...
    Call Trace:
     xen_uninit_lock_cpu+0x28/0x62
     xen_hvm_cpu_die+0x21/0x30
     takedown_cpu+0x9c/0xe0
     ? trace_suspend_resume+0x60/0x60
     cpuhp_invoke_callback+0x9a/0x530
     _cpu_up+0x11a/0x130
     cpu_up+0x7e/0xc0
     bringup_nonboot_cpus+0x48/0x50
     smp_init+0x26/0x79
     kernel_init_freeable+0xea/0x229
     ? rest_init+0xaa/0xaa
     kernel_init+0xa/0x106
     ret_from_fork+0x35/0x40

The secondary CPUs are not activated with the nosmt mitigations and only
the primary thread on each CPU core is used. In this situation,
xen_hvm_smp_prepare_cpus(), and more importantly xen_init_lock_cpu(), is
not called, so the lock_kicker_irq is not initialized for the secondary
CPUs. Let's fix this by exiting early in xen_uninit_lock_cpu() if the
irq is not set to avoid the warning from above for each secondary CPU.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20201107011119.631442-1-bmasney@redhat.com
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-02 08:49:48 +01:00
..
Kconfig x86/Kconfig: Add new X86_HV_CALLBACK_VECTOR config symbol 2019-06-11 21:21:11 +02:00
Makefile xen/pvh: Create a new file for Xen specific PVH code 2018-12-13 13:41:49 -05:00
apic.c Merge branch 'WIP.x86/asm' into x86/urgent, because the topic is ready 2018-04-12 09:42:34 +02:00
debugfs.c x86: xen: no need to check return value of debugfs_create functions 2019-06-03 15:49:07 +02:00
debugfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
enlighten.c x86/xen: Return from panic notifier 2019-10-07 17:53:30 -04:00
enlighten_hvm.c x86/xen: Add "nopv" support for HVM guest 2019-07-17 08:09:59 +02:00
enlighten_pv.c x86/xen: disable Firmware First mode for correctable memory errors 2020-11-01 12:01:05 +01:00
enlighten_pvh.c xen/pvh: correctly setup the PV EFI interface for dom0 2019-04-25 10:36:25 -04:00
grant-table.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
irq.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
mmu.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
mmu.h mm: update ptep_modify_prot_start/commit to take vm_area_struct as arg 2019-03-05 21:07:18 -08:00
mmu_hvm.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
mmu_pv.c xen: remove the exports for xen_{create,destroy}_contiguous_region 2019-09-11 12:43:26 +02:00
multicalls.c treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
multicalls.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
p2m.c x86: xen: no need to check return value of debugfs_create functions 2019-06-03 15:49:07 +02:00
pci-swiotlb-xen.c x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
platform-pci-unplug.c xen/pvh: don't try to unplug emulated devices 2018-10-26 09:16:57 +02:00
pmu.c Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-10-23 16:16:40 +01:00
pmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.c x86/xen: dont add memory above max allowed allocation 2019-02-18 06:52:51 +01:00
smp.c x86/xen: Calculate __max_logical_packages on PV domains 2018-02-17 09:40:45 +01:00
smp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp_pv.c x86: Fix early boot crash on gcc-10, third try 2020-05-20 08:20:34 +02:00
spinlock.c x86/xen: don't unbind uninitialized lock_kicker_irq 2020-12-02 08:49:48 +01:00
suspend.c x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend 2018-02-28 16:03:19 +01:00
suspend_hvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
suspend_pv.c x86/xen/time: Initialize pv xen time in init_hypervisor_platform() 2018-07-20 00:02:39 +02:00
time.c x86/xen: Add "xen_timer_slop" command line option 2019-04-23 11:06:26 -04:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso.h x86/xen: Add SPDX identifier in arch/x86/xen files 2018-09-03 16:50:33 +02:00
vga.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-asm.S x86/paravirt: Make read_cr2() CALLEE_SAVE 2019-07-17 23:17:37 +02:00
xen-asm_32.S x86/xen/32: Simplify ring check in xen_iret_crit_fixup() 2019-11-29 10:09:50 +01:00
xen-asm_64.S xen/pv: Fix a boot up hang revealed by int3 self test 2019-07-17 08:09:59 +02:00
xen-head.S x86/irq/64: Split the IRQ stack into its own pages 2019-04-17 15:37:02 +02:00
xen-ops.h x86/paravirt: Make read_cr2() CALLEE_SAVE 2019-07-17 23:17:37 +02:00