Skip to main content

Error

Enum Error 

Source
#[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 Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Box<dyn Error + Send + Sync>> for Error

Source§

fn from(e: Box<dyn Error + Send + Sync>) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(error: Error) -> Error

Converts to this type from the input type.
Source§

impl From<ErrorStack> for Error

Source§

fn from(error: ErrorStack) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,