1# Changelog 2 3## Upcoming version 4 5## \[v0.16.1\] 6 7### Added 8 9- \[[#304](https://github.com/rust-vmm/vm-memory/pull/304)\] Implement ReadVolatile and WriteVolatile for TcpStream 10 11## \[v0.16.0\] 12 13### Added 14 15- \[[#287](https://github.com/rust-vmm/vm-memory/pull/287)\] Support for RISC-V 64-bit platform. 16- \[[#299](https://github.com/rust-vmm/vm-memory/pull/299)\] atomic_bitmap: support enlarging the bitmap. 17 18### Changed 19 20- \[[#278](https://github.com/rust-vmm/vm-memory/pull/278) Remove `GuestMemoryIterator` trait, 21 and instead have GuestMemory::iter() return `impl Iterator`. 22 23## \[v0.15.0\] 24 25### Added 26 27- \[[#270](https://github.com/rust-vmm/vm-memory/pull/270)\] atomic_bitmap: add capability to reset bits range 28- \[[#285](https://github.com/rust-vmm/vm-memory/pull/285)\] Annotated modules in lib.rs to indicate their feature 29 dependencies such that it is reflected in the docs, enhancing documentation clarity for users. 30 31### Changed 32 33- \[[#275](https://github.com/rust-vmm/vm-memory/pull/275)\] Fail builds on non 64-bit platforms. 34 35### Fixed 36 37- \[[#279](https://github.com/rust-vmm/vm-memory/pull/279)\] Remove restriction from `read_volatile_from` and `write_volatile_into` 38 that made it copy data it chunks of 4096. 39 40### Removed 41 42### Deprecated 43 44## \[v0.14.0\] 45 46### Added 47 48- \[[#266](https://github.com/rust-vmm/vm-memory/pull/266)\] Derive `Debug` for several 49 types that were missing it. 50 51### Changed 52 53- \[[#274](https://github.com/rust-vmm/vm-memory/pull/274)\] Drop `Default` as requirement for `ByteValued`. 54 55## \[v0.13.1\] 56 57### Added 58 59- \[[#256](https://github.com/rust-vmm/vm-memory/pull/256)\] Implement `WriteVolatile` 60 for `std::io::Stdout`. 61- \[[#256](https://github.com/rust-vmm/vm-memory/pull/256)\] Implement `WriteVolatile` 62 for `std::vec::Vec`. 63- \[[#256](https://github.com/rust-vmm/vm-memory/pull/256)\] Implement `WriteVolatile` 64 for `Cursor<&mut [u8]>`. 65- \[[#256](https://github.com/rust-vmm/vm-memory/pull/256)\] Implement `ReadVolatile` 66 for `Cursor<T: AsRef[u8]>`. 67 68## \[v0.13.0\] 69 70### Added 71 72- [\[#247\]](https://github.com/rust-vmm/vm-memory/pull/247) Add `ReadVolatile` and 73 `WriteVolatile` traits which are equivalents of `Read`/`Write` with volatile 74 access semantics. 75 76### Changed 77 78- [\[#247\]](https://github.com/rust-vmm/vm-memory/pull/247) Deprecate 79 `Bytes::{read_from, read_exact_from, write_to, write_all_to}`. Instead use 80 `ReadVolatile`/`WriteVolatile`, which do not incur the performance penalty 81 of copying to hypervisor memory due to `Read`/`Write` being incompatible 82 with volatile semantics (see also #217). 83 84## \[v0.12.2\] 85 86### Fixed 87 88- [\[#251\]](https://github.com/rust-vmm/vm-memory/pull/251): Inserted checks 89 that verify that the value returned by `VolatileMemory::get_slice` is of 90 the correct length. 91 92### Deprecated 93 94- [\[#244\]](https://github.com/rust-vmm/vm-memory/pull/241) Deprecate volatile 95 memory's `as_ptr()` interfaces. The new interfaces to be used instead are: 96 `ptr_guard()` and `ptr_guard_mut()`. 97 98## \[v0.12.1\] 99 100### Fixed 101 102- [\[#241\]](https://github.com/rust-vmm/vm-memory/pull/245) mmap_xen: Don't drop 103 the FileOffset while in use #245 104 105## \[v0.12.0\] 106 107### Added 108 109- [\[#241\]](https://github.com/rust-vmm/vm-memory/pull/241) Add Xen memory 110 mapping support: Foreign and Grant. Add new API for accessing pointers to 111 volatile slices, as `as_ptr()` can't be used with Xen's Grant mapping. 112- [\[#237\]](https://github.com/rust-vmm/vm-memory/pull/237) Implement `ByteValued` for `i/u128`. 113 114## \[v0.11.0\] 115 116### Added 117 118- [\[#216\]](https://github.com/rust-vmm/vm-memory/pull/216) Add `GuestRegionMmap::from_region`. 119 120### Fixed 121 122- [\[#217\]](https://github.com/rust-vmm/vm-memory/pull/217) Fix vm-memory internally 123 taking rust-style slices to guest memory in ways that could potentially cause 124 undefined behavior. Removes/deprecates various `as_slice`/`as_slice_mut` methods 125 whose usage violated rust's aliasing rules, as well as an unsound 126 `impl<'a> VolatileMemory for &'a mut [u8]`. 127 128## \[v0.10.0\] 129 130### Changed 131 132- [\[#208\]](https://github.com/rust-vmm/vm-memory/issues/208) Updated 133 vmm-sys-util dependency to v0.11.0 134- [\[#203\]](https://github.com/rust-vmm/vm-memory/pull/203) Switched to Rust 135 edition 2021. 136 137## \[v0.9.0\] 138 139### Fixed 140 141- [\[#195\]](https://github.com/rust-vmm/vm-memory/issues/195): 142 `mmap::check_file_offset` is doing the correct size validation for block and 143 char devices as well. 144 145### Changed 146 147- [\[#198\]](https://github.com/rust-vmm/vm-memory/pull/198): atomic: enable 64 148 bit atomics on ppc64le and s390x. 149- [\[#200\]](https://github.com/rust-vmm/vm-memory/pull/200): docs: enable all 150 features in `docs.rs`. 151- [\[#199\]](https://github.com/rust-vmm/vm-memory/issues/199): Update the way 152 the dependencies are pulled such that we don't end up with incompatible 153 versions. 154 155## \[v0.8.0\] 156 157### Fixed 158 159- [\[#190\]](https://github.com/rust-vmm/vm-memory/pull/190): 160 `VolatileSlice::read/write` when input slice is empty. 161 162## \[v0.7.0\] 163 164### Changed 165 166- [\[#176\]](https://github.com/rust-vmm/vm-memory/pull/176): Relax the trait 167 bounds of `Bytes` auto impl for `T: GuestMemory` 168- [\[#178\]](https://github.com/rust-vmm/vm-memory/pull/178): 169 `MmapRegion::build_raw` no longer requires that the length of the region is a 170 multiple of the page size. 171 172## \[v0.6.0\] 173 174### Added 175 176- [\[#160\]](https://github.com/rust-vmm/vm-memory/pull/160): Add `ArcRef` and `AtomicBitmapArc` bitmap 177 backend implementations. 178- [\[#149\]](https://github.com/rust-vmm/vm-memory/issues/149): Implement builder for MmapRegion. 179- [\[#140\]](https://github.com/rust-vmm/vm-memory/issues/140): Add dirty bitmap tracking abstractions. 180 181### Deprecated 182 183- [\[#133\]](https://github.com/rust-vmm/vm-memory/issues/8): Deprecate `GuestMemory::with_regions()`, 184 `GuestMemory::with_regions_mut()`, `GuestMemory::map_and_fold()`. 185 186## \[v0.5.0\] 187 188### Added 189 190- [\[#8\]](https://github.com/rust-vmm/vm-memory/issues/8): Add GuestMemory method to return an Iterator 191- [\[#120\]](https://github.com/rust-vmm/vm-memory/pull/120): Add is_hugetlbfs() to GuestMemoryRegion 192- [\[#126\]](https://github.com/rust-vmm/vm-memory/pull/126): Add VolatileSlice::split_at() 193- [\[#128\]](https://github.com/rust-vmm/vm-memory/pull/128): Add VolatileSlice::subslice() 194 195## \[v0.4.0\] 196 197### Fixed 198 199- [\[#100\]](https://github.com/rust-vmm/vm-memory/issues/100): Performance 200 degradation after fixing [#95](https://github.com/rust-vmm/vm-memory/pull/95). 201- [\[#122\]](https://github.com/rust-vmm/vm-memory/pull/122): atomic, 202 Cargo.toml: Update for arc-swap 1.0.0. 203 204## \[v0.3.0\] 205 206### Added 207 208- [\[#109\]](https://github.com/rust-vmm/vm-memory/pull/109): Added `build_raw` to 209 `MmapRegion` which can be used to operate on externally created mappings. 210- [\[#101\]](https://github.com/rust-vmm/vm-memory/pull/101): Added `check_range` for 211 GuestMemory which could be used to validate a range of guest memory. 212- [\[#115\]](https://github.com/rust-vmm/vm-memory/pull/115): Add methods for atomic 213 access to `Bytes`. 214 215### Fixed 216 217- [\[#93\]](https://github.com/rust-vmm/vm-memory/issues/93): DoS issue when using 218 virtio with rust-vmm/vm-memory. 219- [\[#106\]](https://github.com/rust-vmm/vm-memory/issues/106): Asserts trigger 220 on zero-length access. 221 222### Removed 223 224- `integer-atomics` is no longer a distinct feature of the crate. 225 226## \[v0.2.0\] 227 228### Added 229 230- [\[#76\]](https://github.com/rust-vmm/vm-memory/issues/76): Added `get_slice` and 231 `as_volatile_slice` to `GuestMemoryRegion`. 232- [\[#82\]](https://github.com/rust-vmm/vm-memory/issues/82): Added `Clone` bound 233 for `GuestAddressSpace::T`, the return value of `GuestAddressSpace::memory()`. 234- [\[#88\]](https://github.com/rust-vmm/vm-memory/issues/88): Added `as_bytes` for 235 `ByteValued` which can be used for reading into POD structures from 236 raw bytes. 237 238## \[v0.1.0\] 239 240### Added 241 242- Added traits for working with VM memory. 243- Added a mmap based implemention for the Guest Memory. 244