From: Yinghai Lu <yinghai.lu@oracle.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bjorn.helgaas@hp.com>,
Andy Isaacson <adi@hexapodia.org>,
"R. Andrew Bailey" <bailey@akamai.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
guenter.roeck@ericsson.com,
Linus Torvalds <torvalds@linux-foundation.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Renninger <trenn@suse.de>,
yaneti@declera.com
Subject: Re: [PATCH] x86/PCI: never allocate PCI MMIO resources below BIOS_END
Date: Mon, 26 Apr 2010 14:59:49 -0700 [thread overview]
Message-ID: <4BD60CD5.4060601@oracle.com> (raw)
In-Reply-To: <20100426142546.2e77b1ba@virtuousgeek.org>
On 04/26/2010 02:25 PM, Jesse Barnes wrote:
> On Mon, 26 Apr 2010 14:12:35 -0700
> "H. Peter Anvin" <hpa@zytor.com> wrote:
>
>
>>> On Mon, 26 Apr 2010 14:27:56 -0600
>>> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>>>
>>>> I'm a little concerned that those patches are a sledgehammer approach.
>>>> Previously, IORESOURCE_BUSY has basically been used for mutual exclusion
>>>> between drivers that would otherwise claim the same resource. It hasn't
>>>> been used to guide resource assignment in the PCI/PNP/etc core. Maybe
>>>> it's a good idea to also use IORESOURCE_BUSY there, but I'm not sure.
>>>> Right now it feels like undesirable overloading to me.
>>>>
>>> I guess that's true, removing those regions from the pool entirely
>>> might be better? Or some other, clear way of expressing that the
>>> regions aren't available to drivers. Maybe we need a new IO resource
>>> type for platform ranges.
>>>
>>>
>>>> I think it also leads to at least one problem: Guenter's machine has no
>>>> VGA but has a PCI device that lives at 0xa0000. The driver for that
>>>> device won't be able to request that region if the arch code has marked
>>>> it busy.
>>>>
>>> Ah good point, so we'll want another approach at any rate. Yinghai?
>>>
>> What we need is to keep track of the areas available for address space
>> allocation by dynamically addressed devices, as distinct from address
>> space that is in use by a kernel-known device. There is an in-between,
>> which one can call "here there be dragons" space, which should never be
>> used for dynamic device allocation, but if a platform device or
>> pre-assigned device uses that space then it should be allowed to be
>> allocated.
>>
>> In the case of x86, anything that is E820_RESERVED, *or* in the legacy
>> region (below 1 MB) and is not RAM, is "here there be dragons" space.
>>
> Agreed. The trickier part is handling any platform devices that
> request_resource against that space. But maybe we don't need to do
> anything special; just making sure we avoid it in the PCI "BIOS" code
> as Bjorn did may be sufficient.
>
>
the two regressions from the reporters:
BIOS put 0xa0000-0xb0000, 0xc0000- 0xd0000 with E820_RESERVED.
BIOS ACPI _CRS keep 0xa0000-0xb0000, 0xc0000-0xd0000 as part resources
for peer root bus: BUS 0.
kernel insert 0xa0000-0xb0000 into resource tree with _BUSY in
e820_reserve_resources() at first.
last pci bus scan code, will insert 0xa0000-0xb0000, and it is under
previous reserved entry.
later pci_assign_unassign code, will use bus 0 resources directly, and
don't care if the parent's have _BUSY bit.
solutions:
1. mark _BUSY under bus 0 resource: ==> -v3
2. split e820 reserve entries to small pieces to fit into bus 0
resources, so will have holder under bus0 resources. it will prevent
those range to be used.
-v4
3. reject any dynamically allocation under 1M. ==> Bjorn's new patch.
till now, driver can reserve resource under 1M, only when those range is
not in e820.
case A:
bus 0: --- bus X --- device Y
if the BIOS only assign range to to BUS X bridge with 0xB0000, and
device Y is not assigned. then with Bojorn's patch, device Y can not
get right resource allocated on first try.
my -v4 can handle that case.
YH
next prev parent reply other threads:[~2010-04-26 21:58 UTC|newest]
Thread overview: 125+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 21:06 [PATCH] x86: Reserve legacy VGA MMIO area for x86_64 as well as x86_32 Bjorn Helgaas
2010-04-07 22:45 ` Yinghai
2010-04-07 23:05 ` Bjorn Helgaas
2010-04-07 23:22 ` Yinghai
2010-04-08 3:24 ` Bjorn Helgaas
2010-04-08 4:42 ` H. Peter Anvin
2010-04-08 13:04 ` Bjorn Helgaas
2010-04-09 16:04 ` Bjorn Helgaas
2010-04-09 16:44 ` H. Peter Anvin
2010-04-09 17:22 ` Yinghai
2010-04-09 18:23 ` H. Peter Anvin
2010-04-09 18:55 ` Guenter Roeck
2010-04-09 19:55 ` Yinghai
2010-04-09 22:21 ` Andy Isaacson
2010-04-09 22:27 ` Yinghai Lu
2010-04-09 22:35 ` Andy Isaacson
2010-04-09 22:44 ` H. Peter Anvin
2010-04-09 22:54 ` Yinghai
2010-04-09 23:01 ` Yinghai
2010-04-10 0:00 ` Andy Isaacson
2010-04-10 1:10 ` Yinghai
2010-04-10 1:43 ` Andy Isaacson
2010-04-10 1:48 ` Yinghai
2010-04-10 1:57 ` Andy Isaacson
2010-04-10 2:46 ` Yinghai
2010-04-12 18:54 ` Andy Isaacson
2010-04-12 19:34 ` Yinghai
2010-04-12 19:48 ` Andy Isaacson
2010-04-12 19:55 ` yinghai.lu
2010-04-12 20:02 ` Andy Isaacson
2010-04-12 22:32 ` [PATCH -v2 1/2] x86: Reserve [0xa0000, 0x100000] in e820 map Yinghai
2010-04-13 21:02 ` Bjorn Helgaas
2010-04-13 21:08 ` Yinghai
2010-04-13 21:09 ` H. Peter Anvin
2010-04-13 21:11 ` Yinghai
2010-04-13 21:18 ` H. Peter Anvin
2010-04-13 21:22 ` [PATCH -v3 1/3] " Yinghai
2010-04-23 23:30 ` H. Peter Anvin
2010-04-26 15:35 ` Jesse Barnes
2010-04-13 21:23 ` [PATCH -v3 2/3] x86,pci, acpi: host bridge windows inherit BUSY flag from parent Yinghai
2010-04-13 21:24 ` [PATCH -v3 3/3] pci: don't allocate from a BUSY bus resource Yinghai
2010-04-13 21:42 ` [PATCH -v2 1/2] x86: Reserve [0xa0000, 0x100000] in e820 map Yinghai
2010-04-13 21:58 ` H. Peter Anvin
2010-04-13 22:29 ` Yinghai
2010-04-13 22:39 ` Yinghai
2010-04-13 22:41 ` H. Peter Anvin
2010-04-13 22:58 ` Yinghai
2010-04-13 23:02 ` H. Peter Anvin
2010-04-13 23:03 ` Yinghai
2010-04-13 23:07 ` H. Peter Anvin
2010-04-13 23:09 ` Yinghai
2010-04-21 5:33 ` [PATCH -v4 1/3] " Yinghai
2010-04-21 5:34 ` [PATCH 2/3] x86, resource: Add reserve_region_with_split_check_child() Yinghai
2010-04-21 5:35 ` [PATCH 3/3] x86,pci,acpi: Handle invalid _CRS Yinghai
2010-04-21 15:21 ` Bjorn Helgaas
2010-04-21 16:45 ` Yinghai Lu
2010-04-21 16:59 ` Bjorn Helgaas
2010-04-21 22:33 ` H. Peter Anvin
2010-04-21 23:04 ` Bjorn Helgaas
2010-04-21 23:10 ` H. Peter Anvin
2010-04-21 23:43 ` Yinghai
2010-04-22 0:02 ` H. Peter Anvin
2010-04-22 0:06 ` Yinghai
2010-04-21 19:31 ` [PATCH -v4 1/3] x86: Reserve [0xa0000, 0x100000] in e820 map Andy Isaacson
2010-04-23 23:05 ` [PATCH] x86/PCI: never allocate PCI MMIO resources below BIOS_END Bjorn Helgaas
2010-04-23 23:44 ` H. Peter Anvin
2010-04-24 0:36 ` Yinghai Lu
2010-04-26 12:50 ` R. Andrew Bailey
2010-04-26 15:40 ` Bjorn Helgaas
2010-04-26 18:34 ` Andy Isaacson
2010-04-26 19:31 ` Jesse Barnes
2010-04-26 20:27 ` Bjorn Helgaas
2010-04-26 20:37 ` Jesse Barnes
2010-04-26 21:07 ` Yinghai
2010-04-26 21:19 ` H. Peter Anvin
2010-04-26 21:12 ` H. Peter Anvin
2010-04-26 21:25 ` Jesse Barnes
2010-04-26 21:44 ` H. Peter Anvin
2010-04-26 21:53 ` Jesse Barnes
2010-04-26 21:59 ` Yinghai Lu [this message]
2010-04-26 22:04 ` [PATCH -v5] reserve a0000 - 0x10000 Yinghai
[not found] ` <4BD60CD4.9020708@oracle.com>
2010-04-26 22:04 ` [PATCH -v5 1/3] x86: Reserve [0xa0000, 0x100000] in e820 map Yinghai
2010-04-26 22:04 ` [PATCH -v5 2/3] x86: Remove probe_roms for 32bit Yinghai
2010-04-26 22:04 ` [PATCH -v5 3/3] x86, resource: Add reserve_region_with_split_check_child() Yinghai
2010-04-26 21:44 ` [PATCH] x86/PCI: never allocate PCI MMIO resources below BIOS_END jacob pan
2010-04-13 23:03 ` [PATCH -v2 1/2] x86: Reserve [0xa0000, 0x100000] in e820 map H. Peter Anvin
2010-04-14 0:57 ` Yinghai
2010-04-14 16:55 ` Bjorn Helgaas
2010-04-14 17:21 ` Yinghai Lu
2010-04-14 19:25 ` Andy Isaacson
2010-04-14 19:27 ` Yinghai
2010-04-14 19:43 ` Andy Isaacson
2010-04-14 19:49 ` Yinghai
2010-04-12 22:33 ` [PATCH -v2 2/2] x86,pci, acpi: Inherent BUSY flag when setup_resource for root bus Yinghai
2010-04-12 22:44 ` Jesse Barnes
2010-04-13 21:02 ` Bjorn Helgaas
2010-04-09 20:11 ` [PATCH] x86: Reserve legacy VGA MMIO area for x86_64 as well as x86_32 H. Peter Anvin
2010-04-09 20:31 ` Guenter Roeck
2010-04-09 20:44 ` H. Peter Anvin
2010-04-09 21:01 ` Guenter Roeck
2010-04-09 22:42 ` Alan Cox
2010-04-09 22:42 ` H. Peter Anvin
2010-04-09 22:54 ` Alan Cox
2010-04-09 22:55 ` H. Peter Anvin
2010-04-09 22:51 ` Alan Cox
2010-04-09 22:55 ` H. Peter Anvin
2010-04-07 23:43 ` H. Peter Anvin
2010-04-08 0:19 ` Andy Isaacson
2010-04-08 5:00 ` H. Peter Anvin
2010-04-08 21:40 ` Andy Isaacson
-- strict thread matches above, loose matches on Subject: below --
2010-04-26 23:02 [PATCH] x86/PCI: never allocate PCI MMIO resources below BIOS_END H. Peter Anvin
2010-04-26 23:25 ` Jesse Barnes
2010-04-26 23:49 ` H. Peter Anvin
2010-04-26 23:49 ` H. Peter Anvin
2010-04-27 0:05 ` Jesse Barnes
2010-04-27 1:27 ` Linus Torvalds
2010-04-27 1:40 ` Jesse Barnes
2010-04-27 1:41 ` Yinghai
2010-04-27 15:11 ` Bjorn Helgaas
2010-04-28 16:07 ` Bjorn Helgaas
2010-04-28 17:14 ` Yinghai Lu
2010-04-28 19:06 ` Bjorn Helgaas
2010-04-28 19:10 ` Yinghai
2010-04-28 19:23 ` Bjorn Helgaas
2010-04-27 2: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=4BD60CD5.4060601@oracle.com \
--to=yinghai.lu@oracle.com \
--cc=adi@hexapodia.org \
--cc=bailey@akamai.com \
--cc=bjorn.helgaas@hp.com \
--cc=guenter.roeck@ericsson.com \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=trenn@suse.de \
--cc=x86@kernel.org \
--cc=yaneti@declera.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