Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for vsock devices, based on the backend and packet parser implementation currently available in Firecracker (some more details about the Firecracker Unix Domain Socket vsock backend are available here). The code is written and brought over on top of #49.
One way to verify the vsock device operation is to follow the next steps. First, build the vsock helper program from here (ideally as a static binary) and copy the binary to the guest filesystem image. After the guest boots with a vsock device added (i.e. by appending something like
--vsock cid=5,uds_path=/tmp/vsock_uds0
to the vmm command line), start the listener server within the guest using./vsock_helper echosrv 5252
(5252 is an arbitrary port number). Then, on the host, we can use something like the following script to verify that can send some data over the UDS vsock backend, and get a reply:We're going to bring over parts of the vsock test infrastructure as well after advancing the discussion around dirty page tracking in
vm-memory
and seeing how the ongoingvm-virtio
discussions conclude. The former is important because we want to start usingVolatileSlice
s for theVsockPacket
abstractions, while the latter influence the boiler plate code we have to adapt as part of the testing infrastructure.