Re: [PATCH] x86_32: trim memory by updating e820 v3

From: Eric W. Biederman
Date: Mon Apr 28 2008 - 14:08:33 EST


"Yinghai Lu" <yhlu.kernel@xxxxxxxxx> writes:

> On Sat, Apr 26, 2008 at 5:56 AM, Gabriel C <nix.or.die@xxxxxxxxxxxxxx> wrote:

> another continuous MTRR mapping.
>
> several months ago, we were talking about modifying MTRR. but Eric
> said that is not safe because acpi and smi...

I think it was Andi who spotted that originally, and yes I do think it
is a pretty horrific failure mode. Reprogramming the MTRRs requires
full knowledge of the hardware and what is going on that we don't
always have. PAT support has just been merged, and using that only
requires knowledge about the region whose attributes we intend to change.

So lets concentrate on PAT to solve contiguous MTRR region problems.

We can upgrade UC to WC with pat. As well as demote WB to UC or WC.
So for those regions we know about we should be in good shape.

In a slightly related vein. Trimming the memory we consider usable by
looking at MTRRs and if a region is not WB not considering it RAM
sounds like a very reasonable work around for one class of BIOS bugs.

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/