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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 89FD5C433DF for ; Tue, 2 Jun 2020 21:17:32 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 27F482072F for ; Tue, 2 Jun 2020 21:17:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Kha5ZPT9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27F482072F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BC9D62324E; Tue, 2 Jun 2020 21:17:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z3Fq1Ph6+WoT; Tue, 2 Jun 2020 21:17:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 381A922EE6; Tue, 2 Jun 2020 21:17:30 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 29C3FC0178; Tue, 2 Jun 2020 21:17:30 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id E50AAC016E for ; Tue, 2 Jun 2020 21:17:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CC17088415 for ; Tue, 2 Jun 2020 21:17:28 +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 fKRM1CcLtS5f for ; Tue, 2 Jun 2020 21:17:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by hemlock.osuosl.org (Postfix) with ESMTPS id 8A8CD883F6 for ; Tue, 2 Jun 2020 21:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591132646; 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=Kha5ZPT9qd30aZRPGuurt2WrcSYCkMFZPufcY6BHoeZ7XUux4APccxEq2JYaBYT43Nkntu OW1DHvd4bljRH+Phw4QJGXQsUSTwUDUxvvC/CzrHNQv6nfU7S4ujBmMSv4rKW/9F6vQa9S Xp1EVPNXFj1yZV+8DZ1EcS3/25DkfeM= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-58-cSGuMpSPPfeE3S6Dly7aSw-1; Tue, 02 Jun 2020 17:17:20 -0400 X-MC-Unique: cSGuMpSPPfeE3S6Dly7aSw-1 Received: by mail-qt1-f199.google.com with SMTP id e44so15457688qta.9 for ; Tue, 02 Jun 2020 14:17:20 -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=bbj3p9/I4OZE/XDCqVrFlWQe2cwAZ/JlKbhRejihZKb4PSrl//8nMXKYFjmw5q/O+H tZLvfTn1qv0WwCQOssk9aG3bRXlteuPYWPcTO60kkKUGTboAsiJUUIbzGnvgFEclfEZL 1z1RQ2gdE4ZbWjChJCNyiwrcrGMV2JFhwlk+Ay2Is0MDzkJongmrDNW7k1jqqVt6/N72 /CU+f8goKa79CDWbTpRn9NTaZWapDwhKw8zCiVFnYhLV2yf+A1k7ycUa7VIGakkF1dBR dzVJXZfue1Oo4kL4CGmRjSjzXee1PKhROFECw47W5LL0RKQG+CptJ8zqkJecqjWvY11F VQZQ== X-Gm-Message-State: AOAM532rfJaqKaR32+nHm2h8/B5wG3n5WhH97sgVjgdk/sAhfEM46PLa 8PZwQaxCuRvZaIkCv/44TJkc72+h1r5BsiF0cqbC46spyua9u76p5kCA7k5KTlqpMpdYZ8Uvop6 HFlV7iP4aP2Afy/ALMqJOcT3n/GU+5A== X-Received: by 2002:ad4:4572:: with SMTP id o18mr4280459qvu.228.1591132639428; Tue, 02 Jun 2020 14:17:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjUlzm0vhI6fKGjvvF8hVsaVisMes9o90lVEfQF4r2oAsbB6iugyCZPUzy6UK1t6uFVWKiBA== 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> 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 In-Reply-To: <20200602163806.o5dpj2tpemwdzyiw@cantor> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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: , Reply-To: Jerry Snitselaar Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 >> _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu