]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mem_detect: limit memory detection loop to "mem=" parameter
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 30 Apr 2013 08:34:04 +0000 (10:34 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 2 May 2013 13:50:26 +0000 (15:50 +0200)
commit96a2d925220839045528dea991ed349705f5683b
tree619ab3b2ef639ebbcd102961c8710b852cd9adfc
parentd629211ec56cc76e0f64817cfb54fbe81a4fb311
s390/mem_detect: limit memory detection loop to "mem=" parameter

The current memory detection loop will detect all present memory of
a machine. This is true even if the user specified the "mem=" parameter
on the kernel command line.
This can be a problem since the memory detection may cause a fully
populated host page table for the guest, even for those parts of the
memory that the guest will never use afterwards.

So fix this and only detect memory up to a user supplied "mem=" limit
if specified.

Reported-by: Michael Johanssen <johanssn@de.ibm.com>
Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/setup.h
arch/s390/kernel/crash_dump.c
arch/s390/kernel/early.c
arch/s390/kernel/setup.c
arch/s390/mm/mem_detect.c
drivers/s390/char/zcore.c