#[repr(u32)]pub enum Error {
Show 41 variants
IoError(Error),
InvalidPlatformState,
InvalidGuestState,
InvalidConfig,
InvalidLen,
AlreadyOwned,
InvalidCertificate,
PolicyFailure,
Inactive,
InvalidAddress,
BadSignature,
BadMeasurement,
AsidOwned,
InvalidAsid,
WbinvdRequired,
DfFlushRequired,
InvalidGuest,
InvalidCommand,
Active,
HardwarePlatform,
HardwareUnsafe,
Unsupported,
InvalidParam,
ResourceLimit,
SecureDataInvalid,
InvalidPageSize,
InvalidPageState,
InvalidMdataEntry,
InvalidPageOwner,
AEADOFlow,
RbModeExited = 31,
RMPInitRequired = 32,
BadSvn,
BadVersion,
ShutdownRequired,
UpdateFailed,
RestoreRequired,
RMPInitFailed,
InvalidKey,
Custom(String),
Unknown,
}Expand description
Error conditions returned by the CSV platform or by layers above it (i.e., the Linux kernel).
These error conditions are documented in the HYGON CSV API spec, but their documentation has been copied here for completeness.
Variants§
IoError(Error)
Something went wrong when communicating with kernel or CSV platform
InvalidPlatformState
The platform state is invalid for this command.
InvalidGuestState
The guest state is invalid for this command.
InvalidConfig
The platform configuration is invalid.
InvalidLen
A memory buffer is too small.
AlreadyOwned
The platform is already owned.
InvalidCertificate
The certificate is invalid.
PolicyFailure
Request is not allowed by guest policy.
Inactive
The guest is inactive.
InvalidAddress
The address provided is invalid.
BadSignature
The provided signature is invalid.
BadMeasurement
The provided measurement is invalid.
AsidOwned
The ASID is already owned.
InvalidAsid
The ASID is invalid.
WbinvdRequired
WBINVD instruction required.
DfFlushRequired
DF_FLUSH invocation required.
InvalidGuest
The guest handle is invalid.
InvalidCommand
The command issued is invalid.
Active
The guest is active.
HardwarePlatform
A hardware condition has occurred affecting the platform. It is safe to re-allocate parameter buffers.
HardwareUnsafe
A hardware condition has occurred affecting the platform. Re-allocating parameter buffers is not safe.
Unsupported
Feature is unsupported.
InvalidParam
A given parameter is invalid.
ResourceLimit
The CSV firmware has run out of a resource required to carry out the command.
SecureDataInvalid
The CSV platform observed a failed integrity check.
InvalidPageSize
The RMP page size is incorrect.
InvalidPageState
The RMP page state is incorrect
InvalidMdataEntry
The metadata entry is invalid.
InvalidPageOwner
The page ownership is incorrect
AEADOFlow
The AEAD algorithm would have overflowed
RbModeExited = 31
A Mailbox mode command was sent while the CSV FW was in Ring Buffer mode. Ring Buffer mode has been exited; the Mailbox mode command has been ignored. Retry is recommended.
RMPInitRequired = 32
The RMP must be reinitialized.
BadSvn
SVN of provided image is lower than the committed SVN.
BadVersion
Firmware version anti-rollback.
ShutdownRequired
An invocation of SNP_SHUTDOWN is required to complete this action.
UpdateFailed
Update of the firmware internal state or a guest context page has failed.
RestoreRequired
Installation of the committed firmware image required
RMPInitFailed
The RMP initialization failed.
InvalidKey
The key requested is invalid, not present, or not allowed.
Custom(String)
Custom error message (catch-all for unclassified errors)
Unknown
Unknown error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()