iommu/vt-d: Report real pgsize bitmap to iommu core
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 20 Jul 2021 02:06:13 +0000 (10:06 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 26 Jul 2021 11:56:25 +0000 (13:56 +0200)
commita886d5a7e67bc403b8e51ab50c10324bcdbb686f
tree7a923b3b20a456a6dc134d9f11c119ee6f230502
parent13b6eb6e1c98c47f7e0d6c74e8b22cfe189a84dd
iommu/vt-d: Report real pgsize bitmap to iommu core

The pgsize bitmap is used to advertise the page sizes our hardware supports
to the IOMMU core, which will then use this information to split physically
contiguous memory regions it is mapping into page sizes that we support.

Traditionally the IOMMU core just handed us the mappings directly, after
making sure the size is an order of a 4KiB page and that the mapping has
natural alignment. To retain this behavior, we currently advertise that we
support all page sizes that are an order of 4KiB.

We are about to utilize the new IOMMU map/unmap_pages APIs. We could change
this to advertise the real page sizes we support.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210720020615.4144323-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c