[Buildroot] [PATCH/master 6/7] package/qemu: add BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS string

Thomas Petazzoni thomas.petazzoni at bootlin.com
Fri Sep 3 22:37:09 UTC 2021


Hello Adam,

On Fri,  3 Sep 2021 09:20:26 -0700
Adam Duskett <aduskett at gmail.com> wrote:

> For specific architectures, running qemu in user mode without any additional
> options may fail if the host processor does not have the necessary instructions
> to properly run qemu in user mode, which results in the following error:
> "qemu: uncaught target signal 4 (Illegal instruction) - core dumped"
> 
> CoreI7 is one such architecture that has had consistent auto-build failures.
> 
> Add a new string in qemu/Config.in.host: BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS.
> The default for the Corei7 architecture is directly from the OpenEmbedded
> project found in meta/conf/machine/include/x86/tune-corei7.inc:
> "-cpu Nehalem,check=false." Other architectures may be added to this string at
> a later date if other failures occure.
> 
> Signed-off-by: Adam Duskett <aduskett at gmail.com>

So on the principle, I'm obviously OK as this is something I have
suggested. However, what bothers me here is that we are handling only
the Core i7 case, because it caused some issue in the autobuilder.

What is qemu doing when no -cpu is provided? Does it emulate the host
CPU in this case? If so, then it is going to be wrong in a lot of other
cases than Core i7, no?

Or put differently, shouldn't we essentially have a value for
BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS for pretty much all CPU
architectures that we want to support for this use-case ?

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list