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

From: Lu Baolu
Date: Mon Nov 11 2019 - 00:23:50 EST


Hi,

On 11/11/19 10:58 AM, Qian Cai wrote:


On Nov 8, 2019, at 10:43 PM, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx> 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 capability. If this option is not
+ selected, scalable mode support could also be enabled
+ by passing intel_iommu=sm_on to the kernel.
+

Does it also make sense to mention which hardware presents this capability or how to check it?


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 spec.

Best regards,
baolu