[OE-core] [PATCH] runqemu: Use correct kvm CPU options for qemux86* with kvm
Darren Hart
darren.hart at intel.com
Wed Sep 25 21:05:17 UTC 2013
On Wed, 2013-09-25 at 21:59 +0100, Richard Purdie wrote:
> 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 at linuxfoundation.org>
Makes a lot of sense to me:
Acked-by: Darren Hart <dvhart at linux.intel.com>
> ---
> diff --git a/scripts/runqemu b/scripts/runqemu
> index efab1a2..12c58d9 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -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
The above is fine, but it does raise the question of dealing with non
oe-core BSPs with runqemu. For instance, there would be value in testing
genericx86 and genericx86_64 in the same way. We can deal with that
separately though I think as this solves an immediate problem and
doesn't make it any worse for the case I mention.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
More information about the Openembedded-core
mailing list