diff --git a/src/ioctls/vcpu.rs b/src/ioctls/vcpu.rs index c5e57c6f..5ebad903 100644 --- a/src/ioctls/vcpu.rs +++ b/src/ioctls/vcpu.rs @@ -1403,6 +1403,18 @@ impl VcpuFd { kvm_run.immediate_exit = val; } + /// Sets the `request_interrupt_window` flag on the `kvm_run` struct associated with this vCPU to `val`. + pub fn set_kvm_request_interrupt_window(&self, val: u8) { + let kvm_run = self.kvm_run_ptr.as_mut_ref(); + kvm_run.request_interrupt_window = val; + } + + /// Gets the `ready_for_interrupt_injection` flag on the `kvm_run` struct associated with this vCPU to `val`. + pub fn get_ready_for_interrupt_injection(&self) -> u8 { + let kvm_run = self.kvm_run_ptr.as_mut_ref(); + return kvm_run.ready_for_interrupt_injection; + } + /// Returns the vCPU TSC frequency in KHz or an error if the host has unstable TSC. /// /// # Example @@ -1428,6 +1440,8 @@ impl VcpuFd { } } + + /// Sets the specified vCPU TSC frequency. /// /// # Arguments