Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2012 11:09:42 -0700
From:      "sree.openwrk" <sree.openwrk@gmail.com>
To:        Neel Natu <neelnatu@gmail.com>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: Bhyve - Host kernel panic after running 'kldload vmm'
Message-ID:  <CADYnSLCTWtKwv-Dx5YadJcgFF%2BpRBDsj_ypLPViaLYsTbTijAA@mail.gmail.com>
In-Reply-To: <CADYnSLBC8c8PGo=XNB5QtHuyTtBUzmd-ompEK%2BM4CgdkxvBZ-w@mail.gmail.com>
References:  <CADYnSLCwGyeiotOLON0nu0j%2Bp=K=PRE-nEJKzi5sPSEK=bRURQ@mail.gmail.com> <CAFgRE9GqsUHynhAf-dw3nFd_Mazb82FvZ3-Z_qcuDmA7umyKwQ@mail.gmail.com> <CADYnSLDNbx9UN6xSUuO%2BYOebmUFy_PEfDk6_DBPrqX2%2BRgzMEA@mail.gmail.com> <CADYnSLBC8c8PGo=XNB5QtHuyTtBUzmd-ompEK%2BM4CgdkxvBZ-w@mail.gmail.com>

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

[-- Attachment #1 --]
I tried to use the prebuilt vm1.tar.gz from
http://people.freebsd.org/~neel/bhyve/vm1.tar.gz.
Rest of the  steps are as described in my earlier e-mail thread. When I try
to run the vm1, I get kernel panic. I am attaching herewith the backtrace
for the kernel panic when I run the prebuilt vm1 (from Neel's home
directory).


On Thu, Jul 19, 2012 at 4:55 PM, sree.openwrk <sree.openwrk@gmail.com>wrote:

> Hi
> I have hit another road block while trying to run the guest using bhyve.
> These are the steps I followed. I have used
> http://people.freebsd.org/~neel/bhyve/bhyve_instructions.txt as the
> reference for preparing and running guest.
> 1. As posted in my previous e-mail, I installed FreeBSD 9 and then checked
> out /projects/bhyve and installed the world and kernel from that. Later I
> am going to use the same kernel, (built from /projects/bhyve, thats used to
> update from Freebsd-9 to latest in /projects/bhyve) for the guest in step
> 9. Also the virtio kernel modules I use in step 9 are from the ones built
> from /projects/bhyve.
> 2. I have 8gb ram and I have set aside 4gb for the vms.
>       sysctl -a | grep hw.physmem
>       hw.physmem: 3185541120
> 3.  I have successfully performed upto step 7 in
> http://people.freebsd.org/~neel/bhyve/bhyve_instructions.txt.
> 4. Skipped step 8, as I plan to use virtio built from the latest code from
> /projects/bhyve (As part of updating the host freebsd to the latest source
> in /projects/bhyve, as mentioned above, I also made the virtio modules.)
> 5. Created vm1 directory in /usr/share and created all its sub-directories
> and their contents. I copied only the mdroot file from
> http://people.freebsd.org/~neel/bhyve/vm1.tar.gz. (remember that I copied
> /boot/kernel (i.e. host kernel) as the guest kernel)
> 6. Then cd to /usr/share/vm1 and execute './vmrun.sh vm1'.  After the
> freebsd boot loader prompy comes up for the guest, after I hit enter, I get
> segfaulted with core.
>
> I am attaching herewith the backtrace of the core. Also I am pasting below
> the loader.conf file witihn /usr/share/vm1/boot.  Any idea what is
> happening? Also is there any easy way to configure and run the guest, after
> building the host kernel with bhyve hypervisor?
>
> loader.conf
> -------------------
> kernel="/kernel"
> virtio_load="YES"
> if_vtnet_load="YES"
> virtio_pci_load="YES"
> virtio_blk_load="YES"
>
> kern.hz="100"
> hw.pci.enable_msix="0"
> hw.pci.honor_msi_blacklist="0"
> bootverbose="1"
>
> mfsroot_load="YES"
> mfsroot_type="mfs_root"
> mfsroot_name="mdroot"
>
> Thanks
>
>
> On Wed, Jul 18, 2012 at 11:17 AM, sree.openwrk <sree.openwrk@gmail.com>wrote:
>
>> Hey Neel
>> Thanks for the immediate reply.
>> I found that the BIOS did not have vm-x and vt-d enabled and luckily
>> enabling them fixed the issue.
>> Now I am able to load the vmm module and its not throwing any error as of
>> now.
>>
>> Thanks
>>
>>
>> On Tue, Jul 17, 2012 at 10:07 PM, Neel Natu <neelnatu@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Jul 17, 2012 at 9:12 PM, s vas <sree.openwrk@gmail.com> wrote:
>>> > Hi
>>> > I have a kernel panic when loading bhyve hypervisor kernel module.
>>> > These are the steps I followed
>>> > 1. First I installed Freebsd 9 on my machine which has Intel-x86_64
>>> and 8Gb
>>> > Ram
>>> > 2.  The following output from dmesg.boot confirm that vmx is enabled
>>> in the
>>> > machine.
>>> > PU: Intel(R) Core(TM) i5 CPU       M 520  @ 2.40GHz (2394.06-MHz
>>> K8-class
>>> > CPU)
>>> >   Origin = "GenuineIntel"  Id = 0x20655  Family = 6  Model = 25
>>>  Stepping =
>>> > 5
>>> >
>>> >
>>> Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
>>> >
>>> >
>>> Features2=0x29ae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,AESNI>
>>> >   AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
>>> >   AMD Features2=0x1<LAHF>
>>> >   TSC: P-state invariant, performance statistics
>>> >
>>> > 3. Then I checked out the latest code from svn://
>>> > svn.freebsd.org/base/projects/bhyve/
>>> >     a) I built world and kernel
>>> >     b) Followed the steps in
>>> >
>>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
>>> > (25.7.1
>>> > The Canonical Way to Update Your System) to install the new kernel and
>>> to
>>> > install the new world.
>>> >     c) Rebooted to the newly built kernel.
>>> > 4. I wanted to give 4gb to the host kernel and the remaining memory
>>> for the
>>> > guest. So I set hw.physmem to "0x100000000".
>>> > 5. Rebooted the host so that hw.physmem takes effect (Following
>>> > http://people.freebsd.org/~neel/bhyve/bhyve_instructions.txt)
>>> >     a) This is the sysctl output
>>> >        sysctl -a | grep hw.physmem
>>> >        hw.physmem: 3185545216
>>> >        cat /boot/loader.conf
>>> >        hw.physmem="0x100000000"
>>> > 6. Then executed 'kldload vmm'. Got kernel panic with the following
>>> trace
>>> >
>>> > -----
>>> > #0 - #8 is panic related call trace....
>>> > ........
>>>
>>> Could you provide the stack frames above vmx_enable()?
>>>
>>> It is unclear from the subset of stack frames provided here as to what
>>> the cause of the panic is.
>>>
>>> best
>>> Neel
>>>
>>> > #9  0xffffffff8189b91f in vmx_enable (arg=Variable "arg" is not
>>> available.
>>> > ) at vmx_cpufunc.h:65
>>> > #10 0xffffffff808b9e5d in smp_rendezvous_action ()
>>> >     at /media/fbsd_part2/bhyve/bhyve/
>>> > sys/kern/subr_smp.c:381
>>> > #11 0xffffffff80b5f0c5 in Xrendezvous () at apic_vector.S:342
>>> > #12 0xffffffff80b58e86 in acpi_cpu_c1 ()
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/amd64/acpica/acpi_machdep.c:97
>>> > #13 0xffffffff803467ce in acpi_cpu_idle ()
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/dev/acpica/acpi_cpu.c:967
>>> > #14 0xffffffff80b622b5 in cpu_idle_acpi (busy=Variable "busy" is not
>>> > available.
>>> > )
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/machdep.c:689
>>> > #15 0xffffffff80b64ab8 in cpu_idle (busy=0)
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/machdep.c:843
>>> > #16 0xffffffff8089ed21 in sched_idletd (dummy=Variable "dummy" is not
>>> > available.
>>> > )
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/kern/sched_ule.c:2583
>>> > #17 0xffffffff80846835 in fork_exit (
>>> >     callout=0xffffffff8089eae0 <sched_idletd>, arg=0x0,
>>> >     frame=0xffffff800023cc40)
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/kern/kern_fork.c:992
>>> > #18 0xffffffff80b5e55e in fork_trampoline ()
>>> >     at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/exception.S:602
>>> >
>>> > I am attaching herewith the text core as well as the info. Can someone
>>> tell
>>> > me whats happening?
>>> >
>>> > _______________________________________________
>>> > 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"
>>> >
>>>
>>
>>
>

[-- Attachment #2 --]
#0  doadump (textdump=0) at /media/fbsd_part2/bhyve/bhyve/sys/kern/kern_shutdown.c:268
#1  0xffffffff8032e970 in db_dump (dummy=Variable "dummy" is not available.
) at /media/fbsd_part2/bhyve/bhyve/sys/ddb/db_command.c:538
#2  0xffffffff8032df61 in db_command (last_cmdp=0xffffffff811d0ee0, cmd_table=Variable "cmd_table" is not available.
) at /media/fbsd_part2/bhyve/bhyve/sys/ddb/db_command.c:449
#3  0xffffffff8032e1b0 in db_command_loop () at /media/fbsd_part2/bhyve/bhyve/sys/ddb/db_command.c:502
#4  0xffffffff80330309 in db_trap (type=Variable "type" is not available.
) at /media/fbsd_part2/bhyve/bhyve/sys/ddb/db_main.c:231
#5  0xffffffff808adb98 in kdb_trap (type=3, code=0, tf=0xffffff80d7af5500) at /media/fbsd_part2/bhyve/bhyve/sys/kern/subr_kdb.c:654
#6  0xffffffff80b73b8d in trap (frame=0xffffff80d7af5500) at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/trap.c:573
#7  0xffffffff80b5e033 in calltrap () at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/exception.S:228
#8  0xffffffff808ad61b in kdb_enter (why=0xffffffff80dc9cea "panic", msg=0x80 <Address 0x80 out of bounds>) at cpufunc.h:63
#9  0xffffffff80875731 in panic (fmt=Variable "fmt" is not available.
) at /media/fbsd_part2/bhyve/bhyve/sys/kern/kern_shutdown.c:633
#10 0xffffffff80b73f67 in trap (frame=0xffffff80d7af5d00) at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/trap.c:460
#11 0xffffffff80b5e033 in calltrap () at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/exception.S:228
#12 0xffffffff80b5f3e1 in fpusave (addr=0xfffffe006503d000) at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/fpu.c:162
#13 0xffffffff81894fad in vm_run (vm=0xfffffe0007ddc800, vmrun=0xfffffe000d915140)
    at /media/fbsd_part2/bhyve/bhyve/sys/modules/vmm/../../amd64/vmm/vmm.c:518
#14 0xffffffff818957e1 in vmmdev_ioctl (cdev=0x10, cmd=3224401408, data=0xfffffe000d915140 "", fflag=Variable "fflag" is not available.
)
    at /media/fbsd_part2/bhyve/bhyve/sys/modules/vmm/../../amd64/vmm/vmm_dev.c:213
#15 0xffffffff807923fa in devfs_ioctl_f (fp=0xfffffe0067866640, com=3224401408, data=Variable "data" is not available.
) at /media/fbsd_part2/bhyve/bhyve/sys/fs/devfs/devfs_vnops.c:757
#16 0xffffffff808c72ad in kern_ioctl (td=Variable "td" is not available.
) at file.h:287
#17 0xffffffff808c754d in sys_ioctl (td=0xfffffe000d5bf460, uap=0xffffff80d7af5bb0) at /media/fbsd_part2/bhyve/bhyve/sys/kern/sys_generic.c:691
#18 0xffffffff80b72a19 in amd64_syscall (td=0xfffffe000d5bf460, traced=0) at subr_syscall.c:135
#19 0xffffffff80b5e317 in Xfast_syscall () at /media/fbsd_part2/bhyve/bhyve/sys/amd64/amd64/exception.S:387
#20 0x0000000800f6b8cc in ?? ()
Previous frame inner to this frame (corrupt stack?)


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADYnSLCTWtKwv-Dx5YadJcgFF%2BpRBDsj_ypLPViaLYsTbTijAA>