]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Use correct kvm CPU options for qemux86* with kvm
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 25 Sep 2013 20:59:11 +0000 (21:59 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Sep 2013 15:37:14 +0000 (16:37 +0100)
The existing -cpu host option caused kernel panics when people attempted to use
the kvm option. After research and discussion, the best options appear to
be the kvm32/kvm64 cpu types so lets use these instead. These resolve
the kernel issues for me.

[YOCTO #3908]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index eb950bc62ddb188ee8c9c65da91360c841371549..619ffb6bedf39c46b8c50e5b66f4dd228e2f8574 100755 (executable)
@@ -265,7 +265,11 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
         exit 1;
     fi
     if [ -w /dev/kvm -a -r /dev/kvm ]; then
-        SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu host"
+        if [ "x$MACHINE" = "xqemux86" ]; then
+            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32"
+        elif [ "x$MACHINE" = "xqemux86-64" ]; then
+            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64"
+        fi
         KVM_ACTIVE="yes"
     else
         echo "You have no rights on /dev/kvm."