iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
	"jroedel@suse.de" <jroedel@suse.de>,
	"Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"Huang, Ray" <Ray.Huang@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>
Subject: Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active
Date: Mon, 7 Sep 2020 12:44:32 +0200	[thread overview]
Message-ID: <20200907104431.GH16609@8bytes.org> (raw)
In-Reply-To: <MN2PR12MB448843EC6D3D5B71613BEAAFF72B0@MN2PR12MB4488.namprd12.prod.outlook.com>

On Sun, Sep 06, 2020 at 04:08:58PM +0000, Deucher, Alexander wrote:
> From f479b9da353c2547c26ebac8930a5dcd9a134eb7 Mon Sep 17 00:00:00 2001
> From: Alex Deucher <alexander.deucher@amd.com>
> Date: Sun, 6 Sep 2020 12:05:12 -0400
> Subject: [PATCH] drm/amdgpu: Fail to load on RAVEN if SME is active
> 
> Due to hardware bugs, scatter/gather display on raven requires
> a 1:1 IOMMU mapping, however, SME (System Memory Encryption)
> requires an indirect IOMMU mapping because the encryption bit
> is beyond the DMA mask of the chip.  As such, the two are
> incompatible.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 12e16445df7c..d87d37c25329 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -1102,6 +1102,16 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
>  		return -ENODEV;
>  	}
>  
> +	/* Due to hardware bugs, S/G Display on raven requires a 1:1 IOMMU mapping,
> +	 * however, SME requires an indirect IOMMU mapping because the encryption
> +	 * bit is beyond the DMA mask of the chip.
> +	 */
> +	if (mem_encrypt_active() && ((flags & AMD_ASIC_MASK) == CHIP_RAVEN)) {
> +		dev_info(&pdev->dev,
> +			 "SME is not compatible with RAVEN\n");
> +		return -ENOTSUPP;
> +	}
> +
>  #ifdef CONFIG_DRM_AMDGPU_SI
>  	if (!amdgpu_si_support) {
>  		switch (flags & AMD_ASIC_MASK) {
> -- 
> 2.25.4
>

Looks good to me, thanks.

Acked-by: Joerg Roedel <jroedel@suse.de>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-09-07 10:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24 10:54 [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active Joerg Roedel
2020-08-24 10:54 ` [PATCH 1/2] iommu/amd: Do not force direct mapping " Joerg Roedel
2020-08-26 14:23   ` Deucher, Alexander
2020-08-24 10:54 ` [PATCH 2/2] iommu/amd: Do not use IOMMUv2 functionality " Joerg Roedel
2020-08-26 14:20   ` Deucher, Alexander
2020-08-26 14:14 ` [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices " Deucher, Alexander
2020-08-26 15:22   ` Felix Kuehling
2020-08-26 15:25     ` Deucher, Alexander
2020-08-28 13:46       ` jroedel
2020-08-28 13:54         ` Felix Kuehling
2020-08-28 15:11           ` Deucher, Alexander
2020-08-28 15:29             ` jroedel
2020-08-28 15:47               ` Deucher, Alexander
2020-09-04 10:05                 ` Joerg Roedel
2020-09-06 16:08                   ` Deucher, Alexander
2020-09-07 10:44                     ` Joerg Roedel [this message]
2020-09-07 11:10                       ` Christian König
2020-09-08  3:38                     ` Felix Kuehling
2020-08-28 15:27           ` jroedel

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=20200907104431.GH16609@8bytes.org \
    --to=joro@8bytes.org \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@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).