iommu/vt-d: Add nested translation helper function
authorJacob Pan <jacob.jun.pan@linux.intel.com>
Sat, 16 May 2020 06:20:46 +0000 (14:20 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 18 May 2020 13:37:25 +0000 (15:37 +0200)
commitb0d1f8741b812352fe0e5f3b2381427085f23e19
tree21bca423e213b53d2c6f835ca2198be1676b861f
parent3aef9ca6a42aca8c797f867e554ad297b446439f
iommu/vt-d: Add nested translation helper function

Nested translation mode is supported in VT-d 3.0 Spec.CH 3.8.
With PASID granular translation type set to 0x11b, translation
result from the first level(FL) also subject to a second level(SL)
page table translation. This mode is used for SVA virtualization,
where FL performs guest virtual to guest physical translation and
SL performs guest physical to host physical translation.

This patch adds a helper function for setting up nested translation
where second level comes from a domain and first level comes from
a guest PGD.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20200516062101.29541-4-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c
drivers/iommu/intel-pasid.c
drivers/iommu/intel-pasid.h
include/linux/intel-iommu.h
include/uapi/linux/iommu.h