1
linux/arch/loongarch/kernel
Bibo Mao 6ce031e5d6 LoongArch: Fix AP booting issue in VM mode
Native IPI is used for AP booting, because it is the booting interface
between OS and BIOS firmware. The paravirt IPI is only used inside OS,
and native IPI is necessary to boot AP.

When booting AP, we write the kernel entry address in the HW mailbox of
AP and send IPI interrupt to it. AP executes idle instruction and waits
for interrupts or SW events, then clears IPI interrupt and jumps to the
kernel entry from HW mailbox.

Between writing HW mailbox and sending IPI, AP can be woken up by SW
events and jumps to the kernel entry, so ACTION_BOOT_CPU IPI interrupt
will keep pending during AP booting. And native IPI interrupt handler
needs be registered so that it can clear pending native IPI, else there
will be endless interrupts during AP booting stage.

Here native IPI interrupt is initialized even if paravirt IPI is used.

Cc: stable@vger.kernel.org
Fixes: 74c16b2e2b ("LoongArch: KVM: Add PV IPI support on guest side")
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-11-12 16:35:39 +08:00
..
.gitignore LoongArch: Add build infrastructure 2022-06-03 20:09:27 +08:00
access-helper.h
acpi.c LoongArch: For all possible CPUs setup logical-physical CPU mapping 2024-11-12 16:35:36 +08:00
alternative.c LoongArch: Use common function sign_extend64() 2023-01-17 11:42:16 +08:00
asm-offsets.c arch: fix asm-offsets.c building with -Wmissing-prototypes 2023-11-23 11:32:31 +01:00
cacheinfo.c
cpu-probe.c LoongArch: Rework CPU feature probe from CPUCFG/IOCSR 2024-09-24 15:32:20 +08:00
crash_dump.c
dma.c dma-mapping: Add helpers for dma_range_map bounds 2024-04-26 12:07:24 +02:00
efi-header.S
efi.c LoongArch: Enable general EFI poweroff method 2024-08-07 17:37:11 +08:00
elf.c
entry.S
env.c
fpu.S
ftrace_dyn.c
ftrace.c
genex.S
head.S LoongArch: Add writecombine support for DMW-based ioremap() 2024-07-20 22:40:59 +08:00
hw_breakpoint.c
idle.c
image-vars.h
inst.c LoongArch: Add larch_insn_gen_break() to generate break insns 2023-06-29 20:58:44 +08:00
io.c LoongArch: Add misc common routines 2022-06-03 20:09:28 +08:00
irq.c Merge tag 'irq-core-2024-09-16' into loongarch-next 2024-09-17 22:20:12 +08:00
jump_label.c
kfpu.c
kgdb.c
kprobes.c
lbt.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
machine_kexec.c
Makefile
Makefile.syscalls syscalls: fix syscall macros for newfstat/newfstatat 2024-08-02 15:20:47 +02:00
mcount_dyn.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
mcount.S
mem.c
module-sections.c
module.c arch: make execmem setup available regardless of CONFIG_MODULES 2024-05-14 00:31:44 -07:00
numa.c arch, mm: pull out allocation of NODE_DATA to generic code 2024-09-03 21:15:28 -07:00
paravirt.c LoongArch: Fix AP booting issue in VM mode 2024-11-12 16:35:39 +08:00
perf_event.c LoongArch/smp: Refine some ipi functions on LoongArch platform 2024-05-06 22:00:46 +08:00
perf_regs.c
proc.c LoongArch: Rework CPU feature probe from CPUCFG/IOCSR 2024-09-24 15:32:20 +08:00
process.c LoongArch: Don't crash in stack_top() for tasks without vDSO 2024-10-21 22:11:19 +08:00
ptrace.c
relocate_kernel.S
relocate.c
reset.c
rethook_trampoline.S
rethook.c
rethook.h
setup.c LoongArch: Get correct cores_per_package for SMT systems 2024-10-21 22:11:18 +08:00
signal.c
smp.c LoongArch: Fix early_numa_add_cpu() usage for FDT systems 2024-11-12 16:35:36 +08:00
stacktrace.c
switch.S
syscall.c LoongArch: Remove STACK_FRAME_NON_STANDARD(do_syscall) 2024-09-17 22:23:10 +08:00
sysrq.c tty: sysrq: switch sysrq handlers from int to u8 2023-07-25 19:21:03 +02:00
time.c
topology.c
traps.c LoongArch: Enable IRQ if do_ale() triggered in irq-enabled context 2024-10-21 22:11:19 +08:00
unaligned.c
unwind_guess.c
unwind_orc.c LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
unwind_prologue.c LoongArch: Set unwind stack type to unknown rather than set error flag 2023-12-09 15:49:15 +08:00
unwind.c
uprobes.c
vdso.c LoongArch: Set correct size for vDSO code mapping 2024-10-21 22:11:19 +08:00
vmlinux.lds.S LoongArch: Add support for relocating the kernel with RELR relocation 2024-07-20 22:41:07 +08:00