]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
runqemu: enable kvm when use tap under sudo rbt/qemu_v2
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 25 Jun 2015 08:56:03 +0000 (01:56 -0700)
committerRobert Yang <liezhi.yang@windriver.com>
Fri, 26 Jun 2015 01:26:06 +0000 (18:26 -0700)
commitec38a9b641108bba14f8be1c71c50cc85e6f9f86
treebffd9d5f7437c6c88969bc758ba330a9df529ae6
parentdd6a444cfc1ef527520a0e3490b6a243f0e7679c
runqemu: enable kvm when use tap under sudo

Enable kvm support automatically when use tap interface under sudo, the
thought is, if sudo works well, and qemu-native has been built with kvm
support, and kvm can be enabled, then enable it, it can be disabled by
nokvm option.

The previous command:
$ runqemu qemux86 kvm
may not work since it checks the current user's read/write permission on
/dev/kvm and /dev/vhost-net but failed without sudo, it can't use sudo
to check them since sudo is not a must, sudo is only required when need
create tap interface, this patch can enable it automatically.

Enable kvm can improve qemu's performance a lot, when test perl-5.22's
lib/warnings.t on qemux86-64, 70 times improved.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
scripts/runqemu
scripts/runqemu-internal