git.annexia.org
/
supernested.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ede28fd
)
Add --tcg option to force TCG.
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 3 Jul 2014 15:50:15 +0000
(16:50 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 3 Jul 2014 16:00:01 +0000
(17:00 +0100)
run-supernested.sh.in
patch
|
blob
|
history
diff --git
a/run-supernested.sh.in
b/run-supernested.sh.in
index
eac3d9b
..
3f7772c
100644
(file)
--- a/
run-supernested.sh.in
+++ b/
run-supernested.sh.in
@@
-26,10
+26,12
@@
kernel=kernel
initrd=initrd
append="panic=1 console=ttyS0 udevtimeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0"
smp=
initrd=initrd
append="panic=1 console=ttyS0 udevtimeout=6000 no_timer_check printk.time=1 root=/dev/sda selinux=0"
smp=
+accel=kvm
+cpu="-cpu host"
TEMP=`getopt \
-o '' \
TEMP=`getopt \
-o '' \
- --longoptions 'help,nested,smp:' \
+ --longoptions 'help,nested,smp:
,tcg
' \
-n run-supernested.sh -- "$@"`
if [ $? != 0 ]; then
echo "$0: problem parsing the command line arguments"
-n run-supernested.sh -- "$@"`
if [ $? != 0 ]; then
echo "$0: problem parsing the command line arguments"
@@
-40,9
+42,10
@@
eval set -- "$TEMP"
usage ()
{
echo "$0: Run the supernested appliance."
usage ()
{
echo "$0: Run the supernested appliance."
- echo " $0 [--smp=N]"
+ echo " $0 [--smp=N]
[--tcg]
"
echo "Options:"
echo " --smp=N Use N virtual CPUs (at all levels)."
echo "Options:"
echo " --smp=N Use N virtual CPUs (at all levels)."
+ echo " --tcg Use TCG (at all levels) instead of KVM."
}
while true ; do
}
while true ; do
@@
-59,6
+62,13
@@
while true ; do
grep -Eo '[[:digit:]]+'
)"
if [ -n "$smp" ]; then smp="-smp $smp"; fi
grep -Eo '[[:digit:]]+'
)"
if [ -n "$smp" ]; then smp="-smp $smp"; fi
+ accel="$(
+ grep -Eo 'supernested.accel=tcg' /proc/cmdline
+ )"
+ if [ -n "$accel" ]; then
+ accel=tcg
+ cpu=
+ fi
shift
;;
--smp)
shift
;;
--smp)
@@
-66,6
+76,12
@@
while true ; do
append="$append supernested.smp=$2"
shift 2
;;
append="$append supernested.smp=$2"
shift 2
;;
+ --tcg)
+ accel=tcg
+ cpu=
+ append="$append supernested.accel=tcg"
+ shift
+ ;;
--help)
usage
exit 0
--help)
usage
exit 0
@@
-108,7
+124,9
@@
append="$append supernested.level=$((level+1))"
echo "Running"
echo " qemu = $qemu"
echo "Running"
echo " qemu = $qemu"
+echo " cpu = $cmp"
echo " smp = $smp"
echo " smp = $smp"
+echo " accel = $accel"
echo " memory = $memory"
echo " kernel = $kernel"
echo " initrd = $initrd"
echo " memory = $memory"
echo " kernel = $kernel"
echo " initrd = $initrd"
@@
-120,9
+138,9
@@
sync
exec \
"$qemu" \
exec \
"$qemu" \
- -cpu host \
- -machine accel=kvm \
+ $cpu \
$smp \
$smp \
+ -machine accel=$accel \
-display none \
-m $memory \
-no-reboot \
-display none \
-m $memory \
-no-reboot \