build: Bump vm-memory and dependents

vm-memory 0.18 has renamed GuestMemory to GuestMemoryBackend, and made
GuestMemory refer to something less specific.  For simplicity, we keep
using GuestMemoryBackend (formerly GuestMemory) everywhere for now.  We
can adjust bounds to be less specific later if we find ourselves needing
the newly enabled flexibility.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Alyssa Ross
2026-07-15 18:51:13 +02:00
committed by Rob Bradford
parent 1a1c21024a
commit cd2089eb69
33 changed files with 140 additions and 103 deletions

View File

@@ -194,16 +194,16 @@ const EM_X86_64: u16 = 62;
pub trait Elf64Writable {
fn write_header(&mut self, dump_state: &DumpState) -> result::Result<(), GuestDebuggableError> {
let e_ident = [
elf::ELFMAG0 as u8, // magic
elf::ELFMAG0, // magic
elf::ELFMAG1,
elf::ELFMAG2,
elf::ELFMAG3,
ELFCLASS64, // class
elf::ELFDATA2LSB as u8, //data
EV_CURRENT, // version
0, // os_abi
0, // abi_version
0, // padding
ELFCLASS64, // class
elf::ELFDATA2LSB, // data
EV_CURRENT, // version
0, // os_abi
0, // abi_version
0, // padding
0,
0,
0,

View File

@@ -114,7 +114,7 @@ use vm_memory::{
Address, GuestAddress, GuestMemoryRegion, GuestUsize, MmapRegion, VolatileMemory, mmap,
};
#[cfg(target_arch = "x86_64")]
use vm_memory::{GuestAddressSpace, GuestMemory};
use vm_memory::{GuestAddressSpace, GuestMemoryBackend};
use vm_migration::protocol::MemoryRangeTable;
use vm_migration::{
Migratable, MigratableError, Pausable, Snapshot, SnapshotData, Snapshottable, Transportable,

View File

@@ -37,7 +37,7 @@ use thiserror::Error;
#[cfg(all(feature = "kvm", feature = "sev_snp"))]
use vm_memory::Bytes;
#[cfg(feature = "sev_snp")]
use vm_memory::{GuestAddress, GuestAddressSpace, GuestMemory};
use vm_memory::{GuestAddress, GuestAddressSpace, GuestMemoryBackend};
#[cfg(all(feature = "kvm", feature = "sev_snp"))]
use vm_migration::Snapshottable;
#[cfg(all(feature = "kvm", feature = "sev_snp", feature = "fw_cfg"))]

View File

@@ -7,7 +7,7 @@ use range_map_vec::{Entry, RangeMap};
use thiserror::Error;
use vm_memory::bitmap::AtomicBitmap;
use vm_memory::{
Bytes, GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryAtomic, GuestMemoryMmap,
Bytes, GuestAddress, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryBackend, GuestMemoryMmap,
GuestMemoryRegion,
};

View File

@@ -40,7 +40,7 @@ use vm_memory::bitmap::AtomicBitmap;
use vm_memory::guest_memory::{Error as MmapError, FileOffset};
use vm_memory::mmap::MmapRegionError;
use vm_memory::{
Address, Bytes, GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryAtomic,
Address, Bytes, GuestAddress, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryBackend,
GuestMemoryError, GuestMemoryRegion, GuestUsize, MmapRegion,
};
use vm_migration::protocol::{MemoryRange, MemoryRangeTable};
@@ -768,7 +768,7 @@ impl MemoryManager {
Ok((mem_regions, memory_zones))
}
// Restore both GuestMemory regions along with MemoryZone zones.
// Restore both GuestMemoryBackend regions along with MemoryZone zones.
fn restore_memory_regions_and_zones(
guest_ram_mappings: &[GuestRamMapping],
zones_config: &[MemoryZoneConfig],
@@ -1585,7 +1585,7 @@ impl MemoryManager {
for region in self.arch_mem_regions.iter() {
if region.r_type == RegionType::Ram {
// Ignore the RAM type since ranges have already been allocated
// based on the GuestMemory regions.
// based on the GuestMemoryBackend regions.
continue;
}
self.ram_allocator

View File

@@ -78,7 +78,7 @@ use thiserror::Error;
use tracer::trace_scoped;
use vm_device::Bus;
#[cfg(feature = "tdx")]
use vm_memory::GuestMemory;
use vm_memory::GuestMemoryBackend;
#[cfg(feature = "tdx")]
use vm_memory::{Address, ByteValued, GuestMemoryRegion, ReadVolatile};
use vm_memory::{Bytes, GuestAddress, GuestAddressSpace, GuestMemoryAtomic};
@@ -3909,7 +3909,7 @@ mod unit_tests {
#[test]
pub fn test_vm() {
use hypervisor::VmExit;
use vm_memory::{Address, GuestMemory, GuestMemoryRegion};
use vm_memory::{Address, GuestMemoryBackend, GuestMemoryRegion};
// This example based on https://lwn.net/Articles/658511/
let code = [
0xba, 0xf8, 0x03, /* mov $0x3f8, %dx */
@@ -4047,7 +4047,7 @@ mod unit_tests {
#[test]
pub fn test_vm() {
use hypervisor::VmExit;
use vm_memory::{Address, GuestMemory, GuestMemoryRegion};
use vm_memory::{Address, GuestMemoryBackend, GuestMemoryRegion};
// This example based on https://lwn.net/Articles/658511/
let code = [
0xba, 0xf8, 0x03, /* mov $0x3f8, %dx */