]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iommu/vt-d: Only enable extended context tables if PASID is supported
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 12 Jun 2015 09:15:49 +0000 (10:15 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 12 Jun 2015 10:31:25 +0000 (11:31 +0100)
commitc83b2f20fdde578bded3dfc4405c5db7a039c694
tree1404bcf4db4542ee2a9d1b11e75c678557000176
parentbd00c606a6f60ca015a62bdbf671eadd48a4ca82
iommu/vt-d: Only enable extended context tables if PASID is supported

Although the extended tables are theoretically a completely orthogonal
feature to PASID and anything else that *uses* the newly-available bits,
some of the early hardware has problems even when all we do is enable
them and use only the same bits that were in the old context tables.

For now, there's no motivation to support extended tables unless we're
going to use PASID support to do SVM. So just don't use them unless
PASID support is advertised too. Also add a command-line bailout just in
case later chips also have issues.

The equivalent problem for PASID support has already been fixed with the
upcoming VT-d spec update and commit bd00c606a ("iommu/vt-d: Change
PASID support to bit 40 of Extended Capability Register"), because the
problematic platforms use the old definition of the PASID-capable bit,
which is now marked as reserved and meaningless.

So with this change, we'll magically start using ECS again only when we
see the new hardware advertising "hey, we have PASID support and we
actually tested it this time" on bit 40.

The VT-d hardware architect has promised that we are not going to have
any reason to support ECS *without* PASID any time soon, and he'll make
sure he checks with us before changing that.

In the future, if hypothetical new features also use new bits in the
context tables and can be seen on implementations *without* PASID support,
we might need to add their feature bits to the ecs_enabled() macro.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Documentation/kernel-parameters.txt
drivers/iommu/intel-iommu.c