KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support
authorHuacai Chen <chenhc@lemote.com>
Sat, 23 May 2020 07:56:37 +0000 (15:56 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Jun 2020 17:50:39 +0000 (13:50 -0400)
commitf21db3090de2c056728dee76d5fb66343aaf6dd1
tree4b5789f4ca1a6f9d4c9f3aa83faac86d190aab4b
parent3f51d8fcac7a0925fb1222d932cb3baa776b1e79
KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support

This patch add Loongson-3 Virtual IPI interrupt support in the kernel.
The current implementation of IPI emulation in QEMU is based on GIC for
MIPS, but Loongson-3 doesn't use GIC. Furthermore, IPI emulation in QEMU
is too expensive for performance (because of too many context switches
between Host and Guest). With current solution, the IPI delay may even
cause RCU stall warnings in a multi-core Guest. So, we design a faster
solution that emulate IPI interrupt in kernel (only used by Loongson-3
now).

Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <1590220602-3547-11-git-send-email-chenhc@lemote.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/include/asm/kvm_host.h
arch/mips/kvm/Makefile
arch/mips/kvm/emulate.c
arch/mips/kvm/loongson_ipi.c [new file with mode: 0644]
arch/mips/kvm/mips.c