aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu Baolu <[email protected]>2024-09-02 10:27:13 +0800
committerJoerg Roedel <[email protected]>2024-09-02 18:14:55 +0200
commit2c13012e09190174614fd6901857a1b8c199e17d (patch)
tree08afc4bb6c5dd00cd9d608bd078f41731eb0dd6f
parent9e74e1b8198fd07fcbb4266771ca0f5195c71d9c (diff)
iommu/vt-d: Always reserve a domain ID for identity setup
We will use a global static identity domain. Reserve a static domain ID for it. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Jerry Snitselaar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
-rw-r--r--drivers/iommu/intel/iommu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 723ea9f3f501..c019fb3b3e78 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1440,10 +1440,10 @@ static int iommu_init_domains(struct intel_iommu *iommu)
* entry for first-level or pass-through translation modes should
* be programmed with a domain id different from those used for
* second-level or nested translation. We reserve a domain id for
- * this purpose.
+ * this purpose. This domain id is also used for identity domain
+ * in legacy mode.
*/
- if (sm_supported(iommu))
- set_bit(FLPT_DEFAULT_DID, iommu->domain_ids);
+ set_bit(FLPT_DEFAULT_DID, iommu->domain_ids);
return 0;
}