All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Brian Bloniarz <phunge0@hotmail.com>,
	Charles Butterfield <charles.butterfield@nextcentury.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stefan Becker <chemobejk@gmail.com>,
	Yinghai Lu <yinghai@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 3/3] PCI: allocate bus resources from the top down
Date: Wed, 15 Sep 2010 16:45:54 -0700	[thread overview]
Message-ID: <4C915AB2.9090203@zytor.com> (raw)
In-Reply-To: <201009151644.38563.bjorn.helgaas@hp.com>

On 09/15/2010 03:44 PM, Bjorn Helgaas wrote:
> 
> I'd like to do that, but I don't see a good way to do it yet.
> 
> We saw the problem on a T3500, a T3400, and a T4500, and I'm sure there
> are others.  So I don't know how to identify the affected machines.
> 
> And I don't know how to identify the invalid ranges, because I suspect
> it depends on the memory size.  I think it would be quite unusual for
> a window to start 1MB under the nice 256MB boundary, but I'm not sure
> I'm ready to say that's always illegal.
> 
> On these machines, the [mem 0xbff00000-0xbfffffff] area is actually
> reported as reserved in the E820 map, and I first thought we could
> simply rely on that.  But I'm not really comfortable with that either,
> because I don't think there's a dependable relationship between those
> E820 entries and ACPI and PCI devices.  For one thing, I experimented
> with Windows, and it happily places PCI devices in reserved areas,
> and I think we're likely to trip over more BIOS bugs if we rely on
> something Windows doesn't.
> 
> I suspect Windows would blow up, too, if we could somehow fill up the
> rest of the window and force it to allocate the bottom.  But since
> it's only a 1MB area, I think that would be very difficult to do
> unless there's some way to tweak PCI BARs before booting Windows.
> 

If we put PCI devices in E820 RESERVED areas that's a bug, plain and
simple.  We should absolutely not doing so!

To some degree I don't care if Windows does or not ... that is the
documented mechanism for reserving address space, and we should respect
that.  Furthermore, we use the same mechanism internally for reserving
address space.

Furthermore, the only potentially bad outcome is reserving excessive
address space, which is in general safer than the opposite.

So let's just fix this.

	-hpa

  reply	other threads:[~2010-09-15 23:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100915210818.12365.58732.stgit@bob.kio>
2010-09-15 21:09 ` [PATCH 1/3] x86/PCI: allocate space from the end of a region, not the beginning Bjorn Helgaas
2010-09-15 21:09 ` [PATCH 2/3] resources: allocate space within a region from the top down Bjorn Helgaas
2010-09-15 21:09 ` [PATCH 3/3] PCI: allocate bus resources " Bjorn Helgaas
2010-09-15 21:50   ` H. Peter Anvin
2010-09-15 22:44     ` Bjorn Helgaas
2010-09-15 23:45       ` H. Peter Anvin [this message]
2010-09-16 17:04         ` Bjorn Helgaas
2010-09-16 17:44           ` H. Peter Anvin
2010-09-16 19:33             ` Yinghai Lu
2010-09-16 20:02               ` H. Peter Anvin

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=4C915AB2.9090203@zytor.com \
    --to=hpa@zytor.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=charles.butterfield@nextcentury.com \
    --cc=chemobejk@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=phunge0@hotmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yinghai@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.