]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/vt-d: Match CPU and IOMMU paging mode
authorJacob Pan <jacob.jun.pan@linux.intel.com>
Thu, 2 Jan 2020 00:18:04 +0000 (08:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:38:23 +0000 (08:38 +0100)
commit9b5b3ee264f942fd1934e788fc7cb822e1f35bca
tree2530a070692c45a3c3104f5ee27df2ac0656f0f2
parent3b6916c11004d1ca9398aecb245f2aa31229ba91
iommu/vt-d: Match CPU and IOMMU paging mode

[ Upstream commit 79db7e1b4cf2a006f556099c13de3b12970fc6e3 ]

When setting up first level page tables for sharing with CPU, we need
to ensure IOMMU can support no less than the levels supported by the
CPU.

It is not adequate, as in the current code, to set up 5-level paging
in PASID entry First Level Paging Mode(FLPM) solely based on CPU.

Currently, intel_pasid_setup_first_level() is only used by native SVM
code which already checks paging mode matches. However, future use of
this helper function may not be limited to native SVM.
https://lkml.org/lkml/2019/11/18/1037

Fixes: 437f35e1cd4c8 ("iommu/vt-d: Add first level page table interface")
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/intel-pasid.c