vm-migration: preserve error chain

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-06-02 06:40:11 +02:00
committed by Rob Bradford
parent b4c37def26
commit 85109ebae0
2 changed files with 9 additions and 3 deletions

View File

@@ -996,8 +996,10 @@ impl MemoryManager {
for range in saved_regions.regions() {
let host_addr = guest_memory
.get_host_address(GuestAddress(range.gpa))
.map_err(|_| UffdError::GpaTranslation { gpa: range.gpa })?
as u64;
.map_err(|e| UffdError::GpaTranslation {
gpa: range.gpa,
source: e,
})? as u64;
let ioctls = uffd::register(uffd_fd.as_fd(), host_addr, range.length).map_err(|e| {
UffdError::Register {