From: Richard W.M. Jones Date: Wed, 16 Mar 2016 13:37:54 +0000 (+0000) Subject: Limit memory to 30000MB for ARM mach_virt. X-Git-Url: http://git.annexia.org/?p=supernested.git;a=commitdiff_plain;h=c0735b93a270bb77afb50577f4319efd3f0b0459 Limit memory to 30000MB for ARM mach_virt. --- diff --git a/run-supernested.sh.in b/run-supernested.sh.in index 9ed9b5b..445f960 100644 --- a/run-supernested.sh.in +++ b/run-supernested.sh.in @@ -115,6 +115,17 @@ if [ $memory -lt 2048 ]; then fi memory=$((memory - 1500)) +# ARM mach_virt (-M virt) model only supports 30GB of RAM. +if [ $memory -gt 30000 ]; then + case "$arch" in + arm*|aarch64) + echo "$0: limiting memory to 30000 MB for ARM mach_virt" + memory=30000 + ;; + *) + esac +fi + # Get current nesting level from /proc/cmdline, increment it, add it # to the command line. level="$(