]> Gentwo Git Trees - linux/.git/commit
iommupt: Add the Intel VT-d second stage page table format
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 23 Oct 2025 18:22:33 +0000 (15:22 -0300)
committerJoerg Roedel <joerg.roedel@amd.com>
Wed, 5 Nov 2025 08:50:17 +0000 (09:50 +0100)
commit5448c1558f60d4051c90938f2878c6fb20e2982a
tree43ec2c7f56950c93dcbe70a7fe34f8da5e08b0ff
parentefa03dab7ce4ed786b131f412440e2fd45fba11f
iommupt: Add the Intel VT-d second stage page table format

The VT-d second stage format is almost the same as the x86 PAE format,
except the bit encodings in the PTE are different and a few new PTE
features, like force coherency are present.

Among all the formats it is unique in not having a designated present bit.

Comparing the performance of several operations to the existing version:

iommu_map()
   pgsz  ,avg new,old ns, min new,old ns  , min % (+ve is better)
     2^12,     53,66    ,      50,64      ,  21.21
     2^21,     59,70    ,      56,67      ,  16.16
     2^30,     54,66    ,      52,63      ,  17.17
 256*2^12,    384,524   ,     337,516     ,  34.34
 256*2^21,    387,632   ,     336,626     ,  46.46
 256*2^30,    376,629   ,     323,623     ,  48.48

iommu_unmap()
   pgsz  ,avg new,old ns, min new,old ns  , min % (+ve is better)
     2^12,     67,86    ,      63,84      ,  25.25
     2^21,     64,84    ,      59,80      ,  26.26
     2^30,     59,78    ,      56,74      ,  24.24
 256*2^12,    216,335   ,     198,317     ,  37.37
 256*2^21,    245,350   ,     232,344     ,  32.32
 256*2^30,    248,345   ,     226,339     ,  33.33

Cc: Tina Zhang <tina.zhang@intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/generic_pt/.kunitconfig
drivers/iommu/generic_pt/Kconfig
drivers/iommu/generic_pt/fmt/Makefile
drivers/iommu/generic_pt/fmt/defs_vtdss.h [new file with mode: 0644]
drivers/iommu/generic_pt/fmt/iommu_vtdss.c [new file with mode: 0644]
drivers/iommu/generic_pt/fmt/vtdss.h [new file with mode: 0644]
include/linux/generic_pt/common.h
include/linux/generic_pt/iommu.h