Skip to contentSkip to conversation

iommu/vt-d: Do not falsely log intel_iommu is unsupported kernel option

PATCH New Tvrtko Ursulin 1 participant 1 message Aug 31, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: Do not falsely log intel_iommu is unsupported kernel option

From: Tvrtko Ursulin <[email protected]>

Handling of intel_iommu kernel command line option should return "true" to indicate option is valid and so avoid logging it as unknown by the core parsing code.

Also log unknown sub-options at the notice level to let user know of potential typos or similar.

---
 drivers/iommu/intel/iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iommu/intel/iommu.c +3 -1
index 327f477a8553..41d163e275b2 100644
@@ -463,13 +463,15 @@ static int __init intel_iommu_setup(char *str)
 		} else if (!strncmp(str, "tboot_noforce", 13)) {
 			pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");
 			intel_iommu_tboot_noforce = 1;
+		} else {
+			pr_notice("Unknown option - '%s'\n", str);
 		}
 
 		str += strcspn(str, ",");
 		while (*str == ',')
 			str++;
 	}
-	return 0;
+	return 1;
 }
 __setup("intel_iommu=", intel_iommu_setup);
 
Signature · 1 line
2.30.2