Re: Is anyone working on VirtFS (FUSE over VirtIO)

From: David Chisnall <theraven_at_freebsd.org>
Date: Sun, 31 Dec 2023 15:24:50 UTC
On 31 Dec 2023, at 14:36, Alan Somers <asomers@freebsd.org> wrote:
> 
> On Sun, Dec 31, 2023 at 5:46 AM David Chisnall <theraven@freebsd.org> wrote:
>> 
>> Hi,
>> 
>> For running FreeBSD containers on macOS, I’m using dfr’s update of the 9pfs client code.  This seems to work fine but Podman is in the process of moving from using QEMU to using Apple’s native hypervisor frameworks.  These don’t provide 9pfs servers and instead provide a native VirtFS server (macOS now ships with a native VirtFS client, as does Linux).
>> 
>> I believe the component bits for at least a functional implementation already exist (FUSE and a VirtIO transport), though I’m not sure about the parts for sharing buffer cache pages with the host.  Is anyone working on connecting these together?
>> 
>> David
> 
> Nobody that I know of.  And while I understand the FUSE stuff well,
> I'm shakier on VirtIO and the buffer cache.  Do you think that this is
> something that a GSoC student could accomplish?

I’m not familiar enough with either part of the kernel to know. A competent student with two mentors each familiar with one of the parts might, but this is increasingly strategically important. The newer cloud container-hosting platforms are moving to lightweight VMs with VirtFS because it lets them get the same sharing of container image contents between hosts but with full kernel isolation. It would be easy to plug FreeBSD in as an alternative to Linux with this support.

The VirtFS protocol is less well documented than I’d like, but it appears to primarily be a different transport for FUSE messages and so may be quite easy to add if the FUSE code is sufficiently abstracted.

David