Home
last modified time | relevance | path

Searched refs:MemoryMapping (Results 1 – 12 of 12) sorted by relevance

/external/crosvm/sys_util/src/
Dmmap.rs118 pub struct MemoryMapping { struct
127 unsafe impl Send for MemoryMapping {} argument
128 unsafe impl Sync for MemoryMapping {} implementation
130 impl MemoryMapping { implementation
135 pub fn new(size: usize) -> Result<MemoryMapping> { in new() argument
136 MemoryMapping::new_protection(size, Protection::read_write()) in new()
144 pub fn new_protection(size: usize, prot: Protection) -> Result<MemoryMapping> { in new_protection() argument
148 MemoryMapping::try_mmap( in new_protection()
163 pub fn from_fd(fd: &dyn AsRawFd, size: usize) -> Result<MemoryMapping> { in from_fd() argument
164 MemoryMapping::from_fd_offset(fd, size, 0) in from_fd()
[all …]
Dshm.rs269 use crate::MemoryMapping;
352 MemoryMapping::from_fd(&shm, shm.size() as usize).expect("failed to map shared memory"); in mmap_page()
354 MemoryMapping::from_fd(&shm, shm.size() as usize).expect("failed to map shared memory"); in mmap_page()
380 let mmap1 = MemoryMapping::from_fd_offset(&shm, shm.size() as usize, 4096) in mmap_page_offset()
383 MemoryMapping::from_fd(&shm, shm.size() as usize).expect("failed to map shared memory"); in mmap_page_offset()
Dguest_memory.rs14 use crate::mmap::{self, MemoryMapping};
73 mapping: MemoryMapping,
168 Some(memfd) => MemoryMapping::from_fd_offset(memfd, range.1 as usize, offset), in new()
169 None => MemoryMapping::new(range.1 as usize), in new()
540 F: FnOnce(&MemoryMapping, usize) -> Result<T>, in do_in_region() argument
706 let mmap = MemoryMapping::from_fd_offset(&gm, size, memfd_offset).unwrap(); in memfd_offset()
/external/crosvm/kvm/tests/
Dread_only_memory.rs9 use sys_util::{GuestAddress, GuestMemory, MemoryMapping, SharedMemory};
27 MemoryMapping::from_fd(&mem, mem_size as usize).expect("failed to create memory mapping"); in test_run()
50 MemoryMapping::from_fd(&mem, mem_size as usize).expect("failed to create memory mapping"), in test_run()
62 let mmap_ro = MemoryMapping::from_fd(&mem_ro, 0x1000).expect("failed to create memory mapping"); in test_run()
68 MemoryMapping::from_fd(&mem_ro, 0x1000).expect("failed to create memory mapping"), in test_run()
Ddirty_log.rs9 use sys_util::{GuestAddress, GuestMemory, MemoryMapping, SharedMemory};
25 MemoryMapping::from_fd(&mem, mem_size as usize).expect("failed to create memory mapping"); in test_run()
48 MemoryMapping::from_fd(&mem, mem_size as usize) in test_run()
/external/crosvm/render_node_forward/
Dlib.rs5 use sys_util::{GuestAddress, GuestMemory, MemoryMapping};
32 mmap: &MemoryMapping, in start() argument
/external/deqp/external/vulkancts/modules/vulkan/memory/
DvktMemoryMappingTests.cpp744 class MemoryMapping class
747 MemoryMapping (const MemoryRange& range,
763 MemoryMapping::MemoryMapping (const MemoryRange& range, in MemoryMapping() function in vkt::memory::__anonccaf675f0111::MemoryMapping
773 void MemoryMapping::randomRead (de::Random& rng) in randomRead()
786 void MemoryMapping::randomWrite (de::Random& rng) in randomWrite()
800 void MemoryMapping::randomModify (de::Random& rng) in randomModify()
870 MemoryMapping* mapRandom (const DeviceInterface& vkd, VkDevice device, de::Random& rng);
877 MemoryMapping* getMapping (void) { return m_mapping; } in getMapping()
893 MemoryMapping* m_mapping;
922 MemoryMapping* MemoryObject::mapRandom (const DeviceInterface& vkd, VkDevice device, de::Random& rn… in mapRandom()
[all …]
/external/crosvm/gpu_display/src/
Dlib.rs18 use sys_util::{round_up_to_page_size, Error as SysError, MemoryMapping, SharedMemory};
106 buffer_mem: MemoryMapping,
242 let buffer_mem = MemoryMapping::from_fd(&buffer_shm, buffer_size).unwrap(); in create_surface()
/external/crosvm/kvm/src/
Dlib.rs26 pagesize, signal, warn, Error, EventFd, GuestAddress, GuestMemory, MemoryMapping,
294 device_memory: HashMap<u32, MemoryMapping>,
406 mem: MemoryMapping, in add_device_memory() argument
435 pub fn remove_device_memory(&mut self, slot: u32) -> Result<MemoryMapping> { in remove_device_memory() argument
1117 run_mmap: MemoryMapping,
1139 MemoryMapping::from_fd(&vcpu, run_mmap_size).map_err(|_| Error::new(ENOSPC))?; in new()
1817 let mem = MemoryMapping::new(mem_size).unwrap(); in add_memory()
1828 let mem = MemoryMapping::new(mem_size).unwrap(); in add_memory_ro()
1839 let mem = MemoryMapping::new(mem_size).unwrap(); in remove_memory()
1863 let mem = MemoryMapping::new(mem_size).unwrap(); in overlap_memory()
/external/crosvm/vm_control/src/
Dlib.rs23 use sys_util::{error, Error as SysError, GuestAddress, MemoryMapping, MmapError, Result};
319 let mmap = match MemoryMapping::from_fd(fd, size) { in register_memory()
/external/crosvm/src/plugin/
Dprocess.rs31 error, Error as SysError, EventFd, GuestAddress, Killable, MemoryMapping, Result as SysResult,
364 let mem = MemoryMapping::from_fd_offset(&shm, length as usize, offset as usize) in handle_memory()
/external/crosvm/src/
Dlinux.rs44 MemoryMapping, PollContext, PollToken, Protection, SignalFd, Terminal, TimerFd, WatchingEvents,
739 MemoryMapping::from_fd_offset_protection(&fd, image_size, 0, protection) in create_pmem_device()
1326 MemoryMapping::new_protection(RENDER_NODE_HOST_SIZE as usize, Protection::none()) in run_config()