]> git.openfabrics.org - ~shefty/rdma-dev.git/commit
xen/setup: Set identity mapping for non-RAM E820 and E820 gaps.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 1 Feb 2011 22:15:30 +0000 (17:15 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 14 Mar 2011 15:17:10 +0000 (11:17 -0400)
commit68df0da7f42be6ae017fe9f48ac414c43a7b9d32
tree9f4d774a788400d339794a2359b92f145bc21c1a
parentc7617798771ad588d585986d896197c04b737621
xen/setup: Set identity mapping for non-RAM E820 and E820 gaps.

We walk the E820 region and start at 0 (for PV guests we start
at ISA_END_ADDRESS) and skip any E820 RAM regions. For all other
regions and as well the gaps we set them to be identity mappings.

The reasons we do not want to set the identity mapping from 0->
ISA_END_ADDRESS when running as PV is b/c that the kernel would
try to read DMI information and fail (no permissions to read that).
There is a lot of gnarly code to deal with that weird region so
we won't try to do a cleanup in this patch.

This code ends up calling 'set_phys_to_identity' with the start
and end PFN of the the E820 that are non-RAM or have gaps.
On 99% of machines that means one big region right underneath the
4GB mark. Usually starts at 0xc0000 (or 0x80000) and goes to
0x100000.

[v2: Fix for E820 crossing 1MB region and clamp the start]
[v3: Squshed in code that does this over ranges]
[v4: Moved the comment to the correct spot]
[v5: Use the "raw" E820 from the hypervisor]
[v6: Added Review-by tag]

Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/setup.c