Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-11 Thread Lu Baolu
Hi, On 11/11/19 10:05 PM, Qian Cai wrote: On Nov 11, 2019, at 12:23 AM, Lu Baolu wrote: The scalable mode is defined in VT-d 3.0. The scalable mode capability could be checked by reading /sys/devices/virtual/iommu/dmar*/intel- iommu/ecap. It's currently not friendly for reading. You need

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-11 Thread Qian Cai
> On Nov 11, 2019, at 12:23 AM, Lu Baolu wrote: > > The scalable mode is defined in VT-d 3.0. The scalable mode capability > could be checked by reading /sys/devices/virtual/iommu/dmar*/intel- > iommu/ecap. It's currently not friendly for reading. You need to decode > it according to the

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 10:58 AM, Qian Cai wrote: On Nov 8, 2019, at 10:43 PM, Lu Baolu wrote: +config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON +prompt "Enable Intel IOMMU scalable mode by default" +depends on INTEL_IOMMU +help + Selecting this option will enable the scalable mode if

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Qian Cai
> On Nov 8, 2019, at 10:43 PM, Lu Baolu wrote: > > +config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON > +prompt "Enable Intel IOMMU scalable mode by default" > +depends on INTEL_IOMMU > +help > + Selecting this option will enable the scalable mode if > + hardware presents the

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 10:00 AM, Qian Cai wrote: On Nov 10, 2019, at 8:30 PM, Lu Baolu wrote: How about "pasid based multiple stages DMA translation"? It is better but I am still not sure how developers should select it or not when asking. Ideally, should it mention pros and cons of this? At

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Qian Cai
> On Nov 10, 2019, at 8:30 PM, Lu Baolu wrote: > > How about "pasid based multiple stages DMA translation"? It is better but I am still not sure how developers should select it or not when asking. Ideally, should it mention pros and cons of this? At minimal, there should be a line said “if

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Lu Baolu
Hi, On 11/9/19 11:59 AM, Qian Cai wrote: On Nov 8, 2019, at 10:40 PM, Lu Baolu wrote: This adds Kconfig option INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON to make it easier for distributions to enable or disable the Intel IOMMU scalable mode by default during kernel build. Signed-off-by: Lu

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-08 Thread Qian Cai
> On Nov 8, 2019, at 10:40 PM, Lu Baolu wrote: > > This adds Kconfig option INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON > to make it easier for distributions to enable or disable the > Intel IOMMU scalable mode by default during kernel build. > > Signed-off-by: Lu Baolu > --- >

[PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-08 Thread Lu Baolu
This adds Kconfig option INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON to make it easier for distributions to enable or disable the Intel IOMMU scalable mode by default during kernel build. Signed-off-by: Lu Baolu --- drivers/iommu/Kconfig | 9 + drivers/iommu/intel-iommu.c | 7 ++- 2