From c0735b93a270bb77afb50577f4319efd3f0b0459 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Mar 2016 13:37:54 +0000 Subject: [PATCH] Limit memory to 30000MB for ARM mach_virt. --- run-supernested.sh.in | 11 +++++++++++ 1 file changed, 11 insertions(+) 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="$( -- 1.8.3.1