On 5 April 2017 at 13:07, Theo de Raadt <dera...@openbsd.org> wrote: > > > cpu0: Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz, 3491.87 MHz > > cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA, > CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3, > PCLMUL,DTES64,DS-CPL,SSSE3,SDBG,FMA3,CX16,xTPR,PCID,DCA, > SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV, > NXE,PAGE1GB,LONG,LAHF,ABM,ITSC,FSGSBASE,BMI1,AVX2,BMI2,ERMS,INVPCID,ARAT > > cpu0: 256KB 64b/line 8-way L2 cache > > (see SDBG in the long line above?) > > In that case the emulation of that cpu must support the feature it > claims to support, either by having the hardware do it, or by having > the vm code emulate it. It must emulate the MSR's associated with > the feature. > > Or, not make the claim. > > bhyve appears to be passing down feature bits from the host cpu > without sanitizing them. > > I wonder what other features they are passing down.... some of them > are not really safe........ >
Just a follow-up. New hardware has arrived. This is not a wide ranging issue and appears to only affect some models of CPUs. Below is the output from a bhyve guest running on an Atom C2758 SoC, no modification was made to the bhyve startup: OpenBSD 6.1 (GENERIC.MP) #0: Wed Apr 5 08:47:48 AEST 2017 mrbuil...@cybermen.ar18.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 1056964608 (1008MB) avail mem = 1021227008 (973MB) warning: no entropy supplied by boot loader mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf101f (10 entries) bios0: vendor BHYVE version "1.00" date 03/14/2014 bios0: bhyve BHYVE acpi0 at bios0: rev 2 acpi0: sleep states S5 acpi0: tables DSDT APIC FACP HPET MCFG acpi0: wakeup devices acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Atom(TM) CPU C2758 @ 2.40GHz, 2400.13 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SSSE3,CX16,xTPR,SSE4 .1,SSE4.2,MOVBE,POPCNT,AES,RDRAND,HV,NXE,LONG,LAHF,3DNOWP,ITSC,ERMS,ARAT cpu0: 1MB 64b/line 16-way L2 cache cpu0: TSC frequency 2400132000 Hz cpu0: smt 0, core 0, package 0 mtrr: CPU supports MTRRs but not enabled by BIOS cpu0: apic clock running at 134MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Atom(TM) CPU C2758 @ 2.40GHz, 2408.75 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SSSE3,CX16,xTPR,SSE4 .1,SSE4.2,MOVBE,POPCNT,AES,RDRAND,HV,NXE,LONG,LAHF,3DNOWP,ITSC,ERMS,ARAT cpu1: 1MB 64b/line 16-way L2 cache cpu1: smt 0, core 0, package 1 ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins acpihpet0 at acpi0: 10000000 Hz acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpiprt0 at acpi0: bus 0 (PC00) "PNP0303" at acpi0 not configured "PNP0F13" at acpi0 not configured "PNP0501" at acpi0 not configured "PNP0501" at acpi0 not configured pvbus0 at mainbus0: bhyve pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 unknown vendor 0x1275 product 0x1275 rev 0x00 ahci0 at pci0 dev 4 function 0 "Intel 82801H AHCI" rev 0x00: apic 0 int 16, AHCI 1.3 ahci0: port 0: 6.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, BHYVE SATA DISK, 001> SCSI3 0/direct fixed t10.ATA_BHYVE_SATA_DISK_BHYVE-ABF0-1147-4A70 sd0: 9216MB, 512 bytes/sector, 18874368 sectors, thin virtio0 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00 vio0 at virtio0: address 00:a0:98:81:81:c6 virtio0: msix shared pcib0 at pci0 dev 31 function 0 "Intel 82371SB ISA" rev 0x00 isa0 at pcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com0: console com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0 mux 1 pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 /dev/ksyms: Symbol table not valid. vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (1eb522b194b459a8.a) swap on sd0b dump on sd0b ------ By applying the -w flag for bhyve start on the original machine, 6.1 starts as expected: Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2017 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 6.1 (RAMDISK_CD) #19: Sat Apr 1 13:49:18 MDT 2017 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD real mem = 251658240 (240MB) avail mem = 240402432 (229MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf101f (10 entries) bios0: vendor BHYVE version "1.00" date 03/14/2014 bios0: bhyve BHYVE acpi0 at bios0: rev 2 acpi0: tables DSDT APIC FACP HPET MCFG acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz, 3491.79 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,SS,HTT,PBE,SSE3,PCLMUL,DTES64,DS-CPL,SSSE3,SDBG,FMA3,CX16 ,xTPR,PCID,DCA,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PA GE1GB,LONG,LAHF,ABM,ITSC,FSGSBASE,BMI1,AVX2,BMI2,ERMS,INVPCID,ARAT cpu0: 256KB 64b/line 8-way L2 cache rdmsr to register 0xc80 on vcpu 0 cpu0: TSC frequency 3491790470 Hz cpu0: apic clock running at 134MHz cpu at mainbus0: not configured ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins acpiprt0 at acpi0: bus 0 (PC00) "PNP0303" at acpi0 not configured "PNP0F13" at acpi0 not configured "PNP0501" at acpi0 not configured "PNP0501" at acpi0 not configured pvbus0 at mainbus0: bhyve pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 unknown vendor 0x1275 product 0x1275 rev 0x00 ahci0 at pci0 dev 3 function 0 "Intel 82801H AHCI" rev 0x00: apic 0 int 16, AHCI 1.3 ahci0: port 0: 6.0Gb/s scsibus0 at ahci0: 32 targets cd0 at scsibus0 targ 0 lun 0: <BHYVE, BHYVE DVD-ROM, 001> ATAPI 5/cdrom removable ahci1 at pci0 dev 4 function 0 "Intel 82801H AHCI" rev 0x00: apic 0 int 17, AHCI 1.3 ahci1: port 0: 6.0Gb/s scsibus1 at ahci1: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, BHYVE SATA DISK, 001> SCSI3 0/direct fixed t10.ATA_BHYVE_SATA_DISK_BHYVE-5DBA-21D5-F87D sd0: 9216MB, 512 bytes/sector, 18874368 sectors, thin virtio0 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00 vio0 at virtio0: address 00:a0:98:51:e2:c1 virtio0: msix shared "Intel 82371SB ISA" rev 0x00 at pci0 dev 31 function 0 not configured isa0 at mainbus0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com0: console com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0 mux 1 softraid0 at root scsibus2 at softraid0: 256 targets root on rd0a swap on rd0b dump on rd0b erase ^?, werase ^W, kill ^U, intr ^C, status ^T Welcome to the OpenBSD/amd64 6.1 installation program. (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?