NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/57304: Recent updates to virtio trigger KASSERT with virtio_mmio on aarch64



>Number:         57304
>Category:       kern
>Synopsis:       Recent updates to virtio trigger KASSERT with virtio_mmio on aarch64
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 28 05:55:00 +0000 2023
>Originator:     Nick Hudson
>Release:        NetBSD -current
>Organization:
	N/A
>Environment:
	NetBSD 10.99.2 (GENERIC64) #130: Mon Mar 27 18:13:45 BST 2023
>Description:
Using the qemu command line 

/home/nick/qemu/build/aarch64-softmmu/qemu-system-aarch64 \
   -M virt -machine gic-version=3 -cpu max -m 8192 \
   -drive if=none,file=arm64.img,id=hd0 -device virtio-blk-device,drive=hd0 \
   -netdev type=user,id=net0 -device virtio-net-device,netdev=net0,mac=00:11:22:33:44:55 \
   -kernel netbsd.img \
   -append "root=dk1a"  \
   -nographic

Results in 

[   1.0000000] NetBSD/evbarm (fdt) booting ...
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 10.99.2 (GENERIC64) #130: Mon Mar 27 18:13:45 BST 2023
[   1.0000000]  nick@thinkbook:/home/nick/netbsd/nbcvs/obj.evbarm64-el/sys/arch/evbarm/compile/GENERIC64
[   1.0000000] total memory = 8172 MB
[   1.0000000] avail memory = 7877 MB
[   1.0000000] armfdt0 (root)
[   1.0000000] simplebus0 at armfdt0: linux,dummy-virt
[   1.0000000] cpus0 at simplebus0
[   1.0000000] psci0 at simplebus0: PSCI 1.1
[   1.0000000] simplebus1 at simplebus0
[   1.0000000] simplebus2 at simplebus0
[   1.0000000] cpu0 at cpus0: unknown CPU (ID = 0x000f0510), id 0x0
[   1.0000000] cpu0: package 0, core 0, smt 0
[   1.0000000] fclock0 at simplebus0: 24000000 Hz fixed clock (clk24mhz)
[   1.0000000] gicvthree0 at simplebus0: GICv3
[   1.0000000] gicvthree0: ITS [#0] Devices table @ 0x40030000/0x80000, Cacheable WA WB, Inner shareable
[   1.0000000] gicvthree0: ITS [#1] Collections table @ 0x400b0000/0x10000, Cacheable WA WB, Inner shareable
[   1.0000000] gtmr0 at simplebus0: Generic Timer
[   1.0000000] gtmr0: interrupting on GICv3 irq 27
[   1.0000000] armgtmr0 at gtmr0: Generic Timer (62500 kHz, virtual)
[   1.0000040] plcom0 at simplebus0: ARM PL011 UART
[   1.0000040] plcom0: txfifo 16 bytes
[   1.0000040] plcom0: console
[   1.0000040] plcom0: interrupting on GICv3 irq 33
[   1.0000040] plgpio0 at simplebus0: GPIO
[   1.0000040] gpio0 at plgpio0: 8 pins
[   1.0000040] qemufwcfg0 at simplebus0
[   1.0000040] virtio0 at simplebus0
[   1.0000040] virtio1 at simplebus0
[   1.0000040] virtio2 at simplebus0
[   1.0000040] virtio3 at simplebus0
[   1.0000040] virtio4 at simplebus0
[   1.0000040] virtio5 at simplebus0
[   1.0000040] virtio6 at simplebus0
[   1.0000040] virtio7 at simplebus0
[   1.0000040] virtio8 at simplebus0
[   1.0000040] virtio9 at simplebus0
[   1.0000040] virtio10 at simplebus0
[   1.0000040] virtio11 at simplebus0
[   1.0000040] virtio12 at simplebus0
[   1.0000040] virtio13 at simplebus0
[   1.0000040] virtio14 at simplebus0
[   1.0000040] virtio15 at simplebus0
[   1.0000040] virtio16 at simplebus0
[   1.0000040] virtio17 at simplebus0
[   1.0000040] virtio18 at simplebus0
[   1.0000040] virtio19 at simplebus0
[   1.0000040] virtio20 at simplebus0
[   1.0000040] virtio21 at simplebus0
[   1.0000040] virtio22 at simplebus0
[   1.0000040] virtio23 at simplebus0
[   1.0000040] virtio24 at simplebus0
[   1.0000040] virtio25 at simplebus0
[   1.0000040] virtio26 at simplebus0
[   1.0000040] virtio27 at simplebus0
[   1.0000040] virtio28 at simplebus0
[   1.0000040] virtio29 at simplebus0
[   1.0000040] virtio30 at simplebus0
[   1.0000040] virtio30: network device (id 1, rev. 0x01)
[   1.0000040] vioif0 at virtio30: features: 0x31870020<EVENT_IDX,INDIRECT_DESC,NOTIFY_ON_EMPTY,CTRL_MAC,CTRL_RX,CTRL_VQ,STATUS,MAC>
[   1.0000040] vioif0: Ethernet address 00:11:22:33:44:55
[   1.0000040] panic: kernel diagnostic assertion "len > 0 && offset + len <= map->dm_mapsize" failed: file "/home/nick/netbsd/nbcvs/src/sys/arch/arm/arm32/bus_dma.c", line 1112 len 8198 offset 20480 mapsize 24576
[   1.0000040] cpu0: Begin traceback...
[   1.0000040] trace fp ffffc00001208480
[   1.0000040] fp ffffc000012084b0 vpanic() at ffffc00000590708 netbsd:vpanic+0x178
[   1.0000040] fp ffffc00001208510 kern_assert() at ffffc00000826568 netbsd:kern_assert+0x58
[   1.0000040] fp ffffc000012085a0 _bus_dmamap_sync() at ffffc000000abe74 netbsd:_bus_dmamap_sync+0x90
[   1.0000040] fp ffffc00001208610 virtio_reset_vq() at ffffc000007b1970 netbsd:virtio_reset_vq+0x190
[   1.0000040] fp ffffc00001208680 virtio_alloc_vq() at ffffc000007b2be0 netbsd:virtio_alloc_vq+0x1c0
[   1.0000040] fp ffffc00001208740 vioif_attach() at ffffc000007b8e64 netbsd:vioif_attach+0xc24
[   1.0000040] fp ffffc00001208860 config_attach_internal() at ffffc0000057004c netbsd:config_attach_internal+0x1b8
[   1.0000040] fp ffffc000012088c0 config_found() at ffffc000005702a8 netbsd:config_found+0xd8
[   1.0000040] fp ffffc00001208930 virtio_mmio_fdt_attach() at ffffc000006b4b74 netbsd:virtio_mmio_fdt_attach+0x134
[   1.0000040] fp ffffc00001208980 config_attach_internal() at ffffc0000057004c netbsd:config_attach_internal+0x1b8
[   1.0000040] fp ffffc000012089e0 config_found() at ffffc000005702a8 netbsd:config_found+0xd8
[   1.0000040] fp ffffc00001208a50 fdt_scan() at ffffc000006a50b0 netbsd:fdt_scan+0x250
[   1.0000040] fp ffffc00001208be0 fdt_rescan() at ffffc000006a54e0 netbsd:fdt_rescan+0x50
[   1.0000040] fp ffffc00001208c10 config_attach_internal() at ffffc0000057004c netbsd:config_attach_internal+0x1b8
[   1.0000040] fp ffffc00001208c70 config_found() at ffffc000005702a8 netbsd:config_found+0xd8
[   1.0000040] fp ffffc00001208ce0 arm_fdt_attach() at ffffc00000072de8 netbsd:arm_fdt_attach+0x94
[   1.0000040] fp ffffc00001208d40 config_attach_internal() at ffffc0000057004c netbsd:config_attach_internal+0x1b8
[   1.0000040] fp ffffc00001208da0 config_rootfound() at ffffc00000570474 netbsd:config_rootfound+0x64
[   1.0000040] fp ffffc00001208e00 cpu_configure() at ffffc0000006e69c netbsd:cpu_configure+0x4c
[   1.0000040] fp ffffc00001208e30 main() at ffffc00000826844 netbsd:main+0x2d4
[   1.0000040] fp 0000000000000000 aarch64_start() at ffffc0000000189c netbsd:aarch64_start+0x109c
[   1.0000040] cpu0: End traceback...

>How-To-Repeat:
	See above
>Fix:
	Unknown



Home | Main Index | Thread Index | Old Index