]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iommu/vt-d: Fix SVM IOTLB flush handling
authorDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 20 Oct 2015 14:52:13 +0000 (15:52 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 20 Oct 2015 15:26:21 +0000 (16:26 +0100)
commit5d52f482ebb7d0845e84cb235700061bc5682ada
tree30b7a717fa1dc6871308543483e3512ccfd5fae7
parentb9997e385eb2b9004d989e3710bd9001532410c0
iommu/vt-d: Fix SVM IOTLB flush handling

Change the 'pages' parameter to 'unsigned long' to avoid overflow.

Fix the device-IOTLB flush parameter calculation — the size of the IOTLB
flush is indicated by the position of the least significant zero bit in
the address field. For example, a value of 0x12345f000 will flush from
0x123440000 to 0x12347ffff (256KiB).

Finally, the cap_pgsel_inv() is not relevant to SVM; the spec says that
*all* implementations must support page-selective invaliation for
"first-level" translations. So don't check for it.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/iommu/intel-svm.c