diff --git a/arch/src/aarch64/fdt.rs b/arch/src/aarch64/fdt.rs index 95831ae67..30c754d6f 100644 --- a/arch/src/aarch64/fdt.rs +++ b/arch/src/aarch64/fdt.rs @@ -82,7 +82,7 @@ pub trait DeviceInfoForFdt { pub enum Error { /// Failure in writing FDT in memory. #[error("Failure in writing FDT in memory: {0}")] - WriteFdtToMemory(GuestMemoryError), + WriteFdtToMemory(#[source] GuestMemoryError), } type Result = result::Result; diff --git a/arch/src/aarch64/mod.rs b/arch/src/aarch64/mod.rs index 78f44e89d..d0a6eb002 100644 --- a/arch/src/aarch64/mod.rs +++ b/arch/src/aarch64/mod.rs @@ -33,7 +33,7 @@ pub enum Error { /// Failed to write FDT to memory. #[error("Failed to write FDT to memory: {0}")] - WriteFdtToMemory(fdt::Error), + WriteFdtToMemory(#[source] fdt::Error), /// Failed to create a GIC. #[error("Failed to create a GIC")] @@ -45,11 +45,11 @@ pub enum Error { /// Error configuring the general purpose registers #[error("Error configuring the general purpose registers: {0}")] - RegsConfiguration(hypervisor::HypervisorCpuError), + RegsConfiguration(#[source] hypervisor::HypervisorCpuError), /// Error configuring the MPIDR register #[error("Error configuring the MPIDR register: {0}")] - VcpuRegMpidr(hypervisor::HypervisorCpuError), + VcpuRegMpidr(#[source] hypervisor::HypervisorCpuError), /// Error initializing PMU for vcpu #[error("Error initializing PMU for vcpu")]