x86/vmx/mod.rs
1//! Data structures and definitions used by Virtual Machine Extensions.
2
3pub mod vmcs;
4
5/// A specialized [`Result`](core::result::Result) type for VMX operations.
6///
7/// This type closely replicates VMX instruction conventions described in
8/// Intel SDM, Volume 3C, Section 30.2.
9pub type Result<T> = core::result::Result<T, VmFail>;
10
11/// Possible outcomes of VMfail pseudo-function used to convey VMX operation errors.
12///
13/// Definitions of all these pseudo-functions can be found in Intel SDM, Volume 3C, Section 30.2.
14#[derive(Debug)]
15pub enum VmFail {
16 /// VMCS pointer is valid, but some other error was encountered. Read
17 /// VM-instruction error field of VMCS for more details.
18 VmFailValid,
19 /// VMCS pointer is not valid.
20 VmFailInvalid,
21}