From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753140AbcIIIuN (ORCPT ); Fri, 9 Sep 2016 04:50:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42230 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146AbcIIIuJ (ORCPT ); Fri, 9 Sep 2016 04:50:09 -0400 Date: Fri, 9 Sep 2016 16:50:05 +0800 From: Baoquan He To: Joerg Roedel Cc: sony.chacko@qlogic.com, Dept-HSGLinuxNICDev@qlogic.com, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, netdev@vger.kernel.org, dyoung@redhat.com Subject: Re: [PATCH] bnx2: Reset device during driver initialization Message-ID: <20160909085005.GG11356@x1.redhat.com> References: <1473408667-7107-1-git-send-email-bhe@redhat.com> <20160909082225.GE11356@x1.redhat.com> <20160909084106.GY1437@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160909084106.GY1437@8bytes.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 09 Sep 2016 08:50:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/09/16 at 10:41am, Joerg Roedel wrote: > > Hi Baoquan, > > On Fri, Sep 09, 2016 at 04:22:25PM +0800, Baoquan He wrote: > > Recently I tried to fix the kdump failure in amd iommu system again, and > > now the latest code works, IO_PAGE_FAULT can't be seen any more. But on > > several amd iommu system with bnx2 NIC, always IO_PAGE_FAULT will be > > printed out. After investegating I found out bnx2 driver doesn't reset > > hardware/reg like other pci device, it does the reset job in bnx2_open > > which is the net device up stage. So with this patch the IO_PAGE_FAULT > > is away too on the system with bnx2 NIC. I will > > > > However when I got a intel system with vt-d and bnx2 NIC, kdump works > > well, and no any error message can be seen. From code it clearly shows > > the domain assignment is done in __intel_map_single, at this time bnx2 > > driver hasn't reset device, the on-flight DMA should still exist. Do you > > have any idea on this? Or I missed anything? I also deferred the > > set_dte_entry calling to __map_single calling, the principal should be > > similar. > > Did you make sure that all unity-mappings are in place in the newly > assigned domain for the bnx2 device before domains are switched? About unity-mappings, are you saying it for intel iommu or amd iommu? For amd iommu, I just skip call set_dte_entry calling during iommu device init stage. Then in device init stage, namely __map_single, judge and call set_dte_entry there to install the new pt_root into the related dev table entry. Thought you mention it, let me look into the unity-mappings of amd iommu again. Thanks a lot!