Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp25869ybg; Thu, 11 Jun 2020 16:07:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFkSQ2raDZ2XzGKR7HO909w+2qfeT39+ZeTJ7lMh50ck0F4xYMXvTBo1pSvrcqS4Y8mYmc X-Received: by 2002:a17:906:150c:: with SMTP id b12mr9486312ejd.545.1591916877991; Thu, 11 Jun 2020 16:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591916877; cv=none; d=google.com; s=arc-20160816; b=UEKeL2vlro2OiYkDmDfUyaG0wwCM2hnbE4/8bK+/YK/DbbsFk1fVjn2GoJ2FDSLWgU +mVhscX5TNuQrDxDMJuaBEl2XtDy4KhAgJzr4o7bfbWECDZlo5Cn+osZ2Y6qmfPGZi70 kAUUFFfTsnyaOnjtDucDxdj6UweJhKb09muvb66tG6xSbPt/FEDrzW7BoiY74Yd6EP/F yAUR8+9jQvUlI2Odm6j52sY3vwKH/PPNzv/o4fhNxJZ7kVg9cpL4z5MYzscLgEoL9TAY Pi40U+V/TymJWIK1mni/Xo5cKjDbWqG9NHAAma2BfeLQ7kRr8StU518eWb5AmFYO2V9z Hqmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:content-transfer-encoding :message-id:mime-version:cc:to:subject:from:date:dkim-signature; bh=4YUy2dnKX+aLfXhIKF01g98COCeJaRGO0uIb0VS79Kk=; b=dICj23qIC6FRZvZQ3A8FL3wT16prLF4z1tdIlw941rkWjWnGVAnefOmA427dzha+xE Hwe5a7C3/3vHHV3ThKCsSO0ZnfUVSUUjM46QB1ehhzzDGcO/Z6T7YIt8bo6iUNHtzHTX jxMYrlbZAMKAGXOpq9nsnu1Migp3WoZvOUV53aZzIbtj8KxG2eD54AWfZ3JiSExBqgKl LwsmLhP/NXbbnlArqWOUv1e0AcspCHQofsfiCPaGnoxCJKt8aZhQ4X6oYoabDEfEF29V ZhG4Vk9xTtcjvWXHvlXDb5g6ybA054x47Ro6168yAqkRk2lIy3Evxlu7sOE3zYEWGOl2 Tj0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b="ksY/536V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si2662594ejs.213.2020.06.11.16.07.33; Thu, 11 Jun 2020 16:07:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@yahoo.ca header.s=s2048 header.b="ksY/536V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.ca Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726369AbgFKXFa (ORCPT + 99 others); Thu, 11 Jun 2020 19:05:30 -0400 Received: from sonic315-55.consmr.mail.gq1.yahoo.com ([98.137.65.31]:41897 "EHLO sonic315-55.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbgFKXF3 (ORCPT ); Thu, 11 Jun 2020 19:05:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s2048; t=1591916728; bh=4YUy2dnKX+aLfXhIKF01g98COCeJaRGO0uIb0VS79Kk=; h=Date:From:Subject:To:Cc:References:From:Subject; b=ksY/536Vx4+k7UgUuK7sU+hVBThfiszI09Iuz1pRDsEDzIekIw49uYjp7ORgIcNYz0f6DNDzfy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.0mTEM7K9s8uzcE9CTS8fKfsDaVPyVxh xVmmJFX.A8jqmra2IrNsfF8nyaPIwxTRtGkfxuk34ZNH.5c0amNlvLcBd8.CT2wpn_WASLVEIrIT lDlihOCfti987bgw5CyoUnMPwNm0_HyhWtZkakVcpPqyn4HsvO_sGZRdcb0.0tEu_C025pvdxswN rmgxGP8nc8FxFl_ewO1mGzIfh.LwtPgP6qxJHGwfAB.8sgV6oyaOcpklbPCK0mtb2TNuawY.gM1Y 4EIewDISpLaEHGybdY02ejlYI9grt4UFGP66cBLM98U9eaSs476RtjcbgJDnZF0_b5o12Ivh3yDE .RRrOjKXttZUE3n3qAJp9VaVUkrJ1tU13bF05OPpKcgEydjxVzV7vX1CE71IihUl_3XGlg_spYT1 ddNGRuEIqFA0z2RSjAXwv25g7eOX4gy.2PVQRZ6tqkn.PDou7IfhlVk8_1frFp5r3OUVYDW2Om7X b38HOjsBTSMFQLSdrTiz56K7c1Ygr8lUnUMCqgmgaJUxAZUUchMUduSb9Ii8mcXGP569B9NwAMAc y3hNB5BRs5SQzb2xm6fsFam.vFlKXVBiNz6MHR.jitsw1wi_Lt0BaPaD8ibirje_yAw4- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Thu, 11 Jun 2020 23:05:28 +0000 Received: by smtp422.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 385a77de6a3948fc2d5a9f83b3566fac; Thu, 11 Jun 2020 23:05:25 +0000 (UTC) Date: Thu, 11 Jun 2020 19:05:21 -0400 From: "Alex Xu (Hello71)" Subject: AMD IOMMU + SME + amdgpu regression To: Joerg Roedel , linux-kernel@vger.kernel.org, David Rientjes , Christoph Hellwig Cc: Will Deacon , Robin Murphy , Marek Szyprowski , Kukjin Kim , Krzysztof Kozlowski , David Woodhouse , Lu Baolu , Andy Gross , Bjorn Andersson , Matthias Brugger , Rob Clark , Heiko Stuebner , Gerald Schaefer , Thierry Reding , Jonathan Hunter , Jean-Philippe Brucker , Daniel Drake , jonathan.derrick@intel.com, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-s390@vger.kernel.org, linux-tegra@vger.kernel.org, virtualization@lists.linux-foundation.org, Joerg Roedel MIME-Version: 1.0 Message-Id: <1591915710.rakbpzst8h.none@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable References: <1591915710.rakbpzst8h.none.ref@localhost> X-Mailer: WebService/1.1.16072 hermes_yahoo Apache-HttpAsyncClient/4.1.4 (Java/11.0.6) Content-Length: 1403 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, amdgpu + IOMMU + SME is now working for me on 5.7, yay! But, it is=20 broken on torvalds master, boo. On boot, depending on which exact commit=20 I test, it either hangs immediately (with built-in driver, before=20 starting initramfs), displays some errors then hangs, or spams the=20 screen with many amdgpu errors. I bisected the black screen hang to: commit dce8d6964ebdb333383bacf5e7ab8c27df151218 Author: Joerg Roedel Date: Wed Apr 29 15:36:53 2020 +0200 iommu/amd: Convert to probe/release_device() call-backs Convert the AMD IOMMU Driver to use the probe_device() and release_device() call-backs of iommu_ops, so that the iommu core code does the group and sysfs setup. Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200429133712.31431-16-joro@8bytes.org Signed-off-by: Joerg Roedel Testing torvalds master (623f6dc593) with the containing merge=20 (98bdc74b36) plus the DMA mapping merge (4e94d08734) reverted allows=20 amdgpu + IOMMU + SME to once again work. I think that nobody is really working on amdgpu + SME, but it would be a=20 shame if it was supported and then incidentally broken by a small=20 change. I am using an ASRock B450 Pro4 with Ryzen 1600 and ASUS RX 480. I don't=20 understand this code at all, but let me know what I can do to=20 troubleshoot. Thanks, Alex.