Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2015 21:40:15 -0800
From:      Neel Natu <neelnatu@gmail.com>
To:        Jason Tubnor <jason@tubnor.net>
Cc:        "freebsd-virtualization@freebsd.org" <virtualization@freebsd.org>
Subject:   Re: OpenBSD guest in bhyve on AMD CPU
Message-ID:  <CAFgRE9ERaMMMYdsn4-A1N0yvKs78%2BwaQmp5zsM=FRLh4adgcPQ@mail.gmail.com>
In-Reply-To: <CACLnyCJDF%2B6p-rD3AK8_c%2B_2D51s2Ju2d4RxkpqNnD4zNHPsMw@mail.gmail.com>
References:  <CACLnyCJDF%2B6p-rD3AK8_c%2B_2D51s2Ju2d4RxkpqNnD4zNHPsMw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Jason,

On Tue, Feb 10, 2015 at 7:38 PM, Jason Tubnor <jason@tubnor.net> wrote:
> Hi,
>
> As posted in IRC, I am checking here if anyone has come across this
> issue.  During boot on OpenBSD I get:
>
> panic: trap type 4, code=0, pc=ffffffff811b7134
>

I suspect that the guest is getting a #GP exception when accessing an
MSR that is not emulated by bhyve.

Can you start the guest with the "-w" option passed to bhyve?

best
Neel

> The operating system has halted.
> Please press any key to reboot.
>
> I don't get this with the same ISO on an Intel CPU.  Below is the
> console from the OpenBSD boot, the dmesg from FreeBSD and the bhyve
> command.  Any suggestions or tips greatly appreciated.
>
> Thanks,
>
> Jason.
>
> --------------------------
> console
>
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>         The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2015 OpenBSD. All rights reserved.  http://www.OpenBSD.org
>
> OpenBSD 5.7-beta (RAMDISK_CD) #733: Tue Jan 20 15:39:52 MST 2015
>     deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD
> real mem = 1056964608 (1008MB)
> avail mem = 1027194880 (979MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xf101f (9 entries)
> bios0: vendor BHYVE version "1.00" date 03/14/2014
> acpi0 at bios0: rev 2
> acpi0: sleep states S5
> acpi0: tables DSDT APIC FACP HPET MCFG
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Phenom(tm) II X4 955 Processor, 3214.13 MHz
> cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,POPCNT,HV,NXE,MMXX,FFXSR,PAGE1GB,LONG,3DNOW2,3DNOW,LAHF,CMPLEG,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,SKINIT,PERF,ITSC
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> 64b/line 16-way L2 cache, 6MB 64b/line 48-way L3 cache
> cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
> cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
> fatal protection fault in supervisor mode
> trap type 4 code 0 rip ffffffff811b7134 cs 8 rflags 10286 cr2  0 cpl e
> rsp ffffffff818058e0
> panic: trap type 4, code=0, pc=ffffffff811b7134
>
> The operating system has halted.
> Please press any key to reboot.
>
> -----
> dmesg
>
> Copyright (c) 1992-2015 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 10.1-STABLE #0 r278028: Sun Feb  1 18:05:27 UTC 2015
>     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> CPU: AMD Phenom(tm) II X4 955 Processor (3214.18-MHz K8-class CPU)
>   Origin="AuthenticAMD"  Id=0x100f43  Family=0x10  Model=0x4  Stepping=3
>   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
> real memory  = 17179869184 (16384 MB)
> avail memory = 16063627264 (15319 MB)
> Event timer "LAPIC" quality 400
> ACPI APIC Table: <GBT    GBTUACPI>
> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
> FreeBSD/SMP: 1 package(s) x 4 core(s)
>  cpu0 (BSP): APIC ID:  0
>  cpu1 (AP): APIC ID:  1
>  cpu2 (AP): APIC ID:  2
>  cpu3 (AP): APIC ID:  3
> ioapic0: Changing APIC ID to 8
> ioapic0 <Version 2.1> irqs 0-23 on motherboard
> random: <Software, Yarrow> initialized
> kbd1 at kbdmux0
> acpi0: <GBT GBTUACPI> on motherboard
> acpi0: Power Button (fixed)
> acpi0: reservation of 0, a0000 (3) failed
> acpi0: reservation of 100000, cfbf0000 (3) failed
> cpu0: <ACPI CPU> on acpi0
> cpu1: <ACPI CPU> on acpi0
> cpu2: <ACPI CPU> on acpi0
> cpu3: <ACPI CPU> on acpi0
> attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
> Timecounter "i8254" frequency 1193182 Hz quality 0
> Event timer "i8254" frequency 1193182 Hz quality 100
> atrtc0: <AT realtime clock> port 0x70-0x73 irq 8 on acpi0
> Event timer "RTC" frequency 32768 Hz quality 0
> Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
> acpi_timer0: <32-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
> acpi_button0: <Power Button> on acpi0
> pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> pci0: <ACPI PCI bus> on pcib0
> pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
> pci1: <ACPI PCI bus> on pcib1
> vgapci0: <VGA-compatible display> port 0xee00-0xeeff mem
> 0xd0000000-0xdfffffff,0xfdfe0000-0xfdfeffff,0xfde00000-0xfdefffff irq
> 18 at device 5.0 on pci1
> vgapci0: Boot video device
> hdac0: <ATI (0x970f) HDA Controller> mem 0xfdffc000-0xfdffffff irq 19
> at device 5.1 on pci1
> pcib2: <ACPI PCI-PCI bridge> irq 18 at device 2.0 on pci0
> pci2: <ACPI PCI bus> on pcib2
> em0: <Intel(R) PRO/1000 Network Connection 7.4.2> port 0xdf00-0xdf1f
> mem 0xfdde0000-0xfddfffff,0xfddc0000-0xfdddffff irq 18 at device 0.0
> on pci2
>
> -----
> bhyve command
>
> bhyve -AI -H -P -W -s 0:0,amd_hostbridge -s 1:0,lpc -s
> 2:0,virtio-net,tap20 -s 2:1,virtio-net,tap22 -s 2:2,virtio-net,tap23
> -s 3:0,virtio-blk,/bhyve/vm/vmhost/disk/disk01.img -s
> 4:0,ahci-cd,/iso/OpenBSD-install57beta.iso -l com1,/dev/nmdm1A -c 1 -m
> 1024M vmhost
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFgRE9ERaMMMYdsn4-A1N0yvKs78%2BwaQmp5zsM=FRLh4adgcPQ>