Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1337215ybg; Tue, 2 Jun 2020 07:25:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1GKSTEker+LHJH0wjcqJRpNwFGpZ3655vTNLFl8xB2V/8JPrDN9yoYZkwkEAI3URCredZ X-Received: by 2002:aa7:d952:: with SMTP id l18mr21654503eds.151.1591107928291; Tue, 02 Jun 2020 07:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591107928; cv=none; d=google.com; s=arc-20160816; b=yxa0yyNmAgP/H9Dxe8tF06hjQxFmaH+cUvwqiyofYFYuA72YvtUkQQI921qIDgSeCz M4yF81iSP1qGsKVte11/FXtr+0CnKP1bR5rW2mYe6UettsiSvAenAVI8evtCPkDMvnld TodiCMQFO0WACwuDDTFy6oIYvgVOPxnBs/XdmjOTOPrgVhf5I3HBkDWLQ5uLuSdthm8X lEF1fywde3sCiq7jFPVk7a5X3LJx4prxbUw0WDAE0+hz0Kk3+CB1zd4ZOLArskM1VyK3 yx7DJ2gttvOAGA/25l3LQwEEl++ZgWnLSjGDv8MP12tWJae8uIf3sP6PaaczNI7d6Lzd PBiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=Zuv28/DqV/pWBpOnz/q+YQUMyzkrEmt/4FhlUaN/GvI=; b=yWRxlP2/8srndm0bp4ERagHwxCUJ9RcvTrAHqSH8zBdDZPlG8xAm7xCxyjnHkyWp0o 8+i2GTL9BGJ1GaE2qNwwbGGjiyh7anMocPTEITQc2IZk6d12ldacUcoetl6gGLIxebX2 e2mb0pzXvcT38ABkUgRnJwAg2Y/7/758/5rrX79gSoo1caLjJ500J2Qh4EPbBB58kYcb 127sRlk/x1vz8zTJPDfvjEq9PcD0NBTOGFsj5nCKjrf0TpmqxLY73YdGVrRb4jBS4eyB xydDj0e4KKeF/OzSrgNHbP+DUDP6/thhLUMu0t9/FhfpAmGAW3e6X/RQdQbbEL++rn9W aUsA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si1592009ejk.9.2020.06.02.07.25.05; Tue, 02 Jun 2020 07:25:28 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727818AbgFBOXR (ORCPT + 99 others); Tue, 2 Jun 2020 10:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgFBOXQ (ORCPT ); Tue, 2 Jun 2020 10:23:16 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D30DC08C5C0; Tue, 2 Jun 2020 07:23:16 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 6498A2A6; Tue, 2 Jun 2020 16:23:14 +0200 (CEST) Date: Tue, 2 Jun 2020 16:23:12 +0200 From: Joerg Roedel To: Lu Baolu , Will Deacon , Robin Murphy , Marek Szyprowski , Kukjin Kim , Krzysztof Kozlowski , David Woodhouse , Andy Gross , Bjorn Andersson , Matthias Brugger , Rob Clark , Heiko Stuebner , Gerald Schaefer , Thierry Reding , Jonathan Hunter , Jean-Philippe Brucker , linux-s390@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code Message-ID: <20200602142312.GJ14598@8bytes.org> References: <20200414131542.25608-1-joro@8bytes.org> <20200529221623.qc6twmpzryh7nkvb@cantor> <20200601104240.7f5xhz7gooqhaq4n@cantor> <47711845-98ee-95b8-aa95-423a36ed9741@linux.intel.com> <20200602000236.j4m3jvluzdhjngdc@cantor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200602000236.j4m3jvluzdhjngdc@cantor> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jerry, On Mon, Jun 01, 2020 at 05:02:36PM -0700, Jerry Snitselaar wrote: > > Yeah, that will solve the panic. > If you still see the kdump faults, can you please try with the attached diff? I was not able to reproduce them in my setup. Regards, Joerg diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b5ea203f6c68..5a6d509f72b6 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -1680,8 +1680,12 @@ static void probe_alloc_default_domain(struct bus_type *bus, static int iommu_group_do_dma_attach(struct device *dev, void *data) { struct iommu_domain *domain = data; + int ret = 0; - return __iommu_attach_device(domain, dev); + if (!iommu_is_attach_deferred(group->domain, dev)) + ret = __iommu_attach_device(group->domain, dev); + + return ret; } static int __iommu_group_dma_attach(struct iommu_group *group)