diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2019-05-15 17:44:46 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-01 07:53:32 +0000 |
commit | 7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec (patch) | |
tree | efab4022bfa9ad49a795488fa143adaca9e20d25 /resources | |
parent | f585543065c052fc67d3e9f8683e6a91395ca1ae (diff) | |
download | crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.tar crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.tar.gz crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.tar.bz2 crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.tar.lz crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.tar.xz crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.tar.zst crosvm-7ca5e3dba3f56c8b8b762e63af7808bf9414c1ec.zip |
vm_control: support registering memory at a specific address
The guest kernel will allocate from PCI range of the virtgpu device, and send physical addresses via a hypercall. Right now, only support buffers that can be mmap'ed. We could add optimizations for GBM buffers later if needed. BUG=chromium:924405 TEST=compile Change-Id: I094de96a2c35bcd2e18c8a6a2d8cdc39bb392e36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1626794 Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/src/lib.rs b/resources/src/lib.rs index c10608e..ce4855a 100644 --- a/resources/src/lib.rs +++ b/resources/src/lib.rs @@ -10,6 +10,7 @@ extern crate libc; extern crate msg_socket; extern crate sys_util; +use msg_socket::MsgOnSocket; use std::fmt::Display; pub use crate::address_allocator::AddressAllocator; @@ -23,7 +24,7 @@ mod gpu_allocator; mod system_allocator; /// Used to tag SystemAllocator allocations. -#[derive(Debug, Eq, PartialEq, Hash)] +#[derive(Debug, Eq, PartialEq, Hash, MsgOnSocket, Copy, Clone)] pub enum Alloc { /// An anonymous resource allocation. /// Should only be instantiated through `SystemAllocator::get_anon_alloc()`. |