dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Dave Jiang <dave.jiang@intel.com>
Cc: dmaengine@vger.kernel.org
Subject: Re: [PATCH] dmaengine: idxd: add module parameter to force disable of SVA
Date: Sun, 17 Jan 2021 12:21:15 +0530	[thread overview]
Message-ID: <20210117065115.GL2771@vkoul-mobl> (raw)
In-Reply-To: <161074811013.2184257.13335125853932003159.stgit@djiang5-desk3.ch.intel.com>

On 15-01-21, 15:01, Dave Jiang wrote:
> 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>
> ---
>  drivers/dma/idxd/init.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
> index 25cc947c6179..9687a24ff982 100644
> --- a/drivers/dma/idxd/init.c
> +++ b/drivers/dma/idxd/init.c
> @@ -26,6 +26,10 @@ MODULE_VERSION(IDXD_DRIVER_VERSION);
>  MODULE_LICENSE("GPL v2");
>  MODULE_AUTHOR("Intel Corporation");
>  
> +static bool sva = true;
> +module_param(sva, bool, 0644);
> +MODULE_PARM_DESC(sva, "Toggle SVA support on/off");

Documentation for this please..

> +
>  #define DRV_NAME "idxd"
>  
>  bool support_enqcmd;
> @@ -338,12 +342,14 @@ static int idxd_probe(struct idxd_device *idxd)
>  	idxd_device_init_reset(idxd);
>  	dev_dbg(dev, "IDXD reset complete\n");
>  
> -	if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM)) {
> +	if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM) && sva) {
>  		rc = idxd_enable_system_pasid(idxd);
>  		if (rc < 0)
>  			dev_warn(dev, "Failed to enable PASID. No SVA support: %d\n", rc);
>  		else
>  			set_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags);
> +	} else if (!sva) {
> +		dev_warn(dev, "User forced SVA off via module param.\n");
>  	}
>  
>  	idxd_read_caps(idxd);
> 

-- 
~Vinod

  reply	other threads:[~2021-01-17  6:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 22:01 [PATCH] dmaengine: idxd: add module parameter to force disable of SVA Dave Jiang
2021-01-17  6:51 ` Vinod Koul [this message]
2021-01-18 17:06   ` Dave Jiang
2021-01-19 16:38     ` Vinod Koul
2021-01-19 19:44       ` Dave Jiang
2021-01-26 17:02         ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210117065115.GL2771@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).