Strange panic at boot with vmm in loader.conf vs manually loading it

From: Mike Tancsa <mike_at_sentex.net>
Date: Fri, 12 Oct 2018 11:52:35 -0400
I am guessing this does not have anything to do with vmm being loaded,
but hardware being initialized in a particular order? If I load vmm in
loader.conf, the box panics at boot up.  However, manually loading it
all seems to work.  Hardware is PRIME X370-PRO, AMD Ryzen 5 1600X 32G
RAM.  FreeBSD 12.0-ALPHA9 r339328 GENERIC-NODEBUG


Leading up to the crash, I see


ugen0.1: <0x1022 XHCI root HUB> at usbus0
ugen1.1: <0x1b21 XHCI root HUB> at usbus1
Trying to mount root from zfs:zroot/ROOT/default []...
uhub0: ugen2.1: <0x1022 XHCI root HUB> at usbus2
Root mount waiting for: usbus2<0x1022 XHCI root HUB, class 9/0, rev
3.00/1.00, addr 1> on usbus0
 usbus1 usbus0
uhub1: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2
uhub2: <0x1b21 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
uhub2: 4 ports with 4 removable, self powered
uhub1: 8 ports with 8 removable, self powered
uhub0: 22 ports with 22 removable, self powered

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x398
fault code              = supervisor write data, page not present
instruction pointer     = 0x20:0xffffffff8273d776
stack pointer           = 0x28:0xfffffe0075d55230
frame pointer           = 0x28:0xfffffe0075d55270
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 1 (kernel)
[ thread pid 1 tid 100002 ]
Stopped at      rrw_enter_read_impl+0x36:       lock cmpxchgq  
%r14,0x18(%rbx)
db> bt
Tracing pid 1 tid 100002 td 0xfffff8000567d580
rrw_enter_read_impl() at rrw_enter_read_impl+0x36/frame 0xfffffe0075d55270
zfs_mount() at zfs_mount+0x7b2/frame 0xfffffe0075d55400
vfs_domount() at vfs_domount+0x5b2/frame 0xfffffe0075d55630
vfs_donmount() at vfs_donmount+0x930/frame 0xfffffe0075d556d0
kernel_mount() at kernel_mount+0x3d/frame 0xfffffe0075d55720
parse_mount() at parse_mount+0x451/frame 0xfffffe0075d55860
vfs_mountroot() at vfs_mountroot+0x7a0/frame 0xfffffe0075d559f0
start_init() at start_init+0x27/frame 0xfffffe0075d55a70
fork_exit() at fork_exit+0x83/frame 0xfffffe0075d55ab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0075d55ab0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
db>

On a normal boot, the next line would be atrtc0

uhub0: Root mount waiting for: usbus2ugen2.1: <0x1022 XHCI root HUB> at usbus2
<0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
 usbus1 usbus0uhub1: <0x1b21 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1

uhub2: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus2
uhub1: 4 ports with 4 removable, self powered
uhub2: 8 ports with 8 removable, self powered
uhub0: 22 ports with 22 removable, self powered
atrtc0: providing initial system time
start_init: trying /sbin/init
Setting hostuuid: c3297ba0-3f01-11e7-8725-6045cba08a84.
Setting hostid: 0x094fa67e.
Starting file system checks:
Mounting local filesystems:.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/perl5/5.26/mach/CORE
32-bit compatibility ldconfig path: /usr/lib32
Setting hostname: ryzenbsd12.sentex.ca.

Manually loading it, dmesg shows

AMD-Vi: IVRS Info VAsize = 64 PAsize = 48 GVAsize = 2 flags:0
driver bug: Unable to set devclass (class: ppc devname: (unknown))
ivhd0: <AMD-Vi/IOMMU ivhd with EFR> on acpi0
ivhd0: Flag:b0<IotlbSup,Coherent>
ivhd0: Features(type:0x11) MsiNumPPR = 0 PNBanks= 2 PNCounters= 0
ivhd0: Extended features[31:0]:22294ada<PPRSup,NXSup,GTSup,IASup> HATS = 0x2 GATS = 0x0 GLXSup = 0x1 SmiFSup = 0x1 SmiFRC = 0x2 GAMSup = 0x1 DualPortLogSup = 0x2 DualEventLogSup = 0x2
ivhd0: Extended features[62:32]:f77ef<USSup> Max PASID: 0x2f DevTblSegSup = 0x3 MarcSup = 0x1
ivhd0: supported paging level:7, will use only: 4
ivhd0: device range: 0x0 - 0xffff
ivhd0: PCI cap 0x190b640f_at_0x40 feature:19<IOTLB,EFR,CapExt>

and loading it manually with boot.verbose set

pci0: driver added
found-> vendor=0x1022, dev=0x1451, revid=0x00
        domain=0, bus=0, slot=0, func=2
        class=08-06-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0004, statreg=0x0010, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        MSI supports 4 messages, 64 bit
pci0:0:0:2: reprobing on driver added
found-> vendor=0x1022, dev=0x790b, revid=0x59
        domain=0, bus=0, slot=20, func=0
        class=0c-05-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0403, statreg=0x0220, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:20:0: reprobing on driver added
pci1: driver added
pci2: driver added
pci3: driver added
pci4: driver added
pci5: driver added
pci6: driver added
pci7: driver added
pci8: driver added
pci9: driver added
found-> vendor=0x1425, dev=0x5501, revid=0x00
        domain=0, bus=9, slot=0, func=5
        class=01-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=b, irq=55
        powerspec 3  supports D0 D3  current D0
        MSI supports 32 messages, 64 bit, vector masks
        MSI-X supports 40 messages in map 0x20
pci0:9:0:5: reprobing on driver added
found-> vendor=0x1425, dev=0x5601, revid=0x00
        domain=0, bus=9, slot=0, func=6
        class=0c-04-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=c, irq=52
        powerspec 3  supports D0 D3  current D0
        MSI supports 32 messages, 64 bit, vector masks
        MSI-X supports 40 messages in map 0x20
pci0:9:0:6: reprobing on driver added
pci10: driver added
pci11: driver added
found-> vendor=0x1022, dev=0x145a, revid=0x00
        domain=0, bus=11, slot=0, func=0
        class=13-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        powerspec 3  supports D0 D3  current D0
pci0:11:0:0: reprobing on driver added
found-> vendor=0x1022, dev=0x1456, revid=0x00
        domain=0, bus=11, slot=0, func=2
        class=10-80-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=b, irq=36
        powerspec 3  supports D0 D3  current D0
        MSI supports 2 messages, 64 bit
        MSI-X supports 2 messages in map 0x24
pci0:11:0:2: reprobing on driver added
pci12: driver added
found-> vendor=0x1022, dev=0x1455, revid=0x00
        domain=0, bus=12, slot=0, func=0
        class=13-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        powerspec 3  supports D0 D3  current D0
pci0:12:0:0: reprobing on driver added
AMD-Vi: IVRS Info VAsize = 64 PAsize = 48 GVAsize = 2 flags:0
ivhd: ivhd0 already exists; skipping it
ACPI: Processor \134_PR_.P00C (ACPI ID 13) ignored
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
ACPI: Processor \134_PR_.P00D (ACPI ID 14) ignored
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
ACPI: Processor \134_PR_.P00E (ACPI ID 15) ignored
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
ACPI: Processor \134_PR_.P00F (ACPI ID 16) ignored
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
ppc: ppc-1 already exists; skipping it
driver bug: Unable to set devclass (class: ppc devname: (unknown))
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
Table 'FACP' at 0xb5adbcb0
FACP: Found table at 0xb5adbcb0
ivhd0: <AMD-Vi/IOMMU ivhd with EFR> on acpi0
ivhd0: Flag:b0<IotlbSup,Coherent>
ivhd0: Features(type:0x11) MsiNumPPR = 0 PNBanks= 2 PNCounters= 0
ivhd0: Extended features[31:0]:22294ada<PPRSup,NXSup,GTSup,IASup> HATS = 0x2 GATS = 0x0 GLXSup = 0x1 SmiFSup = 0x1 SmiFRC = 0x2 GAMSup = 0x1 DualPortLogSup = 0x2 DualEventLogSup = 0x2
ivhd0: Extended features[62:32]:f77ef<USSup> Max PASID: 0x2f DevTblSegSup = 0x3 MarcSup = 0x1
ivhd0: supported paging level:7, will use only: 4
ivhd0: device range: 0x0 - 0xffff
ivhd0: PCI cap 0x190b640f_at_0x40 feature:19<IOTLB,EFR,CapExt>
msi: routing MSI IRQ 305 to local APIC 12 vector 52


	---Mike



-- 
-------------------
Mike Tancsa, tel +1 519 651 3400 x203
Sentex Communications, mike_at_sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   
Received on Fri Oct 12 2018 - 13:52:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:18 UTC