From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A86E6C433E2 for ; Mon, 7 Sep 2020 10:44:42 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0648020738 for ; Mon, 7 Sep 2020 10:44:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0648020738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 99E7487051; Mon, 7 Sep 2020 10:44:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I5AKVmXn9xMl; Mon, 7 Sep 2020 10:44:39 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id BBBD887062; Mon, 7 Sep 2020 10:44:39 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A7AA1C0052; Mon, 7 Sep 2020 10:44:39 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7575EC0051 for ; Mon, 7 Sep 2020 10:44:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 71D4186660 for ; Mon, 7 Sep 2020 10:44:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w-kYO9CRIH9E for ; Mon, 7 Sep 2020 10:44:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by whitealder.osuosl.org (Postfix) with ESMTPS id B0A358664B for ; Mon, 7 Sep 2020 10:44:36 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id BF8CA34A; Mon, 7 Sep 2020 12:44:33 +0200 (CEST) Date: Mon, 7 Sep 2020 12:44:32 +0200 From: Joerg Roedel To: "Deucher, Alexander" Subject: Re: [PATCH 0/2] iommu/amd: Fix IOMMUv2 devices when SME is active Message-ID: <20200907104431.GH16609@8bytes.org> References: <34db343f-cd23-09af-3bc5-29b9d385f85d@amd.com> <20200828134639.GW3354@suse.de> <60067932-dbf4-d67b-cf11-4dd2b016ed63@amd.com> <20200828152943.GY3354@suse.de> <20200904100556.GU6714@8bytes.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Cc: "Lendacky, Thomas" , "jroedel@suse.de" , "Kuehling, Felix" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "Huang, Ray" , "Koenig, Christian" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 > 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 > --- > 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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu