diff options
Diffstat (limited to 'scripts/runqemu')
| -rwxr-xr-x | scripts/runqemu | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 9272b6f2d5..0db7ad63ca 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -68,6 +68,8 @@ SCRIPT_QEMU_OPT="" | |||
| 68 | SCRIPT_QEMU_EXTRA_OPT="" | 68 | SCRIPT_QEMU_EXTRA_OPT="" |
| 69 | SCRIPT_KERNEL_OPT="" | 69 | SCRIPT_KERNEL_OPT="" |
| 70 | SERIALSTDIO="" | 70 | SERIALSTDIO="" |
| 71 | KVM_ENABLED="no" | ||
| 72 | KVM_ACTIVE="no" | ||
| 71 | 73 | ||
| 72 | # Determine whether the file is a kernel or QEMU image, and set the | 74 | # Determine whether the file is a kernel or QEMU image, and set the |
| 73 | # appropriate variables | 75 | # appropriate variables |
| @@ -103,7 +105,6 @@ process_filename() { | |||
| 103 | 105 | ||
| 104 | # Parse command line args without requiring specific ordering. It's a | 106 | # Parse command line args without requiring specific ordering. It's a |
| 105 | # bit more complex, but offers a great user experience. | 107 | # bit more complex, but offers a great user experience. |
| 106 | KVM_ENABLED="no" | ||
| 107 | while true; do | 108 | while true; do |
| 108 | arg=${1} | 109 | arg=${1} |
| 109 | case "$arg" in | 110 | case "$arg" in |
| @@ -266,11 +267,7 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then | |||
| 266 | exit 1; | 267 | exit 1; |
| 267 | fi | 268 | fi |
| 268 | if [ -w /dev/kvm -a -r /dev/kvm ]; then | 269 | if [ -w /dev/kvm -a -r /dev/kvm ]; then |
| 269 | if [ "x$MACHINE" = "xqemux86" ]; then | 270 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm" |
| 270 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32" | ||
| 271 | elif [ "x$MACHINE" = "xqemux86-64" ]; then | ||
| 272 | SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64" | ||
| 273 | fi | ||
| 274 | KVM_ACTIVE="yes" | 271 | KVM_ACTIVE="yes" |
| 275 | else | 272 | else |
| 276 | echo "You have no rights on /dev/kvm." | 273 | echo "You have no rights on /dev/kvm." |
