Skip to content

Commit 8950dcd

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Leave scalable mode default off
Commit 765b6a9 ("iommu/vt-d: Enumerate the scalable mode capability") enables VT-d scalable mode if hardware advertises the capability. As we will bring up different features and use cases to upstream in different patch series, it will leave some intermediate kernel versions which support partial features. Hence, end user might run into problems when they use such kernels on bare metals or virtualization environments. This leaves scalable mode default off and end users could turn it on with "intel-iommu=sm_on" only when they have clear ideas about which scalable features are supported in the kernel. Cc: Liu Yi L <yi.l.liu@intel.com> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com> Suggested-by: Ashok Raj <ashok.raj@intel.com> Suggested-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 9825bd9 commit 8950dcd

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,12 +1696,11 @@
16961696
By default, super page will be supported if Intel IOMMU
16971697
has the capability. With this option, super page will
16981698
not be supported.
1699-
sm_off [Default Off]
1700-
By default, scalable mode will be supported if the
1699+
sm_on [Default Off]
1700+
By default, scalable mode will be disabled even if the
17011701
hardware advertises that it has support for the scalable
17021702
mode translation. With this option set, scalable mode
1703-
will not be used even on hardware which claims to support
1704-
it.
1703+
will be used on hardware which claims to support it.
17051704
tboot_noforce [Default Off]
17061705
Do not force the Intel IOMMU enabled under tboot.
17071706
By default, tboot will force Intel IOMMU on, which

drivers/iommu/intel-iommu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static int dmar_map_gfx = 1;
363363
static int dmar_forcedac;
364364
static int intel_iommu_strict;
365365
static int intel_iommu_superpage = 1;
366-
static int intel_iommu_sm = 1;
366+
static int intel_iommu_sm;
367367
static int iommu_identity_mapping;
368368

369369
#define IDENTMAP_ALL 1
@@ -456,9 +456,9 @@ static int __init intel_iommu_setup(char *str)
456456
} else if (!strncmp(str, "sp_off", 6)) {
457457
pr_info("Disable supported super page\n");
458458
intel_iommu_superpage = 0;
459-
} else if (!strncmp(str, "sm_off", 6)) {
460-
pr_info("Intel-IOMMU: disable scalable mode support\n");
461-
intel_iommu_sm = 0;
459+
} else if (!strncmp(str, "sm_on", 5)) {
460+
pr_info("Intel-IOMMU: scalable mode supported\n");
461+
intel_iommu_sm = 1;
462462
} else if (!strncmp(str, "tboot_noforce", 13)) {
463463
printk(KERN_INFO
464464
"Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");

0 commit comments

Comments
 (0)