linux-uconsole/arch
David Vrabel 061cc2478c x86/xen: do not identity map UNUSABLE regions in the machine E820
commit 3bc38cbceb upstream.

If there are UNUSABLE regions in the machine memory map, dom0 will
attempt to map them 1:1 which is not permitted by Xen and the kernel
will crash.

There isn't anything interesting in the UNUSABLE region that the dom0
kernel needs access to so we can avoid making the 1:1 mapping and
treat it as RAM.

We only do this for dom0, as that is where tboot case shows up.
A PV domU could have an UNUSABLE region in its pseudo-physical map
and would need to be handled in another patch.

This fixes a boot failure on hosts with tboot.

tboot marks a region in the e820 map as unusable and the dom0 kernel
would attempt to map this region and Xen does not permit unusable
regions to be mapped by guests.

  (XEN)  0000000000000000 - 0000000000060000 (usable)
  (XEN)  0000000000060000 - 0000000000068000 (reserved)
  (XEN)  0000000000068000 - 000000000009e000 (usable)
  (XEN)  0000000000100000 - 0000000000800000 (usable)
  (XEN)  0000000000800000 - 0000000000972000 (unusable)

tboot marked this region as unusable.

  (XEN)  0000000000972000 - 00000000cf200000 (usable)
  (XEN)  00000000cf200000 - 00000000cf38f000 (reserved)
  (XEN)  00000000cf38f000 - 00000000cf3ce000 (ACPI data)
  (XEN)  00000000cf3ce000 - 00000000d0000000 (reserved)
  (XEN)  00000000e0000000 - 00000000f0000000 (reserved)
  (XEN)  00000000fe000000 - 0000000100000000 (reserved)
  (XEN)  0000000100000000 - 0000000630000000 (usable)

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[v1: Altered the patch and description with domU's with UNUSABLE regions]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-29 09:47:40 -07:00
..
alpha Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
arc ARC: [lib] strchr breakage in Big-endian configuration 2013-08-29 09:47:34 -07:00
arm ARM: 7816/1: CONFIG_KUSER_HELPERS: fix help text 2013-08-29 09:47:36 -07:00
arm64 arm64: perf: fix event validation for software group leaders 2013-08-29 09:47:36 -07:00
avr32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 2013-05-22 18:06:57 -07:00
blackfin blackfin updates for Linux 3.10 2013-05-10 07:21:16 -07:00
c6x arch: c6x: mm: include "asm/uaccess.h" to pass compiling 2013-07-21 18:21:29 -07:00
cris - Lots of cleanups from Artem, including deletion of some obsolete drivers 2013-05-09 10:15:46 -07:00
frv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
h8300 We get rid of the general module prefix confusion with a binary config option, 2013-05-05 10:58:06 -07:00
hexagon Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
ia64 Fix TLB gather virtual address range invalidation corner cases 2013-08-20 08:43:05 -07:00
m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
m68k m68k/atari: ARAnyM - Fix NatFeat module support 2013-08-20 08:43:05 -07:00
metag metag: fix mm/hugetlb.c build breakage 2013-06-19 06:23:34 -10:00
microblaze microblaze: fix clone syscall 2013-08-20 08:43:02 -07:00
mips MIPS: Expose missing pci_io{map,unmap} declarations 2013-08-14 22:59:10 -07:00
mn10300 mn10300: Use early_param() to parse "mem=" parameter 2013-06-28 16:53:03 +01:00
openrisc Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
parisc parisc: Fix interrupt routing for C8000 serial ports 2013-08-11 18:35:21 -07:00
powerpc powerpc/tm: Fix context switching TAR, PPR and DSCR SPRs 2013-08-14 22:59:05 -07:00
s390 KVM: s390: move kvm_guest_enter,exit closer to sie 2013-08-29 09:47:28 -07:00
score score: remove redundant kcore_list entries 2013-05-25 10:27:27 -07:00
sh Fix TLB gather virtual address range invalidation corner cases 2013-08-20 08:43:05 -07:00
sparc sparc32: vm_area_struct access for old Sun SPARCs. 2013-07-28 16:29:41 -07:00
tile tilepro: work around module link error with gcc 4.7 2013-06-15 16:47:47 -04:00
um Fix TLB gather virtual address range invalidation corner cases 2013-08-20 08:43:05 -07:00
unicore32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-05-10 09:21:05 -07:00
x86 x86/xen: do not identity map UNUSABLE regions in the machine E820 2013-08-29 09:47:40 -07:00
xtensa xtensa: adjust boot parameters address when INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX is selected 2013-07-25 14:07:42 -07:00
.gitignore
Kconfig microblaze: fix clone syscall 2013-08-20 08:43:02 -07:00