diff options
author | 2025-07-14 12:50:24 +0800 | |
---|---|---|
committer | 2025-07-14 11:18:03 +0100 | |
commit | b33125296b5047115469b8a3b74c0fdbf4976548 (patch) | |
tree | 25ba4920498963e7b6e941998a4e4e2f4959cf6e /tools/perf/scripts/python | |
parent | iommu/vt-d: Split intel_iommu_domain_alloc_paging_flags() (diff) | |
download | wireguard-linux-b33125296b5047115469b8a3b74c0fdbf4976548.tar.xz wireguard-linux-b33125296b5047115469b8a3b74c0fdbf4976548.zip |
iommu/vt-d: Create unique domain ops for each stage
Use the domain ops pointer to tell what kind of domain it is instead of
the internal use_first_level indication. This also protects against
wrongly using a SVA/nested/IDENTITY/BLOCKED domain type in places they
should not be.
The only remaining uses of use_first_level outside the paging domain are in
paging_domain_compatible() and intel_iommu_enforce_cache_coherency().
Thus, remove the useless sets of use_first_level in
intel_svm_domain_alloc() and intel_iommu_domain_alloc_nested(). None of
the unique ops for these domain types ever reference it on their call
chains.
Add a WARN_ON() check in domain_context_mapping_one() as it only works
with second stage.
This is preparation for iommupt which will have different ops for each of
the stages.
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5-v3-dbbe6f7e7ae3+124ffe-vtd_prep_jgg@nvidia.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20250714045028.958850-8-baolu.lu@linux.intel.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions