Skip to content

Commit

Permalink
mshv-ioctls/system: Remove check_stable() and MSHV_CHECK_EXTENSION
Browse files Browse the repository at this point in the history
check_stable() and the associated IOCTL, MSHV_CHECK_EXTENSION, are
not currently in use, and will be replaced in a future patch.

Signed-off-by: Nuno Das Neves <[email protected]>
  • Loading branch information
NunoDasNeves authored and Muminul Islam Russell committed Dec 11, 2023
1 parent 425bc05 commit 0dd4d34
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
13 changes: 0 additions & 13 deletions mshv-ioctls/src/ioctls/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,6 @@ impl Mshv {
self.create_vm_with_type(VmType::Normal)
}

/// Check if MSHV API is stable
pub fn check_stable(&self) -> Result<bool> {
// Safe because we know `self.hv` is a real MSHV fd as this module is the only one that
// creates mshv objects.
let cap: u32 = MSHV_CAP_CORE_API_STABLE;
// SAFETY: IOCTL call with the correct types.
let ret = unsafe { ioctl_with_ref(&self.hv, MSHV_CHECK_EXTENSION(), &cap) };
match ret {
0 => Ok(false),
r if r > 0 => Ok(true),
_ => Err(errno::Error::last()),
}
}
/// X86 specific call to get list of supported MSRS
pub fn get_msr_index_list(&self) -> Result<MsrList> {
/* return all the MSRs we currently support */
Expand Down
1 change: 0 additions & 1 deletion mshv-ioctls/src/mshv_ioctls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause
//
use mshv_bindings::*;
ioctl_iow_nr!(MSHV_CHECK_EXTENSION, MSHV_IOCTL, 0x00, u32);
ioctl_iow_nr!(MSHV_CREATE_VP, MSHV_IOCTL, 0x04, mshv_create_vp);
ioctl_iowr_nr!(MSHV_GET_VP_REGISTERS, MSHV_IOCTL, 0x05, mshv_vp_registers);
ioctl_iow_nr!(MSHV_SET_VP_REGISTERS, MSHV_IOCTL, 0x06, mshv_vp_registers);
Expand Down

0 comments on commit 0dd4d34

Please sign in to comment.