iommu/amd: Fix the configuration of GCR3 table root pointer
authorAdrian Huang <ahuang12@lenovo.com>
Fri, 14 Feb 2020 10:44:51 +0000 (18:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 05:59:14 +0000 (07:59 +0200)
commita42a984c7b0cf8ceab08c0ff581d474d9657b5a7
treeab34e08d70c2f428f0709e7f28fa4b3735b6c05c
parent2567276be7417e15f6b5b3720575e865a16a01d0
iommu/amd: Fix the configuration of GCR3 table root pointer

[ Upstream commit c20f36534666e37858a14e591114d93cc1be0d34 ]

The SPA of the GCR3 table root pointer[51:31] masks 20 bits. However,
this requires 21 bits (Please see the AMD IOMMU specification).
This leads to the potential failure when the bit 51 of SPA of
the GCR3 table root pointer is 1'.

Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
Fixes: 52815b75682e2 ("iommu/amd: Add support for IOMMUv2 domain mode")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/amd_iommu_types.h