linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Woodhouse, David" <david.woodhouse-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org"
	<joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: "bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org"
	<James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"davidlohr-VXdhtT5mjnY@public.gmane.org"
	<davidlohr-VXdhtT5mjnY@public.gmane.org>,
	"scameron-3C9H9nn4BS4HL6m8NFMY+dBPR1lH4CV8@public.gmane.org"
	<scameron-3C9H9nn4BS4HL6m8NFMY+dBPR1lH4CV8@public.gmane.org>,
	"bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org"
	<bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	"jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org"
	<jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: Re: hpsa driver bug crack kernel down!
Date: Thu, 10 Apr 2014 08:46:28 +0000	[thread overview]
Message-ID: <1397119587.19944.14.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20140410071535.GX13491-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2468 bytes --]

On Thu, 2014-04-10 at 09:15 +0200, Joerg Roedel wrote:
> [+ David, VT-d maintainer ]
> 
> Jiang, David, can you please have a look into this issue?
> 

> > > >> > > > > DMAR:[fault reason 02] Present bit in context entry is clear
> > > >> > > > > dmar: DRHD: handling fault status reg 602
> > > >> > > > > dmar: DMAR:[DMA Read] Request device [02:00.0] fault addr 7f61e000

That "Present bit in context entry is clear" fault means that we have
not set up *any* mappings for this PCI device… on this IOMMU.

> > Yes, specifically (finally done bisecting):
> > 
> > commit 2e45528930388658603ea24d49cf52867b928d3e
> > Author: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> > Date:   Wed Feb 19 14:07:36 2014 +0800
> > 
> >     iommu/vt-d: Unify the way to process DMAR device scope array

This commit is about how we decide which IOMMU a given PCI device is
attached to.

Thus, my first guess would be that we are quite happily setting up the
requested DMA maps on the *wrong* IOMMU, and then taking faults when the
device actually tries to do DMA.

However, I'm not 100% convinced of that. The fault address looks
suspiciously like a true physical address, not a virtual bus address of
the type that we'd normally allocate for a dma_map_* operation. Those
would start at 0xfffff000 and work downwards, typically.

Do you have 'iommu=pt' on the kernel command line? Can I see the full
dmesg as this system boots, and also a copy of the DMAR table?


We should also rate-limit DMA faults, which would avoid the lockup
failure mode. Bjorn, what should an IOMMU driver *do* when it detects
that a device is creating an endless stream of DMA faults and isn't
aborting the transaction?

I can set it to silent so that it just stops *reporting* the DMA faults
for that device... and I suppose I can re-enable them when I next see a
DMA mapping for it (although actually it'd be better to have a hook to
do that on FLR or something like that). But there must be a better
answer than that, surely? And I don't want to hack it up locally in
*one* specific IOMMU driver, any more than I have to.

On a POWER system with EEH, the kernel would end up isolating the
offending device completely, and subsequently resetting it...

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org                              Intel Corporation

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3437 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2014-04-10  8:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140409023935.GE11839@dhcp-16-105.nay.redhat.com>
     [not found] ` <1397083799.2608.20.camel@buesod1.americas.hpqcorp.net>
2014-04-09 23:08   ` hpsa driver bug crack kernel down! James Bottomley
2014-04-09 23:10     ` James Bottomley
2014-04-09 23:40       ` Davidlohr Bueso
2014-04-09 23:50         ` James Bottomley
2014-04-10  0:19           ` Davidlohr Bueso
     [not found]             ` <1397089180.2608.27.camel-5JQ4ckphU/8SZAcGdq5asR6epYMZPwEe5NbjCUgZEJk@public.gmane.org>
2014-04-10  4:03               ` Bjorn Helgaas
2014-04-10  6:32                 ` Davidlohr Bueso
     [not found]                   ` <1397111557.2608.29.camel-5JQ4ckphU/8SZAcGdq5asR6epYMZPwEe5NbjCUgZEJk@public.gmane.org>
2014-04-10  7:15                     ` Joerg Roedel
     [not found]                       ` <20140410071535.GX13491-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-04-10  8:46                         ` Woodhouse, David [this message]
     [not found]                           ` <1397119587.19944.14.camel-Fexsq3y4057IgHVZqg5X0TlWvGAXklZc@public.gmane.org>
2014-04-10 15:14                             ` Bjorn Helgaas
2014-04-10 15:34                               ` Woodhouse, David
2014-04-10 15:36                               ` Linda Knippers
2014-04-10 16:19                             ` Davidlohr Bueso
2014-04-10 16:30                               ` Woodhouse, David
2014-04-11  9:18                               ` Woodhouse, David
     [not found]                                 ` <1397207932.19944.58.camel-Fexsq3y4057IgHVZqg5X0TlWvGAXklZc@public.gmane.org>
2014-04-14 15:45                                   ` Davidlohr Bueso
     [not found]                                     ` <1397490358.31076.6.camel-5JQ4ckphU/8SZAcGdq5asR6epYMZPwEe5NbjCUgZEJk@public.gmane.org>
2014-04-14 16:19                                       ` Jiang Liu
     [not found]                                         ` <534C0AA9.5080909-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-04-14 16:44                                           ` Davidlohr Bueso
     [not found]                                             ` <1397493858.31076.8.camel-5JQ4ckphU/8SZAcGdq5asR6epYMZPwEe5NbjCUgZEJk@public.gmane.org>
2014-04-14 16:47                                               ` Davidlohr Bueso
2014-04-14 17:03                                                 ` Woodhouse, David
     [not found]                                                   ` <1397495030.19944.198.camel-Fexsq3y4057IgHVZqg5X0TlWvGAXklZc@public.gmane.org>
2014-04-16 13:37                                                     ` joro-zLv9SwRftAIdnm+yROfE0A
2014-04-16 13:58                                                       ` Woodhouse, David
2014-04-16 14:13                                                         ` joro
2014-04-14  7:01                               ` Jiang Liu
2014-04-14  8:57                               ` Jiang Liu
     [not found]                                 ` <534BA30B.5040102-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-04-14 18:08                                   ` Davidlohr Bueso
2014-04-10 20:45                   ` scameron
     [not found]                     ` <20140410204525.GC21815-3C9H9nn4BS4HL6m8NFMY+dBPR1lH4CV8@public.gmane.org>
2014-04-10 23:17                       ` Shuah Khan
     [not found]                         ` <CAKocOONaqGAaiesf_MUFXEOMDtX8R8kYuPQYAxLBfth7nAx3Jg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-11  8:57                           ` David Woodhouse
     [not found]                 ` <CAErSpo4H=hcro8sMnt2MzDDVCROpASuUTQWBw37OxodHTyOfyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-10  8:34                   ` Jiang Liu
     [not found]                     ` <53465781.4010904-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-04-10 15:54                       ` Davidlohr Bueso
2014-04-10 16:02                       ` Davidlohr Bueso
2014-04-11  1:34                       ` Baoquan He
2014-04-11  3:14                       ` Baoquan He

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=1397119587.19944.14.camel@shinybook.infradead.org \
    --to=david.woodhouse-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
    --cc=bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=davidlohr-VXdhtT5mjnY@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=scameron-3C9H9nn4BS4HL6m8NFMY+dBPR1lH4CV8@public.gmane.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;
as well as URLs for NNTP newsgroup(s).