Re: [PATCH] x86: split e820 reserved entries record to late

H. Peter Anvin
2008-08-28T20:30:59Z

Linus Torvalds wrote:
>
> So e820 is fairly trustworthy, but we know that it will have various
> random things marked as reserved because they are special in some way (but
> we don't know _how_ they are special - they may well be real BAR's that
> just have a fixed meaning to ACPI or whatever).
>

My thinking is that if we run into a region which is reserved in e820
but points to a real BAR, we would want to keep that BAR pinned, since a
legitimate BIOS might use this mechanism to indicate that the device
implemented by that BAR is used by SMM or ACPI. If not, in most cases
we will only have wasted some address space. The sucky case, of course,
would be an uninitialized BAR pointing into unusable address space which
happens to be reserved in e820. This seems very difficult to
disambiguate from the above case through any algorithm that I can think of.

> Of course, I bet there will be cases where this causes problems. It feels
> like we have _never_ worked around some PCI BAR allocation problem without
> hitting another unexpected one..

I suspect that for any possible behaviour, there will be at least one
system out there doing something broken for it :(

-hpa