aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-01-23 21:31:32 -0500
committerJoerg Roedel <jroedel@suse.de>2019-01-30 11:23:58 -0500
commit8950dcd83ae7d62bdc2a60507949acebd85399f2 (patch)
treef16ce662f31aa59f682a3ae52b0ad8e1f3fa1fa0
parent9825bd94e3a2baae1f4874767ae3a7d4c049720e (diff)
iommu/vt-d: Leave scalable mode default off
Commit 765b6a98c1de3 ("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>
-rw-r--r--Documentation/admin-guide/kernel-parameters.txt7
-rw-r--r--drivers/iommu/intel-iommu.c8
2 files changed, 7 insertions, 8 deletions
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index b799bcf67d7b..858b6c0b9a15 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1696,12 +1696,11 @@
1696 By default, super page will be supported if Intel IOMMU 1696 By default, super page will be supported if Intel IOMMU
1697 has the capability. With this option, super page will 1697 has the capability. With this option, super page will
1698 not be supported. 1698 not be supported.
1699 sm_off [Default Off] 1699 sm_on [Default Off]
1700 By default, scalable mode will be supported if the 1700 By default, scalable mode will be disabled even if the
1701 hardware advertises that it has support for the scalable 1701 hardware advertises that it has support for the scalable
1702 mode translation. With this option set, scalable mode 1702 mode translation. With this option set, scalable mode
1703 will not be used even on hardware which claims to support 1703 will be used on hardware which claims to support it.
1704 it.
1705 tboot_noforce [Default Off] 1704 tboot_noforce [Default Off]
1706 Do not force the Intel IOMMU enabled under tboot. 1705 Do not force the Intel IOMMU enabled under tboot.
1707 By default, tboot will force Intel IOMMU on, which 1706 By default, tboot will force Intel IOMMU on, which
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 1457f931218e..78188bf7e90d 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -363,7 +363,7 @@ static int dmar_map_gfx = 1;
363static int dmar_forcedac; 363static int dmar_forcedac;
364static int intel_iommu_strict; 364static int intel_iommu_strict;
365static int intel_iommu_superpage = 1; 365static int intel_iommu_superpage = 1;
366static int intel_iommu_sm = 1; 366static int intel_iommu_sm;
367static int iommu_identity_mapping; 367static int iommu_identity_mapping;
368 368
369#define IDENTMAP_ALL 1 369#define IDENTMAP_ALL 1
@@ -456,9 +456,9 @@ static int __init intel_iommu_setup(char *str)
456 } else if (!strncmp(str, "sp_off", 6)) { 456 } else if (!strncmp(str, "sp_off", 6)) {
457 pr_info("Disable supported super page\n"); 457 pr_info("Disable supported super page\n");
458 intel_iommu_superpage = 0; 458 intel_iommu_superpage = 0;
459 } else if (!strncmp(str, "sm_off", 6)) { 459 } else if (!strncmp(str, "sm_on", 5)) {
460 pr_info("Intel-IOMMU: disable scalable mode support\n"); 460 pr_info("Intel-IOMMU: scalable mode supported\n");
461 intel_iommu_sm = 0; 461 intel_iommu_sm = 1;
462 } else if (!strncmp(str, "tboot_noforce", 13)) { 462 } else if (!strncmp(str, "tboot_noforce", 13)) {
463 printk(KERN_INFO 463 printk(KERN_INFO
464 "Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n"); 464 "Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n");