Source of QEMU woes: CPUTYPE
Dimitry Andric
dim at FreeBSD.org
Tue Apr 4 18:32:11 UTC 2017
On 4 Apr 2017, at 14:34, Eric McCorkle <eric at metricspace.net> wrote:
>
> A while ago I posted on here about some problems I'd had with testing
> boot loader modifications on QEMU, and which also showed up on an
> unmodified HEAD.
>
> I ultimately tracked down the source of the problem: I had
> CPUTYPE?=native set in my /etc/make.conf. As my CPU is relatively
> recent, this caused some instructions that QEMU doesn't support to be
> generated in various places (most notoriously, in strlen), which would
> trigger illegal instruction exceptions.
Out of interest, what does "llvm-tblgen -version | grep 'Host CPU'"
show? (This is a simple way to see what LLVM auto-detects.)
> I'm posting this here, as it's somewhat non-obvious, and probably ought
> to be documented somewhere.
I usually find it clearer to specify the exact CPU type myself, for
example CPUTYPE?=core-avx2 (which is an alias for "haswell"). You can
also specify a lower CPUTYPE to build the world that you are going to
run inside QEMU.
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20170404/4355e7cb/attachment.sig>
More information about the freebsd-hackers
mailing list