Skip to content

Commit

Permalink
ioctls: Update MSHV_DEV_VFIO_ names
Browse files Browse the repository at this point in the history
MSHV_DEV_VFIO_GROUP-prefixed names have changed to MSHV_DEV_VFIO_FILE
in the newly generated bindings. The values remain the same.

Signed-off-by: Nuno Das Neves <[email protected]>
  • Loading branch information
NunoDasNeves committed Oct 28, 2024
1 parent 8f3d48d commit 3f50af4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mshv-ioctls/src/ioctls/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl DeviceFd {
/// # use mshv_ioctls::Mshv;
/// # use mshv_bindings::{
/// mshv_device_type_MSHV_DEV_TYPE_VFIO,
/// MSHV_DEV_VFIO_GROUP, MSHV_DEV_VFIO_GROUP_ADD, MSHV_CREATE_DEVICE_TEST
/// MSHV_DEV_VFIO_FILE, MSHV_DEV_VFIO_FILE_ADD, MSHV_CREATE_DEVICE_TEST
/// };
/// let mshv = Mshv::new().unwrap();
/// let vm = mshv.create_vm().unwrap();
Expand All @@ -64,8 +64,8 @@ impl DeviceFd {
/// .expect("Cannot create MSHV device");
///
/// let dist_attr = mshv_bindings::mshv_device_attr {
/// group: MSHV_DEV_VFIO_GROUP,
/// attr: u64::from(MSHV_DEV_VFIO_GROUP_ADD),
/// group: MSHV_DEV_VFIO_FILE,
/// attr: u64::from(MSHV_DEV_VFIO_FILE_ADD),
/// addr: 0,
/// flags: 0,
/// };
Expand Down Expand Up @@ -143,7 +143,7 @@ mod tests {
use crate::ioctls::system::Mshv;
#[cfg(target_arch = "x86_64")]
use mshv_bindings::{
mshv_device_type_MSHV_DEV_TYPE_VFIO, MSHV_DEV_VFIO_GROUP, MSHV_DEV_VFIO_GROUP_ADD,
mshv_device_type_MSHV_DEV_TYPE_VFIO, MSHV_DEV_VFIO_FILE, MSHV_DEV_VFIO_FILE_ADD,
};

#[test]
Expand All @@ -170,8 +170,8 @@ mod tests {
let device = unsafe { DeviceFd::from_raw_fd(raw_fd) };

let dist_attr = mshv_bindings::mshv_device_attr {
group: MSHV_DEV_VFIO_GROUP,
attr: u64::from(MSHV_DEV_VFIO_GROUP_ADD),
group: MSHV_DEV_VFIO_FILE,
attr: u64::from(MSHV_DEV_VFIO_FILE_ADD),
addr: 0,
flags: 0,
};
Expand Down

0 comments on commit 3f50af4

Please sign in to comment.