Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Versionize kvm structures #25

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ fam-wrappers = ["vmm-sys-util"]

[dependencies]
vmm-sys-util = { version = ">=0.2.0", optional = true }

versionize = { version = ">=0.1.1" }
versionize_derive = { version = ">=0.1.1" }
9 changes: 6 additions & 3 deletions src/arm/bindings_v4_20_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
/* automatically generated by rust-bindgen */

use versionize::{VersionMap, Versionize, VersionizeResult};
use versionize_derive::Versionize;

#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
Expand Down Expand Up @@ -758,7 +761,7 @@ fn bindgen_test_layout_pt_regs() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct kvm_regs {
pub usr_regs: pt_regs,
pub svc_regs: [::std::os::raw::c_ulong; 3usize],
Expand Down Expand Up @@ -4354,7 +4357,7 @@ fn bindgen_test_layout_kvm_vapic_addr() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct kvm_mp_state {
pub mp_state: __u32,
}
Expand Down Expand Up @@ -6418,7 +6421,7 @@ fn bindgen_test_layout_kvm_reg_list() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct kvm_one_reg {
pub id: __u64,
pub addr: __u64,
Expand Down
13 changes: 8 additions & 5 deletions src/arm64/bindings_v4_20_0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
/* automatically generated by rust-bindgen */

use versionize::{VersionMap, Versionize, VersionizeResult};
use versionize_derive::Versionize;

#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
Expand Down Expand Up @@ -1331,7 +1334,7 @@ impl Default for prctl_mm_map {
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct user_pt_regs {
pub regs: [__u64; 31usize],
pub sp: __u64,
Expand Down Expand Up @@ -1392,7 +1395,7 @@ fn bindgen_test_layout_user_pt_regs() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct user_fpsimd_state {
pub vregs: [__uint128_t; 32usize],
pub fpsr: __u32,
Expand Down Expand Up @@ -1640,7 +1643,7 @@ fn bindgen_test_layout_user_sve_header() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct kvm_regs {
pub regs: user_pt_regs,
pub sp_el1: __u64,
Expand Down Expand Up @@ -5289,7 +5292,7 @@ fn bindgen_test_layout_kvm_vapic_addr() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct kvm_mp_state {
pub mp_state: __u32,
}
Expand Down Expand Up @@ -7353,7 +7356,7 @@ fn bindgen_test_layout_kvm_reg_list() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialEq)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Versionize)]
pub struct kvm_one_reg {
pub id: __u64,
pub addr: __u64,
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#[cfg(feature = "fam-wrappers")]
extern crate vmm_sys_util;

extern crate versionize;
extern crate versionize_derive;

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
mod x86;
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
Expand Down
Loading