OSDN Git Service

iommu/amd: Fix unity mapping initialization race
authorJoerg Roedel <jroedel@suse.de>
Fri, 1 Jul 2016 14:42:55 +0000 (16:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2016 16:47:32 +0000 (09:47 -0700)
commite205592b31d0aed33edc1fbbb667dcba696aa173
tree5e2968d6b92e08de49cbd36d0ed3c68e5c5c2a51
parent72803a72a6b8444cf9cac844553056dae984dc3b
iommu/amd: Fix unity mapping initialization race

commit 522e5cb76d0663c88f96b6a8301451c8efa37207 upstream.

There is a race condition in the AMD IOMMU init code that
causes requested unity mappings to be blocked by the IOMMU
for a short period of time. This results on boot failures
and IO_PAGE_FAULTs on some machines.

Fix this by making sure the unity mappings are installed
before all other DMA is blocked.

Fixes: aafd8ba0ca74 ('iommu/amd: Implement add_device and remove_device')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu_init.c