191e9d4abSLoGin use system_error::SystemError; 240314b30SXiaoye Zheng 3*bd70d2d1SLoGin #[allow(dead_code)] 440314b30SXiaoye Zheng pub trait Vcpu: Send + Sync { 540314b30SXiaoye Zheng /// Virtualize the CPU virtualize_cpu(&mut self) -> Result<(), SystemError>640314b30SXiaoye Zheng fn virtualize_cpu(&mut self) -> Result<(), SystemError>; devirtualize_cpu(&self) -> Result<(), SystemError>740314b30SXiaoye Zheng fn devirtualize_cpu(&self) -> Result<(), SystemError>; 840314b30SXiaoye Zheng /// Gets the index of the current logical/virtual processor id(&self) -> u32940314b30SXiaoye Zheng fn id(&self) -> u32; 1040314b30SXiaoye Zheng } 11