Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Pranjal Shrivastava <praan@google.com>, <will@kernel.org>,
	<robin.murphy@arm.com>, <joro@8bytes.org>, <kevin.tian@intel.com>,
	<smostafa@google.com>, <linux-arm-kernel@lists.infradead.org>,
	<iommu@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<jamien@nvidia.com>
Subject: Re: [PATCH v8 0/9] iommu/arm-smmu-v3: Adopt the crashed kernel's stream table for kdump
Date: Sun, 19 Jul 2026 13:59:44 -0700	[thread overview]
Message-ID: <al06wA8v4p51+Uo/@nvidia.com> (raw)
In-Reply-To: <20260718162052.GF699082@nvidia.com>

On Sat, Jul 18, 2026 at 01:20:52PM -0300, Jason Gunthorpe wrote:
> On Fri, Jul 17, 2026 at 09:43:24PM +0000, Pranjal Shrivastava wrote:
> 
> > However, looking at your approach, I think I can slightly rework my 
> > preservation logic and instead of bloating the KHO ABI with physical
> > addresses, I could re-use your exact table-walking logic during probe
> > to parse the live L1/L2 structures directly from registers, identify 
> > the valid tables, and kho/dma_restore them. There could me small 
> > differences though, for example instead of memremap stuff, we'd have to
> > use the kho/dma_restore API (which can be done by passing some op like 
> > the data structure writers we have?) Similarly, maybe reserving ASID/VMID 
> > can be potentially re-used as well..
> 
> I think this will be true for all the iommu drivers as they pretty
> much all have this same kind of kdumpish adoption logic in one way or
> another.
> 
> > for KHO), I wanted to start a discussion to see if it makes sense to 
> > factor this common code out into an arm-smmu-v3-kexec.c (or similar)?
> 
> Yeah maybe so
> 
> It sounds great this helps the live update project as well!

I agree. I think the final layout can be:

# Kconfig
 config ARM_SMMU_V3_KEXEC
- 	def_bool CRASH_DUMP
+ 	def_bool CRASH_DUMP || IOMMU_LIVEUPDATE

# Makefile
 arm_smmu_v3-$(CONFIG_ARM_SMMU_V3_KEXEC) += arm-smmu-v3-kexec.o
 arm_smmu_v3-$(CONFIG_CRASH_DUMP) += arm-smmu-v3-kdump.o
+arm_smmu_v3-$(CONFIG_IOMMU_LIVEUPDATE) += arm-smmu-v3-liveupdate.o

Nicolin


      reply	other threads:[~2026-07-19 21:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11  0:52 [PATCH v8 0/9] iommu/arm-smmu-v3: Adopt the crashed kernel's stream table for kdump Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 1/9] iommu/arm-smmu-v3: Do not enable EVTQ/PRIQ interrupts in kdump kernel Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 2/9] iommu/arm-smmu-v3: Skip EVTQ/PRIQ setup " Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 3/9] iommu/arm-smmu-v3: Add ARM_SMMU_OPT_KDUMP_ADOPT for " Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 4/9] iommu/arm-smmu-v3: Destroy vmid_map ida via devres Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 5/9] iommu/arm-smmu-v3-kdump: Reserve crashed kernel's ASIDs and VMIDs Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 6/9] iommu/arm-smmu-v3-kdump: Implement is_attach_deferred() Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 7/9] iommu/arm-smmu-v3: Retain CR0_SMMUEN during kdump device reset Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 8/9] iommu/arm-smmu-v3: Skip RMR bypass for kdump adoption Nicolin Chen
2026-07-11  0:52 ` [PATCH v8 9/9] iommu/arm-smmu-v3: Detect ARM_SMMU_OPT_KDUMP_ADOPT in probe() Nicolin Chen
2026-07-17 21:43 ` [PATCH v8 0/9] iommu/arm-smmu-v3: Adopt the crashed kernel's stream table for kdump Pranjal Shrivastava
2026-07-18 16:20   ` Jason Gunthorpe
2026-07-19 20:59     ` Nicolin Chen [this message]

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=al06wA8v4p51+Uo/@nvidia.com \
    --to=nicolinc@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jamien@nvidia.com \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=praan@google.com \
    --cc=robin.murphy@arm.com \
    --cc=smostafa@google.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