crosvm/vhost
Christian Blichmann 50f9591b6a devices: vhost: Allow vhost-vsock fd from command-line
Passing an open FD is necessary to avoid racing for vsock context IDs:
On Borg, we first want to generate a random, unused CID and pass this to
crosvm. This requires us to open `/dev/vhost-vsock` and call the
`VHOST_VSOCK_SET_GUEST_CID` ioctl on it. Closing the device and simply
assing its path to crovm opens up a time window where an overlapping VM
creation request may set a different CID on the device.

BUG=none
TEST=tools/presubmit --quick

Change-Id: If053e26ba93ab357b06e8cf07798679c8ad06c9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3263933
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Christian Blichmann <cblichmann@google.com>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
2021-11-18 15:19:29 +00:00
..
src devices: vhost: Allow vhost-vsock fd from command-line 2021-11-18 15:19:29 +00:00
Cargo.toml Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00