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

Method free_bars

devices/src/pvpanic.rs:211–222  ·  view source on GitHub ↗
(
        &mut self,
        _allocator: &mut SystemAllocator,
        mmio32_allocator: &mut AddressAllocator,
        _mmio64_allocator: &mut AddressAllocator,
    )

Source from the content-addressed store, hash-verified

209 }
210
211 fn free_bars(
212 &mut self,
213 _allocator: &mut SystemAllocator,
214 mmio32_allocator: &mut AddressAllocator,
215 _mmio64_allocator: &mut AddressAllocator,
216 ) -> std::result::Result<(), PciDeviceError> {
217 for bar in self.bar_regions.drain(..) {
218 mmio32_allocator.free(GuestAddress(bar.addr()), bar.size());
219 }
220
221 Ok(())
222 }
223
224 fn move_bar(&mut self, old_base: u64, new_base: u64) -> result::Result<(), std::io::Error> {
225 for bar in self.bar_regions.iter_mut() {

Callers

nothing calls this directly

Calls 3

freeMethod · 0.45
addrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected