Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: idxd: add module parameter to force disable of SVA

Add a module parameter that overrides the SVA feature enabling. This keeps
the driver in legacy mode even when intel_iommu=sm_on is set. In this mode,
the descriptor fields must be programmed with dma_addr_t from the Linux DMA
API for source, destination, and completion descriptors.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/161134110457.4005461.13171197785259115852.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Dave Jiang and committed by
Vinod Koul
03d939c7 9f3c14d4

+13 -1
+6
Documentation/admin-guide/kernel-parameters.txt
··· 1673 1673 In such case C2/C3 won't be used again. 1674 1674 idle=nomwait: Disable mwait for CPU C-states 1675 1675 1676 + idxd.sva= [HW] 1677 + Format: <bool> 1678 + Allow force disabling of Shared Virtual Memory (SVA) 1679 + support for the idxd driver. By default it is set to 1680 + true (1). 1681 + 1676 1682 ieee754= [MIPS] Select IEEE Std 754 conformance mode 1677 1683 Format: { strict | legacy | 2008 | relaxed } 1678 1684 Default: strict
+7 -1
drivers/dma/idxd/init.c
··· 26 26 MODULE_LICENSE("GPL v2"); 27 27 MODULE_AUTHOR("Intel Corporation"); 28 28 29 + static bool sva = true; 30 + module_param(sva, bool, 0644); 31 + MODULE_PARM_DESC(sva, "Toggle SVA support on/off"); 32 + 29 33 #define DRV_NAME "idxd" 30 34 31 35 bool support_enqcmd; ··· 342 338 idxd_device_init_reset(idxd); 343 339 dev_dbg(dev, "IDXD reset complete\n"); 344 340 345 - if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM)) { 341 + if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM) && sva) { 346 342 rc = idxd_enable_system_pasid(idxd); 347 343 if (rc < 0) 348 344 dev_warn(dev, "Failed to enable PASID. No SVA support: %d\n", rc); 349 345 else 350 346 set_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags); 347 + } else if (!sva) { 348 + dev_warn(dev, "User forced SVA off via module param.\n"); 351 349 } 352 350 353 351 idxd_read_caps(idxd);