mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
6f8f396312
Most of our VhostUserBackends require an Executor to be constructed, which interferes with our wish to jail them: we want to create the VhostUserBackend before the child process gets forked, but the forking process would render the Executor invalid in the child. Work around this issue by introducing a VhostUserDevice trait which is supposed to include all the device state without its runtime. Once the child process is forked, the device can be converted into a VhostUserBackend using its into_backend() method. This new trait is illustrated using the Console device. BUG=b:217480043 TEST=cargo build Change-Id: Ifc7525aae39da8fdb19fcd237832213c9223a56d Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3762973 Tested-by: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Morg <morg@chromium.org> Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |