Re: [PATCH] x86: fixed mtrr change WP to WB

From: H. Peter Anvin
Date: Tue May 06 2008 - 14:32:22 EST


Yinghai Lu wrote:

If the mptable should be modified, it should be copied to kernel memory and
modified there. Modifying it in-place is both unsafe and, in general,
simply will not work.

but

* 1) Scan the bottom 1K for a signature
* 2) Scan the top 1K of base RAM
* 3) Scan the 64K of bios
*/
if (smp_scan_config(0x0, 0x400, reserve) ||
smp_scan_config(639 * 0x400, 0x400, reserve) ||
smp_scan_config(0xF0000, 0x10000, reserve))
return;

and all these areas are reserved already.

wonder if we could only modify mpf->mpf_physptr to point to another
mpc and reuse mpf?


Obviously, if you have already modified a table, you should save a pointer to it, and not rely on the kernel scanning later.

-hpa
--
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/