pub enum VmmError {
InvalidCertificatePageLength = 1,
RateLimitRetryRequest = 2,
Unknown = 3,
}Expand description
An error representingthe upper 32 bits of a SW_EXITINFO2 field set by the VMM.
Variants§
InvalidCertificatePageLength = 1
If there are not enough guest pages to hold the certificate table and certificate data, the hypervisor will return the required number of pages needed to hold the certificate table and certificate data in the RBX register and set the SW_EXITINFO2 field to 0x0000000100000000.
RateLimitRetryRequest = 2
It is not expected that a guest would issue many Guest Request NAE events. However, access to the SNP firmware is a sequential and synchronous operation. To avoid the possibility of a guest creating a denial-of-service attack against the SNP firmware, it is recommended that some form of rate limiting be implemented should it be detected that a high number of Guest Request NAE events are being issued. To allow for this, the hypervisor may set the SW_EXITINFO2 field to 0x0000000200000000, which will inform the guest to retry the request.
Unknown = 3
Nothing more implemented yet.
Trait Implementations§
Source§impl Error for VmmError
Use the default implementations for std::error::Error here.
impl Error for VmmError
Use the default implementations for std::error::Error here.
1.30.0 · 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()
Source§impl From<VmmError> for UserApiError
impl From<VmmError> for UserApiError
Source§impl From<u32> for VmmError
impl From<u32> for VmmError
Source§fn from(value: u32) -> Self
fn from(value: u32) -> Self
Takes a raw u32 and translates it into the correlated VmmError type.
- value - The raw u32 value which we would like to interpret.
§Example
use sev::error::VmmError;
let raw_value: u32 = 0x1u32;
let outcome: VmmError = VmmError::from(raw_value);
assert_eq!(outcome, VmmError::InvalidCertificatePageLength);Source§impl From<u64> for VmmError
impl From<u64> for VmmError
Source§fn from(value: u64) -> Self
fn from(value: u64) -> Self
Takes a raw u64 and translates it into the correlated VmmError type.
- value - The raw u64 value which we would like to interpret.
§Example
use sev::error::VmmError;
let raw_value: u64 = 0x100000000;
let outcome: VmmError = VmmError::from(raw_value);
assert_eq!(outcome, VmmError::InvalidCertificatePageLength);