From owner-freebsd-hackers@freebsd.org Tue Apr 4 18:32:11 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CDEFD2EBCA for ; Tue, 4 Apr 2017 18:32:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE396BF7 for ; Tue, 4 Apr 2017 18:32:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::988f:bd7f:a95:844] (unknown [IPv6:2001:470:7a58:0:988f:bd7f:a95:844]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8D9A636EBA; Tue, 4 Apr 2017 20:32:01 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_C01E471F-D4CA-4FDB-B623-75CED0A40087"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Source of QEMU woes: CPUTYPE Date: Tue, 4 Apr 2017 20:31:50 +0200 In-Reply-To: Cc: "freebsd-hackers@freebsd.org" To: Eric McCorkle References: X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2017 18:32:11 -0000 --Apple-Mail=_C01E471F-D4CA-4FDB-B623-75CED0A40087 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 4 Apr 2017, at 14:34, Eric McCorkle 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 --Apple-Mail=_C01E471F-D4CA-4FDB-B623-75CED0A40087 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAljj5qEACgkQsF6jCi4glqN04QCbBmPw//EYF5txrecmdiRq060M SFcAn226Jwp6HtgLpANSBPqf0pgijGUM =KP2T -----END PGP SIGNATURE----- --Apple-Mail=_C01E471F-D4CA-4FDB-B623-75CED0A40087--