Home
last modified time | relevance | path

Searched refs:GuestMemory (Results 1 – 25 of 81) sorted by relevance

1234

/external/crosvm/vhost/src/
Dnet.rs14 use vm_memory::GuestMemory;
26 mem: GuestMemory,
32 fn new(vhost_net_device_path: &PathBuf, mem: &GuestMemory) -> Result<Self>; in new()
51 fn new(vhost_net_device_path: &PathBuf, mem: &GuestMemory) -> Result<Net<T>> { in new()
87 fn mem(&self) -> &GuestMemory { in mem() argument
107 mem: GuestMemory,
121 fn new(_vhost_net_device_path: &PathBuf, mem: &GuestMemory) -> Result<FakeNet<T>> { in new()
140 fn mem(&self) -> &GuestMemory { in mem() argument
Dvsock.rs13 use vm_memory::GuestMemory;
20 mem: GuestMemory,
25 pub fn new(vhost_vsock_device_path: &PathBuf, mem: &GuestMemory) -> Result<Vsock> { in new()
73 fn mem(&self) -> &GuestMemory { in mem() argument
Dlib.rs21 use vm_memory::{GuestAddress, GuestMemory, GuestMemoryError};
68 fn mem(&self) -> &GuestMemory; in mem() argument
345 use vm_memory::{GuestAddress, GuestMemory, GuestMemoryError};
347 fn create_guest_memory() -> result::Result<GuestMemory, GuestMemoryError> { in create_guest_memory()
350 GuestMemory::new(&vec![(start_addr1, 0x1000), (start_addr2, 0x4000)]) in create_guest_memory()
/external/crosvm/devices/src/virtio/
Dqueue.rs12 use vm_memory::{GuestAddress, GuestMemory};
59 mem: GuestMemory,
83 mem: &GuestMemory, in checked_new() argument
188 mem: &'a GuestMemory,
276 pub fn is_valid(&self, mem: &GuestMemory) -> bool { in is_valid()
331 fn get_avail_index(&self, mem: &GuestMemory) -> Wrapping<u16> { in get_avail_index()
347 fn set_avail_event(&mut self, mem: &GuestMemory, avail_index: Wrapping<u16>) { in set_avail_event() argument
359 fn get_avail_flag(&self, mem: &GuestMemory, flag: u16) -> bool { in get_avail_flag() argument
371 fn get_used_event(&self, mem: &GuestMemory) -> Wrapping<u16> { in get_used_event()
383 fn set_used_index(&mut self, mem: &GuestMemory, used_index: Wrapping<u16>) { in set_used_index() argument
[all …]
Ddescriptor_utils.rs22 use vm_memory::{GuestAddress, GuestMemory};
91 fn get_remaining<'mem>(&self, mem: &'mem GuestMemory) -> SmallVec<[VolatileSlice<'mem>; 16]> { in get_remaining()
136 mem: &'mem GuestMemory, in get_remaining_with_count() argument
213 mem: GuestMemory,
237 pub fn new(mem: GuestMemory, desc_chain: DescriptorChain) -> Result<Reader> { in new() argument
501 mem: GuestMemory,
507 pub fn new(mem: GuestMemory, desc_chain: DescriptorChain) -> Result<Writer> { in new() argument
752 memory: &GuestMemory, in create_descriptor_chain() argument
806 let memory = GuestMemory::new(&vec![(memory_start_addr, 0x10000)]).unwrap(); in reader_test_simple_chain()
847 let memory = GuestMemory::new(&vec![(memory_start_addr, 0x10000)]).unwrap(); in writer_test_simple_chain()
[all …]
Dvirtio_device.rs6 use vm_memory::GuestMemory;
62 mem: GuestMemory, in activate() argument
Dballoon.rs19 use vm_memory::{GuestAddress, GuestMemory};
115 mem: &GuestMemory, in handle_address_chain() argument
160 mem: &GuestMemory, in handle_queue() argument
190 mem: &GuestMemory, in handle_stats_queue() argument
311 mem: GuestMemory, in run_worker() argument
471 mem: GuestMemory, in activate() argument
550 let memory = GuestMemory::new(&vec![(memory_start_addr, 0x10000)]).unwrap(); in desc_parsing_inflate()
/external/crosvm/vm_memory/src/
Dguest_memory.rs121 pub struct GuestMemory { struct
125 impl AsRawDescriptors for GuestMemory { implementation
134 impl GuestMemory { impl
162 pub fn new(ranges: &[(GuestAddress, u64)]) -> Result<GuestMemory> { in new() argument
165 let shm = Arc::new(GuestMemory::create_shm(ranges)?); in new()
198 Ok(GuestMemory { in new()
719 unsafe impl BackingMemory for GuestMemory { implementation
739 assert!(GuestMemory::new(&[(start_addr1, 0x100), (start_addr2, 0x400)]).is_err()); in test_alignment()
740 assert!(GuestMemory::new(&[(start_addr1, 0x1000), (start_addr2, 0x1000)]).is_ok()); in test_alignment()
747 assert!(GuestMemory::new(&[(start_addr1, 0x4000), (start_addr2, 0x4000)]).is_ok()); in two_regions()
[all …]
/external/crosvm/x86_64/src/
Dregs.rs10 use vm_memory::{GuestAddress, GuestMemory};
257 fn write_gdt_table(table: &[u64], guest_mem: &GuestMemory) -> Result<()> { in write_gdt_table()
270 fn write_idt_value(val: u64, guest_mem: &GuestMemory) -> Result<()> { in write_idt_value()
277 fn configure_segments_and_sregs(mem: &GuestMemory, sregs: &mut Sregs) -> Result<()> { in configure_segments_and_sregs() argument
313 fn setup_page_tables(mem: &GuestMemory, sregs: &mut Sregs) -> Result<()> { in setup_page_tables() argument
346 pub fn setup_sregs(mem: &GuestMemory, vcpu: &dyn VcpuX86_64) -> Result<()> { in setup_sregs() argument
360 use vm_memory::{GuestAddress, GuestMemory};
362 fn create_guest_mem() -> GuestMemory { in create_guest_mem()
363 GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap() in create_guest_mem()
366 fn read_u64(gm: &GuestMemory, offset: u64) -> u64 { in read_u64() argument
Dsmbios.rs15 use vm_memory::{GuestAddress, GuestMemory};
195 mem: &GuestMemory, in write_and_incr() argument
207 fn write_string(mem: &GuestMemory, val: &str, mut curptr: GuestAddress) -> Result<GuestAddress> { in write_string() argument
215 fn setup_smbios_from_file(mem: &GuestMemory, path: &Path) -> Result<()> { in setup_smbios_from_file() argument
287 pub fn setup_smbios(mem: &GuestMemory, dmi_path: Option<PathBuf>) -> Result<()> { in setup_smbios() argument
393 let mem = GuestMemory::new(&[(GuestAddress(SMBIOS_START), 4096)]).unwrap(); in entrypoint_checksum()
Dmptable.rs14 use vm_memory::{GuestAddress, GuestMemory};
118 mem: &GuestMemory, in setup_mptable() argument
400 let mem = GuestMemory::new(&[( in bounds_check()
412 let mem = GuestMemory::new(&[(GuestAddress(MPTABLE_START), 0x1000)]).unwrap(); in bounds_check_fails()
420 let mem = GuestMemory::new(&[( in mpf_intel_checksum()
436 let mem = GuestMemory::new(&[( in mpc_table_checksum()
461 let mem = GuestMemory::new(&[( in cpu_entry_count()
/external/crosvm/fuzz/
Dfs_server_fuzzer.rs12 use vm_memory::{GuestAddress, GuestMemory};
18 static GUEST_MEM: GuestMemory = GuestMemory::new(&[(GuestAddress(0), MEM_SIZE)]).unwrap();
Dzimage_fuzzer.rs9 use vm_memory::{GuestAddress, GuestMemory};
26 let mem = GuestMemory::new(&[(GuestAddress(0), MEM_SIZE)]).unwrap();
Dvirtqueue_fuzzer.rs13 use vm_memory::{GuestAddress, GuestMemory};
19 static GUEST_MEM: GuestMemory = GuestMemory::new(&[(GuestAddress(0), MEM_SIZE)]).unwrap();
/external/crosvm/devices/src/usb/xhci/
Dtransfer_ring_controller.rs12 use vm_memory::GuestMemory;
26 mem: GuestMemory,
67 mem: GuestMemory, in new() argument
Dscatter_gather_buffer.rs10 use vm_memory::{GuestAddress, GuestMemory, GuestMemoryError};
42 mem: GuestMemory,
48 pub fn new(mem: GuestMemory, td: TransferDescriptor) -> Result<ScatterGatherBuffer> { in new() argument
154 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in scatter_gather_buffer_test()
202 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in immediate_data_test()
Dring_buffer.rs10 use vm_memory::{GuestAddress, GuestMemory, GuestMemoryError};
41 mem: GuestMemory,
57 pub fn new(name: String, mem: GuestMemory) -> Self { in new()
157 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in ring_test_dequeue()
236 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in transfer_ring_test_dequeue_failure()
271 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in ring_test_toggle_cycle()
/external/crosvm/kernel_loader/src/
Dlib.rs11 use vm_memory::{GuestAddress, GuestMemory};
74 guest_mem: &GuestMemory, in load_kernel() argument
154 guest_mem: &GuestMemory, in load_cmdline() argument
183 use vm_memory::{GuestAddress, GuestMemory};
187 fn create_guest_mem() -> GuestMemory { in create_guest_mem()
188 GuestMemory::new(&vec![(GuestAddress(0x0), MEM_SIZE)]).unwrap() in create_guest_mem()
/external/crosvm/devices/src/virtio/gpu/
Dudmabuf.rs24 use vm_memory::{GuestAddress, GuestMemory, GuestMemoryError};
91 fn memory_offset(mem: &GuestMemory, guest_addr: GuestAddress, len: u64) -> UdmabufResult<u64> { in memory_offset() argument
132 mem: &GuestMemory, in create_udmabuf() argument
189 let mem = GuestMemory::new(&vec![ in test_memory_offsets()
233 let mem = GuestMemory::new(&sg_list[..]).unwrap(); in test_udmabuf_create()
/external/crosvm/kvm/src/
Dlib.rs40 use vm_memory::{GuestAddress, GuestMemory};
267 guest_mem: GuestMemory,
274 pub fn new(kvm: &Kvm, guest_mem: GuestMemory) -> Result<Vm> { in new()
430 pub fn get_memory(&self) -> &GuestMemory { in get_memory() argument
1716 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in create_vm()
1731 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in check_vm_extension()
1765 let gm = GuestMemory::new(&vec![ in add_memory()
1783 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in add_memory_ro()
1794 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in remove_memory_region()
1810 let gm = GuestMemory::new(&vec![(GuestAddress(0), 0x1000)]).unwrap(); in remove_invalid_memory()
[all …]
/external/crosvm/hypervisor/src/kvm/
Dmod.rs41 use vm_memory::{GuestAddress, GuestMemory};
158 guest_mem: GuestMemory,
166 pub fn new(kvm: &Kvm, guest_mem: GuestMemory) -> Result<KvmVm> { in new()
446 fn get_memory(&self) -> &GuestMemory { in get_memory() argument
1196 let gm = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap(); in create_vm()
1203 let gm = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap(); in clone_vm()
1211 let gm = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap(); in send_vm()
1223 let gm = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap(); in check_vm_capability()
1233 let gm = GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap(); in create_vcpu()
1241 let gm = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap(); in get_memory()
[all …]
/external/crosvm/devices/src/pci/
Dac97.rs15 use vm_memory::GuestMemory;
116 mem: GuestMemory, in new() argument
145 pub fn try_new(mem: GuestMemory, param: Ac97Parameters) -> Result<Self> { in try_new() argument
168 fn create_cras_audio_device(params: Ac97Parameters, mem: GuestMemory) -> Result<Self> { in create_cras_audio_device()
186 fn create_vios_audio_device(mem: GuestMemory, param: Ac97Parameters) -> Result<Self> { in create_vios_audio_device() argument
203 fn create_null_audio_device(mem: GuestMemory) -> Self { in create_null_audio_device()
410 let mem = GuestMemory::new(&[(GuestAddress(0u64), 4 * 1024 * 1024)]).unwrap(); in create()
/external/crosvm/devices/src/virtio/vhost/
Dnet.rs15 use vm_memory::GuestMemory;
53 mem: &GuestMemory, in new() argument
193 _: GuestMemory, in activate() argument
362 use vm_memory::{GuestAddress, GuestMemory, GuestMemoryError};
364 fn create_guest_memory() -> result::Result<GuestMemory, GuestMemoryError> { in create_guest_memory()
367 GuestMemory::new(&[(start_addr1, 0x1000), (start_addr2, 0x4000)]) in create_guest_memory()
/external/crosvm/devices/src/virtio/vhost/user/
Dhandler.rs8 use vm_memory::GuestMemory;
117 fn set_mem_table(&mut self, mem: &GuestMemory) -> Result<()> { in set_mem_table()
143 mem: &GuestMemory, in activate_vring() argument
201 mem: &GuestMemory, in activate() argument
/external/crosvm/kvm/tests/
Dreal_run_adder.rs9 use vm_memory::{GuestAddress, GuestMemory};
27 let mem = GuestMemory::new(&vec![(load_addr, mem_size)]).unwrap(); in test_run()

1234