Skip to main content

serve_mount_vsock

Function serve_mount_vsock 

Source
pub async fn serve_mount_vsock(
    mount: Arc<dyn Mount>,
    subject: Subject,
    decider: Arc<dyn AccessDecider>,
    monitor: Option<Arc<ReferenceMonitor>>,
    path: impl AsRef<Path>,
) -> Result<()>
Expand description

Bind a Cloud-Hypervisor hybrid-vsock host socket at path and serve mount (scoped to subject) as its 9P2000.L root until the socket errors or is closed.

The hybrid-vsock sibling of serve_mount_uds and the #730 one-call entry a supervisor uses to expose a tenant’s Subject-scoped export to a kata guest dialing over vsock. Guest connections arrive on the host UDS path, each prefixed with a connect <port>\n handshake that Translator::serve_vsock strips before handing the stream to the shared 9P core.