summaryrefslogtreecommitdiff
path: root/arch/loongarch/kvm/vm.c
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2024-05-06 17:00:47 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2024-05-06 17:00:47 +0300
commite33bda7ee50c3c20d80f5ca6dc5ca2cd37863518 (patch)
tree20725db700c1e1bacaba03bfa564650ac5baca85 /arch/loongarch/kvm/vm.c
parent73516e9da512adc63ba3859fbd82a21f6257348f (diff)
downloadlinux-e33bda7ee50c3c20d80f5ca6dc5ca2cd37863518.tar.xz
LoongArch: KVM: Add PV IPI support on host side
On LoongArch system, IPI hw uses iocsr registers. There are one iocsr register access on IPI sending, and two iocsr access on IPI receiving for the IPI interrupt handler. In VM mode all iocsr accessing will cause VM to trap into hypervisor. So with one IPI hw notification there will be three times of trap. In this patch PV IPI is added for VM, hypercall instruction is used for IPI sender, and hypervisor will inject an SWI to the destination vcpu. During the SWI interrupt handler, only CSR.ESTAT register is written to clear irq. CSR.ESTAT register access will not trap into hypervisor, so with PV IPI supported, there is one trap with IPI sender, and no trap with IPI receiver, there is only one trap with IPI notification. Also this patch adds IPI multicast support, the method is similar with x86. With IPI multicast support, IPI notification can be sent to at most 128 vcpus at one time. It greatly reduces the times of trapping into hypervisor. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kvm/vm.c')
0 files changed, 0 insertions, 0 deletions