Source of QEMU woes: CPUTYPE
Willem Jan Withagen
wjw at digiware.nl
Sat Apr 8 14:02:38 UTC 2017
On 4-4-2017 20:31, Dimitry Andric wrote:
> 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.
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
More information about the freebsd-hackers
mailing list