vmm: Update memory zones

We consume `zone_updates` from `VmReceiveMigrationData` and
`RestoreConfig` to remap already existing `MemoryZone`s to different
host NUMA nodes. For now, we do not support further changes, such as
altering the size of the respective `MemoryZone`s.

These changes allow to migrate a VM to a host that has the capacity to
host the same `MemoryZone`s on a different NUMA layout.

Signed-off-by: Pascal Scholz <pascal.scholz@cyberus-technology.de>
On-behalf-of: SAP pascal.scholz@sap.com
This commit is contained in:
Pascal Scholz
2026-07-20 14:28:57 +02:00
committed by Rob Bradford
parent 9198fcf833
commit ad3790a0ea
2 changed files with 15 additions and 1 deletions

View File

@@ -120,7 +120,7 @@ use crate::vm_config::{
};
use crate::{
CPU_MANAGER_SNAPSHOT_ID, DEVICE_MANAGER_SNAPSHOT_ID, GuestMemoryMmap,
MEMORY_MANAGER_SNAPSHOT_ID, PciDeviceInfo, acpi, cpu,
MEMORY_MANAGER_SNAPSHOT_ID, MemoryZoneUpdateError, PciDeviceInfo, acpi, cpu,
};
/// Errors associated with VM management
@@ -399,6 +399,10 @@ pub enum Error {
#[cfg(feature = "fw_cfg")]
#[error("Error using fw_cfg while disabled")]
FwCfgDisabled,
/// Cannot apply NUMA memory zone updates
#[error("Error applying memory zone updates")]
ApplyMemoryZoneUpdate(#[source] MemoryZoneUpdateError),
}
pub type Result<T> = result::Result<T, Error>;