[Bug 294706] powerpc64: kernel crashes on boot and fails to initialize virtio-scsi

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 22 Apr 2026 15:14:18 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294706

            Bug ID: 294706
           Summary: powerpc64: kernel crashes on boot and fails to
                    initialize virtio-scsi
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: powerpc
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jing@jing.rocks

This issue only happens on powerpc64 but not powerpc64le. I have a FreeBSD VM
that runs on qemu, with the root disk using the virtio-scsi disk controller.
Until 16.snap20260323212910, everything was working fine.

serial output:

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...               
cas: selected radix MMU
Kernel entry at 0x1017d0 ...
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
---<<BOOT>>---
Copyright (c) 1992-2026 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 16.0-CURRENT main-n285251-07a3501e6c85 GENERIC powerpc
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git
llvmorg-19.1.7-0-gcd708029e0b2)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
cpu0: IBM POWER9 revision 2.2, 2400.00 MHz
cpu0: Features
dc007182<PPC32,PPC64,ALTIVEC,FPU,MMU,SMT,ISNOOP,ARCH205,ARCH206,VSX,TRUELE>
cpu0: Features2 bee00000<ARCH207,DSCR,ISEL,TAR,VCRYPTO,ARCH300,IEEE128,DARN>
real memory  = 137393299456 (131028 MB)
avail memory = 133712596992 (127518 MB)
FreeBSD/SMP: Multiprocessor System Detected: 64 CPUs
random: registering fast source PowerISA DARN random number generator
random: fast provider: "PowerISA DARN random number generator"
random: unblocking device.
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree> on nexus0
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
xicp0: <External Interrupt Presentation Controller> on ofwbus0
xicp0: Handling CPUs 0-63
vdevice0: <POWER Hypervisor Virtual Device Root> on ofwbus0
uart0: <POWER Hypervisor Virtual Serial Port> irq 16781569 on vdevice0
pcib0: <RTAS Host-PCI bridge> on ofwbus0
pci0: <POWER Hypervisor PCI bus> on pcib0
virtio_pci0: <VirtIO PCI (modern) SCSI adapter> port 0xc0-0xff mem
0x80080000-0x80080fff,0x210000020000-0x210000023fff irq 4609 at device 5.0
numa-domain 0 on pci0
vtscsi0: <VirtIO SCSI Adapter> numa-domain 0 on virtio_pci0
virtio_pci0: virtqueue 1 (vtscsi0 event) does not exist (size is zero)
virtio_pci0: cannot allocate virtqueue 1: 19
vtscsi0: cannot allocate virtqueues

fatal kernel trap:

   exception       = 0x380 (data segment exception)
   virtual address = 0xdeadc0dedeadc0de
   dsisr           = 0x0
   srr0            = 0xc000000000e86490 (0xe86490)
   srr1            = 0x8000000000001032
   current msr     = 0x8000000000001032
   lr              = 0xc0000000006c3d78 (0x6c3d78)
   frame           = 0xc00800000000ba50
   curthread       = 0xc0000000017e4360
          pid = 0, comm = kernel

panic: data segment exception trap
cpuid = 0
time = 1
KDB: stack backtrace:
0xc00800000000b780: at vpanic+0x1b0
0xc00800000000b830: at panic+0x44
0xc00800000000b860: at trap+0x300
0xc00800000000b990: at powerpc_interrupt+0x1cc
0xc00800000000ba20: kernel DSE trap @ 0xdeadc0dedeadc0de by
bus_dmamap_sync+0x20: srr1=0x8000000000001032
            r1=0xc00800000000bcd0 cr=0x22200282 xer=0 ctr=0x1
r2=0xc0000000018d4000 frame=0xc00800000000ba50
0xc00800000000bcd0: at -0x4
0xc00800000000bd20: at virtqueue_dequeue+0x3c
0xc00800000000bda0: at vtscsi_complete_vqs_locked+0x118
0xc00800000000bdf0: at vtscsi_detach+0xf0
0xc00800000000bf70: at vtscsi_attach+0x270
0xc00800000000c130: at device_attach+0x568
0xc00800000000c210: at vtpci_modern_probe_and_attach_child+0xb0
0xc00800000000c260: at vtpci_modern_attach+0x5e0
0xc00800000000c310: at device_attach+0x568
0xc00800000000c3f0: at bus_attach_children+0x88
0xc00800000000c430: at ofw_pcibus_attach+0x3bc
0xc00800000000c550: at device_attach+0x568
0xc00800000000c630: at bus_attach_children+0x88
0xc00800000000c670: at ofw_pcib_attach+0x54
0xc00800000000c6a0: at rtaspci_attach+0x19c
0xc00800000000c6f0: at device_attach+0x568
0xc00800000000c7d0: at bus_generic_new_pass+0x190
0xc00800000000c820: at bus_generic_new_pass+0x104
0xc00800000000c870: at bus_generic_new_pass+0x104
0xc00800000000c8c0: at root_bus_configure+0x6c
0xc00800000000c910: at configure+0x1c
0xc00800000000c940: at mi_startup+0x288
0xc00800000000ca50: at __start+0xc4
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x70: ori     r0, r0, 0x0
db>


qemu command (example):

/usr/bin/qemu-system-ppc64 \
-smp 64 \
-cpu host \
-m 131072 \
-accel kvm \
-device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \
-drive
'file=/dev/zvol/tank/dummy,if=none,id=drive-scsi0,cache=writeback,discard=on,format=raw,aio=io_uring,detect-zeroes=unmap'
\
-device
'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,rotation_rate=1'
\
-vga none \
-nographic \
-machine 'type=pseries'

-- 
You are receiving this mail because:
You are the assignee for the bug.