<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/drivers/iommu, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/drivers/iommu?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/drivers/iommu?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2026-10-14T13:42:12Z</updated>
<entry>
<title>iommupt/kunit: Use if_changed_rule for the kunit</title>
<updated>2026-10-14T13:42:12Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@nvidia.com</email>
</author>
<published>2026-10-13T13:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=4bcfe29021993cb167fd9bbdb849f7d7247a166f'/>
<id>urn:sha1:4bcfe29021993cb167fd9bbdb849f7d7247a166f</id>
<content type='text'>
Use if_changed_rule so rule_cc_o_c runs cmd_save_c_flags for the kunit
objects. Without the saved flags CONFIG_LTO_CLANG_THIN_DIST runs the
ThinLTO backend with no --target and generates x86_64 code from arm64
bitcode.

Fixes: 1dd4187f53c3 ("iommupt: Add a kunit test for Generic Page Table")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202610110841.120JzAJG-lkp@intel.com/
Assisted-by: LLM
Signed-off-by: Jason Gunthorpe &lt;jgg@nvidia.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>Revert "iommu/amd: Remove redundant check in irq_remapping_select()"</title>
<updated>2026-10-14T13:40:36Z</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2026-10-14T13:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=3ba149029a4389d1723194ebe34a63aedbc6a610'/>
<id>urn:sha1:3ba149029a4389d1723194ebe34a63aedbc6a610</id>
<content type='text'>
This reverts commit 5e1afd4ea1d6a9bbaecf3e28707dac9c8b56bd45.

This commit caused a regression with GPU devices on some platforms.
Revert it for now.

Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'dma-mapping-7.3-2026-10-09' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux</title>
<updated>2026-10-09T22:49:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-09T22:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=c8d4256f1081c191773de9f46e2ad8f5e8d05d30'/>
<id>urn:sha1:c8d4256f1081c191773de9f46e2ad8f5e8d05d30</id>
<content type='text'>
Pull dma-mapping fixes from Marek Szyprowski:
 "Two more fixes for the corner cases in the DMA-mapping SWIOTLB code
  (Peng Fan and Marek Szyprowski)"

* tag 'dma-mapping-7.3-2026-10-09' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
  swiotlb: fix default_swiotlb_limit() for non-growable default pool
  iommu/dma: skip swiotlb bounce for DMA_ATTR_MMIO in iommu_dma_map_phys
</content>
</entry>
<entry>
<title>iommu/dma: skip swiotlb bounce for DMA_ATTR_MMIO in iommu_dma_map_phys</title>
<updated>2026-09-23T07:56:10Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2026-09-16T15:23:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=057e5e07420c753f248f9ce148040ab6dcf8359f'/>
<id>urn:sha1:057e5e07420c753f248f9ce148040ab6dcf8359f</id>
<content type='text'>
MMIO resources mapped via dma_map_resource() carry DMA_ATTR_MMIO. These
never need swiotlb bounce buffering, but the current code enters the
swiotlb path when the physical address is not page-aligned, then rejects
the mapping because MMIO cannot be bounced.

Move the DMA_ATTR_MMIO check before the swiotlb block so the entire bounce
path is skipped for MMIO, falling through directly to __iommu_dma_map()
which creates the IOVA mapping.

Fixes: f9374de14c0e8 ("iommu/dma: implement DMA_ATTR_MMIO for iommu_dma_(un)map_phys()")
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Acked-by: Robin Murphy &lt;robin.murphy@arm.comn&gt;
Link: https://lore.kernel.org/r/20260916-iommu-dma-fix-v1-1-a59a0c45ec5b@nxp.com
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Remove unused macro</title>
<updated>2026-09-11T15:27:22Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2026-09-11T08:33:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=b63c3c26726576e2a87baeee80bc202a5a43c9e5'/>
<id>urn:sha1:b63c3c26726576e2a87baeee80bc202a5a43c9e5</id>
<content type='text'>
Remove unsed device range capability related macros.

No functional changes.

Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Remove redundant checks from interrupt handler path</title>
<updated>2026-09-11T15:27:22Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2026-09-11T08:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=80a4e3ad8daba66915a9bdf0fcae5831cc8dbd5f'/>
<id>urn:sha1:80a4e3ad8daba66915a9bdf0fcae5831cc8dbd5f</id>
<content type='text'>
PPR and GAlog interrupt is enabled only if buffer is allocated.
(See amd_iommu_enable_ppr_log() and iommu_ga_log_enable()).

The duplicate check in interrupt hanlder path is unnecessary
and can be removed.

No functional changes.

Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Remove redundant check in irq_remapping_select()</title>
<updated>2026-09-11T15:27:21Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2026-09-11T08:33:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=5e1afd4ea1d6a9bbaecf3e28707dac9c8b56bd45'/>
<id>urn:sha1:5e1afd4ea1d6a9bbaecf3e28707dac9c8b56bd45</id>
<content type='text'>
The amd_iommu_irq_remap flag is already validated during irq remapping
domain creation (before calling amd_iommu_create_irq_domain()). The
duplicate check in irq_remapping_select() is unnecessary and can be
removed.

Additionally, mark amd_iommu_irq_remap as static.

No functional changes.

Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Make iommu_sva_set_dev_pasid as static</title>
<updated>2026-09-11T15:27:21Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2026-09-11T08:33:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=798514a25544d6978d0bd7fe7071c9bdb5503076'/>
<id>urn:sha1:798514a25544d6978d0bd7fe7071c9bdb5503076</id>
<content type='text'>
Its used inside pasid.c only.

No functional changes.

Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Fix ineffective error check in nested domain allocation</title>
<updated>2026-09-07T13:03:01Z</updated>
<author>
<name>Hemanth Selam</name>
<email>hemanth.selam@gmail.com</email>
</author>
<published>2026-08-25T10:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=fa5c0827f0b7bac6d0a188f10118151769ae68fd'/>
<id>urn:sha1:fa5c0827f0b7bac6d0a188f10118151769ae68fd</id>
<content type='text'>
amd_iommu_pdom_id_alloc() returns an int: a domain ID on success, or the
negative errno from ida_alloc_range() when the ID space is exhausted or
memory is short.  amd_iommu_alloc_domain_nested() stores that return value
in gdom_info-&gt;hdom_id, which is a u32, and only then tests it:

	gdom_info-&gt;hdom_id = amd_iommu_pdom_id_alloc();
	if (gdom_info-&gt;hdom_id &lt;= 0) {

The assignment discards the sign, so -ENOSPC becomes 0xffffffe4 and the
test never fires.  The nested domain is then set up with a host domain ID
that was never allocated, instead of the allocation failing with -ENOSPC.

Keep the value in an int, test it there, and store it only once it is
known to be valid, which is what the other amd_iommu_pdom_id_alloc()
callers already do.

Fixes: 757d2b1fdf5b ("iommu/amd: Introduce gDomID-to-hDomID Mapping and handle parent domain invalidation")
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Reviewed-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
<entry>
<title>iommu/amd: Fix premature break in init_iommu_one() again</title>
<updated>2026-09-07T12:38:58Z</updated>
<author>
<name>Vasant Hegde</name>
<email>vasant.hegde@amd.com</email>
</author>
<published>2026-08-24T06:29:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=eb29b7bbc8ba28bbb0b9fdd655e931e1d1fa625c'/>
<id>urn:sha1:eb29b7bbc8ba28bbb0b9fdd655e931e1d1fa625c</id>
<content type='text'>
Commit 283d245468a2 ("iommu/amd: Fix premature break in
init_iommu_one()") unintentionally broke older platforms - such as
the ASRockRack B550D4-4L - where the BIOS advertises incorrect IOMMU
features.

Move the HATDis check ahead of the GASup check, and re-introduce the
break inside the GASup check to restore correct behavior on affected
platforms.

This is a short-term fix to resolve the regression. Longer term, we
should rework how EFRs are tracked and prioritize the MMIO-advertised
EFR over the one reported via IVRS. That requires more extensive
changes and will be addressed separately.

Fixes: 283d245468a2 ("iommu/amd: Fix premature break in init_iommu_one()")
Reported-by: Andreas Juch &lt;andreas@juch.cc&gt;
Closes: https://lore.kernel.org/linux-iommu/07b2d390-f7a0-47e2-bc2c-eb0853acf52e@juch.cc/
Tested-by: Andreas Juch &lt;andreas@juch.cc&gt;
Signed-off-by: Vasant Hegde &lt;vasant.hegde@amd.com&gt;
Signed-off-by: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
</content>
</entry>
</feed>
