linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Davidlohr Bueso <davidlohr@hp.com>,
	"Woodhouse, David" <david.woodhouse@intel.com>
Cc: "joro@8bytes.org" <joro@8bytes.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bhe@redhat.com" <bhe@redhat.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"James.Bottomley@hansenpartnership.com"
	<James.Bottomley@hansenpartnership.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"scameron@beardog.cce.hp.com" <scameron@beardog.cce.hp.com>
Subject: Re: hpsa driver bug crack kernel down!
Date: Mon, 14 Apr 2014 15:01:07 +0800	[thread overview]
Message-ID: <534B87B3.1060401@linux.intel.com> (raw)
In-Reply-To: <1397146781.2608.46.camel@buesod1.americas.hpqcorp.net>

Hi Davidlohr,
	Thanks for the information!
	According to lspci output, device 0000:02:00.2 is HP ILO
controller, device 0000:03:00.0 is RAID controller. Both ILO and
RAID controllers need to access reserved memory range
[0x7f61e000 - 0x7f61ffff] in physical mode.

	According to dmesg output, BIOS has reserved memory and
IOMMU has setup 1:1 mapping for ILO and RAID controller to access
this range. Related log messages as below:
BIOS-e820: [mem 0x000000007f61d000-0x000000008fffffff] reserved
IOMMU: Setting RMRR:
IOMMU: Setting identity map for device 0000:03:00.0 [0x7f61e000 -
0x7f61ffff]
IOMMU: Setting identity map for device 0000:02:00.0 [0x7f61e000 -
0x7f61ffff]
IOMMU: Setting identity map for device 0000:02:00.2 [0x7f61e000 -
0x7f61ffff]
	
	From the screenshot, device 0000:02:00.2 fails to access
memory address 0x7f61e000. That indicates IOMMU driver fails to
setup 1:1 mapping for Reserved Memory Range for ILO controller.
So could you please help to check whether you could observe boot
messages like "IOMMU: Setting identity map for device 0000:02:00.2
[0x7f61e000 - 0x7f61ffff]" with the failure kernel image?

	It would be great if boot messages could be saved when
failing to boot, so we could get more information from log.

	BTW, I have double checked related code, and still can't
find a reliable explanation for the regression:(

Thanks!
Gerry

On 2014/4/11 0:19, Davidlohr Bueso wrote:
> On Thu, 2014-04-10 at 08:46 +0000, Woodhouse, David wrote:
>> 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@linux.intel.com>
>>>> 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? 
> 
> No.
> 
>> Can I see the full
>> dmesg as this system boots, and also a copy of the DMAR table?
> 
> Attaching a dmesg from one of the kernels that boots. It doesn't appear
> to have much of the related information... is there any debug config
> option I can enable that might give you more data?
> 

  parent reply	other threads:[~2014-04-14  7:01 UTC|newest]

Thread overview: 31+ 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>
     [not found]   ` <1397084904.9519.62.camel@dabdike>
     [not found]     ` <1397085044.9519.63.camel@dabdike>
     [not found]       ` <1397086817.2608.25.camel@buesod1.americas.hpqcorp.net>
2014-04-09 23:50         ` hpsa driver bug crack kernel down! James Bottomley
2014-04-10  0:19           ` Davidlohr Bueso
2014-04-10  4:03             ` Bjorn Helgaas
2014-04-10  6:32               ` Davidlohr Bueso
2014-04-10  7:15                 ` Joerg Roedel
2014-04-10  8:46                   ` Woodhouse, David
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
2014-04-14 15:45                         ` Davidlohr Bueso
2014-04-14 16:19                           ` Jiang Liu
2014-04-14 16:44                             ` Davidlohr Bueso
2014-04-14 16:47                               ` Davidlohr Bueso
2014-04-14 17:03                                 ` Woodhouse, David
2014-04-16 13:37                                   ` joro
2014-04-16 13:58                                     ` Woodhouse, David
2014-04-16 14:13                                       ` joro
2014-04-14  7:01                       ` Jiang Liu [this message]
2014-04-14  8:57                       ` Jiang Liu
2014-04-14 18:08                         ` Davidlohr Bueso
2014-04-10 20:45                 ` scameron
2014-04-10 23:17                   ` Shuah Khan
2014-04-11  8:57                     ` David Woodhouse
2014-04-10  8:34               ` Jiang Liu
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=534B87B3.1060401@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=bhe@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=david.woodhouse@intel.com \
    --cc=davidlohr@hp.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=scameron@beardog.cce.hp.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;
as well as URLs for NNTP newsgroup(s).