Commit a52357259680fe5368c2fabf5949209e231f2aa2
1 parent
b57f95a382
Exists in
master
and in
4 other branches
x86/amd-iommu: Add amd_iommu=off command line option
This patch adds a command line option to tell the AMD IOMMU driver to not initialize any IOMMU it finds. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Showing 2 changed files with 8 additions and 0 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
... | ... | @@ -324,6 +324,8 @@ |
324 | 324 | they are unmapped. Otherwise they are |
325 | 325 | flushed before they will be reused, which |
326 | 326 | is a lot of faster |
327 | + off - do not initialize any AMD IOMMU found in | |
328 | + the system | |
327 | 329 | |
328 | 330 | amijoy.map= [HW,JOY] Amiga joystick support |
329 | 331 | Map of devices attached to JOY0DAT and JOY1DAT |
arch/x86/kernel/amd_iommu_init.c
... | ... | @@ -120,6 +120,7 @@ |
120 | 120 | bool amd_iommu_dump; |
121 | 121 | |
122 | 122 | static int __initdata amd_iommu_detected; |
123 | +static bool __initdata amd_iommu_disabled; | |
123 | 124 | |
124 | 125 | u16 amd_iommu_last_bdf; /* largest PCI device id we have |
125 | 126 | to handle */ |
... | ... | @@ -1372,6 +1373,9 @@ |
1372 | 1373 | if (no_iommu || (iommu_detected && !gart_iommu_aperture)) |
1373 | 1374 | return; |
1374 | 1375 | |
1376 | + if (amd_iommu_disabled) | |
1377 | + return; | |
1378 | + | |
1375 | 1379 | if (acpi_table_parse("IVRS", early_amd_iommu_detect) == 0) { |
1376 | 1380 | iommu_detected = 1; |
1377 | 1381 | amd_iommu_detected = 1; |
... | ... | @@ -1401,6 +1405,8 @@ |
1401 | 1405 | for (; *str; ++str) { |
1402 | 1406 | if (strncmp(str, "fullflush", 9) == 0) |
1403 | 1407 | amd_iommu_unmap_flush = true; |
1408 | + if (strncmp(str, "off", 3) == 0) | |
1409 | + amd_iommu_disabled = true; | |
1404 | 1410 | } |
1405 | 1411 | |
1406 | 1412 | return 1; |