Re: [PATCH v5 2/8] iommu/vt-d: Add per-device IOMMU feature ops entries

2019-01-24 Thread Joerg Roedel
Hi Lu Baolu, On Thu, Jan 24, 2019 at 02:47:39PM +0800, Lu Baolu wrote: > bool iommu_dev_feature_enabled(dev, IOMMU_DEV_FEAT_AUX)? Looks good. Having a function to check for enabled features is certainly a good thing. Regards, Joerg

Re: [PATCH v5 2/8] iommu/vt-d: Add per-device IOMMU feature ops entries

2019-01-23 Thread Lu Baolu
Hi Joerg, On 1/11/19 7:16 PM, Joerg Roedel wrote: + +static bool +intel_iommu_dev_has_feat(struct device *dev, enum iommu_dev_features feat) +{ + struct device_domain_info *info = dev->archdata.iommu; + + if (feat == IOMMU_DEV_FEAT_AUX) + return scalable_mode_support()

Re: [PATCH v5 2/8] iommu/vt-d: Add per-device IOMMU feature ops entries

2019-01-13 Thread Lu Baolu
Hi Joerg, Thanks for reviewing my patch. On 1/11/19 7:16 PM, Joerg Roedel wrote: Hi, this looks a bit confusing to me because I can see no checking whether the device actually supports scalable mode. Yes. I should put some checking there. Device scalable mode capability is exposed in PCI

Re: [PATCH v5 2/8] iommu/vt-d: Add per-device IOMMU feature ops entries

2019-01-11 Thread Joerg Roedel
Hi, this looks a bit confusing to me because I can see no checking whether the device actually supports scalable mode. More below: On Thu, Jan 10, 2019 at 11:00:21AM +0800, Lu Baolu wrote: > +static int intel_iommu_enable_auxd(struct device *dev) > +{ > + struct device_domain_info *info; > +

[PATCH v5 2/8] iommu/vt-d: Add per-device IOMMU feature ops entries

2019-01-09 Thread Lu Baolu
This adds the iommu ops entries for aux-domain per-device feature query and enable/disable. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Signed-off-by: Sanjay Kumar Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 86 +