From: "Huang, Kai" <kai.huang@intel.com>
To: "seanjc@google.com" <seanjc@google.com>,
"hao_zhang_kdev@163.com" <hao_zhang_kdev@163.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>
Subject: Re: [PATCH v5 5/6] KVM: x86: ioapic: Clear irr_delivered on level-triggered RTE
Date: Wed, 12 Aug 2026 22:41:33 +0000 [thread overview]
Message-ID: <786130c4f97b8a3d26d6104037758f2046f349e7.camel@intel.com> (raw)
In-Reply-To: <anwxK1aCSCGVygih@192.168.1.215>
On Wed, 2026-08-12 at 16:39 +0800, Hao Zhang wrote:
> From: Hao Zhang <zhanghao1@kylinos.cn>
>
> irr_delivered hides delivered edge interrupts from KVM_GET_IRQCHIP.
> The interrupt remains in IRR until the guest deasserts the line.
>
> The guest can reprogram an IOAPIC RTE from edge to level via MMIO.
> If an edge interrupt was delivered before the trigger mode change, a
> stale irr_delivered bit can incorrectly mask a subsequent pending level
> interrupt from KVM_GET_IRQCHIP.
>
> That can cause userspace to migrate the VM without a pending level
> interrupt that is still present in KVM's in-kernel IOAPIC.
>
> Clear irr_delivered when the RTE is configured for level-triggered
> interrupts.
>
> Fixes: 5bda6eed2e36 ("KVM: ioapic: Record edge-triggered interrupts delivery status")
> Signed-off-by: Hao Zhang <zhanghao1@kylinos.cn>
Reviewed-by: Kai Huang <kai.huang@intel.com>
next prev parent reply other threads:[~2026-08-12 22:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 8:27 [PATCH v5 0/6] KVM: x86: Fix IOAPIC remote_irr and irr_delivered handling Hao Zhang
2026-08-12 8:32 ` [PATCH v5 1/6] KVM: x86: ioapic: Update remote_irr only after successful delivery Hao Zhang
2026-08-12 8:34 ` [PATCH v5 2/6] KVM: selftests: Verify failed IOAPIC delivery preserves state Hao Zhang
2026-08-12 8:35 ` [PATCH v5 3/6] KVM: x86: ioapic: Preserve irr_delivered for duplicate edge interrupts Hao Zhang
2026-08-12 8:52 ` sashiko-bot
2026-08-13 7:52 ` Hao Zhang
2026-08-13 10:10 ` Huang, Kai
2026-08-12 8:37 ` [PATCH v5 4/6] KVM: selftests: Verify duplicate edge preserves IOAPIC state Hao Zhang
2026-08-12 8:39 ` [PATCH v5 5/6] KVM: x86: ioapic: Clear irr_delivered on level-triggered RTE Hao Zhang
2026-08-12 22:41 ` Huang, Kai [this message]
2026-08-12 8:41 ` [PATCH v5 6/6] KVM: selftests: Verify edge-to-level clears IOAPIC state Hao Zhang
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=786130c4f97b8a3d26d6104037758f2046f349e7.camel@intel.com \
--to=kai.huang@intel.com \
--cc=hao_zhang_kdev@163.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/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