From: sashiko-bot@kernel.org
To: "Tao Cui" <cui.tao@linux.dev>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] LoongArch: KVM: Advertise already-supported capabilities
Date: Tue, 04 Aug 2026 08:40:00 +0000 [thread overview]
Message-ID: <20260804084001.6A2A61F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804082604.178092-1-cui.tao@linux.dev>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Falsely advertising KVM_CAP_IRQFD_RESAMPLE without underlying architecture support leads to broken level-triggered interrupts (e.g., VFIO INTx pass-through).
--
--- Patch [1]: [PATCH] LoongArch: KVM: Advertise already-supported capabilities ---
commit 09ee78983007b60953a55e2354d4d1971a9bc4c7
Author: Tao Cui <cui.tao@linux.dev>
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, long 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:
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804082604.178092-1-cui.tao@linux.dev?part=1
next prev parent reply other threads:[~2026-08-04 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 8:26 [PATCH] LoongArch: KVM: Advertise already-supported capabilities Tao Cui
2026-08-04 8:40 ` sashiko-bot [this message]
2026-08-05 2:36 ` Bibo Mao
2026-08-05 5:18 ` Tao Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260804084001.6A2A61F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=cui.tao@linux.dev \
--cc=kvm@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox