[PATCH v8 0/2] LoongArch: KVM: Add DMSINTC support irqchip in kernel
From: Song Gao
Date: Tue Mar 24 2026 - 05:47:19 EST
Hi,
This series implements the DMSINTC in-kernel irqchip device,
enables irqfd to deliver MSI to DMSINTC, and supports injecting MSI interrupts
to the target vCPU.
applied this series. use netperf test.
VM with one CPU and start netserver, host run netperf.
disable dmsintc
taskset 0x2f netperf -H 192.168.122.204 -t UDP_RR -l 36000
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
212992 212992 1 1 36000.00 27107.36
enable dmsintc
Local /Remote
Socket Size Request Resp. Elapsed Trans.
Send Recv Size Size Time Rate
bytes Bytes bytes bytes secs. per sec
212992 212992 1 1 36000.00 28831.14 (+6.3%)
v8:
*Move dmsintc_inject_irq(),dmsintc_deliver_msi_to_vcpu()and
dmsintc_set_msi_irq to dmsintc.c.
*Rebase.
v7:
*Rebase;
*Fix a typo error;
*Drop an extra space;
*Move some code from patch2 to patch1.
*Rename loongarch_dmsintc_inject_irq() to dmsintc_inject_irq() and move
it to interrupt.c;
*Rename kvm_loongarch_deliver_msi_to_vcpu() to
dmsintc_deliver_msi_to_vcpu() and move it to irqfd.c;
*Drop loongarch_set_msi() and dispatch the dmsintc/eiointc
paths in pch_msi_set_irq().
v6:
Fix kvm_device leak in kvm_dmsintc_destroy().
v5:
Combine patch2 and patch3
Add check msgint feature when register DMSINT device.
V4: Rebase and R-b;
replace DINTC to DMSINTC.
V3: Fix kvm_arch_set_irq_inatomic() missing dmsintc set msi.(patch3)
V2:
https://patchew.org/linux/20251128091125.2720148-1-gaosong@xxxxxxxxxxx/
Thanks.
Song Gao
Song Gao (2):
LoongArch: KVM: Add DMSINTC device support
LoongArch: KVM: Add dmsintc inject msi to the dest vcpu
arch/loongarch/include/asm/kvm_dmsintc.h | 26 ++++
arch/loongarch/include/asm/kvm_host.h | 3 +
arch/loongarch/include/asm/kvm_pch_pic.h | 4 +-
arch/loongarch/include/uapi/asm/kvm.h | 4 +
arch/loongarch/kvm/Makefile | 1 +
arch/loongarch/kvm/intc/dmsintc.c | 190 +++++++++++++++++++++++
arch/loongarch/kvm/intc/pch_pic.c | 16 +-
arch/loongarch/kvm/interrupt.c | 2 +
arch/loongarch/kvm/irqfd.c | 11 +-
arch/loongarch/kvm/main.c | 6 +
include/uapi/linux/kvm.h | 2 +
11 files changed, 256 insertions(+), 9 deletions(-)
create mode 100644 arch/loongarch/include/asm/kvm_dmsintc.h
create mode 100644 arch/loongarch/kvm/intc/dmsintc.c
--
2.39.3