From owner-freebsd-virtualization@FreeBSD.ORG Tue Feb 24 05:37:42 2015 Return-Path: Delivered-To: virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 476769EA for ; Tue, 24 Feb 2015 05:37:42 +0000 (UTC) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CE2C8D04 for ; Tue, 24 Feb 2015 05:37:41 +0000 (UTC) Received: by wgha1 with SMTP id a1so3013842wgh.12 for ; Mon, 23 Feb 2015 21:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sLdtC3iTXdk0TDtvXP8vEC5PCGKJD0gYfBSLszo/s5M=; b=CkHYy+2wzO3yo/coT2Ge+iO3sgB58Z9+PLE6ktYpj53ubSkCdwedBgqsbgMSGqdM1y uW272LCLyjYcFMYojnpvADrmd8d7vh9TBAwjb/uePs7bS/Rf08CEUqpDB+6IR8svKK3+ RnCojThSF/kUijhFl0edBgaOhqobH0cG6DdO8PKE+jGVcIKU56iKuaZ6pblysrrix//B wDRlSENbQX/laYkRLURfe3OIO4pogDayR+R78LTAP/bUewYRrVtD4cW9rfHoUPnUJjF+ zXGCjG38GUHTJ5Eqf2Oe0qdb9eIPa7zJ+rDNhShVmiuT3W0n6ExonF+/FSllLuXsuBgb ay6A== MIME-Version: 1.0 X-Received: by 10.194.6.228 with SMTP id e4mr28631821wja.63.1424756260316; Mon, 23 Feb 2015 21:37:40 -0800 (PST) Received: by 10.27.91.79 with HTTP; Mon, 23 Feb 2015 21:37:40 -0800 (PST) In-Reply-To: References: Date: Mon, 23 Feb 2015 21:37:40 -0800 Message-ID: Subject: Re: OpenBSD guest in bhyve on AMD CPU From: Neel Natu To: Jason Tubnor Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2015 05:37:42 -0000 Hi Jason, On Tue, Feb 10, 2015 at 9:40 PM, Neel Natu wrote: > Hi Jason, > > On Tue, Feb 10, 2015 at 7:38 PM, Jason Tubnor 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? > r279227 has a fix for this and should allow booting without the "-w". https://svnweb.freebsd.org/base?view=revision&revision=279227 best Neel > 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 >> Features2=0x802009 >> AMD Features=0xee500800 >> AMD Features2=0x37ff >> 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: >> 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 irqs 0-23 on motherboard >> random: initialized >> kbd1 at kbdmux0 >> acpi0: on motherboard >> acpi0: Power Button (fixed) >> acpi0: reservation of 0, a0000 (3) failed >> acpi0: reservation of 100000, cfbf0000 (3) failed >> cpu0: on acpi0 >> cpu1: on acpi0 >> cpu2: on acpi0 >> cpu3: on acpi0 >> attimer0: port 0x40-0x43 irq 0 on acpi0 >> Timecounter "i8254" frequency 1193182 Hz quality 0 >> Event timer "i8254" frequency 1193182 Hz quality 100 >> atrtc0: 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: on acpi0 >> pcib0: port 0xcf8-0xcff on acpi0 >> pci0: on pcib0 >> pcib1: at device 1.0 on pci0 >> pci1: on pcib1 >> vgapci0: port 0xee00-0xeeff mem >> 0xd0000000-0xdfffffff,0xfdfe0000-0xfdfeffff,0xfde00000-0xfdefffff irq >> 18 at device 5.0 on pci1 >> vgapci0: Boot video device >> hdac0: mem 0xfdffc000-0xfdffffff irq 19 >> at device 5.1 on pci1 >> pcib2: irq 18 at device 2.0 on pci0 >> pci2: on pcib2 >> em0: 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"