mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
This removes RunnableVcpu as an associated type on Vcpu traits, instead using the new VcpuRunHandle type to enforce the same guarantees. This simplifies implementations of Vcpu becuase only one impl is needed with all the methods provided. The other advantage to removing RunnableVcpu was that a Vcpu could be try_cloned, defeating the purpose of consuming the Vcpu in the first place with to_runnable. The type system and ownership model gave a false sense of compile time safety. The usage of VcpuRunHandle is more consistent with the fact that it is a runtime check that the programmer is doing the safe thing. It's also consistent with all hypervisor impls. BUG=None TEST=./build_test Change-Id: I14bbc5d939744cb92fb9cb3152edb82603cadd11 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2442096 Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Zach Reizner <zachr@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |