Re: [PATCH v8 01/11] iommu: Add max_pasids field in struct iommu_device

Baolu Lu
2022-06-10T06:34:01Z

On 2022/6/10 01:25, Raj, Ashok wrote:
>> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
>> index 4f29139bbfc3..e065cbe3c857 100644
>> --- a/include/linux/intel-iommu.h
>> +++ b/include/linux/intel-iommu.h
>> @@ -479,7 +479,6 @@ enum {
>> #define VTD_FLAG_IRQ_REMAP_PRE_ENABLED (1 << 1)
>> #define VTD_FLAG_SVM_CAPABLE (1 << 2)
>>
>> -extern int intel_iommu_sm;
>> extern spinlock_t device_domain_lock;
>>
>> #define sm_supported(iommu) (intel_iommu_sm && ecap_smts((iommu)->ecap))
>> @@ -786,6 +785,7 @@ struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
>> extern const struct iommu_ops intel_iommu_ops;
>>
>> #ifdef CONFIG_INTEL_IOMMU
>> +extern int intel_iommu_sm;
>> extern int iommu_calculate_agaw(struct intel_iommu *iommu);
>> extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
>> extern int dmar_disabled;
>> @@ -802,6 +802,7 @@ static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu)
>> }
>> #define dmar_disabled (1)
>> #define intel_iommu_enabled (0)
>> +#define intel_iommu_sm (0)
> Is the above part of this patch? Or should be moved up somewhere?

This is to make pasid_supported() usable in dmar.c. It's only needed by
the change in this patch. I should make this clear in the commit
message. :-)

Best regards,
baolu