Bug 271793

Summary: virtio: doesn't implement a vsock driver
Product: Base System Reporter: Mina Galić <freebsd>
Component: kernAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: Open ---    
Severity: Affects Only Me CC: emaste, grahamperrin, osidorkin, swills
Priority: --- Keywords: feature
Version: CURRENT   
Hardware: Any   
OS: Any   
URL: https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-39000010

Description Mina Galić freebsd_triage 2023-06-02 22:30:05 UTC
from: https://wiki.qemu.org/Features/VirtioVsock

virtio-vsock is a host/guest communications device. It allows applications in the guest and host to communicate. This can be used to implement hypervisor services and guest agents.

  -  POSIX Sockets API so existing networking applications require minimal modification (unlike virtio-serial char devices)
  -  Listen sockets can accept connections from multiple clients (unlike virtio-serial char devices)
  -  No address configuration required inside the guest
  -  No Ethernet or TCP/IP for a reduced attack surface for hypervisor services
  -  Can be used with VMs that have no network interfaces

Sockets are created with the AF_VSOCK address family. The SOCK_STREAM socket type is currently implemented for in-order, guaranteed stream semantics.

The actual 1.1 spec is at: https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html#x1-39000010
Comment 1 Mina Galić freebsd_triage 2023-06-02 22:31:35 UTC
Why do I care about this?
I'm working on cloud-init, which uses LXD for testing.

LXD uses vsock to communicate between lxd-agent on the virtual machine and LXD on the host.
To make FreeBSD run properly on LXD, we need lxd-agent and as such virtio vsock.
Comment 2 Mina Galić freebsd_triage 2023-06-02 22:51:42 UTC
note also that we have precedent for something like this on Hyper-V: https://reviews.freebsd.org/D24061