Re: [PATCH] LoongArch: KVM: Advertise already-supported capabilities
[email protected] Tue, 04 Aug 2026 08:40:00 +0000
| Newsgroups | org.kernel.vger.kvm |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(= s) to consider: - [High] Falsely advertising KVM_CAP_IRQFD_RESAMPLE without underlying arch= itecture support leads to broken level-triggered interrupts (e.g., VFIO INT= x pass-through). -- --- Patch [1]: [PATCH] LoongArch: KVM: Advertise already-supported capabili= ties --- commit 09ee78983007b60953a55e2354d4d1971a9bc4c7 Author: Tao Cui <[email protected]> LoongArch: KVM: Advertise already-supported capabilities This commit advertises several KVM capabilities for LoongArch to userspace that are noted as already supported. It enables discovery for KVM_CAP_STEAL_TIME, KVM_CAP_IRQFD_RESAMPLE, KVM_CAP_VM_GPA_BITS, and KVM_CAP_VCPU_ATTRIBUTES. > diff --git a/arch/loongarch/kvm/vm.c b/arch/loongarch/kvm/vm.c > --- a/arch/loongarch/kvm/vm.c > +++ b/arch/loongarch/kvm/vm.c [ ... ] > @@ -120,8 +120,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, lo= ng ext) > case KVM_CAP_READONLY_MEM: > case KVM_CAP_IMMEDIATE_EXIT: > case KVM_CAP_IOEVENTFD: > + case KVM_CAP_IRQFD_RESAMPLE: [Severity: High] Does the underlying architecture actually support IRQFD resamplers? The commit message states the resampler is generic code backed by the in-kernel irqchip. However, the generic irqfd resampler relies entirely on the architecture's in-kernel irqchip explicitly calling kvm_notify_acked_irq(), kvm_notify_acked_gsi(), or similar hooks when the guest acknowledges the interrupt. If the LoongArch irqchip implementations do not call any of these notification hooks, the resampler will never trigger. Will this cause physical interrupts to remain permanently masked after their first injection, potentially hanging passed-through devices that rely on level-triggered interrupts (such as VFIO INTx pass-through)? > case KVM_CAP_MP_STATE: > case KVM_CAP_SET_GUEST_DEBUG: [ ... ] --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260804082604.1780= [email protected]?part=3D1