MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / find_region

Method find_region

pci/src/vfio.rs:1214–1223  ·  view source on GitHub ↗
(&self, addr: u64)

Source from the content-addressed store, hash-verified

1212 }
1213
1214 fn find_region(&self, addr: u64) -> Option<MmioRegion> {
1215 for region in self.mmio_regions.iter() {
1216 if addr >= region.start.raw_value()
1217 && addr < region.start.unchecked_add(region.length).raw_value()
1218 {
1219 return Some(region.clone());
1220 }
1221 }
1222 None
1223 }
1224
1225 pub(crate) fn read_bar(&mut self, base: u64, offset: u64, data: &mut [u8]) {
1226 let addr = base + offset;

Callers 8

initramfs_load_addrFunction · 0.80
read_barMethod · 0.80
write_barMethod · 0.80
mapMethod · 0.80
memory_slot_fdsMethod · 0.80
sendMethod · 0.80
dirty_logMethod · 0.80
release_memory_rangeMethod · 0.80

Calls 2

iterMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected