From: Vasant Hegde <vasant.hegde@amd.com>
To: Guanghui Feng <guanghuifeng@linux.alibaba.com>, ankit.soni@amd.com
Cc: iommu@lists.linux.dev, joro@8bytes.org,
linux-kernel@vger.kernel.org, robin.murphy@arm.com,
suravee.suthikulpanit@amd.com, will@kernel.org
Subject: Re: [PATCH v2] iommu/amd: Do not clear unobserved log overflow status bits
Date: Mon, 23 Nov 2026 14:02:55 +0530 [thread overview]
Message-ID: <1f0dfd17-9cbd-4d7c-be9d-05c04d9c8150@amd.com> (raw)
In-Reply-To: <20261119141348.1601037-1-guanghuifeng@linux.alibaba.com>
On 11/19/2026 7:43 PM, Guanghui Feng wrote:
> amd_iommu_handle_irq() clears the interrupt status with an unconditional
> writel(mask, MMIO_STATUS_OFFSET), where mask is int_mask | overflow_mask.
> If hardware sets a log overflow bit after the status register is sampled
> at the top of the loop but before that write, the write clears the
> freshly-set bit while the stale sampled status does not contain it, so
> overflow_handler() is skipped for an overflow that really happened.
>
> This is fatal for the GA log: GALOverflow generates no interrupt of its
> own (MMIO Offset 2020h bit 9), amd_iommu_restart_ga_log() is the only
> recovery path, and per spec section 2.7.4 logging stays halted until
> GALogEn is toggled -- a bare W1C of GALOverflow is not part of that
> recovery. The GA log then stays halted, GAInt never re-asserts and the
> GA log interrupt line goes permanently silent, losing all AVIC
> non-running vCPU wakeups on that IOMMU.
>
> Clear only the bits observed this round by writing status & mask. An
> overflow bit set concurrently is then left asserted and is re-observed by
> the existing ERBT1312 status read-back at the bottom of the loop, which
> re-enters the loop and runs overflow_handler().
>
> The unconditional write has cleared an overflow bit since commit
> 5ce97f4ec5e0 ("iommu/amd: Recover from event log overflow"); commit
> af47b0a24058 ("iommu/amd: Handle GALog overflows") and commit
> 274c2218b8b2 ("iommu/amd: Handle PPR log overflow") later added the GA
> and PPR overflow bits to the same write.
Applied, thanks!
-Vasant
next prev parent reply other threads:[~2026-11-23 8:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 3:39 [PATCH] " Guanghui Feng
2026-11-16 6:30 ` Ankit Soni
2026-11-19 14:13 ` [PATCH v2] " Guanghui Feng
2026-11-23 8:32 ` Vasant Hegde [this message]
2026-11-16 8:40 ` [PATCH] " Ankit Soni
2026-11-16 11:19 ` Ankit Soni
2026-11-16 11:42 ` Ankit Soni
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=1f0dfd17-9cbd-4d7c-be9d-05c04d9c8150@amd.com \
--to=vasant.hegde@amd.com \
--cc=ankit.soni@amd.com \
--cc=guanghuifeng@linux.alibaba.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®