OSDN Git Service

iommu/amd: Set exclusion range correctly
authorJoerg Roedel <jroedel@suse.de>
Fri, 12 Apr 2019 10:50:31 +0000 (12:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 17:45:04 +0000 (19:45 +0200)
commit2984aa6d4a7857b0525e9a46d1d6310403c4ce6c
tree8aee154f177fb65c6e374d1d093aa4a026b1c903
parent4294ec58537d6bb8e6f93acb3f0d9c886976af4e
iommu/amd: Set exclusion range correctly

[ Upstream commit 3c677d206210f53a4be972211066c0f1cd47fe12 ]

The exlcusion range limit register needs to contain the
base-address of the last page that is part of the range, as
bits 0-11 of this register are treated as 0xfff by the
hardware for comparisons.

So correctly set the exclusion range in the hardware to the
last page which is _in_ the range.

Fixes: b2026aa2dce44 ('x86, AMD IOMMU: add functions for programming IOMMU MMIO space')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/amd_iommu_init.c