This release includes a major change to the vm-memory API in order to support
memory access permissions. The previous GuestMemory trait is now renamed
to GuestMemoryBackend, and GuestMemory has a completely new definition.
However, common interfaces such as GuestAddressSpace and Bytes remain on
GuestMemory; therefore, all callers that just use the Bytes interface
remain completely unchanged.
- [#362] Rename
GuestMemorytoGuestMemoryBackend,IoMemorytoGuestMemory
- [#327] I/O virtual memory support via
IoMemory,IommuMemory, andIommu/Iotlb
- [#361] clippy: allow mut_from_ref
No visible changes.
- [#311] Allow compiling without the ReadVolatile and WriteVolatile implementations
- [#312]
GuestRegionContainer, a generic container ofGuestMemoryRegions, generalizingGuestMemoryMmap(which is now a type alias forGuestRegionContainer<GuestRegionMmap>). - [#338] Make
GuestMemoryAtomicalways implementClone. - [#338] Make
GuestAddressSpacea subtrait ofClone. - [#339] Add
GuestMemory::get_slices()
- [#307] Move
read_volatile_from,read_exact_volatile_from,write_volatile_toandwrite_all_volatile_tofunctions from theGuestMemorytrait to theBytestrait. - [#312]: Give
GuestMemory::find_regionandGuestMemory::num_regionsa default implementation, based on linear search. - [#312]: Provide a marker trait,
GuestMemoryRegionBytes, which enables a default implementation ofBytes<MemoryRegionAddress>for aGuestMemoryRegionif implemented. - [#312]: Adjust error types returned from
GuestMemoryMmap::from_ranges[_with_files]andGuestRegionMmap::from_rangeto be separate from the error type returned byGuestRegionCollectionfunctions. Change return type ofGuestRegionMmap::newfromResulttoOption. - [#324](https:////github.com//pull/324)]
GuestMemoryRegion::bitmap()now returns aBitmapSlice. Accessing the full bitmap is now possible only if the type of the memory region is know, for example withMmapRegion::bitmap(). - [#339] Implement
Bytes::load()andBytes::store()withget_slices()instead ofto_region_addr()
- [#307] Remove deprecated functions
Bytes::read_from,Bytes::read_exact_from,Bytes::write_to,Bytes::write_all_to,GuestMemory::as_slice,GuestMemory::as_slice_mut,GuestMemory::with_regions,GuestMemory::with_regions_mut,GuestMemory::map_and_fold,VolatileSlice::as_ptr,VolatileRef::as_ptr, andVolatileArrayRef::as_ptr. - [#320] Drop
check_file_offsetcheck when usingMmapRegionBuilder. Themmap(2)syscall itself already validates that offset and length are valid, and trying to replicate this check in userspace ended up being imperfect.
- [#339] Fix
Bytes::read()andBytes::write()not to ignoretry_access()'scountparameter
- [#349] Deprecate
GuestMemory::try_access(). UseGuestMemory::get_slices()instead.
- [#304] Implement ReadVolatile and WriteVolatile for TcpStream
- [#278 Remove
GuestMemoryIteratortrait, and instead have GuestMemory::iter() returnimpl Iterator.
- [#270] atomic_bitmap: add capability to reset bits range
- [#285] Annotated modules in lib.rs to indicate their feature dependencies such that it is reflected in the docs, enhancing documentation clarity for users.
- [#275] Fail builds on non 64-bit platforms.
- [#279] Remove restriction from
read_volatile_fromandwrite_volatile_intothat made it copy data it chunks of 4096.
- [#266] Derive
Debugfor several types that were missing it.
- [#274] Drop
Defaultas requirement forByteValued.
- [#256] Implement
WriteVolatileforstd::io::Stdout. - [#256] Implement
WriteVolatileforstd::vec::Vec. - [#256] Implement
WriteVolatileforCursor<&mut [u8]>. - [#256] Implement
ReadVolatileforCursor<T: AsRef[u8]>.
- [#247] Add
ReadVolatileandWriteVolatiletraits which are equivalents ofRead/Writewith volatile access semantics.
- [#247] Deprecate
Bytes::{read_from, read_exact_from, write_to, write_all_to}. Instead useReadVolatile/WriteVolatile, which do not incur the performance penalty of copying to hypervisor memory due toRead/Writebeing incompatible with volatile semantics (see also #217).
- [#251]: Inserted checks
that verify that the value returned by
VolatileMemory::get_sliceis of the correct length.
- [#244] Deprecate volatile
memory's
as_ptr()interfaces. The new interfaces to be used instead are:ptr_guard()andptr_guard_mut().
- [#241] mmap_xen: Don't drop the FileOffset while in use #245
- [#241] Add Xen memory
mapping support: Foreign and Grant. Add new API for accessing pointers to
volatile slices, as
as_ptr()can't be used with Xen's Grant mapping. - [#237] Implement
ByteValuedfori/u128.
- [#216] Add
GuestRegionMmap::from_region.
- [#217] Fix vm-memory internally
taking rust-style slices to guest memory in ways that could potentially cause
undefined behavior. Removes/deprecates various
as_slice/as_slice_mutmethods whose usage violated rust's aliasing rules, as well as an unsoundimpl<'a> VolatileMemory for &'a mut [u8].
- [#195]:
mmap::check_file_offsetis doing the correct size validation for block and char devices as well.
- [#198]: atomic: enable 64 bit atomics on ppc64le and s390x.
- [#200]: docs: enable all
features in
docs.rs. - [#199]: Update the way the dependencies are pulled such that we don't end up with incompatible versions.
- [#190]:
VolatileSlice::read/writewhen input slice is empty.
- [#176]: Relax the trait
bounds of
Bytesauto impl forT: GuestMemory - [#178]:
MmapRegion::build_rawno longer requires that the length of the region is a multiple of the page size.
- [#160]: Add
ArcRefandAtomicBitmapArcbitmap backend implementations. - [#149]: Implement builder for MmapRegion.
- [#140]: Add dirty bitmap tracking abstractions.
- [#133]: Deprecate
GuestMemory::with_regions(),GuestMemory::with_regions_mut(),GuestMemory::map_and_fold().
- [#8]: Add GuestMemory method to return an Iterator
- [#120]: Add is_hugetlbfs() to GuestMemoryRegion
- [#126]: Add VolatileSlice::split_at()
- [#128]: Add VolatileSlice::subslice()
- [#100]: Performance degradation after fixing #95.
- [#122]: atomic, Cargo.toml: Update for arc-swap 1.0.0.
- [#109]: Added
build_rawtoMmapRegionwhich can be used to operate on externally created mappings. - [#101]: Added
check_rangefor GuestMemory which could be used to validate a range of guest memory. - [#115]: Add methods for atomic
access to
Bytes.
- [#93]: DoS issue when using virtio with rust-vmm/vm-memory.
- [#106]: Asserts trigger on zero-length access.
integer-atomicsis no longer a distinct feature of the crate.
- [#76]: Added
get_sliceandas_volatile_slicetoGuestMemoryRegion. - [#82]: Added
Clonebound forGuestAddressSpace::T, the return value ofGuestAddressSpace::memory(). - [#88]: Added
as_bytesforByteValuedwhich can be used for reading into POD structures from raw bytes.
- Added traits for working with VM memory.
- Added a mmap based implemention for the Guest Memory.