Date: Sat, 8 Apr 2017 16:02:31 +0200 From: Willem Jan Withagen <wjw@digiware.nl> To: Dimitry Andric <dim@FreeBSD.org>, Eric McCorkle <eric@metricspace.net> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.org> Subject: Re: Source of QEMU woes: CPUTYPE Message-ID: <d3d1214e-d4c2-c76d-c9b2-e65765c7d177@digiware.nl> In-Reply-To: <A5077163-17D6-4416-B52C-325027E5BBEB@FreeBSD.org> References: <ee20545b-9937-bbfd-ea33-ca7d4d3deb46@metricspace.net> <A5077163-17D6-4416-B52C-325027E5BBEB@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4-4-2017 20:31, Dimitry Andric wrote: > On 4 Apr 2017, at 14:34, Eric McCorkle <eric@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. So what does: Host CPU: bdver1 tell me? It actually is a: CPU: AMD FX-8370 Eight-Core Processor (4013.71-MHz K8-class CPU) Origin="AuthenticAMD" Id=0x600f20 Family=0x15 Model=0x2 Stepping=0 Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> Features2=0x3e98320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C> AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM> AMD Features2=0x1ebbfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,TCE,NodeId, TBM,Topology,PCXC,PNXC> Structured Extended Features=0x8<BMI1> SVM: Features=0x1cff<NP,LbrVirt,SVML,NRIPS,TscRateMsr,VmcbClean,FlushByAsid,DecodeAssist,PauseFilter,<b11>,PauseFilterThreshold> Revision=1, ASIDs=65536 --WjW
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d3d1214e-d4c2-c76d-c9b2-e65765c7d177>