Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1590267ybg; Tue, 2 Jun 2020 14:19:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRbeO1AcIdrLWlO+2zrOut/jpOTcb5Wbusa1/QwIgp6JDptg0xdvKjZ/tJ3jn/fKeGnSfS X-Received: by 2002:a17:906:7a19:: with SMTP id d25mr25852994ejo.333.1591132773803; Tue, 02 Jun 2020 14:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591132773; cv=none; d=google.com; s=arc-20160816; b=po6RS/lbrcr+vKHmDwsYAW6Km6Wnft0xRqSNt8KEXEasWxstL7XuVzAJCsmjDPQyZK Iz0ZC7qRWv+y23OcO47tGg0vdfZuHICRTGxDjLCbbNCZDGrs8UqsXRYg4nlQ5zBWGbXQ RQJQK0yMDPesTe3fvlWQpFGO7KExLW7wa9Zyhsha7CLrSYieATTISAjtC2GR828XgWtO MaXrLCGXXsbUTwj6qj5omnYx8N09y5uywDu8ppl0V/8YRSd9328ldYNktKmQwDjxNg5p 6+VThTiVIR1WwL4V0W4ikWf8GJlkA7vaheYALKufv9qp2myAd4Qza9eem0du1lLB5VcP 26nA== 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:to:from:date:dkim-signature; bh=Ylu/HiOGtyIh3U7JFEU/kaSkFMIS4f2I77a/faIj58k=; b=LQROolVcScQwih5bgWdQLERFJjkr7gGQxUaKhtHrBseQsoOT2ALILnlsxgXmp1o2BE I80pn8wKSiayHvlGtGGGHk/qau/Z7MUWSsPIKfAb9ygtoHtdMG4fUk3qG26Jc27uvm+3 sH8PZj7aw81VLrZniDjEGjDzjZvPzic/fZc4QeDqxmili12GcHL5zCgAXA+11ArJxT1c Y193tQWUFkFWMQ14+JPpXf2nj9FKthN2kuq3rtM/X86bCMAGsm0TmsWyNy/xcqI2HMw2 jA5inNTrJFZ9DJI/isj8dpbNWkFq9iMXcY5JRhgu9RkrgJYm0zLhLTZqwcKDVbq19CYr g5Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=apb7WPvj; 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 bm5si2228979edb.332.2020.06.02.14.19.10; Tue, 02 Jun 2020 14:19:33 -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=apb7WPvj; 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 S1726809AbgFBVR2 (ORCPT + 99 others); Tue, 2 Jun 2020 17:17:28 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26352 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726130AbgFBVR1 (ORCPT ); Tue, 2 Jun 2020 17:17:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591132645; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=Ylu/HiOGtyIh3U7JFEU/kaSkFMIS4f2I77a/faIj58k=; b=apb7WPvjn+ZpTogqKQgf9Q3eOWQwpMH0QjPyM1BP286Lp273Jz2xnmcrh9sgyocbVJ+kAY ehOXabtgSFgqZkkPeyxZWPFSiIwQOGp31x+7Eui7MK33yC+VwO0C6GwjN2yu9klyEGjXmH hRLyBBrzxCvoKZBP9/ZeYKm6NynvMX8= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-433-Y0KdISfAOl6JRevfkZiXaw-1; Tue, 02 Jun 2020 17:17:20 -0400 X-MC-Unique: Y0KdISfAOl6JRevfkZiXaw-1 Received: by mail-qt1-f197.google.com with SMTP id q21so8902333qte.17 for ; Tue, 02 Jun 2020 14:17:19 -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:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=Ylu/HiOGtyIh3U7JFEU/kaSkFMIS4f2I77a/faIj58k=; b=D6hQh5hBnT45igA0T9L76YkiDGbjzJRX6jyeAq3JRDG8m4eVt72WKDCwrDhdEih7A4 n6oanZzsnwNSutk88c87W6SbXKaOssYQZbPWQro4LZE8dAz8D0cSIJwAflwqqL8IkcR8 GrF5lTJ40FsGPZELMvaIGmUsNJFsHxfIW5wsJbqbCLkl9vwB3L/wAo7LeOKukNXpEhYt javMMYQNj4FnNsfkYxs0oyI0Yju3wXeBoqApIH9DDmI9jBJ764opqPkxm2wPqW5QTJsn eYGTNDm8N3cG5k0gEMVmK1GZziJMeXZsPSGLwYzBXdy3vZLGCc0ly4vnU21qPDOK+tzY wytg== X-Gm-Message-State: AOAM533zYzUVt81KY+x7t7fpcsOv3rjCDAJmlsM1MDaV1+2wpIXvIXu/ QRuWWvjBeP7g0c3jA6YCsRiceWgg0DpK+83ZneYSyundm/sSRNQTdBKvEMBiPy/l8fBwoXPLdgg umISdbcvo7gwsf3oWCtQy0ahL X-Received: by 2002:ad4:4572:: with SMTP id o18mr4280449qvu.228.1591132639423; Tue, 02 Jun 2020 14:17:19 -0700 (PDT) X-Received: by 2002:ad4:4572:: with SMTP id o18mr4280428qvu.228.1591132639109; Tue, 02 Jun 2020 14:17:19 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id l9sm3244877qki.90.2020.06.02.14.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 14:17:18 -0700 (PDT) Date: Tue, 2 Jun 2020 14:17:16 -0700 From: Jerry Snitselaar 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 Subject: Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code Message-ID: <20200602211716.mcwacflxvh7kycya@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> <20200602163806.o5dpj2tpemwdzyiw@cantor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20200602163806.o5dpj2tpemwdzyiw@cantor> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue Jun 02 20, Jerry Snitselaar wrote: >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. > Looks like it solves problem for both the epyc system, and the hp proliant server, >>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 >>