You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we switch to a (potentially) virtual memory model, we want to
compact the interface, especially removing references to memory regions
because virtual memory is not just split into regions, but pages first.
`to_region_addr()` will no longer work then, as it does not communicate
to the caller for how many bytes that mapping is valid. (Currently, it
is generally valid until the end of the region, but this will not be the
case with virtual memory.)
So instead, get a `VolatileSlice` via `get_slices()` and do the atomic
access on it.
(Note: We cannot really have a test case for this, as right now, memory
fragmentation will only happen exactly at memory region boundaries. In
this case, `region.load()` and `region.store()` would have already
returned errors. This change is necessary for when page boundaries
result in different mappings within a single region, but because we
don’t have IOMMU support yet, this can’t be tested.)
Signed-off-by: Hanna Czenczek <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
and `GuestRegionMmap::from_range` to be separate from the error type returned by `GuestRegionCollection` functions.
24
24
Change return type of `GuestRegionMmap::new` from `Result` to `Option`.
25
25
-\[#324](https:////github.com/rust-vmm/vm-memory/pull/324)\]`GuestMemoryRegion::bitmap()` now returns a `BitmapSlice`. Accessing the full bitmap is now possible only if the type of the memory region is know, for example with `MmapRegion::bitmap()`.
26
+
-\[[#339](https://github.com/rust-vmm/vm-memory/pull/339)\] Implement `Bytes::load()` and `Bytes::store()` with `get_slices()` instead of `to_region_addr()`
0 commit comments