]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Add memory gap for larger RAM sizes
authorSasha Levin <levinsasha928@gmail.com>
Wed, 11 May 2011 15:17:23 +0000 (18:17 +0300)
committerPekka Enberg <penberg@kernel.org>
Wed, 11 May 2011 15:51:15 +0000 (18:51 +0300)
commit86081713656872933f961f2a7728d0ae573f8257
treee2c3841a26d98b3b637c124accde52dd9045f5d6
parent1d8d90dfa775adaf7348e125a148b6e5ed4f698e
kvm tools: Add memory gap for larger RAM sizes

e820 is expected to leave a memory gap within the low 32
bits of RAM space. From the documentation of e820_setup_gap():

  /*
   * Search for the biggest gap in the low 32 bits of the e820
   * memory space.  We pass this space to PCI to assign MMIO resources
   * for hotplug or unconfigured devices in.
   * Hopefully the BIOS let enough space left.
   */

Not leaving such gap causes errors and hangs during the boot process.

This patch adds a memory gap between 0xe0000000 and 0x100000000 when using more
than 0xe0000000 bytes for guest RAM.

This patch updates the e820 table, slot allocations used for
KVM_SET_USER_MEMORY_REGION.

Acked-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/bios.c
tools/kvm/include/kvm/e820.h
tools/kvm/include/kvm/kvm.h
tools/kvm/kvm.c