From: Vasant Hegde <vasant.hegde@amd.com>
To: Karl Mehltretter <kmehltretter@gmail.com>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Will Deacon <will@kernel.org>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu/amd: Do not reallocate GA log buffers on resume
Date: Tue, 25 Aug 2026 17:51:09 +0530 [thread overview]
Message-ID: <1dbe374e-c5cd-4ac6-9ec0-c42b04e685a0@amd.com> (raw)
In-Reply-To: <3fcdf5ea-37c6-430e-b1c6-1277008148fa@amd.com>
On 8/25/2026 3:58 PM, Vasant Hegde wrote:
>
>
> On 8/19/2026 8:53 AM, Karl Mehltretter wrote:
>>
>> Commit c5e1a1eb9279 ("iommu/amd: Simplify and Consolidate Virtual APIC
>> (AVIC) Enablement") moved the GA log allocation from iommu_init_pci()
>> to enable_iommus_vapic(), which is called on every resume.
>>
>> iommu_init_ga_log() assigns iommu->ga_log and iommu->ga_log_tail
>> unconditionally. Each resume therefore replaces the boot-time pointers
>> and leaks both old allocations. The function also uses GFP_KERNEL from a
>> syscore resume callback, where interrupts are disabled and the non-boot
>> CPUs are offline.
>>
>> Return early if both buffers are already allocated. Clear the pointers
>> in free_ga_log() so a partial allocation failure cannot leave ga_log
>> dangling.
>>
>> Fixes: c5e1a1eb9279 ("iommu/amd: Simplify and Consolidate Virtual APIC (AVIC) Enablement")
>> Assisted-by: Claude:claude-opus-5
>> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
>
> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
>
> @Joerg, I think we should pick this for -rc.
Just to be clear, I have a patch to remove all these checks in iommu_init_ga_log
and re-arrange a code bit. But its slightly bigger change and backporting to
stable becomes difficult.
Hence I'd say lets apply this patch. I will send my patches on top of this patch.
-Vasant
next prev parent reply other threads:[~2026-08-25 12:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 3:23 [PATCH] iommu/amd: Do not reallocate GA log buffers on resume Karl Mehltretter
2026-08-20 9:07 ` Ankit Soni
2026-08-25 10:28 ` Vasant Hegde
2026-08-25 12:21 ` Vasant Hegde [this message]
2026-09-07 12:37 ` Joerg Roedel (AMD)
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=1dbe374e-c5cd-4ac6-9ec0-c42b04e685a0@amd.com \
--to=vasant.hegde@amd.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kmehltretter@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.