git: c6f76e9d5561 - stable/15 - amd_iommu: Honor disabled interrupt remapping

Kevin Bowling <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a88ecc7.21edb.2203e74__19976.1741839879$1787358440$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=c6f76e9d5561626fddc6656b4a0f5f70afc88458

commit c6f76e9d5561626fddc6656b4a0f5f70afc88458
Author:     Kevin Bowling <[email protected]>
AuthorDate: 2026-08-06 06:43:47 +0000
Commit:     Kevin Bowling <[email protected]>
CommitDate: 2026-08-22 00:26:38 +0000

    amd_iommu: Honor disabled interrupt remapping
    
    Do not instantiate an interrupt-remapping context for a unit whose IRTE
    support is disabled. In that mode the caller must retain the ordinary
    interrupt path.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D58725
    
    (cherry picked from commit 9f4df9fc1ba8841a28584ed1323fc8cc9e54c9bc)
---
 sys/x86/iommu/amd_intrmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/x86/iommu/amd_intrmap.c b/sys/x86/iommu/amd_intrmap.c
index cce4f57ca323..3e48281d1931 100644
--- a/sys/x86/iommu/amd_intrmap.c
+++ b/sys/x86/iommu/amd_intrmap.c
@@ -254,7 +254,7 @@ amdiommu_ir_find(device_t src, uint16_t *ridp, bool *is_iommu)
 	} else {
 		error = amdiommu_find_unit(src, &unit, &rid, &dte, &edte,
 		    bootverbose);
-		if (error == 0) {
+		if (error == 0 && unit->irte_enabled) {
 			ioctx = iommu_instantiate_ctx(AMD2IOMMU(unit), src, false);
 			if (ioctx != NULL)
 				ctx = IOCTX2CTX(ioctx);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.