Skip to content

RFE: support AF_UNIX userspace backend for virtio-vsock matching firecracker

Goal

QEMU's current support for AF_VSOCK is done via the vhost-vsock backend which exposes guests via the host kernel AF_VSOCK protocol.

This has some limitations:

  • The mgmt application needs to track and assign a unique VSOCK CID for each guest since they're in a global kernel namespace
  • This is not portable to non-Linux platforms. eg you can't run a Linux guest using VSOCK from a non-Linux host.
  • Only host apps that understand VSOCK can communicate with the guest

A simpler to manage and more portable approach would be to map VSOCK onto UNIX sockets in the host.

Technical details

Firecracker has designed a way to map guest AF_VSOCK onto host AF_UNIX described here:

https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md#firecracker-virtio-vsock-design

This is something we should implement natively in QEMU in a manner compatible with firecrackers design.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information