All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Martin Kelly <mkelly@xevo.com>, poky@yoctoproject.org
Subject: Re: [PATCH] qemuboot.conf: make cpus match built artifacts
Date: Mon, 24 Apr 2017 17:31:18 +0100	[thread overview]
Message-ID: <1493051478.19076.117.camel@linuxfoundation.org> (raw)
In-Reply-To: <1492820479-2808-1-git-send-email-mkelly@xevo.com>

On Fri, 2017-04-21 at 17:21 -0700, Martin Kelly wrote:
> Currently, the qemu CPUs for are specified as generic, but the built
> artifacts are not. For example, we build x86-64 artifacts targeting
> core2duo but run them in qemu with generic qemu/kvm CPUs. This causes
> some packages that take advantage of the host architecture to crash
> because they try to use CPU features not advertised by qemu. As an
> example, Qt uses ssse3. When artifacts linked against Qt and built
> targeting core2duo attempt to run on a generic qemu/kvm CPU, we get
> the following crash:
> 
> Incompatible processor. This Qt build requires the following
> features:
>      ssse3
> 
> We could fix this by making packages like Qt not take advantage of
> CPU
> features. However, we will probably keep facing similar issues over
> time, so it's better to resolve them in a more enduring way.
> 
> Fix this by making the qemu -cpu arguments match the built artifacts.
> 
> Signed-off-by: Martin Kelly <mkelly@xevo.com>
> ---
>  meta/conf/machine/include/qemuboot-x86.inc | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/conf/machine/include/qemuboot-x86.inc
> b/meta/conf/machine/include/qemuboot-x86.inc
> index 06ac983..acd03a1 100644
> --- a/meta/conf/machine/include/qemuboot-x86.inc
> +++ b/meta/conf/machine/include/qemuboot-x86.inc
> @@ -1,12 +1,12 @@
>  # For runqemu
>  IMAGE_CLASSES += "qemuboot"
>  QB_SYSTEM_NAME_x86 = "qemu-system-i386"
> -QB_CPU_x86 = "-cpu qemu32"
> -QB_CPU_KVM_x86 = "-cpu kvm32"
> +QB_CPU_x86 = "-cpu pentium2"
> +QB_CPU_KVM_x86 = "-cpu pentium2"
> 
>  QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64"
>  QB_CPU_x86-64 = "-cpu core2duo"
> -QB_CPU_KVM_x86-64 = "-cpu kvm64"
> +QB_CPU_KVM_x86-64 = "-cpu core2duo"
>  
>  QB_AUDIO_DRV = "alsa"
>  QB_AUDIO_OPT = "-soundhw ac97,es1370"

We've had problems here in the past:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=b8819b02dc4ff29d678cc55887dfe6c2d109a67d
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a2a20adbfd03ed9f07a3aa38ee2c9a8d962d4bf9

so we once did use core2duo and had to switch away from it after kernel
issues. Admittedly that was some time ago and I don't know if those
issues were resolved. I do remember other debates about qemu32 verses
pentium2 and other tunes as well so I'm a little nervous about changes
in this area as the issues were subtle to track down and fix,
particularly given the range of host distro kernels we need to run kvm
against :(.

Cheers,

Richard


  parent reply	other threads:[~2017-04-24 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-22  0:21 [PATCH] qemuboot.conf: make cpus match built artifacts Martin Kelly
2017-04-23 19:50 ` Burton, Ross
2017-04-24 15:59   ` Martin Kelly
2017-04-24 16:31 ` Richard Purdie [this message]
2017-04-24 17:57   ` Martin Kelly
2017-04-24 17:57     ` [poky] " Martin Kelly
2017-04-24 16:50 ` Aníbal Limón
2017-04-24 17:57   ` Martin Kelly
2017-04-24 17:57     ` Martin Kelly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493051478.19076.117.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=mkelly@xevo.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.