]> Git Repo - linux.git/commit
LoongArch: Fix AP booting issue in VM mode
authorBibo Mao <[email protected]>
Tue, 12 Nov 2024 08:35:39 +0000 (16:35 +0800)
committerHuacai Chen <[email protected]>
Tue, 12 Nov 2024 08:35:39 +0000 (16:35 +0800)
commit6ce031e5d6f475d476bab55ab7d8ea168fedc4c1
treefd73563f6344af6f62923722603f49b99d88cfe0
parent139d42ca51018c1d43ab5f35829179f060d1ab31
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: [email protected]
Fixes: 74c16b2e2b0c ("LoongArch: KVM: Add PV IPI support on guest side")
Signed-off-by: Bibo Mao <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
arch/loongarch/kernel/paravirt.c
This page took 0.051197 seconds and 4 git commands to generate.