Skip to main content

serve_mount_vsock_raw

Function serve_mount_vsock_raw 

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

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

The raw sibling of serve_mount_vsock, for the guest-initiated direction (#741). path is a per-port host UDS (<vsock-base>_<port>) the guest dials; per the Firecracker/CH hybrid-vsock spec such connections arrive raw (no connect <port>\n preamble — the port is encoded in the socket path). Accepted streams go straight to the shared 9P core via Translator::serve_vsock_raw with no preamble strip, so the guest’s first Tversion bytes are treated as 9P and not consumed. This is the entry a kata supervisor uses to expose a tenant’s Subject-scoped export on VFS_9P_VSOCK_PORT.