On 2023/10/24 20:52, Joao Martins wrote:
On 24/10/2023 13:42, Joao Martins wrote:
On 24/10/2023 13:34, Yi Liu wrote:
On 2023/10/21 06:27, Joao Martins wrote:
---
drivers/iommu/intel/Kconfig | 1 +
drivers/iommu/intel/iommu.c | 104 +++++++++++++++++++++++++++++++++-
drivers/iommu/intel/iommu.h | 17 ++++++
drivers/iommu/intel/pasid.c | 108 ++++++++++++++++++++++++++++++++++++
drivers/iommu/intel/pasid.h | 4 ++
5 files changed, 233 insertions(+), 1 deletion(-)
normally, the subject of commits to intel iommu driver is started
with 'iommu/vt-d'. So if there is a new version, please rename it.
Also, SL is a bit eld naming, please use SS (second stage)
s/iommu/intel: Access/Dirty bit support for SL domains/iommu/vt-d: Access/Dirty
bit support for SS domains
OK
FYI, this is what I have staged in:
sure.
Subject: iommu/vt-d: Access/Dirty bit support for SS domains
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 4e25faf573de..eb92a201cc0b 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -4094,7 +4094,7 @@ intel_iommu_domain_alloc_user(struct device *dev, u32 flags)
return ERR_PTR(-EOPNOTSUPP);
dirty_tracking = (flags & IOMMU_HWPT_ALLOC_DIRTY_TRACKING);
- if (dirty_tracking && !slads_supported(iommu))
+ if (dirty_tracking && !ssads_supported(iommu))
return ERR_PTR(-EOPNOTSUPP);
/*
@@ -4137,7 +4137,7 @@ static int prepare_domain_attach_device(struct
iommu_domain *domain,
if (dmar_domain->force_snooping && !ecap_sc_support(iommu->ecap))
return -EINVAL;
- if (domain->dirty_ops && !slads_supported(iommu))
+ if (domain->dirty_ops && !ssads_supported(iommu))
return -EINVAL;
/* check if this iommu agaw is sufficient for max mapped address */
@@ -4395,7 +4395,7 @@ static bool intel_iommu_capable(struct device *dev, enum
iommu_cap cap)
case IOMMU_CAP_ENFORCE_CACHE_COHERENCY:
return ecap_sc_support(info->iommu->ecap);
case IOMMU_CAP_DIRTY_TRACKING:
- return slads_supported(info->iommu);
+ return ssads_supported(info->iommu);
default:
return false;
}
diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h
index 27bcfd3bacdd..3bb569146229 100644
--- a/drivers/iommu/intel/iommu.h
+++ b/drivers/iommu/intel/iommu.h
@@ -542,10 +542,9 @@ enum {
#define sm_supported(iommu) (intel_iommu_sm && ecap_smts((iommu)->ecap))
#define pasid_supported(iommu) (sm_supported(iommu) && \
ecap_pasid((iommu)->ecap))
-#define slads_supported(iommu) (sm_supported(iommu) && \
+#define ssads_supported(iommu) (sm_supported(iommu) && \
ecap_slads((iommu)->ecap))
-
struct pasid_entry;
struct pasid_state_entry;
struct page_req_dsc;
--
Regards,
Yi Liu