diff --git a/src/ioctls/vcpu.rs b/src/ioctls/vcpu.rs index b0cee562..440ce853 100644 --- a/src/ioctls/vcpu.rs +++ b/src/ioctls/vcpu.rs @@ -1394,6 +1394,11 @@ impl VcpuFd { Ok(()) } } + + /// Get reference to the underlying vcpu file object. + pub fn vcpu_file(&self) -> &File { + &self.vcpu + } } /// Helper function to create a new `VcpuFd`. diff --git a/src/lib.rs b/src/lib.rs index 10c3cbae..af40fa66 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -222,7 +222,7 @@ pub use cap::Cap; pub use ioctls::device::DeviceFd; pub use ioctls::system::Kvm; pub use ioctls::vcpu::{VcpuExit, VcpuFd}; -pub use ioctls::vm::{IoEventAddress, NoDatamatch, VmFd}; +pub use ioctls::vm::{new_vmfd, IoEventAddress, NoDatamatch, VmFd}; // The following example is used to verify that our public // structures are exported properly. /// # Example