From: Grant Grundler <grundler@parisc-linux.org>
To: Dirk Hohndel <hohndel@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Arjan van de Ven <arjan@infradead.org>
Subject: Re: git-latest: kernel oops in IOMMU setup
Date: Thu, 8 Jan 2009 14:41:16 -0700 [thread overview]
Message-ID: <20090108214116.GB20506@colo.lackof.org> (raw)
In-Reply-To: <20090108120538.0176d348@infradead.org>
On Thu, Jan 08, 2009 at 12:05:38PM -0800, Dirk Hohndel wrote:
>
> latest git from Linus. On a Thinkpad x200s with VT-d enabled (if I
> disable VT-d, this of course goes away).
>
> The oops happens very early during boot in device_to_iommu (called
> from domain_context_mapping_one).
>
> Looking at the code dump and the disassembled function here's where
> the error happens:
>
> static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)
> {
> struct dmar_drhd_unit *drhd = NULL;
> int i;
>
> for_each_drhd_unit(drhd) {
> if (drhd->ignored)
> continue;
>
> for (i = 0; i < drhd->devices_cnt; i++)
> if (drhd->devices[i]->bus->number == bus &&
> --> drhd->devices[0] is NULL
> drhd->devices[i]->devfn == devfn)
> return drhd->iommu;
>
>
> Given how early this happens it's a little hard to provide logs, etc. I
> literally used delay_boot=100 and wrote things down by hand (forgot my
> digital camera) and then added printk's to verify).
>
> please let me know what other data I should collect.
If you can, a back trace. Basically just need to know which caller
is tripping over this. But there can't be that many callers and they
are all in this file:
0 intel-iommu.c device_to_iommu 431 static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)
1 intel-iommu.c domain_context_mapping_on 1471 iommu = device_to_iommu(bus, devfn);
2 intel-iommu.c domain_context_mapped 1593 iommu = device_to_iommu(pdev->bus->number, pdev->devfn);
3 intel-iommu.c domain_remove_dev_info 1684 iommu = device_to_iommu(info->bus, info->devfn);
4 intel-iommu.c vm_domain_remove_one_dev_ 2773 iommu = device_to_iommu(pdev->bus->number, pdev->devfn);
5 intel-iommu.c vm_domain_remove_one_dev_ 2803 if (device_to_iommu(info->bus, info->devfn) == iommu)
6 intel-iommu.c vm_domain_remove_all_dev_ 2836 iommu = device_to_iommu(info->bus, info->devfn);
7 intel-iommu.c intel_iommu_attach_device 3023 iommu = device_to_iommu(pdev->bus->number, pdev->devfn);
so it should be possible to figure out which one is called
before the dev is setup. It's unlikely to be anything with
"remove" in the name. :)
My guess is it's intel_iommu_attach_device being called "too early".
hth,
grant
hth,
grant
>
> The system ran fine with the 2.6.28 release kernel.
>
> /D
>
> --
> Dirk Hohndel
> Intel Open Source Technology Center
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-08 21:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 20:05 Dirk Hohndel
2009-01-08 21:41 ` Grant Grundler [this message]
2009-01-08 21:56 ` Dirk Hohndel
2009-01-09 0:58 ` Han, Weidong
2009-01-09 2:05 ` Dirk Hohndel
2009-01-09 4:52 ` Dirk Hohndel
2009-01-09 6:53 ` Han, Weidong
2009-01-09 15:08 ` Dirk Hohndel
2009-01-09 16:16 ` Zhao, Yu
2009-01-09 16:34 ` Dirk Hohndel
2009-01-09 16:45 ` Zhao, Yu
2009-01-09 16:55 ` Dirk Hohndel
2009-01-09 16:58 ` [PATCH] Prevent oops at boot with VT-d Dirk Hohndel
2009-01-11 15:25 ` [Resend][PATCH] " Dirk Hohndel
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=20090108214116.GB20506@colo.lackof.org \
--to=grundler@parisc-linux.org \
--cc=arjan@infradead.org \
--cc=hohndel@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®