From f607d0143d1173152d90343feb93849b95f2de15 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Tue, 2 Jun 2026 06:44:17 +0200 Subject: [PATCH] arch: preserve error chain for memmap table On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster --- arch/src/lib.rs | 4 +++- arch/src/x86_64/mod.rs | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/src/lib.rs b/arch/src/lib.rs index 79d5c510c..8c067c302 100644 --- a/arch/src/lib.rs +++ b/arch/src/lib.rs @@ -35,7 +35,9 @@ pub enum Error { #[error("The memory map table extends past the end of guest memory")] MemmapTablePastRamEnd, #[error("Error writing memory map table to guest memory")] - MemmapTableSetup, + MemmapTableSetup(#[source] vm_memory::GuestMemoryError), + #[error("Error generating memory map table")] + MemmapTableGeneration, #[error("The hvm_start_info structure extends past the end of guest memory")] StartInfoPastRamEnd, #[error("Error writing hvm_start_info to guest memory")] diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index dc2718cee..8c0f179f4 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -1140,8 +1140,9 @@ pub fn generate_ram_ranges(guest_mem: &GuestMemoryMmap) -> super::Result super::Result() as u64); }