Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2026 18:00:37 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Andrew Turner <andrew@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Sarah Walker <sarah.walker2@arm.com>
Subject:   Re: git: c16c95192f01 - main - virtio_net: Use bus_dma for rxq/txq buffers
Message-ID:  <ae_chW7sJV1YAa-h@nuc>
In-Reply-To: <69ef4acf.1fcd2.4d4d3e54@gitrepo.freebsd.org>

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

On Mon, Apr 27, 2026 at 11:38:55AM +0000, Andrew Turner wrote:
> The branch main has been updated by andrew:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=c16c95192f01237a876eb7bc336e3bbda9310171
> 
> commit c16c95192f01237a876eb7bc336e3bbda9310171
> Author:     Sarah Walker <sarah.walker2@arm.com>
> AuthorDate: 2026-02-16 14:19:13 +0000
> Commit:     Andrew Turner <andrew@FreeBSD.org>
> CommitDate: 2026-04-27 11:37:53 +0000
> 
>     virtio_net: Use bus_dma for rxq/txq buffers
>     
>     While the majority of virtio platforms will be fully coherent, some may
>     require cache maintenance or other specific device memory handling (eg for
>     secure partitioning). Using bus_dma allows for these usecases.
>     
>     The virtio buffers are marked as coherent; this should ensure that sync
>     calls are no-ops in the common cases.
>     
>     Reviewed by:    andrew
>     Sponsored by:   Arm Ltd
>     Differential Revision:  https://reviews.freebsd.org/D55492

After this commit I see a ton of warnings during boot in an amd64 bhyve
VM:

uma_zalloc_debug: zone "malloc-16" with the following non-sleepable locks held:                                                                                
exclusive sleep mutex vtnet0-rx0 (vtnet0-rx0) r = 0 (0xfffffe00f1e71d80) locked @ /home/markj/sb/main/src/sys/dev/virtio/network/if_vtnet.c:3584               
exclusive sleep mutex vtnet0 (VTNET Core Lock) r = 0 (0xfffffe00f1b819a8) locked @ /home/markj/sb/main/src/sys/dev/virtio/network/if_vtnet.c:1572              
stack backtrace:                                                               
#0 0xffffffff8134b497 at witness_debugger+0x137                                                                                                                
#1 0xffffffff8134dad9 at witness_warn+0x749                                                                                                                    
#2 0xffffffff819524bc at uma_zalloc_debug+0xbc                                 
#3 0xffffffff81951df0 at uma_zalloc_arg+0x30                                   
#4 0xffffffff812083cb at malloc+0xab                                           
#5 0xffffffff8126f92c at sysctl_add_oid+0x7c                                                                                                                   
#6 0xffffffff81b92fcd at alloc_bounce_zone+0x58d                                                                                                               
#7 0xffffffff81b91164 at bounce_bus_dmamap_create+0x294                                                                                                        
#8 0xffffffff80ededc6 at vtnet_rx_alloc_buf+0x166                                                                                                              
#9 0xffffffff80ee2ce2 at vtnet_init_locked+0xb42                                                                                                               
#10 0xffffffff80ee10da at vtnet_ioctl+0x33a                                                                                                                    
#11 0xffffffff814b63da at ifhwioctl+0x153a                                     
#12 0xffffffff814b81bb at ifioctl+0x76b                                                                                                                        
#13 0xffffffff81356d36 at kern_ioctl+0x406                                     
#14 0xffffffff8135687c at sys_ioctl+0x26c                                                                                                                      
#15 0xffffffff81bffea5 at amd64_syscall+0x3d5                                                                                                                  
#16 0xffffffff81bb77fb at fast_syscall_common+0xf8

It seems surprising that we need to create a UMA zone at all.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ae_chW7sJV1YAa-h>