pub struct AddressSpace { /* private fields */ }
Expand description

An address space implementation with region hotplug capability.

The AddressSpace is a wrapper over AddressSpaceBase to support hotplug of address space regions.

Implementations

Convert a GuestMemoryMmap object into GuestMemoryAtomic<GuestMemoryMmap>.

Create an instance of AddressSpace from an AddressSpaceRegion array.

To achieve better performance by using binary search algorithm, the regions vector will gotten sorted by guest physical address.

Note, panicking if some regions intersects with each other.

Arguments
  • regions - prepared regions to managed by the address space instance.
  • layout - prepared address space layout configuration.

Insert a new address space region into the address space.

Arguments
  • region - the new region to be inserted.

Enumerate all regions in the address space.

Arguments
  • cb - the callback function to apply to each region.

Get address space layout associated with the address space.

Get maximum of guest physical address in the address space.

Check whether the guest physical address guest_addr belongs to a DAX memory region.

Arguments
  • guest_addr - the guest physical address to inquire

Get optional NUMA node id associated with guest physical address gpa.

Arguments
  • gpa - guest physical address to query.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.