1. 18 5月, 2020 4 次提交
  2. 13 3月, 2020 1 次提交
  3. 07 1月, 2020 4 次提交
    • L
      iommu/vt-d: debugfs: Add support to show page table internals · e2726dae
      Lu Baolu 提交于
      Export page table internals of the domain attached to each device.
      Example of such dump on a Skylake machine:
      
      $ sudo cat /sys/kernel/debug/iommu/intel/domain_translation_struct
      [ ... ]
      Device 0000:00:14.0 with pasid 0 @0x15f3d9000
      IOVA_PFN                PML5E                   PML4E
      0x000000008ced0 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced1 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced2 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced3 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced4 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced5 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced6 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced7 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced8 |       0x0000000000000000      0x000000015f3da003
      0x000000008ced9 |       0x0000000000000000      0x000000015f3da003
      
      PDPE                    PDE                     PTE
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced0003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced1003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced2003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced3003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced4003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced5003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced6003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced7003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced8003
      0x000000015f3db003      0x000000015f3dc003      0x000000008ced9003
      [ ... ]
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      e2726dae
    • L
      iommu/vt-d: Flush PASID-based iotlb for iova over first level · 33cd6e64
      Lu Baolu 提交于
      When software has changed first-level tables, it should invalidate
      the affected IOTLB and the paging-structure-caches using the PASID-
      based-IOTLB Invalidate Descriptor defined in spec 6.5.2.4.
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      33cd6e64
    • L
      iommu/vt-d: Setup pasid entries for iova over first level · ddf09b6d
      Lu Baolu 提交于
      Intel VT-d in scalable mode supports two types of page tables for
      IOVA translation: first level and second level. The IOMMU driver
      can choose one from both for IOVA translation according to the use
      case. This sets up the pasid entry if a domain is selected to use
      the first-level page table for iova translation.
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      ddf09b6d
    • J
      iommu/vt-d: Fix CPU and IOMMU SVM feature matching checks · ff3dc652
      Jacob Pan 提交于
      Shared Virtual Memory(SVM) is based on a collective set of hardware
      features detected at runtime. There are requirements for matching CPU
      and IOMMU capabilities.
      
      The current code checks CPU and IOMMU feature set for SVM support but
      the result is never stored nor used. Therefore, SVM can still be used
      even when these checks failed. The consequences can be:
      1. CPU uses 5-level paging mode for virtual address of 57 bits, but
      IOMMU can only support 4-level paging mode with 48 bits address for DMA.
      2. 1GB page size is used by CPU but IOMMU does not support it. VT-d
      unrecoverable faults may be generated.
      
      The best solution to fix these problems is to prevent them in the first
      place.
      
      This patch consolidates code for checking PASID, CPU vs. IOMMU paging
      mode compatibility, as well as provides specific error messages for
      each failed checks. On sane hardware configurations, these error message
      shall never appear in kernel log.
      Signed-off-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      ff3dc652
  4. 11 11月, 2019 1 次提交
  5. 11 9月, 2019 1 次提交
  6. 03 9月, 2019 1 次提交
    • J
      iommu/vt-d: Remove global page flush support · 8744daf4
      Jacob Pan 提交于
      Global pages support is removed from VT-d spec 3.0. Since global pages G
      flag only affects first-level paging structures and because DMA request
      with PASID are only supported by VT-d spec. 3.0 and onward, we can
      safely remove global pages support.
      
      For kernel shared virtual address IOTLB invalidation, PASID
      granularity and page selective within PASID will be used. There is
      no global granularity supported. Without this fix, IOTLB invalidation
      will cause invalid descriptor error in the queued invalidation (QI)
      interface.
      
      Fixes: 1c4f88b7 ("iommu/vt-d: Shared virtual address in scalable mode")
      Reported-by: NSanjay K Kumar <sanjay.k.kumar@intel.com>
      Signed-off-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      8744daf4
  7. 05 6月, 2019 1 次提交
  8. 28 5月, 2019 1 次提交
    • L
      iommu/vt-d: Cleanup get_valid_domain_for_dev() · 4ec066c7
      Lu Baolu 提交于
      Previously, get_valid_domain_for_dev() is used to retrieve the
      DMA domain which has been attached to the device or allocate one
      if no domain has been attached yet. As we have delegated the DMA
      domain management to upper layer, this function is used purely to
      allocate a private DMA domain if the default domain doesn't work
      for ths device. Cleanup the code for readability.
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      4ec066c7
  9. 27 5月, 2019 1 次提交
  10. 11 4月, 2019 3 次提交
  11. 11 1月, 2019 1 次提交
  12. 11 12月, 2018 8 次提交
  13. 12 11月, 2018 1 次提交
  14. 25 9月, 2018 3 次提交
  15. 20 7月, 2018 7 次提交
  16. 06 7月, 2018 2 次提交