crosvm/vm_control
Keita Suzuki 7d1c18ac69 devices: vhost-user: block: add control server to devices command
Add an in-process control server-like mechanism which runs in the
devices command to enable controlling vhost-user devices with control
commands such as DiskControlCommands. Like the in-process version,
the vhost-user control server waits for connection on the specified
socket, processes the recevied command, and forwards it to the
corresponding device via established tubes. Currently, DiskCommands are
the only commands supported by the control server, as block devices are
the only devices which need this mechanism.

This patch also adds the mechanism to process forwarded commands in
the vhost-user block backend device, similar to the command processing
mechanism in the worker provided in the in-process block device.

BUG=b:191845881
TEST=cargo run devices -s /path/to/socket.sock --block ..., then run
cargo run disk resize 0 $SIZE /path/to/socket.sock

Change-Id: I7b96e6c4bb7371424ca220da5f95be88e82c1fc0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3841001
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Keita Suzuki <suzukikeita@google.com>
Reviewed-by: Morg <morg@chromium.org>
Commit-Queue: Keita Suzuki <suzukikeita@google.com>
2022-09-02 07:47:30 +00:00
..
src devices: vhost-user: block: add control server to devices command 2022-09-02 07:47:30 +00:00
Cargo.toml gdb: Upgrade gdbstub & gdbstub_arch dependencies 2022-09-01 16:24:00 +00:00