pub struct Vcpu { /* private fields */ }
Expand description
Wrapper for VCPU ioctls.
Representation of the file descriptor obtained by the KVM_CREATE_VCPU
ioctl.
This wrapper provides access to the VCPU ioctls
as described in KVM API.
Implementations§
source§impl Vcpu
impl Vcpu
sourcepub fn get_regs(&self) -> Result<kvm_regs>
pub fn get_regs(&self) -> Result<kvm_regs>
Get the general purpose registers with the KVM_GET_REGS
ioctl in form of
kvm_regs
.
sourcepub fn set_regs(&self, regs: kvm_regs) -> Result<()>
pub fn set_regs(&self, regs: kvm_regs) -> Result<()>
Set the general purpose registers with the KVM_SET_REGS
ioctl in form of
kvm_regs
.
sourcepub fn get_sregs(&self) -> Result<kvm_sregs>
pub fn get_sregs(&self) -> Result<kvm_sregs>
Get the special registers with the KVM_GET_SREGS
ioctl in form of
kvm_sregs
.
sourcepub fn set_sregs(&self, sregs: kvm_sregs) -> Result<()>
pub fn set_sregs(&self, sregs: kvm_sregs) -> Result<()>
Set the special registers with the KVM_SET_SREGS
ioctl in form of
kvm_sregs
.
sourcepub fn get_debugregs(&self) -> Result<kvm_debugregs>
pub fn get_debugregs(&self) -> Result<kvm_debugregs>
Get the debug registers with the KVM_GET_DEBUGREGS
ioctl in form of
kvm_debugregs
.
sourcepub fn set_debugregs(&self, dregs: kvm_debugregs) -> Result<()>
pub fn set_debugregs(&self, dregs: kvm_debugregs) -> Result<()>
Set the debug registers with the KVM_SET_DEBUGREGS
ioctl in form of
kvm_debugregs
.
sourcepub fn set_single_step(&self, enable: bool) -> Result<()>
pub fn set_single_step(&self, enable: bool) -> Result<()>
Enable or disable guest single steppig (debug) with the
KVM_GUESTDBG_ENABLE
ioctl.
Auto Trait Implementations§
impl RefUnwindSafe for Vcpu
impl !Send for Vcpu
impl !Sync for Vcpu
impl Unpin for Vcpu
impl UnwindSafe for Vcpu
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