diff options
author | Cristian Iorga <cristian.iorga@intel.com> | 2012-09-19 10:06:54 +0300 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2012-09-20 22:21:14 -0700 |
commit | a35d03e2eb905de4eadc9c7df5b50bff1fb7f897 (patch) | |
tree | b6765e6638f0bdb0c592513ff49d94ffc982bdc4 /scripts/runqemu | |
parent | 465d7b6e66b5a55706535e194b3e44e11ee542c6 (diff) | |
download | openembedded-core-a35d03e2eb905de4eadc9c7df5b50bff1fb7f897.tar.gz openembedded-core-a35d03e2eb905de4eadc9c7df5b50bff1fb7f897.tar.bz2 openembedded-core-a35d03e2eb905de4eadc9c7df5b50bff1fb7f897.zip |
qemux86: Support for KVM, paravirt and virtio added
KVM, paravirtualization and virtio drivers are now activated
in runqemu using the kvm option flag for qemux86.
Host CPU features are also exported to guest OS (Yocto Linux).
Usage example: runqemu qemux86 core-image-x11 kvm
Implements [YOCTO #2550].
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index a9f513c7a9..e6e43f20c8 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -208,6 +208,7 @@ if [ -z "$MACHINE" ]; then fi YOCTO_KVM_WIKI="https://wiki.yoctoproject.org/wiki/How_to_enable_KVM_for_Poky_qemu" +YOCTO_PARAVIRT_KVM_WIKI="https://wiki.yoctoproject.org/wiki/Running_an_x86_Yocto_Linux_image_under_QEMU_KVM" # Detect KVM configuration if [ "x$KVM_ENABLED" = "xyes" ]; then if [ -z "$KVM_CAPABLE" ]; then @@ -226,14 +227,27 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then echo "$YOCTO_KVM_WIKI"; exit 1; fi + if [ ! -e /dev/vhost-net ]; then + echo "Missing virtio net device. Have you inserted vhost-net module?" + echo "For further help see" + echo "$YOCTO_PARAVIRT_KVM_WIKI"; + exit 1; + fi if 9<>/dev/kvm ; then - SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm" + SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu host" + KVM_ACTIVE="yes" else echo "You have no rights on /dev/kvm." echo "Please change the ownership of this file as described at" echo "$YOCTO_KVM_WIKI"; exit 1; fi + if [ ! -w /dev/vhost-net -a -r /dev/vhost-net ]; then + echo "You have no rights on /dev/vhost-net." + echo "Please change the ownership of this file as described at" + echo "$YOCTO_PARAVIRT_KVM_WIKI"; + exit 1; + fi fi machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'` |