public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Li, ZhenHua" <zhen-hual@hp.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linda Knippers <linda.knippers@hp.com>
Subject: Re: [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel
Date: Wed, 20 Aug 2014 17:54:43 +0800	[thread overview]
Message-ID: <53F47063.7070800@hp.com> (raw)
In-Reply-To: <20140819110239.GA16329@8bytes.org>


On my system, error message:
[    4.322008] dmar: DRHD: handling fault status reg 2
[    4.327484] dmar: DMAR:[DMA Read] Request device [21:00.0] fault addr 
fff66000
[    4.327484] DMAR:[fault reason 01] Present bit in root entry is clear

fault happens on device : 21:00.0

To describe this problem clearly, we mark two time points:
A: Just before dump kernel init the DMAR/IOMMU structures.
B: Just after DMAR/IOMMU finished initialization.
C: Just before  21:00.0

When the first kernel crashed, then the dump kernel will boot.
Then there comes a DMA request on  21:00.0 when durting A to C. And this 
will cause this error.

If I clear the root entry table when iommu structure is allocted, this 
error will not happen during A to B, but still can be seen during B and 
C.  I guess the cause is the un-expected DMA request.

I will apply Bill Sumner's patch to see whether it will cause the errors 
disappear.


-- Zhenhua

On 08/19/2014 07:02 PM, Joerg Roedel wrote:
> On Mon, Aug 18, 2014 at 11:27:01PM +0000, Li, Zhen-Hua wrote:
>> : [fault reason 01] Present bit in root entry is clear
>> It appears when iommu initializing in the kdump kernel.
>
> Hmm, do you have an explanation how this can happen? From how I read the
> code, the kdump kernel disables translation on the IOMMU, then sets a
> new root entry, and then re-enabled translation. To me it looks like
> there is no point in time where translation is enabled and the
> root-entry is clear (present-bit==0).
>
> But obviously I am missing something if you see the message above.
>
> Btw, have you looked into this patch-set posted earlier this year:
>
> 	https://lkml.org/lkml/2014/4/24/836
>
> It approaches the same problem-space, but also cares about in-flight
> DMA.
>
>
> 	Joerg
>


  reply	other threads:[~2014-08-20  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  8:59 [PATCH 1/1] iommu/vt-d : clear old root entry for dump kernel Li, Zhen-Hua
2014-08-18 23:01 ` Li, Zhen-Hua
2014-08-18 23:23   ` Joerg Roedel
2014-08-18 23:27     ` Li, Zhen-Hua
2014-08-19 11:02       ` Joerg Roedel
2014-08-20  9:54         ` Li, ZhenHua [this message]
2014-08-18 23:47     ` Li, Zhen-Hua
2014-08-18 23:59       ` Li, Zhen-Hua
2014-08-19  5:49         ` Li, ZhenHua

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=53F47063.7070800@hp.com \
    --to=zhen-hual@hp.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linda.knippers@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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