• Home
  • Raw
  • Download

Lines Matching +full:helper +full:- +full:simple +full:- +full:access

5 - Provide a set of traits for accessing and configuring the physical memory of
7 - Provide a clean abstraction of the VM memory such that rust-vmm components
13 - Define consumer side interfaces to access VM's physical memory.
14 - Do not define provider side interfaces to supply VM physical memory.
16 The `vm-memory` crate focuses on defining consumer side interfaces to access
20 [Firecracker](https://github.com/firecracker-microvm/firecracker) can make
22 lightweight backend to access it. For VMMs like [Qemu](https://www.qemu.org/),
28 The `vm-memory` is derived from two upstream projects:
30 - [CrosVM](https://chromium.googlesource.com/chromiumos/platform/crosvm/)
32 - [Firecracker](https://github.com/firecracker-microvm/firecracker) commit
38 The `vm-memory` crate could be divided into four logic parts as:
40 - [Abstraction of Address Space](#abstraction-of-address-space)
41 - [Specialization for Virtual Machine Physical Address Space](#specialization-for-virtual-machine-p…
42 - [Backend Implementation Based on `mmap`](#backend-implementation-based-on-`mmap`)
43 - [Utilities and helpers](#utilities-and-helpers)
50 - `AddressValue`: stores the raw value of an address. Typically `u32`, `u64` or
54 - `Address`: implementation of `AddressValue`.
55 - `Bytes`: trait for volatile access to memory. The `Bytes` trait can be
58 - `VolatileMemory`: basic implementation of volatile access to memory.
62 methods to access the address space, and they never define methods to manage
69 The generic address space crates are specialized to access the physical memory
72 - `GuestAddress`: represents a guest physical address (GPA). On ARM64, a
73 32-bit VMM/hypervisor can be used to support a 64-bit VM. For simplicity,
74 `u64` is used to store the the raw value no matter if it is a 32-bit or
75 a 64-bit virtual machine.
76 - `GuestMemoryRegion`: represents a continuous region of the VM memory.
77 - `GuestMemory`: represents a collection of `GuestMemoryRegion` objects. The
79 - hide the detail of accessing physical addresses (for example complex
81 - map an address request to a `GuestMemoryRegion` object and relay the
83 - handle cases where an access request is spanning two or more
87 access VM's physical memory and not on the implementation of the traits.
94 - `MmapRegion`: implementation of mmap a continuous range of physical memory
96 - `GuestRegionMmap`: implementation of `GuestMemoryRegion` providing a wrapper
98 - `GuestMemoryMmap`: implementation of `GuestMemory` that manages a collection
102 cases where an access request crosses the memory region boundary. This scenario
103 may be triggered when memory hotplug is supported. There is a trade-off between
106 - The following pattern currently used in both CrosVM and Firecracker is
107 simple, but fails when the request crosses region boundary.
116 - To support requests crossing region boundary, the following update is needed:
127 The following utilities and helper traits/macros are imported from the
131 - `ByteValued` (originally `DataInit`): types which are safe to be initialized
134 for all plain-old-data structs. It is notably not true for any type that
136 - `{Le,Be}_{16,32,64}`: explicit endian types useful for embedding in structs
143 - `Address` inherits `AddressValue`
144 - `GuestMemoryRegion` inherits `Bytes<MemoryRegionAddress, E = Error>`. The
146 - `GuestMemory` has a generic implementation of `Bytes<GuestAddress>`.
150 - `GuestAddress`: `Address<u64>`
151 - `MemoryRegionAddress`: `Address<u64>`
155 - `MmapRegion` implements `VolatileMemory`
156 - `GuestRegionMmap` implements `Bytes<MemoryRegionAddress> + GuestMemoryRegion`
157 - `GuestMemoryMmap` implements `GuestMemory`
158 - `VolatileSlice` implements