From nobody Fri Feb 13 02:01:32 2026 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fBwQM1dJpz6S8Cg for ; Fri, 13 Feb 2026 02:01:47 +0000 (UTC) (envelope-from emil@etsalapatis.com) Received: from mail-yx1-xb134.google.com (mail-yx1-xb134.google.com [IPv6:2607:f8b0:4864:20::b134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fBwQL1PS4z4MH7 for ; Fri, 13 Feb 2026 02:01:46 +0000 (UTC) (envelope-from emil@etsalapatis.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yx1-xb134.google.com with SMTP id 956f58d0204a3-649e97f1e1eso409282d50.1 for ; Thu, 12 Feb 2026 18:01:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770948104; cv=none; d=google.com; s=arc-20240605; b=dHcpR2rf7T3pAklgS5fpJE8+hsdK5WgKHt6hGmSuADT+PmDhIrzbresBTHm7S1ib3q GhTJjLaeuXJ/U3NH/ZKEhzDNlYb14CyCcRlEsO0tY2VDDWi2q/3Q9ca0jquPc3gP1CiN 2D/X/7RHUX2NJusetMYfJstDOIUgVFnxIneR0I+DIrDZ9iOY9vprnpTQ0oI8TOzpB/rV WbjLn3yN9O1QEel+QsD2Ohu1kblKYsi0jZ8XJYnjdzvLXXgqTKrIEDPXkmKWV5V1XkVl 0wYh/26nHrBrex0mAGqCjlA6PYMuNge5uCmqqNOWjQIWFk4nikDpfqccrLNzR0ZWy6jo kozg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=izdr3ogf/lwP+QMONC1N5n5T6td4hy50ex5ilWq2Z4w=; fh=7IYwslvkInY5h6lqIYjPcjeOMjpdNzr8C0gLHmLdxgE=; b=cIAxUc3AFmcbBpFCWwjBilbPst2tAaX0JJRJHwBOwg1qucwjl8Zt/32Hp1Qp78Lf2d NledLoC1xbNI0xxf/XAHCbYVOx+IfwTJ+SYXpIfW9xD/ebOgXotLdSlPEO2XuRN/bphS yD4gfRf3rbmzwTfwLMk+8PAhMJFyOxWuClznIQMhDi4J3ZyxarcmxYtqSvHC2sNvq3Ql Je1Wp6kgCgrwDKPeLYmIl46R/6XyFwAZ0u5OSd1dj5pP0k/M+pAj3L1yhMbfuk3h9T3e DEvUnqip7gTIBUGLKqJk1C0z6nlQ70yXOgsVRdXK9hmGluK0LmyrOkDj9QCwdpsgORiR VZ8A==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsalapatis-com.20230601.gappssmtp.com; s=20230601; t=1770948104; x=1771552904; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=izdr3ogf/lwP+QMONC1N5n5T6td4hy50ex5ilWq2Z4w=; b=bA+E0+z99yxDCvSyuxxlwpClk26yyvW/gxTOAd0RxyqFzAdNbXK3anpwvrRd6/B1+R 4OmCSfGWD1MGMTRgEoVxoJQYQ1H01sTo39pykhDmiFY8NfXHfc6RDjLlNL+dr/S9F74R dHxDqTeXv3ntHOe0JOLWseFNIKVC0ZQ61K0gnp6dxmBNLl/Ze2tJWgjweo+n1U/H8BdK /g2bHG4qisncsakmAgaobQHDyYYu+g2QlKPdEQ6/1PBmu2cZQ2+b4k7VjC++sIfFw3kn wBmEp17dB4/ge+7TfxdLGSJNOuFCJi9UDtOBnEYGs5NqPPi3PZSJXleHZo43vzj/zs0q np8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770948104; x=1771552904; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=izdr3ogf/lwP+QMONC1N5n5T6td4hy50ex5ilWq2Z4w=; b=EQdoVHu2FbiXv/JsycLx4n7g7esLNqgVfQRuG9iA5FnTU9evAiHgf+ZtFY7Le5dhId 5AqIed/eyoJgS53qvvIhPdsnbSHiMw72IH/aHk91q1TAcHdI+O7LK8trlDwMBarDlvvd P4q2UP9gvDGOvfwX3VUjEPHZ+nXNEbOmRPdg//ubLCf8pNiVBvpXOT+LRi2rKj8LQh+e 7q7XspObr3WuThskXiUgsOYP8el6OAlCKao8LgVFNTc/gssCj6fCO2HR8Le1cex6aECz 6Tn1IAGSYs6m2HdtqNIPB3xKXXYX+pK5AncQXUw4GKUR6KkFHHIWhCYmFguTUqaeLtiG OoCg== X-Forwarded-Encrypted: i=1; AJvYcCXsEqazYYyN6KCaHGybg2zooTYHeZWsUM1yZQfn9ScKhPcnfUrczL1hYOVmRxdkT6ujmjtGeuEmPdvCnr1zkeq8XhQWnaLm@freebsd.org X-Gm-Message-State: AOJu0YyVozN2pxxSKekKc0CrzHogRpwZdHej0l7gD08hTU/IGnl2JezW t0lh8WNmI04xMuKlegpUce2A8RNRTyGEp3aqFbFl/Wg4gHZDjqQymIjTSavYKDng3jKQRCb1oTW +2u0OmeHi695u+RO6CqXRAEfBgUcx3lKSKFgXcTTLMQ== X-Gm-Gg: AZuq6aITTtYgf8dCBdBbtwYDPhAUmdn5Yo8pzvG5fmgq4rqqaBTKE/xcVofx44asW+u AMzs5Lq3Trvy6KYYnWvB/zyvLdWJUa+nJxem/DaeO2Ym7O0kspEcFFPf/XjCP3mwsALvrKtsYxZ F8vvScbu0Us/Lol8v+3uMbIqO7JLBBBrojiSRJSf4+J3yY/hTvB0cfOEK0APZAebB08L12RBUM6 P49x6hFkgty7nD/bnsZhl71trBWu0UvcwT3Pk1q8jp58c20T5OBmN29x5IsrQbdDqxlx2uLKw3Y SHBriRaJ6w== X-Received: by 2002:a05:690e:c4a:b0:64a:dc2e:9b22 with SMTP id 956f58d0204a3-64c14d9361dmr1102061d50.74.1770948103570; Thu, 12 Feb 2026 18:01:43 -0800 (PST) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Emil Tsalapatis Date: Thu, 12 Feb 2026 21:01:32 -0500 X-Gm-Features: AZwV_QhvbTJ5txRxREa9e3AWY3sdtNWdGjT-KJ6AAShtyjn93JY47qq7nd0-pVs Message-ID: Subject: Re: RFC: Kernel virtiofs driver To: Oleg Sidorkin Cc: Mario Marietto , FreeBSD virtualization Content-Type: multipart/alternative; boundary="000000000000a11674064aaafcf5" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fBwQL1PS4z4MH7 X-Spamd-Bar: ---- --000000000000a11674064aaafcf5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2026 at 9:01=E2=80=AFAM Oleg Sidorkin = wrote: > Hello. > > My favorite test to run in bhyve guest: > > root@:/usr/src # uname -a > FreeBSD 16.0-CURRENT FreeBSD 16.0-CURRENT #1 > main-n283712-16c902f05853: Sat Feb 7 02:10:47 MSK 2026 > olsi@:/usr/obj/usr/src/amd64.amd64/sys/QUADKERNEL amd64 > root@:/usr/src # mount > /dev/vtbd0p2 on / (ufs, local, soft-updates, journaled soft-updates) > devfs on /dev (devfs) > obj on /usr/obj (p9fs, local) > 192.168.2.1:/vms/freebsd-current/usr/home on /usr/home (nfs) > 192.168.2.1:/vms/freebsd-current/usr/src on /usr/src (nfs) > 192.168.2.1:/vms/freebsd-current/usr/lib/debug on /usr/lib/debug (nfs) > 192.168.2.1:/usr/ports/distfiles on /usr/ports/distfiles (nfs) > root@:/usr/src # make -j4 buildworld buildkernel > > Panics guest system in a few minutes (everything is ok when /obj is > mounted over nfs): > > db> bt > Tracing pid 2248 tid 100165 td 0xfffff80100eb8780 > kdb_enter() at kdb_enter+0x33/frame 0xfffffe006833e560 > panic() at panic+0x43/frame 0xfffffe006833e5c0 > freevnode() at freevnode+0x2d5/frame 0xfffffe006833e620 > vput_final() at vput_final+0x96/frame 0xfffffe006833e670 > vfs_hash_insert() at vfs_hash_insert+0x226/frame 0xfffffe006833e6c0 > p9fs_vget_common() at p9fs_vget_common+0x39b/frame 0xfffffe006833e770 > p9fs_lookup() at p9fs_lookup+0x4ad/frame 0xfffffe006833e8c0 > VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0x57/frame 0xfffffe006833e8f0 > vfs_lookup() at vfs_lookup+0x5aa/frame 0xfffffe006833e980 > namei() at namei+0x35d/frame 0xfffffe006833e9e0 > kern_execve() at kern_execve+0x2d1/frame 0xfffffe006833ed80 > sys_execve() at sys_execve+0x54/frame 0xfffffe006833ee00 > amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe006833ef30 > fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe006833ef3= 0 > --- syscall (59, FreeBSD ELF64, execve), rip =3D 0x2cc73682f46a, rsp =3D > 0x2cc731eb2028, rbp =3D 0x2cc731eb2170 --- > db> > > I'll be really happy to test virtiofs and I hope it will do better. > > If you hit any bugs, let me know! I'd be happy to take a look. Please include some additional patches apart from the two diffs ( https://github.com/etsal/freebsd-src/tree/virtiofs), that handle some issues virtiofs was triggering in the FUSE layer (D55047 , D55046 ). Also, if you could try running with a debugging kernel I'd really appreciate it - it will help us better interpret any issues. For example, with a config like this: include GENERIC ident DEBUG options KDB # Enable kernel debugger support. options KDB_TRACE # Print a stack trace for a panic. options DDB options DDB_NUMSYM options GDB options INVARIANTS options INVARIANT_SUPPORT options DIAGNOSTIC # KTR options KTR options ALQ options KTR_ALQ # KASAN options KASAN Thanks, Emil > Thanks > > =D0=B2=D1=82, 10 =D1=84=D0=B5=D0=B2=D1=80. 2026=E2=80=AF=D0=B3. =D0=B2 09= :57, Mario Marietto : > > > > Hello Emil, > > > > Inside a FreeBSD guest OS (15.0-RELEASE) I do : > > > > kldload virtio_p9fs > > > > kldload p9fs_load > > > > mount -t p9fs sharename /mnt/host > > > > This works for me,I can share files between FreeBSD 15.0 guest and > FreeBSD 14.3 host os. So,what's missing in this case and which features y= ou > added ? > > > > Thanks. > > > > > > > > On Tue, Feb 10, 2026 at 4:05=E2=80=AFAM Emil Tsalapatis > wrote: > >> > >> Hi everyone, > >> > >> I recently finished the virtiofs driver and it is now ready for > review. The device allows for sharing directories between a FreeBSD guest > and a host. > >> > >> The driver really is two components: > >> > >> 1) The virtio device that sends FUSE tickets to and from the host: > D46295 > >> 2) The file system that gets mounted in the guest: D46296. > >> > >> To test it you need a couple additional fixes/workarounds for > FUSE-related issues. You can grab a working tree here or apply diffs D550= 47 > and D55046. D55046 is a workaround, but still prevents an assertion failu= re > related to FUSE caching until the underlying issue is properly fixed on > HEAD. > >> > >> To use it, make sure you are creating virtiofs device on the host then > from the FreeBSD guest run > >> > >> mount -t virtiofs > >> > >> where is the name tag you gave to the virtiofs device in the hos= t > VMM. > >> > >> Reviews and testing welcome! > >> > >> Thanks, > >> Emil > >> > >> > > > > > > -- > > Mario. > > > > -- > Oleg Sidorkin > --000000000000a11674064aaafcf5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Feb 12, 2026 at 9:01=E2=80= =AFAM Oleg Sidorkin <osidorkin@gmail.com> wrote:
Hello.

My favorite test to run in bhyve guest:

root@:/usr/src # uname -a
FreeBSD=C2=A0 16.0-CURRENT FreeBSD 16.0-CURRENT #1
main-n283712-16c902f05853: Sat Feb=C2=A0 7 02:10:47 MSK 2026
olsi@:/usr/obj/usr/src/amd64.amd64/sys/QUADKERNEL amd64
root@:/usr/src # mount
/dev/vtbd0p2 on / (ufs, local, soft-updates, journaled soft-updates)
devfs on /dev (devfs)
obj on /usr/obj (p9fs, local)
192.168.2.1:/vms/freebsd-current/usr/home on /usr/home (nfs)
192.168.2.1:/vms/freebsd-current/usr/src on /usr/src (nfs)
192.168.2.1:/vms/freebsd-current/usr/lib/debug on /usr/lib/debug (nfs)
192.168.2.1:/usr/ports/distfiles on /usr/ports/distfiles (nfs)
root@:/usr/src # make -j4 buildworld buildkernel

Panics guest system in a few minutes (everything is ok when /obj is
mounted over nfs):

db> bt
Tracing pid 2248 tid 100165 td 0xfffff80100eb8780
kdb_enter() at kdb_enter+0x33/frame 0xfffffe006833e560
panic() at panic+0x43/frame 0xfffffe006833e5c0
freevnode() at freevnode+0x2d5/frame 0xfffffe006833e620
vput_final() at vput_final+0x96/frame 0xfffffe006833e670
vfs_hash_insert() at vfs_hash_insert+0x226/frame 0xfffffe006833e6c0
p9fs_vget_common() at p9fs_vget_common+0x39b/frame 0xfffffe006833e770
p9fs_lookup() at p9fs_lookup+0x4ad/frame 0xfffffe006833e8c0
VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0x57/frame 0xfffffe006833e8f0
vfs_lookup() at vfs_lookup+0x5aa/frame 0xfffffe006833e980
namei() at namei+0x35d/frame 0xfffffe006833e9e0
kern_execve() at kern_execve+0x2d1/frame 0xfffffe006833ed80
sys_execve() at sys_execve+0x54/frame 0xfffffe006833ee00
amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe006833ef30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe006833ef30<= br> --- syscall (59, FreeBSD ELF64, execve), rip =3D 0x2cc73682f46a, rsp =3D 0x2cc731eb2028, rbp =3D 0x2cc731eb2170 ---
db>

I'll be really happy to test virtiofs and I hope it will do better.


If you hit any bugs, let me know!= I'd be happy to take a look. Please include some additional patches ap= art from the two diffs (https://github.com/etsal/freebsd-src/tree/vir= tiofs), that handle some issues virtiofs was triggering in the FUSE lay= er (D55047= , D550= 46).

Also, if you could try running with a debugging kernel I'd really appreciate= =20 it - it will help us better interpret any issues. For example, with a=20 config like this:

include GENERIC

ident =C2= =A0 DEBUG

options =C2=A0 =C2=A0 =C2=A0 =C2=A0 KDB =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Enable kernel debugg= er support.
options =C2=A0 =C2=A0 =C2=A0 =C2=A0 KDB_TRACE =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Print a stack trace for a panic.
op= tions =C2=A0 =C2=A0 =C2=A0 =C2=A0 DDB
options =C2=A0 =C2=A0 =C2=A0 =C2= =A0 DDB_NUMSYM
options =C2=A0 =C2=A0 =C2=A0 =C2=A0 GDB

options = =C2=A0 =C2=A0 =C2=A0 =C2=A0 INVARIANTS
options =C2=A0 =C2=A0 =C2=A0 =C2= =A0 INVARIANT_SUPPORT
options =C2=A0 =C2=A0 =C2=A0 =C2=A0 DIAGNOSTIC
=
# KTR
options =C2=A0 =C2=A0 =C2=A0 =C2=A0 KTR
options =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ALQ
options =C2=A0 =C2=A0 =C2=A0 =C2=A0 KTR_ALQ
# KASAN
options KASAN


Thanks,
Emil


=C2=A0
Thanks

=D0=B2=D1=82, 10 =D1=84=D0=B5=D0=B2=D1=80. 2026=E2=80=AF=D0=B3. =D0=B2 09:5= 7, Mario Marietto <marietto2008@gmail.com>:
>
> Hello Emil,
>
> Inside a FreeBSD guest OS (15.0-RELEASE) I do :
>
> kldload virtio_p9fs
>
> kldload p9fs_load
>
> mount -t p9fs sharename /mnt/host
>
> This works for me,I can share files between FreeBSD 15.0 guest and Fre= eBSD 14.3 host os. So,what's missing in this case and which features yo= u added ?
>
> Thanks.
>
>
>
> On Tue, Feb 10, 2026 at 4:05=E2=80=AFAM Emil Tsalapatis <emil@etsalapatis.com>= ; wrote:
>>
>> Hi everyone,
>>
>>=C2=A0 =C2=A0 =C2=A0I recently finished the virtiofs driver and it = is now ready for review. The device allows for sharing directories between = a FreeBSD guest and a host.
>>
>> The driver really is two components:
>>
>> 1) The virtio device that sends FUSE tickets to and from the host:= D46295
>> 2) The file system that gets mounted in the guest: D46296.
>>
>> To test it you need a couple additional fixes/workarounds for FUSE= -related issues. You can grab a working tree here or apply diffs D55047 and= D55046. D55046 is a workaround, but still prevents an assertion failure re= lated to FUSE caching until the underlying issue is properly fixed on HEAD.=
>>
>> To use it, make sure you are creating virtiofs device on the host = then from the FreeBSD guest run
>>
>> mount -t virtiofs <tag> <mountpoint>
>>
>> where <tag> is the name tag you gave to the virtiofs device = in the host VMM.
>>
>> Reviews and testing welcome!
>>
>> Thanks,
>> Emil
>>
>>
>
>
> --
> Mario.



--
Oleg Sidorkin
--000000000000a11674064aaafcf5--