Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1429361ybg; Tue, 2 Jun 2020 09:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuRxdbkioJxOJXiD7LUr4n4KYuM8ZXH1E+njeRu/Od6AoTIiVOq41myjxg21C2pXUNmPSs X-Received: by 2002:a17:906:fc1a:: with SMTP id ov26mr23133402ejb.226.1591116034372; Tue, 02 Jun 2020 09:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591116034; cv=none; d=google.com; s=arc-20160816; b=li8VH/SxdS82D0UWXoW9kpooIXunkaBhbr+XHqSKwSVuqTNoAqf00Hf5QlXIPdURMp 8u7Mayb7yWV0wHo5hpGgE1M83bNZf9/8h8OdiGM0vXHPdb4th6QFrkbBjZRFTF4VefUk SoIR1XBh4IdilGUI1LPamY/ayY2YhJtPWavGDsD3Om1Jfit5JE2NaL8RPs9pR5ztSfkO dW9olzcacz0CEcf7xbjA/GJkSxxOa6X7puiZvdWf9h/JTHYQ3tzTHinh2RbeZ6XWAE/z qAeqkM+rxjrfbxn+1eafu7R+OLPk9ATx5MNR+hK+TqsvJdaXGS1DAfF781sylBxZV6gh FK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=hHqD35umcQO2huEjb9WL/Ckh3jB+GYgIq0lk1r/iSMI=; b=X5MZY/J/5zEr7W5GXz5NWDOQVnYx3002XxHl52n7rBnhn9/wUg3g/3YbYR3iEcgWtw 7O6vm0JQDA38hF9nFz46QLbv+kULnQU66hFcOswBIgOq2tb7D3/I4qiVbqYFHJFSxnXt c1U1exa9cVzSAjLRgOOv67W/M7vgELADxA41UGXAZY2NO6PCytoXxXAjXNJHmGE/7Qw4 trh6QgBMrVg87HZt0OlyDMq/+0MJJfjJE339fvqvFjuUq55lN43jRz4PWXVrVCNeQ1as PwFsFtW64YuK/KQUH5keVZ/VK0cXHXW+ZmSMMm4Bnq0GypVcO+N7yOBm7Y/DGO7M8Pbt fobA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZLClR7g3; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si1707580ejz.68.2020.06.02.09.40.11; Tue, 02 Jun 2020 09:40:34 -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=@redhat.com header.s=mimecast20190719 header.b=ZLClR7g3; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726485AbgFBQiT (ORCPT + 99 others); Tue, 2 Jun 2020 12:38:19 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:28346 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726112AbgFBQiS (ORCPT ); Tue, 2 Jun 2020 12:38:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591115895; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=hHqD35umcQO2huEjb9WL/Ckh3jB+GYgIq0lk1r/iSMI=; b=ZLClR7g3EsJCHfJCk+bVk2IO+H/pHfomCZlFQS8oDEf5cW+tExgPEOhvAXABf33a80849s eDzjhkX+q6DBBx2zvp3ErXEngLYVvVEANHqX+c/bUjjzV95l3UqA3IIEKaC6dI9r4O8eB6 mkrfI4nmMEhb8Jwg7sD/iXZGXNpMTGI= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-493-bpuo_hGMOQqrxmZubeJuog-1; Tue, 02 Jun 2020 12:38:10 -0400 X-MC-Unique: bpuo_hGMOQqrxmZubeJuog-1 Received: by mail-qt1-f200.google.com with SMTP id t24so14540051qtj.15 for ; Tue, 02 Jun 2020 09:38:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=hHqD35umcQO2huEjb9WL/Ckh3jB+GYgIq0lk1r/iSMI=; b=ZY5oks8lW1lIZ80mMlksDsrVTWM6rlnxmZDSjxUhx6wZQmTUdSny47C/1b3lPJPhYP 3WvvqfCsyAP5HtJFEHLXgHLZoxTxy3PYpQtt+NL7hu3S1W97KwF98IPR610v+WhGaM24 fGn/E/OXcKWbghIHBHy8fEQW5m8DdcTcpWJGk/ZbIHbXfSk6v1BWzozAOlbv9jXHr4go fQOugLpz/Avj9O6YjiD8ICTVg/iwRGAk0Z8UBN0x8Oc9nPmkdeoa319+hoo/DSS6ZCou Wz01Z4LDQC9o0jcGWuqAtH/PJxPnvU4q0oj1kbEbxfuLQyf8LK0Mqgo0V26s3+tcIcCK E32g== X-Gm-Message-State: AOAM531F6Pf3BwHbs6yg1ZMtwM/g56uksyMa7Ued6TREwlDNB5kDEGqo gHDpPWldShYLEwy6Pv9bRHhox9cYvaXU2LH/ROYthEKzBb2/8oJW2u1nSbjvQINdDge4FCHJJ9k yqXbH90UZYy6EUbNnTTYnOqOF X-Received: by 2002:a37:e205:: with SMTP id g5mr26245745qki.451.1591115889883; Tue, 02 Jun 2020 09:38:09 -0700 (PDT) X-Received: by 2002:a37:e205:: with SMTP id g5mr26245713qki.451.1591115889616; Tue, 02 Jun 2020 09:38:09 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id 70sm2863201qkk.10.2020.06.02.09.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 09:38:08 -0700 (PDT) Date: Tue, 2 Jun 2020 09:38:06 -0700 From: Jerry Snitselaar To: Joerg Roedel Cc: 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: <20200602163806.o5dpj2tpemwdzyiw@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Joerg Roedel , 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 References: <20200414131542.25608-1-joro@8bytes.org> <20200529221623.qc6twmpzryh7nkvb@cantor> <20200601104240.7f5xhz7gooqhaq4n@cantor> <47711845-98ee-95b8-aa95-423a36ed9741@linux.intel.com> <20200602000236.j4m3jvluzdhjngdc@cantor> <20200602142312.GJ14598@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20200602142312.GJ14598@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue Jun 02 20, Joerg Roedel wrote: >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 > I have another hp proliant server now, and reproduced. I will have the patch below tested shortly. Minor change, I switched group->domain to domain since group isn't an argument, and *data being passed in comes from group->domain anyways. >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) >_______________________________________________ >iommu mailing list >iommu@lists.linux-foundation.org >https://lists.linuxfoundation.org/mailman/listinfo/iommu >