#
# Written by Richard W.M. Jones <rjones@redhat.com>
+arch="@host_cpu@"
qemu="@QEMU@"
image="supernested-@VERSION@-@DISTRO@.qcow2"
format=qcow2
kernel=kernel
initrd=initrd
-append="panic=1 console=ttyS0 udevtimeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0"
+append="panic=1 udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0"
smp=
tcg=
+case "$arch" in
+ aarch64)
+ append="$append earlyprintk=pl011,0x9000000 ignore_loglevel efi-rtc=noprobe"
+ ;;
+ *)
+ append="$append console=ttyS0"
+ ;;
+esac
+
TEMP=`getopt \
-o '' \
--longoptions 'help,nested,smp:,tcg' \
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="$(
extra_args="$extra_args -cpu host -machine accel=kvm"
fi
+case "$arch" in
+ i[3456]86|x86_64)
+ extra_args="$extra_args -no-hpet -device sga"
+ ;;
+ *)
+ ;;
+esac
+
echo "Running"
echo " qemu = $qemu"
echo " extra_args = $extra_args"
-m $memory \
-no-reboot \
-rtc driftfix=slew \
- -no-hpet \
-global kvm-pit.lost_tick_policy=discard \
-kernel "$kernel" \
-initrd "$initrd" \
-device scsi-hd,drive=hd0 \
-device virtio-serial-pci \
-serial stdio \
- -device sga \
-append "$append"