Skip to content

Commit

Permalink
x86/amd-iommu: Initialize passthrough mode when requested
Browse files Browse the repository at this point in the history
This patch enables the passthrough mode for AMD IOMMU by
running the initialization function when iommu=pt is passed
on the kernel command line.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Joerg Roedel committed Sep 3, 2009
1 parent a1ca331 commit 4751a95
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,12 +1242,18 @@ int __init amd_iommu_init(void)
if (ret)
goto free;

ret = amd_iommu_init_dma_ops();
if (iommu_pass_through)
ret = amd_iommu_init_passthrough();
else
ret = amd_iommu_init_dma_ops();
if (ret)
goto free;

enable_iommus();

if (iommu_pass_through)
goto out;

printk(KERN_INFO "AMD IOMMU: device isolation ");
if (amd_iommu_isolate)
printk("enabled\n");
Expand Down

0 comments on commit 4751a95

Please sign in to comment.