diff --git a/vmm/src/api/mod.rs b/vmm/src/api/mod.rs index 66e52879a..9abe2ce6f 100644 --- a/vmm/src/api/mod.rs +++ b/vmm/src/api/mod.rs @@ -313,7 +313,7 @@ pub enum VmReceiveMigrationConfigError { #[error("Error parsing receive migration parameters")] ParseError(#[source] OptionParserError), - #[error("Error validating receive migration parameters")] + #[error("Error validating receive migration parameters: {0}")] ValidationError(String), } @@ -422,7 +422,7 @@ pub enum VmSendMigrationConfigError { )] InvalidDestinationUrl(#[source] TcpAddressParseError), - #[error("Error validating send migration parameters")] + #[error("Error validating send migration parameters: {0}")] ValidationError(String), } diff --git a/vmm/src/config.rs b/vmm/src/config.rs index 0c6769e3f..f2cef2482 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -394,18 +394,18 @@ pub enum ValidationError { #[error("Path {0:?} provided in landlock-rules does not exist")] LandlockPathDoesNotExist(PathBuf), /// Access provided in landlock-rules in invalid - #[error("access provided in landlock-rules in invalid")] + #[error("Invalid landlock access: {0}")] InvalidLandlockAccess(String), /// Invalid block device serial length #[error("Block device serial length ({0}) exceeds maximum allowed length ({1})")] InvalidSerialLength(usize, usize), #[cfg(feature = "ivshmem")] /// Invalid Ivshmem input size - #[error("Invalid ivshmem input size")] + #[error("Invalid ivshmem input size: {0}")] InvalidIvshmemInputSize(u64), #[cfg(feature = "ivshmem")] /// Invalid Ivshmem backend file size - #[error("Invalid ivshmem backend file size")] + #[error("Invalid ivshmem backend file size: {0}")] InvalidIvshmemSize(u64), #[cfg(feature = "ivshmem")] /// Invalid Ivshmem backend file path @@ -418,7 +418,7 @@ pub enum ValidationError { #[error("IP provided without a mask")] IpProvidedWithoutMask, /// Invalid NUMA Configuration - #[error("NUMA Configuration is invalid")] + #[error("Invalid NUMA configuration: {0}")] InvalidNumaConfig(String), /// The supplied PCI ID was greater then the max. supported number /// of devices per Bus diff --git a/vmm/src/device_manager.rs b/vmm/src/device_manager.rs index 4f592eb13..e87d7e512 100644 --- a/vmm/src/device_manager.rs +++ b/vmm/src/device_manager.rs @@ -493,7 +493,7 @@ pub enum DeviceManagerError { RemoveDeviceFromMmioBus(#[source] vm_device::BusError), /// Failed to find the device corresponding to a specific PCI b/d/f. - #[error("Failed to find the device corresponding to a specific PCI b/d/f")] + #[error("Failed to find the device corresponding to a specific PCI b/d/f: {0:#x}")] UnknownPciBdf(u32), /// Not allowed to remove this type of device from the VM. @@ -501,7 +501,7 @@ pub enum DeviceManagerError { RemovalNotAllowed(vm_virtio::VirtioDeviceType), /// Failed to find device corresponding to the given identifier. - #[error("Failed to find device corresponding to the given identifier")] + #[error("Failed to find device corresponding to the given identifier: {0}")] UnknownDeviceId(String), /// Failed to find an available PCI device ID. @@ -649,7 +649,7 @@ pub enum DeviceManagerError { InvalidIdentifier(String), /// vfio-user socket path already in use by another user device. - #[error("vfio-user socket path already in use: {0:?}")] + #[error("VFIO-user socket path already in use: {0:?}")] UserDeviceSocketInUse(path::PathBuf), /// Failed retrieving device state from snapshot diff --git a/vmm/src/igvm/igvm_loader.rs b/vmm/src/igvm/igvm_loader.rs index 57ef05a6c..31d965096 100644 --- a/vmm/src/igvm/igvm_loader.rs +++ b/vmm/src/igvm/igvm_loader.rs @@ -104,7 +104,7 @@ pub enum Error { #[error("Error decoding host data")] FailedToDecodeHostData(#[source] hex::FromHexError), #[error("Error allocating address space")] - MemoryManager(MemoryManagerError), + MemoryManager(#[source] MemoryManagerError), #[error("IGVM file not provided")] MissingIgvm, #[error("Error applying VMSA to vCPU registers: {0}")] diff --git a/vmm/src/igvm/loader.rs b/vmm/src/igvm/loader.rs index a27eb9498..1e91ea18b 100644 --- a/vmm/src/igvm/loader.rs +++ b/vmm/src/igvm/loader.rs @@ -37,8 +37,6 @@ pub enum Error { MemoryUnavailable, #[error("failed to import pages")] ImportPagesFailed, - #[error("invalid vp context memory")] - InvalidVpContextMemory(&'static str), #[error("data larger than imported region")] DataTooLarge, } diff --git a/vmm/src/serial_manager.rs b/vmm/src/serial_manager.rs index b62b7abba..6975d464a 100644 --- a/vmm/src/serial_manager.rs +++ b/vmm/src/serial_manager.rs @@ -90,11 +90,11 @@ pub enum Error { /// Cannot create seccomp filter. #[error("Error creating seccomp filter")] - CreateSeccompFilter(seccompiler::Error), + CreateSeccompFilter(#[source] seccompiler::Error), /// Cannot apply seccomp filter. #[error("Error applying seccomp filter")] - ApplySeccompFilter(seccompiler::Error), + ApplySeccompFilter(#[source] seccompiler::Error), } pub type Result = result::Result;