diff options
author | Chirantan Ekbote <chirantan@chromium.org> | 2020-05-15 20:06:58 +0900 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-25 19:14:07 +0000 |
commit | e7d1221c9d5a4e23b6142ef466892ccf38cfde9c (patch) | |
tree | 62345d17a52b48aac24c125fab25ef33cccf2a1e /gpu_buffer | |
parent | be5824412cec9e55fdfb523c80e33393e1054140 (diff) | |
download | crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.tar crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.tar.gz crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.tar.bz2 crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.tar.lz crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.tar.xz crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.tar.zst crosvm-e7d1221c9d5a4e23b6142ef466892ccf38cfde9c.zip |
Make VolatileSlice ABI-compatible with iovec
Change VolatileSlice so that it is ABI-compatible with iovec. This allows us to directly pass in a VolatileSlice for a C function that expects an iovec without having to create temporaries that convert from one to the other. Also change all the parameters from u64 to usize. It's not possible to address more memory than fits into a usize so having u64 here didn't really provide much benefit and led to a lot of tedious casting back and forth all over the place. BUG=none TEST=unit tests Cq-Depend: chromium:2206621 Change-Id: I258f9123c603d9a4c6c5e2d4d10eb4aedf74466d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2203998 Tested-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Diffstat (limited to 'gpu_buffer')
-rw-r--r-- | gpu_buffer/src/lib.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/gpu_buffer/src/lib.rs b/gpu_buffer/src/lib.rs index 5d25fa2..4b56f19 100644 --- a/gpu_buffer/src/lib.rs +++ b/gpu_buffer/src/lib.rs @@ -461,7 +461,6 @@ impl AsRawFd for Buffer { #[cfg(test)] mod tests { use super::*; - use data_model::VolatileMemory; use std::fmt::Write; #[test] |