1*91e9d4abSLoGin use system_error::SystemError; 240314b30SXiaoye Zheng 340314b30SXiaoye Zheng pub trait Vcpu: Send + Sync { 440314b30SXiaoye Zheng /// Virtualize the CPU 540314b30SXiaoye Zheng fn virtualize_cpu(&mut self) -> Result<(), SystemError>; 640314b30SXiaoye Zheng fn devirtualize_cpu(&self) -> Result<(), SystemError>; 740314b30SXiaoye Zheng /// Gets the index of the current logical/virtual processor 840314b30SXiaoye Zheng fn id(&self) -> u32; 940314b30SXiaoye Zheng } 10