mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Faidon Liambotis <paravoid@debian.org>
Cc: linux-kernel@vger.kernel.org,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	iommu@lists.linux-foundation.org,
	David Woodhouse <David.Woodhouse@intel.com>
Subject: Re: [regression, bisected] fails to boot on Dell Optiplex 760 with VT-d enabled
Date: Mon, 17 Aug 2009 16:11:56 -0700	[thread overview]
Message-ID: <20090817231156.GJ24885@sequoia.sous-sol.org> (raw)
In-Reply-To: <4A89CB52.4030008@debian.org>

* Faidon Liambotis (paravoid@debian.org) wrote:
> I am experiencin a bug on an Dell Optiplex 760 with a configuration that
> has an Intel Core2 Q9550 CPU and with an up-to-date BIOS, version A03.
> 
> When "VT for Direct I/O" is enabled in the BIOS, v2.6.30 boots and works
> perfectly, while v2.6.31-rc1..rc6 fail (both of them x86-64).

AFAIK, this platform is broken when VT-d is enabled.
Can you add this patch to a broken kernel and retest?
Please boot with 'debug' on the kernel command line.

 drivers/pci/dmar.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 7b287cb..40f497b 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -631,6 +631,18 @@ int alloc_iommu(struct dmar_drhd_unit *drhd)
 	}
 	iommu->cap = dmar_readq(iommu->reg + DMAR_CAP_REG);
 	iommu->ecap = dmar_readq(iommu->reg + DMAR_ECAP_REG);
+	ver = readl(iommu->reg + DMAR_VER_REG);
+	printk(KERN_DEBUG "IOMMU %llx: ver %d:%d cap %llx ecap %llx\n",
+		(unsigned long long)drhd->reg_base_addr,
+		DMAR_VER_MAJOR(ver), DMAR_VER_MINOR(ver),
+		(unsigned long long)iommu->cap,
+		(unsigned long long)iommu->ecap);
+
+	if (ver == (u32)-1 || iommu->cap == (u64)-1 || iommu->ecap == (u64)-1) {
+		printk(KERN_ERR "IOMMU: BIOS or hardware problem, disabling "
+			"VT-d\n");
+		goto error;
+	}
 
 #ifdef CONFIG_DMAR
 	agaw = iommu_calculate_agaw(iommu);
@@ -664,13 +676,6 @@ int alloc_iommu(struct dmar_drhd_unit *drhd)
 		}
 	}
 
-	ver = readl(iommu->reg + DMAR_VER_REG);
-	pr_debug("IOMMU %llx: ver %d:%d cap %llx ecap %llx\n",
-		(unsigned long long)drhd->reg_base_addr,
-		DMAR_VER_MAJOR(ver), DMAR_VER_MINOR(ver),
-		(unsigned long long)iommu->cap,
-		(unsigned long long)iommu->ecap);
-
 	spin_lock_init(&iommu->register_lock);
 
 	drhd->iommu = iommu;

  parent reply	other threads:[~2009-08-17 23:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-17 21:27 Faidon Liambotis
2009-08-17 22:17 ` David Woodhouse
2009-08-17 22:59   ` Faidon Liambotis
2009-08-17 23:11 ` Chris Wright [this message]
2009-08-17 23:22   ` Faidon Liambotis
2009-08-17 23:29     ` Chris Wright

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=20090817231156.GJ24885@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=David.Woodhouse@intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paravoid@debian.org \
    --cc=suresh.b.siddha@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

all inboxes | Powered by JetHome®