mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Tom Lyon <pugs@cisco.com>,
	chrisw@sous-sol.org, iommu@lists.linux-foundation.org,
	dwmw2@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] drivers/pci/intel-iommu.c: errors with smaller iommu widths
Date: Mon, 19 Apr 2010 15:52:23 -0700	[thread overview]
Message-ID: <20100419225223.GD25955@sequoia.sous-sol.org> (raw)
In-Reply-To: <20100419154339.e80b6ef3.akpm@linux-foundation.org>

* Andrew Morton (akpm@linux-foundation.org) wrote:
> On Mon, 19 Apr 2010 14:44:16 -0700
> "Tom Lyon" <pugs@cisco.com> wrote:
> > 
> > When using iommu_domain_alloc with the Intel iommu, the domain address width
> > is always initialized to 48 bits (agaw 2). __This domain->agaw value is then
> > used by pfn_to_dma_pte to (always) build a 4 level page table. __However, not
> > all systems support iommu width of 48 or 4 level page tables. __In particular,
> > the Core i5-660 and i5-670 support an address width of 36 bits (not 39!), an
> > agaw of only 1, and only 3 level page tables.
> > 
> > This version of the patch simply lops off extra levels of the page tables if
> > the agaw value of the iommu is less than what is currently allocated for the
> > domain (in intel_iommu_attach_device). If there were already allocated
> > addresses above what the new iommu can handle, EFAULT is returned.
> > 	Signed-off-by: Tom Lyon <pugs@cisco.com>
> 
> This smells like a 2.6.34 patch.  Do you agree?

I didn't think this effected in-tree code.  Tom hit this while developing
a new user of the iommu interface, whereas the current user (KVM) doesn't
trigger this.

thanks,
-chris

      parent reply	other threads:[~2010-04-19 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 21:44 Tom Lyon
2010-04-19 22:43 ` Andrew Morton
2010-04-19 22:47   ` Tom Lyon
2010-04-19 22:52   ` Chris Wright [this message]

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=20100419225223.GD25955@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=akpm@linux-foundation.org \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pugs@cisco.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

Powered by JetHome