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.
I suspect that for any possible behaviour, there will be at least one
system out there doing something broken for it :(
-hpa
--