iommu/vt-d: Make first level IOVA canonical
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 2 Jan 2020 00:18:19 +0000 (08:18 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 7 Jan 2020 13:05:58 +0000 (14:05 +0100)
commitcb8b892dcecf279004967daab7791deb921cbcbe
treef2469df64ed9ecf9f0b6309017c5772a82e8b992
parent33cd6e642d6a76c1d338ce25cba5fd79a5029011
iommu/vt-d: Make first level IOVA canonical

First-level translation restricts the input-address to a canonical
address (i.e., address bits 63:N have the same value as address
bit [N-1], where N is 48-bits with 4-level paging and 57-bits with
5-level paging). (section 3.6 in the spec)

This makes first level IOVA canonical by using IOVA with bit [N-1]
always cleared.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c