public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: Jerry Snitselaar <jsnitsel@redhat.com>
Cc: dmaengine@vger.kernel.org, Vinod Koul <vkoul@kernel.org>,
	linux-kernel@vger.kernel.org, Dave Jiang <dave.jiang@intel.com>
Subject: Re: [PATCH v2] dmaengine: idxd: Only call idxd_enable_system_pasid() if succeeded in enabling SVA feature
Date: Sat, 25 Jun 2022 22:06:31 -0700	[thread overview]
Message-ID: <YrfpV5kcyRj2LdZB@fyu1.sc.intel.com> (raw)
In-Reply-To: <20220626045144.9063-1-jsnitsel@redhat.com>

Hi, Jerry,

On Sat, Jun 25, 2022 at 09:51:44PM -0700, Jerry Snitselaar wrote:
> On a Sapphire Rapids system if you boot without intel_iommu=on, the IDXD
                               s/you//

> driver will crash during probe in iommu_sva_bind_device().
.... 
> v2: Balance braces on if else block. Fix up commit description.

This change log should be moved after "---".

> 
> Fixes: 42a1b73852c4 ("dmaengine: idxd: Separate user and kernel pasid enabling")
> Cc: Vinod Koul <vkoul@kernel.org>
> Cc: linux-kernel@vger.kernel.org
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>

Please put the bug report link here:

Link: https://lore.kernel.org/dmaengine/20220623170232.6whonfjuh3m5vcoy@cantor/

> ---

i.e. put the change log here:

v2: Balance braces on if else block. Fix up commit description.

>  drivers/dma/idxd/init.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
> index 355fb3ef4cbf..aa3478257ddb 100644
> --- a/drivers/dma/idxd/init.c
> +++ b/drivers/dma/idxd/init.c
> @@ -512,15 +512,16 @@ static int idxd_probe(struct idxd_device *idxd)
>  	dev_dbg(dev, "IDXD reset complete\n");
>  
>  	if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM) && sva) {
> -		if (iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_SVA))
> +		if (iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_SVA)) {
>  			dev_warn(dev, "Unable to turn on user SVA feature.\n");
> -		else
> +		} else {
>  			set_bit(IDXD_FLAG_USER_PASID_ENABLED, &idxd->flags);
>  
> -		if (idxd_enable_system_pasid(idxd))
> -			dev_warn(dev, "No in-kernel DMA with PASID.\n");
> -		else
> -			set_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags);
> +			if (idxd_enable_system_pasid(idxd))
> +				dev_warn(dev, "No in-kernel DMA with PASID.\n");
> +			else
> +				set_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags);
> +		}
>  	} else if (!sva) {
>  		dev_warn(dev, "User forced SVA off via module param.\n");
>  	}
> -- 
> 2.36.1
> 
Thanks.

-Fenghua

  reply	other threads:[~2022-06-26  5:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25 22:13 [PATCH] dmaengine: idxd: Only call idxd_enable_system_pasid if succeeded in enabling SVA feature Jerry Snitselaar
2022-06-26  4:20 ` Fenghua Yu
2022-06-26  4:51 ` [PATCH v2] dmaengine: idxd: Only call idxd_enable_system_pasid() " Jerry Snitselaar
2022-06-26  5:06   ` Fenghua Yu [this message]
2022-06-26  5:16 ` [PATCH v3] " Jerry Snitselaar
2022-06-26  5:36   ` Fenghua Yu
2022-07-01 17:52     ` Jerry Snitselaar
2022-07-05 13:00   ` 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=YrfpV5kcyRj2LdZB@fyu1.sc.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jsnitsel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@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