Skip to content

Commit

Permalink
iommu/vt-d: Do not falsely log intel_iommu is unsupported kernel option
Browse files Browse the repository at this point in the history
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.

Reported-by: Eero Tamminen <[email protected]>
Signed-off-by: Tvrtko Ursulin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lu Baolu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
tursulin authored and joergroedel committed Oct 18, 2021
1 parent 9e1ff30 commit 5240aed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/iommu/intel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ static int __init intel_iommu_setup(char *str)
{
if (!str)
return -EINVAL;

while (*str) {
if (!strncmp(str, "on", 2)) {
dmar_disabled = 0;
Expand Down Expand Up @@ -441,13 +442,16 @@ 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);

Expand Down

0 comments on commit 5240aed

Please sign in to comment.