Enum hypervisor::VcpuExit
source · pub enum VcpuExit {
Show 29 variants
Io,
Mmio,
IoapicEoi {
vector: u8,
},
Exception,
Hypercall,
Debug,
Hlt,
IrqWindowOpen,
Shutdown(Result<(), VcpuShutdownError>),
FailEntry {
hardware_entry_failure_reason: u64,
},
Intr,
SetTpr,
TprAccess,
InternalError,
SystemEventShutdown,
SystemEventReset,
SystemEventCrash,
InvalidVpRegister,
UnsupportedFeature,
Canceled,
UnrecoverableException,
MsrAccess,
Cpuid {
entry: CpuIdEntry,
},
RdTsc,
ApicSmiTrap,
ApicInitSipiTrap,
BusLock,
Sbi {
extension_id: u64,
function_id: u64,
args: [u64; 6],
},
RiscvCsr {
csr_num: u64,
new_value: u64,
write_mask: u64,
ret_value: u64,
},
}
Expand description
A reason why a VCPU exited. One of these returns every time Vcpu::run
is called.
Variants§
Io
An io instruction needs to be emulated. vcpu handle_io should be called to handle the io operation
Mmio
A mmio instruction needs to be emulated. vcpu handle_mmio should be called to handle the mmio operation
IoapicEoi
Exception
Hypercall
Debug
Hlt
IrqWindowOpen
Shutdown(Result<(), VcpuShutdownError>)
FailEntry
Intr
SetTpr
TprAccess
InternalError
SystemEventShutdown
SystemEventReset
SystemEventCrash
InvalidVpRegister
An invalid vcpu register was set while running.
UnsupportedFeature
incorrect setup for vcpu requiring an unsupported feature
Canceled
vcpu run was user cancelled
UnrecoverableException
an unrecoverable exception was encountered (different from Exception)
MsrAccess
vcpu stopped due to an msr access.
Cpuid
vcpu stopped due to a cpuid request.
Fields
§
entry: CpuIdEntry
RdTsc
vcpu stopped due to calling rdtsc
ApicSmiTrap
vcpu stopped for an apic smi trap
ApicInitSipiTrap
vcpu stopped due to an apic trap
BusLock
vcpu stoppted due to bus lock
Sbi
Riscv supervisor call.
RiscvCsr
Emulate CSR access from guest.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VcpuExit
impl RefUnwindSafe for VcpuExit
impl Send for VcpuExit
impl Sync for VcpuExit
impl Unpin for VcpuExit
impl UnwindSafe for VcpuExit
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.