-
Notifications
You must be signed in to change notification settings - Fork 186
Port virtio media simple device as a vhost user media device. #1895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Why are you copying this code here instead of depending on it? Would it be possible to contribute changes upstream and only implement the cuttlefish-specific changes here? |
base/cvd/cuttlefish/host/commands/vhost_user_media/simple_device/Cargo.toml
Show resolved
Hide resolved
base/cvd/cuttlefish/host/commands/vhost_user_media/simple_device/src/simple_device.rs
Outdated
Show resolved
Hide resolved
d42f8bd to
db5b139
Compare
Removed the copy depending on the upstream implementation. |
833efed to
fadcf29
Compare
| serde = { version = "1.0", features = ["derive"] } | ||
| serde_json = "1" | ||
|
|
||
| [patch.crates-io] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove this once rust-vmm/vhost/pull/339 is merged in.
Run the device. ``` RUST_LOG=trace cargo run --bin simple_device -- --socket-path /tmp/simple_device.sock or RUST_LOG=trace bazel run simple_device:simple_device -- --socket-path /tmp/simple_device.sock ``` Run the VM. ``` cargo run -- --log-level=debug run --cpus 4 --mem 4096 \ --rwdisk /path/to/debian-12.img \ --params "root=/dev/vda1" \ --vhost-user media,socket=/tmp/simple_device.sock \ /path/to/bzImage v4l2-compliance -d0 -s ``` Bug: 445229097
fadcf29 to
8b2a123
Compare
Port virtio media reference device
simple_deviceas a vhost user implementation.First iteration of
simple_device/src/simple_device.rsis the same as in virtio-media upstream https://github.com/chromeos/virtio-media/blob/main/device/src/devices/simple_device.rs.Bug: 445229097