iommu/vt-d: Make sure IOMMUs are off when intel_iommu=off
authorJoerg Roedel <jroedel@suse.de>
Tue, 28 Mar 2017 15:04:52 +0000 (17:04 +0200)
committerJoerg Roedel <jroedel@suse.de>
Wed, 29 Mar 2017 15:02:00 +0000 (17:02 +0200)
commit161b28aae1651aa7ad63ec14753aa8a751154340
treedc2c8bc17bf9c15d575762bf5fcb0b415ab0cbc1
parent61012985eb132a2fa5e4a3eddbc33528334fa377
iommu/vt-d: Make sure IOMMUs are off when intel_iommu=off

When booting into a kexec kernel with intel_iommu=off, and
the previous kernel had intel_iommu=on, the IOMMU hardware
is still enabled and gets not disabled by the new kernel.

This causes the boot to fail because DMA is blocked by the
hardware. Disable the IOMMUs when we find it enabled in the
kexec kernel and boot with intel_iommu=off.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c