Processor support for bhyve

amiramix

Member

Reaction score: 4
Messages: 93

I am trying to determine if my processor supports [FONT=Courier New]bhyve[/FONT]. Just reading the 21.7. FreeBSD as a Host with bhyve page. I can find the [FONT=Courier New]POPCNT[/FONT] flag when grepping /var/run/dmesg.boot but can't find a line with [FONT=Courier New]VT-x[/FONT]. In particular:

Code:
CPU: AMD Opteron(tm) Processor 3380  (2600.05-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: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536
  TSC: P-state invariant, performance statistics

And:

Code:
CPU: AMD Phenom(tm) II X4 955 Processor (3210.89-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x100f42  Family=0x10  Model=0x4  Stepping=2
  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=0x802009<SSE3,MON,CX16,POPCNT>
  AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>
  SVM: NP,NRIP,NAsids=64
  TSC: P-state invariant

However bhyve wiki page says that Barcelona or later processors support bhyve, and both processors above came after Barcelona.

Does it mean that my processor doesn't support bhyve or that there is an error in the documentation and it should rather read:

The easiest way to tell if a processor will support bhyve is to run dmesg or look in /var/run/dmesg.boot for the [FONT=Courier New]POPCNT[/FONT] processor feature flag on the [FONT=Courier New]Features2[/FONT] (AMD) line or [FONT=Courier New]EPT[/FONT] and [FONT=Courier New]UG[/FONT] on the [FONT=Courier New]VT-x[/FONT] (Intel) line.
 

wblock@

Beastie Himself
Developer

Reaction score: 3,729
Messages: 13,851

Yes, the wording is ambiguous. Updated in r48526. Thanks!
 
OP
amiramix

amiramix

Member

Reaction score: 4
Messages: 93

I wasn't pretending that I don't know the answer ;-) So, am I to understand that either of those needs to be present, not both, and my processor indeed supports bhyve?

What's r48526? An update to the document? If yes, then may be worth mentioning what's already stated in the bhyve wiki, or adding a link to the wiki, namely, that some, notably the "Kuma" core processors include [FONT=Courier New]POPCNT[/FONT] but lack the required [FONT=Courier New]"NRIPS"[/FONT] (Next RIP Save) feature.
 

crbenesch

New Member


Messages: 2

I have the following, its an older SuperMicro
Code:
---<<BOOT>>---
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.2-RELEASE r366954 GENERIC amd64
FreeBSD clang version 10.0.1 ([email]git@github.com[/email]:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
VT(vga): resolution 640x480
CPU: AMD Opteron(TM) Processor 6272                  (2100.04-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x600f12  Family=0x15  Model=0x1  Stepping=2
  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=0x1e98220b<SSE3,PCLMULQDQ,MON,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,AESNI,XSAVE,OSXSAVE,AVX>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x1c9bfff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,XOP,SKINIT,WDT,LWP,FMA4,NodeId,Topology,PCXC,PNXC>
  SVM: NP,NRIP,VClean,AFlush,DAssist,NAsids=65536
  TSC: P-state invariant, performance statistics
real memory  = 34359738368 (32768 MB)
avail memory = 33338105856 (31793 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <112513 APIC1100>
FreeBSD/SMP: Multiprocessor System Detected: 32 CPUs
FreeBSD/SMP: 2 package(s) x 2 cache groups x 8 core(s)
random: unblocking device.
It does start, but I get this trying to install CentOS 7 Minimal 2009:
Code:
[    0.026455] Modules linked in:
[    0.027217] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-1160.el7.x86_64 #1
[    0.028882] Hardware name:   BHYVE, BIOS 1.00 03/14/2014
[    0.030106] task: ffffffffa8e18480 ti: ffffffffa8e00000 task.ti: ffffffffa8e00000
[    0.031814] RIP: 0010:[<ffffffffa82443de>]  [<ffffffffa82443de>] init_amd+0x35e/0x7d0
[    0.033640] RSP: 0000:ffffffffa8e03e30  EFLAGS: 00010246
[    0.034872] RAX: 0000000000000000 RBX: ffffffffa8f50f40 RCX: 0000000000000000
[    0.036506] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffa8e03de0
[    0.038145] RBP: ffffffffa8e03e98 R08: 0000000000000040 R09: ffffffffa8e03de8
[    0.039784] R10: ffffffffa8e03dec R11: 0000000000000000 R12: 0000000000000102
[    0.041392] R13: ffffffffa8f50f62 R14: 000000000000e020 R15: 0000000000000000
[    0.042992] FS:  0000000000000000(0000) GS:ffff95bc7fc00000(0000) knlGS:0000000000000000
[    0.044837] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[    0.046178] CR2: ffff95bc78074000 CR3: 0000000077a10000 CR4: 00000000000406b0
[    0.047771] Call Trace:
[    0.048346]  [<ffffffffa8240dd2>] identify_cpu+0x1c2/0x580
[    0.049578]  [<ffffffffa8f9a9ec>] identify_boot_cpu+0x10/0xae
[    0.050868]  [<ffffffffa8f9ad9e>] check_bugs+0x25/0x5e1
[    0.052041]  [<ffffffffa8f8b1a6>] start_kernel+0x422/0x46c
[    0.053274]  [<ffffffffa8f8ab84>] ? repair_env_string+0x5c/0x5c
[    0.054627]  [<ffffffffa8f8a120>] ? early_idt_handler_array+0x120/0x120
[    0.056097]  [<ffffffffa8f8a738>] x86_64_start_reservations+0x24/0x26
[    0.057548]  [<ffffffffa8f8a88e>] x86_64_start_kernel+0x154/0x177
[    0.058903]  [<ffffffffa82000d5>] start_cpu+0x5/0x14
[    0.060013] Code: ff f0 80 4b 23 08 80 3b 16 0f 87 76 fe ff ff 0f b7 83 f0 00 00 00 31 d2 0f b7 b3 fc 00 00 00 f7 35 70 c1 be 00 31 d2 89 c1 89 f0 <f7> f1 66 89 93 fc 00 00 00 e9 4c fe ff ff 0f 1f 40 00 41 8d 57 
[    0.066752] RIP  [<ffffffffa82443de>] init_amd+0x35e/0x7d0
[    0.068063]  RSP <ffffffffa8e03e30>
[    0.068918] ---[ end trace f68728a0d3053b52 ]---
[    0.070029] Kernel panic - not syncing: Fatal exception
[    0.300327] random: fast init done
And it hangs (obviously). Is it a problem with my CPU? It worked on an i7-4770, but not this beast. Trying to set up a build environment for code check-in validation.
 
Top