mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
devices: vhost: user: Add README
BUG=none TEST=none Change-Id: I6a7b27c5dbb44d417ff9e0e7b213403efee92ec5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3320905 Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
This commit is contained in:
parent
fd032f2a77
commit
31bc5998bb
1 changed files with 34 additions and 0 deletions
34
devices/src/virtio/vhost/user/README.md
Normal file
34
devices/src/virtio/vhost/user/README.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Vhost-user devices
|
||||||
|
|
||||||
|
This directory contains the implementation of [vhost-user] devices and
|
||||||
|
[virtio vhost-user] devices.
|
||||||
|
|
||||||
|
## Code Locations
|
||||||
|
|
||||||
|
* [`vmm`](./vmm/) - Implements vhost-user vmm device; i.e. vhost-user master.
|
||||||
|
* [`device`](./device/) - Implements vhost-user device backend; i.e.
|
||||||
|
vhost-user slave.
|
||||||
|
* [`proxy.rs`](./proxy.rs) - Implements [virtio vhost-user] device, which
|
||||||
|
works like a proxy forwarding vhost-user messages to the guest via
|
||||||
|
virtqueues.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Vhost-user
|
||||||
|
|
||||||
|
First, start a vhost-user device with the `crosvm device` command. Here we use
|
||||||
|
the block device as an example, but the basic usage is same for all of devices.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ crosvm device block --socket /path/to/socket --file /path/to/block.img
|
||||||
|
```
|
||||||
|
|
||||||
|
Then start a VM with a vhost-user block device by specifying the same socket
|
||||||
|
path .
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ crosvm run -r rootfs.img --vhost-user-blk /path/to/socket <crosvm arguments>
|
||||||
|
```
|
||||||
|
|
||||||
|
[vhost-user]: https://qemu.readthedocs.io/en/latest/interop/vhost-user.html
|
||||||
|
[virtio vhost-user]: https://wiki.qemu.org/Features/VirtioVhostUser
|
Loading…
Reference in a new issue