mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Li, ZhenHua" <zhen-hual@hp.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
	Bjorn Helgaas <bhelgaas@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Joerg Roedel <joro@8bytes.org>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Bruce Allan <bruce.w.allan@intel.com>,
	Carolyn Wyborny <carolyn.wyborny@intel.com>,
	Don Skidmore <donald.c.skidmore@intel.com>,
	Greg Rose <gregory.v.rose@intel.com>,
	Alex Duyck <alexander.h.duyck@intel.com>,
	John Ronciak <john.ronciak@intel.com>,
	Mitch Williams <mitch.a.williams@intel.com>,
	Linux NICS <linux.nics@intel.com>,
	"e1000-devel@lists.sourceforge.net" 
	<e1000-devel@lists.sourceforge.net>,
	linda.knippers@hp.com
Subject: Re: [PATCH 1/1] pci/quirks: fix a dmar fault for intel 82599 card
Date: Wed, 08 Oct 2014 09:46:04 +0800	[thread overview]
Message-ID: <5434975C.9000709@hp.com> (raw)
In-Reply-To: <542EB2A2.3050005@gmail.com>

well,  then I will create a patch for ALL pcie devices.
On 10/03/2014 10:28 PM, Alexander Duyck wrote:
> On 10/02/2014 08:09 AM, Bjorn Helgaas wrote:
>> On Tue, Sep 30, 2014 at 12:15 AM, Li, ZhenHua <zhen-hual@hp.com> wrote:
>>> Add Joerg to CC list. For it is also related to iommu module.
>>>
>>> Joerg,
>>> There was a try for this dmar fault,
>>>          https://lkml.org/lkml/2014/8/18/118
>>>
>>> This patch is trying to fix the same thing.
>>>
>>>
>>> Zhenhua
>>>
>>> On 09/30/2014 02:09 PM, Li, Zhen-Hua wrote:
>>>> On a HP system with Intel Corporation 82599 ethernet adapter, when kernel
>>>> crashed and the kdump kernel boots with intel_iommu=on, there may be some
>>>> unexpected DMA requests on this adapter, which will cause DMA Remapping
>>>> faults like:
>>>>       dmar: DRHD: handling fault status reg 102
>>>>       dmar: DMAR:[DMA Read] Request device [41:00.0] fault addr fff81000
>>>>       DMAR:[fault reason 01] Present bit in root entry is clear
>>>>
>>>> Analysis for this bug:
>>>>
>>>> The present bit is set in this function:
>>>>
>>>> static struct context_entry * device_to_context_entry(
>>>>                  struct intel_iommu *iommu, u8 bus, u8 devfn)
>>>> {
>>>>       ......
>>>>                   set_root_present(root);
>>>>       ......
>>>> }
>>>>
>>>> Calling tree:
>>>> ixgbe_open
>>>>       ixgbe_setup_tx_resources
>>>>           intel_alloc_coherent
>>>>               __intel_map_single
>>>>                   domain_context_mapping
>>>>                       domain_context_mapping_one
>>>>                           device_to_context_entry
>>>>
>>>> This means, the present bit in root entry will not be set until the device
>>>>    driver is loaded.
>>>>
>>>> But in the kdump kernel, some hardware device does not know the OS is the
>>>>    second kernel and the drivers should be loaded again, this causes there
>>>> are
>>>>    some unexpected DMA requsts on this device when it has not been
>>>> initialized,
>>>>    and then the DMA Remapping errors come.
>>>>
>>>> To fix this DMAR fault, we need to reset the bus that this device on.
>>>> Reset
>>>>    the device itself does not work.
>> This seems like something that could happen with *any* device, not
>> just the 82599 NIC.  Or is there something in the "kernel crash ->
>> kexec -> kdump kernel" path that stops DMA for most devices, but not
>> for the 82599?lex
>>
>
> This is an *any* device problem.  Specifically any device that is doing
> active DMA when a kdump kernel is triggered will cause this issue since
> the IOMMU will not have valid mappings for the DMA events until the
> device driver itself is loaded and resets the device.
>
> Thanks,
>
> Alex
>


      reply	other threads:[~2014-10-08  1:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30  6:09 Li, Zhen-Hua
2014-09-30  6:15 ` Li, ZhenHua
2014-10-02 15:09   ` Bjorn Helgaas
2014-10-03 14:28     ` Alexander Duyck
2014-10-08  1:46       ` Li, ZhenHua [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5434975C.9000709@hp.com \
    --to=zhen-hual@hp.com \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=bhelgaas@google.com \
    --cc=bruce.w.allan@intel.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=donald.c.skidmore@intel.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=gregory.v.rose@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=joro@8bytes.org \
    --cc=linda.knippers@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux.nics@intel.com \
    --cc=mitch.a.williams@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome