Skip to main content

get_current_vcpu

Function get_current_vcpu 

Source
pub fn get_current_vcpu<'a, A: AxArchVCpu>() -> Option<&'a AxVCpu<A>>
Expand description

Get the current VCpu on the current physical CPU.

It’s guaranteed that each time before a method of AxArchVCpu is called, the current VCpu is set to the corresponding AxVCpu. So methods of AxArchVCpu can always get the AxVCpu containing itself by calling this method.