From d2ca7b0e87c4f24571bd80b6b75795e426770f4f Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Wed, 21 May 2025 13:02:36 +0200 Subject: [PATCH] misc: arch: streamline #[source] and Error impl This streamlines the Error implementation in the Cloud Hypervisor code base to match the remaining parts so that everything follows the agreed conventions. These are leftovers missed in the previous commits. Signed-off-by: Philipp Schuster On-behalf-of: SAP philipp.schuster@sap.com --- arch/src/x86_64/mod.rs | 2 +- arch/src/x86_64/mptable.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index 977bf3678..4ee69075e 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -202,7 +202,7 @@ pub enum Error { /// Error retrieving TDX capabilities through the hypervisor (kvm/mshv) API #[cfg(feature = "tdx")] #[error("Error retrieving TDX capabilities through the hypervisor API: {0}")] - TdxCapabilities(HypervisorError), + TdxCapabilities(#[source] HypervisorError), /// Failed to configure E820 map for bzImage #[error("Failed to configure E820 map for bzImage")] diff --git a/arch/src/x86_64/mptable.rs b/arch/src/x86_64/mptable.rs index 406db7575..490b4ca73 100644 --- a/arch/src/x86_64/mptable.rs +++ b/arch/src/x86_64/mptable.rs @@ -60,7 +60,7 @@ pub enum Error { AddressOverflow, /// Failure while zeroing out the memory for the MP table. #[error("Failure while zeroing out the memory for the MP table: {0}")] - Clear(GuestMemoryError), + Clear(#[source] GuestMemoryError), /// Number of CPUs exceeds the maximum supported CPUs #[error("Number of CPUs exceeds the maximum supported CPUs")] TooManyCpus,