Re: [PATCH 0/2] LoongArch: KVM: Code cleanup with MSI intterupt injection
From: Bibo Mao
Date: Tue Sep 22 2026 - 08:47:44 EST
On 2026/9/10 上午11:06, Tao Cui wrote:
Hi, Biboyes, it seems that returning 0 is better, since there is such usage with
在 2026/9/9 16:32, Bibo Mao 写道:
Here is to remove some unnecessary parameter checking when injecting
MSI interrupt, include MSI level parameter and vcpu::arch::dmsintc_state
NULL pointer etc.
Bibo Mao (2):
LoongArch: KVM: Remove parameter line when inject MSI
LoongArch: KVM: Remove duplicated checking with DMSI irq injection
arch/loongarch/include/asm/kvm_dmsintc.h | 3 +--
arch/loongarch/include/asm/kvm_pch_pic.h | 2 +-
arch/loongarch/kvm/intc/dmsintc.c | 19 +++----------------
arch/loongarch/kvm/intc/pch_pic.c | 6 +++---
arch/loongarch/kvm/irqfd.c | 6 +++---
5 files changed, 11 insertions(+), 25 deletions(-)
base-commit: df2908090cda368b01ff43709f51890076c56157
The series looks good to me.
Reviewed-by: Tao Cui <cuitao@xxxxxxxxxx>
Minor question: kvm_set_msi() now returns -EINVAL for !level instead
of -1. Since MSI is edge-triggered, returning 0 to ignore a deassert
level == 0 when injecting MSI interrupt.
Regards
Bibo Mao
would also work, though nothing looks at the return value today.