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 559C6C433DF for ; Tue, 2 Jun 2020 16:38:21 +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 14731206C3 for ; Tue, 2 Jun 2020 16:38:20 +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="ReaM5w19" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14731206C3 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 9E8F4204D7; Tue, 2 Jun 2020 16:38:20 +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 DgTawyox4ATx; Tue, 2 Jun 2020 16:38:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 1347B20773; Tue, 2 Jun 2020 16:38:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 03CE7C0865; Tue, 2 Jun 2020 16:38:20 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 853E8C016E for ; Tue, 2 Jun 2020 16:38:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 79DFE867C6 for ; Tue, 2 Jun 2020 16:38:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R4x9TozZ3nlf for ; Tue, 2 Jun 2020 16:38:17 +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 [207.211.31.81]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 854378658A for ; Tue, 2 Jun 2020 16:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591115896; 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=ReaM5w19lpFOo9+RfsXq7dFeZ9bWvhu14kG2nAWplJp0ePFumtaL4uls9p1uPD6u/j3VBa vh6+j4NPJujFXrqqkiiaCLBFCnCcGmZ5Ltgprb00h8L31BJ8WLg15qHR8OU5zwECz5WUm9 /pLgzynC4eaUES6YKgX5jfe3cMBhDYg= 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-493-uyxsbk3yNX68ETXwhfGbwA-1; Tue, 02 Jun 2020 12:38:10 -0400 X-MC-Unique: uyxsbk3yNX68ETXwhfGbwA-1 Received: by mail-qt1-f197.google.com with SMTP id y25so14527039qtb.6 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=bV63gU6dBIhc1BLqxR9gjrhf0sO3eBu8QilB8eXWrVMuKRQtQwbbIaParq1xKRVw4a 39VMKk5GZLzBHnm83yOJgDIJ+7JRYTkouwYCNdhyaejP6H1S3Du1Ep8sXAf70ucaW5zl 1GjaGDkNDNTObYD1DqaEiSdtNasf3+/lj5bFgrErdlGlUf90uaR5+oSJOwsV9p72xmcR oy8gc0pcjMl4virdV9/S7hC0Rl55GpVvl/OUZ9ieLSk1VN9jYW3xh8d+2JRtHiN/5OLh WK5suVmjWtd09UWsNCCDrWAXsM2gYrjrC0++MD3M5rhYW6upmNVgeYUSJ9AL/8QjLHdo /Opg== X-Gm-Message-State: AOAM533M4qT+gNfKaSr8J4UjFRWDnwLzYrKCaNZpdnEI1NfZhjGXLbTS JuyIbemGmXz7kJvduEKXoMuByxEpRbFdyZBZ7V5lJHgT6St1fWYukOCH2aU3zHOgW7NjiQD8Rxs SY3zY8sx+Tqu8tgG209b0034KHqRhZA== X-Received: by 2002:a37:e205:: with SMTP id g5mr26245746qki.451.1591115889883; Tue, 02 Jun 2020 09:38:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEHwB8sZ6GJqYFOX4Dc4L1exr5Cive5nf+jzBOew3IuxjQdOjd9lAvq/gnZam2w9pqVYc4MQ== 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 Subject: Re: [PATCH v2 00/33] iommu: Move iommu_group setup to IOMMU core code Message-ID: <20200602163806.o5dpj2tpemwdzyiw@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> MIME-Version: 1.0 In-Reply-To: <20200602142312.GJ14598@8bytes.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: Heiko Stuebner , virtualization@lists.linux-foundation.org, linux-tegra@vger.kernel.org, Thierry Reding , Will Deacon , Jean-Philippe Brucker , linux-samsung-soc@vger.kernel.org, iommu@lists.linux-foundation.org, Krzysztof Kozlowski , Jonathan Hunter , linux-rockchip@lists.infradead.org, Andy Gross , linux-s390@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , Bjorn Andersson , Gerald Schaefer , David Woodhouse , linux-kernel@vger.kernel.org, Kukjin Kim , Robin Murphy 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, 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 > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu