mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
f1885ff06b
The previous method required calling `get_volatile_slice()` twice for each memory region - once to validate that each region is valid, and again to convert the MemRegion into an IoBufMut. It also relied on `get_volatile_slice()` returning the same non-Err value twice to avoid a panic in the `unwrap()` used in the second pass. Instead, we can iterate over the regions once and convert the iterator directly into a pinned boxed slice. BUG=None TEST=tools/dev_container tools/presubmit TEST=cargo test -p cros_async Change-Id: I16e0bd38998b97e072a2d0fa5a72a2dea2d082f9 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4646722 Reviewed-by: Frederick Mayle <fmayle@google.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |