[RFC] bhyve: modeling virtio-9p

Roman Bogorodskiy bogorodskiy at gmail.com
Tue Oct 6 14:51:52 UTC 2020


Hi,

Recently bhyve got virtio-9p support. Modeling it appears to be pretty
straight-forward, but probably I'm missing something, so decided to
discuss first before proceeding with the implementation.

On the host side it looks like this:

  bhyve .... -s 25:0,virtio-9p,distfiles=/workspace/distfiles

Mounting it in a (Linux) guest looks this way:

  mount -t 9p distfiles /mnt/distfiles

lspci(8) shows it like this:

00:1f.0 SCSI storage controller: Red Hat, Inc. Virtio filesystem
        Subsystem: Red Hat, Inc. Virtio filesystem
        Flags: bus master, fast devsel, latency 64, IRQ 20
        I/O ports at 2200 [size=512]
        Memory at c2004000 (32-bit, non-prefetchable) [size=8K]
        Expansion ROM at c0007000 [virtual] [disabled] [size=2K]
        Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
        Capabilities: [4c] MSI: Enable- Count=1/1 Maskable- 64bit+
        Kernel driver in use: virtio-pci

I was thinking about presenting it like this:

  <filesystem type='mount'>
    <driver type='virtiofs'/>
    <source dir='/workspace/distfiles'>
    <target dir='distfiles'/>
  </filesystem>

There's also an optional <readonly/> element for readonly mounts, which
is also supported by bhyve.

Does this look reasonable?

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201006/994fd9a1/attachment-0001.sig>


More information about the libvir-list mailing list