commit | 205297ef9578d511a88fe7f3254d53b8d307b28c | [log] [tgz] |
---|---|---|
author | Takaya Saeki <takayas@chromium.org> | Thu Feb 23 02:04:35 2023 +0900 |
committer | crosvm LUCI <crosvm-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Mar 02 08:52:56 2023 +0000 |
tree | f676c9f02e2718812a36c061701a1d1d27c53b58 | |
parent | e4f63747614e26114e264b53df320d6071beff50 [diff] |
disk: add try_clone method to DiskFile trait Introduce `try_clone` method to `DiskFile` trait. This allows callers to create DiskFile instances which share the same underlying file descriptors, which enables you to manipulate them in multiple threads in parallel. virtio-blk requires this change to run multiple worker threads in parallel. Note `try_clone` is introduced as a method of `DiskFile`, not as a standalone `TryClone`, since such `TryClone` trait is not an object-safe and thus cannot be defined actually. BUG=b:267716786 TEST=build passes Change-Id: I8aae4ee08992de2649b7157b8dfe7328751208b5 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4281742 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Takaya Saeki <takayas@chromium.org>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the ChromeOS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on ChromeOS devices.