Home
last modified time | relevance | path

Searched full:vsock (Results 1 – 25 of 31) sorted by relevance

12

/cloud-hypervisor/docs/
H A Dvsock.md1 # VSOCK support
3 VSOCK provides a way for guest and host to communicate through a socket. `cloud-hypervisor` only su…
5 The `virtio-vsock` is based on the [Firecracker](https://github.com/firecracker-microvm/firecracker…
36 ## Establishing VSOCK Connection
38 VSOCK device becomes available with `--vsock` option passed by the VM start. Cloud Hypervisor can b…
46 --vsock cid=3,socket=/tmp/ch.vsock
49VSOCK functionality. However, there are other tools supporting VSOCK, like [ncat](https://stefano-…
55 `$ socat - VSOCK-LISTEN:1234`
59 `echo -e "CONNECT 1234\\nHello from host!" | socat - UNIX-CONNECT:/tmp/ch.vsock
61 …ening on different ports, thus the specific command is needed to instruct VSOCK to which listener …
[all …]
H A Ddevice_model.md20 | virtio-vsock | :x: | :x: | :heavy_check_mark: |
155 ### virtio-vsock
158 we added a hybrid implementation of the [VSOCK](http://man7.org/linux/man-pages/man7/vsock.7.html)
160 … to the [Firecracker](https://github.com/firecracker-microvm/firecracker/blob/master/docs/vsock.md)
164 flag `--vsock`.
H A Dhotplug.md220 ### Add Vsock Device
222 To ask the VMM to add additional vsock device then use the `add-vsock` API.
225 ./ch-remote --api-socket=/tmp/ch-socket add-vsock cid=3,socket=/foo/bar/vsock.sock
H A Dapi.md105 | Add vsock device to the VM | `/vm.add-vsock` | `/schemas/VsockConfig` | …
/cloud-hypervisor/virtio-devices/src/vsock/
H A Dmod.rs20 pub use self::device::Vsock;
25 /// Max vsock packet data/buffer size.
30 /// Vsock packet operation IDs.
48 /// Vsock packet flags.
56 /// Vsock packet type.
68 /// The vsock data/buffer virtio descriptor length is smaller than expected.
70 /// The vsock data/buffer virtio descriptor is expected, but missing.
76 /// The vsock header descriptor length is too small.
78 /// The vsock header descriptor is expected, but missing.
80 /// The vsock header `len` field holds an invalid value.
[all …]
H A Ddevice.rs27 /// This is the `VirtioDevice` implementation for our vsock device. It handles the virtio-level
35 /// The vsock device has two input parameters: a CID to identify the device, and a `VsockBackend`
36 /// to use for offloading vsock traffic.
38 /// Upon its activation, the vsock device creates its `EpollHandler`, passes it the event-interested
69 /// The `VsockEpollHandler` implements the runtime logic of our vsock device:
106 debug!("vsock: raising IRQ"); in signal_used_queue()
120 debug!("vsock: epoll_handler::process_rx()"); in process_rx()
140 warn!("vsock: RX queue error: {:?}", e); in process_rx()
158 … /// Walk the driver-provided TX queue buffers, package them up as vsock packets, and send them to
162 debug!("vsock: epoll_handler::process_tx()"); in process_tx()
[all …]
H A Dpacket.rs6 //! There are two components to a vsock packet, each using its own descriptor in a
17 //! to temporary buffers, before passing it on to the vsock backend.
30 // The vsock packet header is defined by the C struct:
54 /// The vsock packet header struct size (when packed).
72 // Socket type. Currently, only connection-oriented streams are defined by the vsock protocol.
95 /// The vsock packet, implemented as a wrapper over a virtq descriptor chain:
274 /// Provides in-place, byte-slice, access to the vsock packet header.
282 /// Provides in-place, byte-slice, mutable access to the vsock packet header.
290 /// Provides in-place, byte-slice access to the vsock packet data buffer.
305 /// Provides in-place, byte-slice, mutable access to the vsock packet data buffer.
[all …]
/cloud-hypervisor/fuzz/fuzz_targets/
H A Dvsock.rs12 use virtio_devices::vsock::tests::TestBackend;
71 let vsock_path = tmp_dir.as_path().join("vsock.sock");
98 let mut vsock = virtio_devices::Vsock::new( localVariable
110 vsock
118 // Wait for the events to finish and vsock device worker thread to return
119 vsock.wait_for_epoll_threads();
H A Dhttp_api.rs184 vsock: None, in vm_info()
/cloud-hypervisor/virtio-devices/src/vsock/unix/
H A Dmuxer.rs5 //! `VsockMuxer` is the device-facing component of the Unix domain sockets vsock backend. I.e.
7 //! between AF_VSOCK and AF_UNIX, and presents a clean interface to the rest of the vsock
10 //! The vsock muxer has two main roles:
12 //! ## Vsock connection multiplexer
18 //! Vsock packet traffic needs to be inspected, in order to detect connection request
25 //! There are three event categories that the vsock backend is interested it:
29 //! the host is ready to issue a vsock connection request, informing us of the
102 /// The vsock connection multiplexer.
137 /// Deliver a vsock packet to the guest vsock driver.
201 debug!("vsock muxer: RX pkt: {:?}", pkt.hdr()); in recv_pkt()
[all …]
H A Dmod.rs5 //! This module implements the Unix Domain Sockets backend for vsock - a mediator between
8 //! handling vsock connection states.
42 /// The host made an invalid vsock port connection request.
43 #[error("The host made an invalid vsock port connection request")]
/cloud-hypervisor/virtio-devices/src/vsock/csm/
H A Dconnection.rs21 //! the guest driver provides some data in a virtio TX buffer, the vsock device must
23 //! have to store it in a buffer (and flush it at a later time). Vsock flow control
26 // The code in this file is best read with a fresh memory of the vsock protocol inner-workings.
29 // Short primer on the vsock protocol
33 // A vsock connection is considered established after a two-way handshake:
67 // (i.e. "forwarded", in the vsock spec terminology):
71 // defined for the vsock protocol, packet flow can often be unidirectional (just one
73 // buffer space can get quickly outdated. The vsock protocol defines two solutions to
100 /// The local CID. Most of the time this will be the constant `2` (the vsock host CID).
119 /// The total number of bytes sent to the peer (guest vsock driver)
[all …]
H A Dmod.rs4 //! This module implements our vsock connection state machine. The heavy lifting is done by
15 /// Vsock connection TX buffer capacity.
44 /// A vsock connection state.
H A Dtxbuf.rs10 /// A simple ring-buffer implementation, used by vsock connections to buffer TX (guest -> host)
/cloud-hypervisor/vm-virtio/src/
H A Dlib.rs38 Vsock = 19, enumerator
58 19 => VirtioDeviceType::Vsock, in from()
83 VirtioDeviceType::Vsock => "vsock", in fmt()
/cloud-hypervisor/virtio-devices/src/
H A Dlib.rs39 pub mod vsock; module
62 pub use self::vsock::Vsock;
/cloud-hypervisor/vmm/src/
H A Dconfig.rs43 /// Missing vsock socket path parameter.
44 #[error("Error parsing --vsock: socket missing")]
46 /// Missing vsock cid parameter.
47 #[error("Error parsing --vsock: cid missing")]
104 /// Failed parsing vsock parameters
105 #[error("Error parsing --vsock")]
246 /// VSOCK Context Identifier has a special meaning, unsuitable for a VM.
247 #[error("{0} is a special VSOCK CID")]
357 pub vsock: Option<&'a str>, field
420 let vsock: Option<&str> = args.get_one::<String>("vsock").map(|x| x as &str); in from_arg_matches() localVariable
[all …]
H A Ddevice_manager.rs201 /// Cannot create virtio-vsock device
202 #[error("Cannot create virtio-vsock device")]
213 /// Failed to convert Path to &str for the virtio-vsock device.
214 #[error("Failed to convert Path to &str for the virtio-vsock device")]
217 /// Cannot create virtio-vsock backend
218 #[error("Cannot create virtio-vsock backend")]
219 CreateVsockBackend(#[source] virtio_devices::vsock::VsockUnixError),
2469 // Add virtio-vsock if required in make_virtio_devices()
3248 info!("Creating virtio-vsock device: {:?}", vsock_cfg); in make_virtio_vsock_device()
3255 virtio_devices::vsock::VsockUnixBackend::new(vsock_cfg.cid, socket_path.to_string()) in make_virtio_vsock_device()
[all …]
H A Dlib.rs2082 if config.vsock.is_some() { in vm_add_vsock()
2086 config.vsock = Some(vsock_cfg.clone()); in vm_add_vsock()
2092 error!("Error when adding new vsock device to the VM: {:?}", e); in vm_add_vsock()
2101 config.vsock = Some(vsock_cfg); in vm_add_vsock()
2420 vsock: None, in create_dummy_vm_config()
2791 .vsock in test_vmm_vm_cold_add_vsock()
2801 .vsock in test_vmm_vm_cold_add_vsock()
H A Dvm_config.rs796 pub vsock: Option<VsockConfig>, field
885 if let Some(vsock_config) = &self.vsock { in apply_landlock()
/cloud-hypervisor/fuzz/
H A DCargo.toml135 name = "vsock"
136 path = "fuzz_targets/vsock.rs"
/cloud-hypervisor/vmm/src/api/openapi/
H A Dcloud-hypervisor.yaml308 /vm.add-vsock:
310 summary: Add a new vsock device to the VM
312 description: The details of the new vsock device
608 vsock:
1133 description: Guest Vsock CID
1136 description: Path to UNIX domain socket, used to proxy vsock connections.
/cloud-hypervisor/src/bin/
H A Dch-remote.rs59 #[error("Error parsing vsock syntax")]
426 Some("add-vsock") => { in rest_api_do_command()
429 .subcommand_matches("add-vsock") in rest_api_do_command()
434 simple_api_command(socket, "PUT", "add-vsock", Some(&vsock_config)) in rest_api_do_command()
644 Some("add-vsock") => { in dbus_api_do_command()
647 .subcommand_matches("add-vsock") in dbus_api_do_command()
976 Command::new("add-vsock") in get_cli_commands_sorted()
977 .about("Add vsock device") in get_cli_commands_sorted()
/cloud-hypervisor/src/
H A Dmain.rs448 Arg::new("vsock") in get_cli_options_sorted()
449 .long("vsock") in get_cli_options_sorted()
1008 vsock: None, in test_valid_vm_config_default()
1915 "--vsock", in test_valid_vm_config_vsock()
1920 "vsock": {"cid": 123, "socket": "/path/to/sock/1"} in test_valid_vm_config_vsock()
1929 "--vsock", in test_valid_vm_config_vsock()
1934 "vsock": {"cid": 123, "socket": "/path/to/sock/1"} in test_valid_vm_config_vsock()
1944 "--vsock", in test_valid_vm_config_vsock()
1949 "vsock": {"cid": 123, "socket": "/path/to/sock/1", "iommu": true}, in test_valid_vm_config_vsock()
1960 "--vsock", in test_valid_vm_config_vsock()
[all …]
/cloud-hypervisor/
H A Drelease-notes.md76 …- [`virtio-vsock` Support for Linux Guest Kernel v6.3+](#virtio-vsock-support-for-linux-guest-kern…
318 …, Persistent Memory (PMEM), VirtioFS and Vsock hotplug](#block-network-persistent-memory-pmem-virt…
509 x86 instruction emulator and `virtio-vsock`.
655 * Short reads are now handled correctly in the `virtio-vsock` device (#6621)
762 * Fix documentation to indicate only stream mode is supported by `virtio-vsock`
846 * Various bug fixes around `virtio-vsock`(#6080, #6091, #6095)
1012 ### `virtio-vsock` Support for Linux Guest Kernel v6.3+
1014 Since kernel v6.3, a vsock packet can be included in a single descriptor,
1015 instead of being split over two descriptors. Our `virtio-vsock` implementation
2008 * Fix virtio-vsock blocking issue (#3497)
[all …]

12