pub struct Vcpu {
pub regs: Registers,
pc: u64,
asid: usize,
mode: Mode,
}
Fields§
§regs: Registers
§pc: u64
§asid: usize
§mode: Mode
Implementations§
Source§impl Vcpu
impl Vcpu
pub fn new(mode: Mode) -> Self
pub fn set_asid(&mut self, asid: usize)
pub fn set_pc(&mut self, pc: u64)
pub fn get_pc(&self) -> u64
pub fn set_sp(&mut self, sp: usize)
pub fn get_mode(&self) -> Mode
pub fn store(&mut self, riscv64: &Riscv64)
pub fn switch(&mut self, riscv64: &mut Riscv64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Vcpu
impl RefUnwindSafe for Vcpu
impl Send for Vcpu
impl Sync for Vcpu
impl Unpin for Vcpu
impl UnwindSafe for Vcpu
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)