]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions
authorAdrian Huang <adrianhuang0701@gmail.com>
Thu, 14 Nov 2019 06:14:47 +0000 (14:14 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 23 Dec 2019 13:06:15 +0000 (14:06 +0100)
commit8a9a1f408ecaafafffe4393ec3274af1012f9dd0
tree76ee0055b568b51eceb4033f5d913827c090d7ae
parent75e273687aee789166c077bbe05d67c0252abf3f
iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions

Some buggy BIOSes might define multiple exclusion ranges of the
IVMD entries which are associated with the same IOMMU hardware.
This leads to the overwritten exclusion range (exclusion_start
and exclusion_length members) in set_device_exclusion_range().

Here is a real case:
When attaching two Broadcom RAID controllers to a server, the first
one reports the failure during booting (the disks connecting to the
RAID controller cannot be detected).

This patch prevents the issue by treating per-device exclusion
ranges as r/w unity-mapped regions.

Discussion:
  * https://lists.linuxfoundation.org/pipermail/iommu/2019-November/040140.html

Suggested-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_init.c