vm_control/any_control_tube.rs
1// Copyright 2026 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use base::Tube;
6
7/// All the tube types that can be "registered" with the platform specific `fn run_control`
8/// implementation. These tubes are generally one half of a tube pair, with the other half held by
9/// a device.
10#[remain::sorted]
11pub enum AnyControlTube {
12 // See `BalloonTube`.
13 Balloon(Tube),
14 /// Receives `DeviceControlRequest`.
15 Device(Tube),
16 // Sends `DiskControlCommand`.
17 Disk(Tube),
18 /// Receives `FsMappingRequest`.
19 Fs(Tube),
20 // Sends `GpuControlCommand`.
21 Gpu(Tube),
22 /// Receives `IrqHandlerRequest`.
23 IrqTube(Tube),
24 // Sends `PvClockCommand`.
25 PvClock(Tube),
26 // Sends `SndControlCommand`.
27 Snd(Tube),
28 /// Receives `VmRequest`.
29 Vm(Tube),
30 VmMemoryTube {
31 tube: Tube,
32 /// See devices::virtio::VirtioDevice.expose_shared_memory_region_with_viommu
33 expose_with_viommu: bool,
34 /// Whether the other end of the tube is in another process.
35 remote_peer: bool,
36 },
37 /// Receives `VmMemoryMappingRequest`.
38 VmMsync(Tube),
39}