kvm_sys: Update aarch64 bindings.rs

Update to v5.10 kernel headers so we can get new features such as
ARM's PV_TIME. Keep the temporary hack from CL:2623942 too.

BUG=chromium:1130828
TEST=emerge-trogdor crosvm && cros deploy $DUT crosvm && \
     tast run $DUT crostini.Basic.buster_stable

Change-Id: I58f7e2bd3bd50f9deadc15786d6bde660d84ecc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2871393
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Stephen Boyd 2021-05-01 18:05:25 -07:00 committed by Commit Bot
parent 561abaffdb
commit d28aaa6c2d

View file

@ -3,11 +3,11 @@
// found in the LICENSE file.
/*
* automatically generated by bindgen 0.49.2.
* From chromeos-linux v5.4 include/linux/kvm.h
* $ cd /path/to/kernel/v5.4/
* $ make headers_install ARCH=arm64 INSTALL_HDR_PATH=arm64_v5_4_headers
* $ cd arm64_v5_4_headers
* automatically generated by rust-bindgen 0.56.0
* From chromeos-linux v5.10 include/linux/kvm.h
* $ cd /path/to/kernel/v5.10/
* $ make headers_install ARCH=arm64 INSTALL_HDR_PATH=arm64_v5_10_headers
* $ cd arm64_v5_10_headers
* $ bindgen --with-derive-default -o bindings.rs include/linux/kvm.h -- -Iinclude
*/
@ -16,16 +16,16 @@
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub fn new() -> Self {
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub unsafe fn as_ptr(&self) -> *const T {
::std::mem::transmute(self)
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
::std::mem::transmute(self)
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
@ -41,12 +41,6 @@ impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fmt.write_str("__IncompleteArrayField")
}
}
impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
#[inline]
fn clone(&self) -> Self {
Self::new()
}
}
pub const __BITS_PER_LONG: u32 = 64;
pub const __FD_SETSIZE: u32 = 1024;
pub const _IOC_NRBITS: u32 = 8;
@ -153,7 +147,16 @@ pub const HWCAP2_SVESHA3: u32 = 32;
pub const HWCAP2_SVESM4: u32 = 64;
pub const HWCAP2_FLAGM2: u32 = 128;
pub const HWCAP2_FRINT: u32 = 256;
pub const HWCAP2_RNG: u32 = 512;
pub const HWCAP2_SVEI8MM: u32 = 512;
pub const HWCAP2_SVEF32MM: u32 = 1024;
pub const HWCAP2_SVEF64MM: u32 = 2048;
pub const HWCAP2_SVEBF16: u32 = 4096;
pub const HWCAP2_I8MM: u32 = 8192;
pub const HWCAP2_BF16: u32 = 16384;
pub const HWCAP2_DGH: u32 = 32768;
pub const HWCAP2_RNG: u32 = 65536;
pub const HWCAP2_BTI: u32 = 131072;
pub const HWCAP2_MTE: u32 = 262144;
pub const __SVE_VQ_BYTES: u32 = 16;
pub const __SVE_VQ_MIN: u32 = 1;
pub const __SVE_VQ_MAX: u32 = 512;
@ -175,20 +178,29 @@ pub const PSR_F_BIT: u32 = 64;
pub const PSR_I_BIT: u32 = 128;
pub const PSR_A_BIT: u32 = 256;
pub const PSR_D_BIT: u32 = 512;
pub const PSR_BTYPE_MASK: u32 = 3072;
pub const PSR_SSBS_BIT: u32 = 4096;
pub const PSR_PAN_BIT: u32 = 4194304;
pub const PSR_UAO_BIT: u32 = 8388608;
pub const PSR_DIT_BIT: u32 = 16777216;
pub const PSR_TCO_BIT: u32 = 33554432;
pub const PSR_V_BIT: u32 = 268435456;
pub const PSR_C_BIT: u32 = 536870912;
pub const PSR_Z_BIT: u32 = 1073741824;
pub const PSR_N_BIT: u32 = 2147483648;
pub const PSR_BTYPE_SHIFT: u32 = 10;
pub const PSR_f: u32 = 4278190080;
pub const PSR_s: u32 = 16711680;
pub const PSR_x: u32 = 65280;
pub const PSR_c: u32 = 255;
pub const PSR_BTYPE_NONE: u32 = 0;
pub const PSR_BTYPE_JC: u32 = 1024;
pub const PSR_BTYPE_C: u32 = 2048;
pub const PSR_BTYPE_J: u32 = 3072;
pub const PTRACE_SYSEMU: u32 = 31;
pub const PTRACE_SYSEMU_SINGLESTEP: u32 = 32;
pub const PTRACE_PEEKMTETAGS: u32 = 33;
pub const PTRACE_POKEMTETAGS: u32 = 34;
pub const SVE_PT_REGS_MASK: u32 = 1;
pub const SVE_PT_REGS_FPSIMD: u32 = 0;
pub const SVE_PT_REGS_SVE: u32 = 1;
@ -225,6 +237,8 @@ pub const KVM_ARM_VCPU_PTRAUTH_GENERIC: u32 = 6;
pub const KVM_ARM_MAX_DBG_REGS: u32 = 16;
pub const KVM_GUESTDBG_USE_SW_BP: u32 = 65536;
pub const KVM_GUESTDBG_USE_HW: u32 = 131072;
pub const KVM_PMU_EVENT_ALLOW: u32 = 0;
pub const KVM_PMU_EVENT_DENY: u32 = 1;
pub const KVM_REG_ARM_COPROC_MASK: u32 = 268369920;
pub const KVM_REG_ARM_COPROC_SHIFT: u32 = 16;
pub const KVM_REG_ARM_CORE: u32 = 1048576;
@ -292,9 +306,12 @@ pub const KVM_DEV_ARM_ITS_CTRL_RESET: u32 = 4;
pub const KVM_ARM_VCPU_PMU_V3_CTRL: u32 = 0;
pub const KVM_ARM_VCPU_PMU_V3_IRQ: u32 = 0;
pub const KVM_ARM_VCPU_PMU_V3_INIT: u32 = 1;
pub const KVM_ARM_VCPU_PMU_V3_FILTER: u32 = 2;
pub const KVM_ARM_VCPU_TIMER_CTRL: u32 = 1;
pub const KVM_ARM_VCPU_TIMER_IRQ_VTIMER: u32 = 0;
pub const KVM_ARM_VCPU_TIMER_IRQ_PTIMER: u32 = 1;
pub const KVM_ARM_VCPU_PVTIME_CTRL: u32 = 2;
pub const KVM_ARM_VCPU_PVTIME_IPA: u32 = 0;
pub const KVM_ARM_IRQ_VCPU2_SHIFT: u32 = 28;
pub const KVM_ARM_IRQ_VCPU2_MASK: u32 = 15;
pub const KVM_ARM_IRQ_TYPE_SHIFT: u32 = 24;
@ -355,6 +372,7 @@ pub const KVM_PIT_SPEAKER_DUMMY: u32 = 1;
pub const KVM_S390_CMMA_PEEK: u32 = 1;
pub const KVM_EXIT_HYPERV_SYNIC: u32 = 1;
pub const KVM_EXIT_HYPERV_HCALL: u32 = 2;
pub const KVM_EXIT_HYPERV_SYNDBG: u32 = 3;
pub const KVM_S390_GET_SKEYS_NONE: u32 = 1;
pub const KVM_S390_SKEYS_MAX: u32 = 1048576;
pub const KVM_EXIT_UNKNOWN: u32 = 0;
@ -385,6 +403,9 @@ pub const KVM_EXIT_SYSTEM_EVENT: u32 = 24;
pub const KVM_EXIT_S390_STSI: u32 = 25;
pub const KVM_EXIT_IOAPIC_EOI: u32 = 26;
pub const KVM_EXIT_HYPERV: u32 = 27;
pub const KVM_EXIT_ARM_NISV: u32 = 28;
pub const KVM_EXIT_X86_RDMSR: u32 = 29;
pub const KVM_EXIT_X86_WRMSR: u32 = 30;
pub const KVM_INTERNAL_ERROR_EMULATION: u32 = 1;
pub const KVM_INTERNAL_ERROR_SIMUL_EX: u32 = 2;
pub const KVM_INTERNAL_ERROR_DELIVERY_EV: u32 = 3;
@ -399,9 +420,14 @@ pub const KVM_S390_RESET_IPL: u32 = 16;
pub const KVM_SYSTEM_EVENT_SHUTDOWN: u32 = 1;
pub const KVM_SYSTEM_EVENT_RESET: u32 = 2;
pub const KVM_SYSTEM_EVENT_CRASH: u32 = 3;
pub const KVM_MSR_EXIT_REASON_INVAL: u32 = 1;
pub const KVM_MSR_EXIT_REASON_UNKNOWN: u32 = 2;
pub const KVM_MSR_EXIT_REASON_FILTER: u32 = 4;
pub const SYNC_REGS_SIZE_BYTES: u32 = 2048;
pub const KVM_S390_MEMOP_LOGICAL_READ: u32 = 0;
pub const KVM_S390_MEMOP_LOGICAL_WRITE: u32 = 1;
pub const KVM_S390_MEMOP_SIDA_READ: u32 = 2;
pub const KVM_S390_MEMOP_SIDA_WRITE: u32 = 3;
pub const KVM_S390_MEMOP_F_CHECK_ONLY: u32 = 1;
pub const KVM_S390_MEMOP_F_INJECT_EXCEPTION: u32 = 2;
pub const KVM_MP_STATE_RUNNABLE: u32 = 0;
@ -618,6 +644,21 @@ pub const KVM_CAP_ARM_PTRAUTH_GENERIC: u32 = 172;
pub const KVM_CAP_PMU_EVENT_FILTER: u32 = 173;
pub const KVM_CAP_ARM_IRQ_LINE_LAYOUT_2: u32 = 174;
pub const KVM_CAP_HYPERV_DIRECT_TLBFLUSH: u32 = 175;
pub const KVM_CAP_PPC_GUEST_DEBUG_SSTEP: u32 = 176;
pub const KVM_CAP_ARM_NISV_TO_USER: u32 = 177;
pub const KVM_CAP_ARM_INJECT_EXT_DABT: u32 = 178;
pub const KVM_CAP_S390_VCPU_RESETS: u32 = 179;
pub const KVM_CAP_S390_PROTECTED: u32 = 180;
pub const KVM_CAP_PPC_SECURE_GUEST: u32 = 181;
pub const KVM_CAP_HALT_POLL: u32 = 182;
pub const KVM_CAP_ASYNC_PF_INT: u32 = 183;
pub const KVM_CAP_LAST_CPU: u32 = 184;
pub const KVM_CAP_SMALLER_MAXPHYADDR: u32 = 185;
pub const KVM_CAP_S390_DIAG318: u32 = 186;
pub const KVM_CAP_STEAL_TIME: u32 = 187;
pub const KVM_CAP_X86_USER_SPACE_MSR: u32 = 188;
pub const KVM_CAP_X86_MSR_FILTER: u32 = 189;
pub const KVM_CAP_ENFORCE_PV_FEATURE_CPUID: u32 = 190;
// TODO(tjeznach): Remove this when reporting KVM_IOAPIC_NUM_PINS is no longer required.
pub const KVM_CAP_IOAPIC_NUM_PINS: u32 = 8191;
// TODO(qwandor): Update this once the pKVM patches are merged upstream with a stable capability ID.
@ -681,6 +722,8 @@ pub const KVM_ARM_DEV_EL1_PTIMER: u32 = 2;
pub const KVM_ARM_DEV_PMU: u32 = 4;
pub const KVM_HYPERV_CONN_ID_MASK: u32 = 16777215;
pub const KVM_HYPERV_EVENTFD_DEASSIGN: u32 = 1;
pub const KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE: u32 = 1;
pub const KVM_DIRTY_LOG_INITIALLY_SET: u32 = 2;
pub type __s8 = ::std::os::raw::c_schar;
pub type __u8 = ::std::os::raw::c_uchar;
pub type __s16 = ::std::os::raw::c_short;
@ -769,6 +812,7 @@ fn bindgen_test_layout___kernel_fsid_t() {
}
pub type __kernel_off_t = __kernel_long_t;
pub type __kernel_loff_t = ::std::os::raw::c_longlong;
pub type __kernel_old_time_t = __kernel_long_t;
pub type __kernel_time_t = __kernel_long_t;
pub type __kernel_time64_t = ::std::os::raw::c_longlong;
pub type __kernel_clock_t = __kernel_long_t;
@ -1522,6 +1566,67 @@ fn bindgen_test_layout_kvm_arch_memory_slot() {
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_pmu_event_filter {
pub base_event: __u16,
pub nevents: __u16,
pub action: __u8,
pub pad: [__u8; 3usize],
}
#[test]
fn bindgen_test_layout_kvm_pmu_event_filter() {
assert_eq!(
::std::mem::size_of::<kvm_pmu_event_filter>(),
8usize,
concat!("Size of: ", stringify!(kvm_pmu_event_filter))
);
assert_eq!(
::std::mem::align_of::<kvm_pmu_event_filter>(),
2usize,
concat!("Alignment of ", stringify!(kvm_pmu_event_filter))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).base_event as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_pmu_event_filter),
"::",
stringify!(base_event)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).nevents as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(kvm_pmu_event_filter),
"::",
stringify!(nevents)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).action as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(kvm_pmu_event_filter),
"::",
stringify!(action)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).pad as *const _ as usize },
5usize,
concat!(
"Offset of field: ",
stringify!(kvm_pmu_event_filter),
"::",
stringify!(pad)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vcpu_events {
pub exception: kvm_vcpu_events__bindgen_ty_1,
pub reserved: [__u32; 12usize],
@ -1531,7 +1636,8 @@ pub struct kvm_vcpu_events {
pub struct kvm_vcpu_events__bindgen_ty_1 {
pub serror_pending: __u8,
pub serror_has_esr: __u8,
pub pad: [__u8; 6usize],
pub ext_dabt_pending: __u8,
pub pad: [__u8; 5usize],
pub serror_esr: __u64,
}
#[test]
@ -1574,9 +1680,22 @@ fn bindgen_test_layout_kvm_vcpu_events__bindgen_ty_1() {
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).pad as *const _ as usize
&(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).ext_dabt_pending as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(kvm_vcpu_events__bindgen_ty_1),
"::",
stringify!(ext_dabt_pending)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).pad as *const _ as usize
},
3usize,
concat!(
"Offset of field: ",
stringify!(kvm_vcpu_events__bindgen_ty_1),
@ -2352,7 +2471,8 @@ pub struct kvm_hyperv_exit {
pub union kvm_hyperv_exit__bindgen_ty_1 {
pub synic: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1,
pub hcall: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2,
_bindgen_union_align: [u64; 4usize],
pub syndbg: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3,
_bindgen_union_align: [u64; 6usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
@ -2512,11 +2632,132 @@ fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2() {
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3 {
pub msr: __u32,
pub pad2: __u32,
pub control: __u64,
pub status: __u64,
pub send_page: __u64,
pub recv_page: __u64,
pub pending_page: __u64,
}
#[test]
fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3() {
assert_eq!(
::std::mem::size_of::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>(),
48usize,
concat!(
"Size of: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).msr as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(msr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).pad2 as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(pad2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).control
as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(control)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).status
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).send_page
as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(send_page)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).recv_page
as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(recv_page)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3>())).pending_page
as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(pending_page)
)
);
}
#[test]
fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<kvm_hyperv_exit__bindgen_ty_1>(),
32usize,
48usize,
concat!("Size of: ", stringify!(kvm_hyperv_exit__bindgen_ty_1))
);
assert_eq!(
@ -2548,6 +2789,18 @@ fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1() {
stringify!(hcall)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1>())).syndbg as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_hyperv_exit__bindgen_ty_1),
"::",
stringify!(syndbg)
)
);
}
impl Default for kvm_hyperv_exit__bindgen_ty_1 {
fn default() -> Self {
@ -2558,7 +2811,7 @@ impl Default for kvm_hyperv_exit__bindgen_ty_1 {
fn bindgen_test_layout_kvm_hyperv_exit() {
assert_eq!(
::std::mem::size_of::<kvm_hyperv_exit>(),
40usize,
56usize,
concat!("Size of: ", stringify!(kvm_hyperv_exit))
);
assert_eq!(
@ -2643,6 +2896,8 @@ pub union kvm_run__bindgen_ty_1 {
pub s390_stsi: kvm_run__bindgen_ty_1__bindgen_ty_18,
pub eoi: kvm_run__bindgen_ty_1__bindgen_ty_19,
pub hyperv: kvm_hyperv_exit,
pub arm_nisv: kvm_run__bindgen_ty_1__bindgen_ty_20,
pub msr: kvm_run__bindgen_ty_1__bindgen_ty_21,
pub padding: [::std::os::raw::c_char; 256usize],
_bindgen_union_align: [u64; 32usize],
}
@ -2684,12 +2939,13 @@ fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_1() {
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_2 {
pub hardware_entry_failure_reason: __u64,
pub cpu: __u32,
}
#[test]
fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_2>(),
8usize,
16usize,
concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2))
);
assert_eq!(
@ -2713,6 +2969,18 @@ fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_2() {
stringify!(hardware_entry_failure_reason)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_2>())).cpu as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(cpu)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
@ -3787,6 +4055,150 @@ fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_19() {
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_20 {
pub esr_iss: __u64,
pub fault_ipa: __u64,
}
#[test]
fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_20() {
assert_eq!(
::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_20>(),
16usize,
concat!(
"Size of: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20)
)
);
assert_eq!(
::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_20>(),
8usize,
concat!(
"Alignment of ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_20>())).esr_iss as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20),
"::",
stringify!(esr_iss)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_20>())).fault_ipa as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20),
"::",
stringify!(fault_ipa)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_21 {
pub error: __u8,
pub pad: [__u8; 7usize],
pub reason: __u32,
pub index: __u32,
pub data: __u64,
}
#[test]
fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_21() {
assert_eq!(
::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_21>(),
24usize,
concat!(
"Size of: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21)
)
);
assert_eq!(
::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_21>(),
8usize,
concat!(
"Alignment of ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_21>())).error as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_21>())).pad as *const _
as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21),
"::",
stringify!(pad)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_21>())).reason as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21),
"::",
stringify!(reason)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_21>())).index as *const _
as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21),
"::",
stringify!(index)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_21>())).data as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21),
"::",
stringify!(data)
)
);
}
#[test]
fn bindgen_test_layout_kvm_run__bindgen_ty_1() {
assert_eq!(
@ -4023,6 +4435,26 @@ fn bindgen_test_layout_kvm_run__bindgen_ty_1() {
stringify!(hyperv)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).arm_nisv as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1),
"::",
stringify!(arm_nisv)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).msr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_run__bindgen_ty_1),
"::",
stringify!(msr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).padding as *const _ as usize },
0usize,
@ -4578,15 +5010,77 @@ fn bindgen_test_layout_kvm_translation() {
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
#[derive(Copy, Clone)]
pub struct kvm_s390_mem_op {
pub gaddr: __u64,
pub flags: __u64,
pub size: __u32,
pub op: __u32,
pub buf: __u64,
pub __bindgen_anon_1: kvm_s390_mem_op__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_s390_mem_op__bindgen_ty_1 {
pub ar: __u8,
pub reserved: [__u8; 31usize],
pub sida_offset: __u32,
pub reserved: [__u8; 32usize],
_bindgen_union_align: [u32; 8usize],
}
#[test]
fn bindgen_test_layout_kvm_s390_mem_op__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<kvm_s390_mem_op__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(kvm_s390_mem_op__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<kvm_s390_mem_op__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(kvm_s390_mem_op__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_s390_mem_op__bindgen_ty_1>())).ar as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_mem_op__bindgen_ty_1),
"::",
stringify!(ar)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_s390_mem_op__bindgen_ty_1>())).sida_offset as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_mem_op__bindgen_ty_1),
"::",
stringify!(sida_offset)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<kvm_s390_mem_op__bindgen_ty_1>())).reserved as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_mem_op__bindgen_ty_1),
"::",
stringify!(reserved)
)
);
}
impl Default for kvm_s390_mem_op__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
#[test]
fn bindgen_test_layout_kvm_s390_mem_op() {
@ -4650,26 +5144,11 @@ fn bindgen_test_layout_kvm_s390_mem_op() {
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).ar as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_mem_op),
"::",
stringify!(ar)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).reserved as *const _ as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_mem_op),
"::",
stringify!(reserved)
)
);
}
impl Default for kvm_s390_mem_op {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
@ -5896,13 +6375,13 @@ fn bindgen_test_layout_kvm_guest_debug() {
)
);
}
pub const kvm_ioeventfd_flag_nr_datamatch: _bindgen_ty_1 = 0;
pub const kvm_ioeventfd_flag_nr_pio: _bindgen_ty_1 = 1;
pub const kvm_ioeventfd_flag_nr_deassign: _bindgen_ty_1 = 2;
pub const kvm_ioeventfd_flag_nr_virtio_ccw_notify: _bindgen_ty_1 = 3;
pub const kvm_ioeventfd_flag_nr_fast_mmio: _bindgen_ty_1 = 4;
pub const kvm_ioeventfd_flag_nr_max: _bindgen_ty_1 = 5;
pub type _bindgen_ty_1 = u32;
pub const kvm_ioeventfd_flag_nr_datamatch: ::std::os::raw::c_uint = 0;
pub const kvm_ioeventfd_flag_nr_pio: ::std::os::raw::c_uint = 1;
pub const kvm_ioeventfd_flag_nr_deassign: ::std::os::raw::c_uint = 2;
pub const kvm_ioeventfd_flag_nr_virtio_ccw_notify: ::std::os::raw::c_uint = 3;
pub const kvm_ioeventfd_flag_nr_fast_mmio: ::std::os::raw::c_uint = 4;
pub const kvm_ioeventfd_flag_nr_max: ::std::os::raw::c_uint = 5;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_ioeventfd {
@ -7366,8 +7845,9 @@ pub const kvm_device_type_KVM_DEV_TYPE_FLIC: kvm_device_type = 6;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V3: kvm_device_type = 7;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_ITS: kvm_device_type = 8;
pub const kvm_device_type_KVM_DEV_TYPE_XIVE: kvm_device_type = 9;
pub const kvm_device_type_KVM_DEV_TYPE_MAX: kvm_device_type = 10;
pub type kvm_device_type = u32;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_PV_TIME: kvm_device_type = 10;
pub const kvm_device_type_KVM_DEV_TYPE_MAX: kvm_device_type = 11;
pub type kvm_device_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vfio_spapr_tce {
@ -7496,6 +7976,186 @@ fn bindgen_test_layout_kvm_enc_region() {
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_sec_parm {
pub origin: __u64,
pub length: __u64,
}
#[test]
fn bindgen_test_layout_kvm_s390_pv_sec_parm() {
assert_eq!(
::std::mem::size_of::<kvm_s390_pv_sec_parm>(),
16usize,
concat!("Size of: ", stringify!(kvm_s390_pv_sec_parm))
);
assert_eq!(
::std::mem::align_of::<kvm_s390_pv_sec_parm>(),
8usize,
concat!("Alignment of ", stringify!(kvm_s390_pv_sec_parm))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_pv_sec_parm>())).origin as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_pv_sec_parm),
"::",
stringify!(origin)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_pv_sec_parm>())).length as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_pv_sec_parm),
"::",
stringify!(length)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_unp {
pub addr: __u64,
pub size: __u64,
pub tweak: __u64,
}
#[test]
fn bindgen_test_layout_kvm_s390_pv_unp() {
assert_eq!(
::std::mem::size_of::<kvm_s390_pv_unp>(),
24usize,
concat!("Size of: ", stringify!(kvm_s390_pv_unp))
);
assert_eq!(
::std::mem::align_of::<kvm_s390_pv_unp>(),
8usize,
concat!("Alignment of ", stringify!(kvm_s390_pv_unp))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_pv_unp>())).addr as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_pv_unp),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_pv_unp>())).size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_pv_unp),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_s390_pv_unp>())).tweak as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(kvm_s390_pv_unp),
"::",
stringify!(tweak)
)
);
}
pub const pv_cmd_id_KVM_PV_ENABLE: pv_cmd_id = 0;
pub const pv_cmd_id_KVM_PV_DISABLE: pv_cmd_id = 1;
pub const pv_cmd_id_KVM_PV_SET_SEC_PARMS: pv_cmd_id = 2;
pub const pv_cmd_id_KVM_PV_UNPACK: pv_cmd_id = 3;
pub const pv_cmd_id_KVM_PV_VERIFY: pv_cmd_id = 4;
pub const pv_cmd_id_KVM_PV_PREP_RESET: pv_cmd_id = 5;
pub const pv_cmd_id_KVM_PV_UNSHARE_ALL: pv_cmd_id = 6;
pub type pv_cmd_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_pv_cmd {
pub cmd: __u32,
pub rc: __u16,
pub rrc: __u16,
pub data: __u64,
pub flags: __u32,
pub reserved: [__u32; 3usize],
}
#[test]
fn bindgen_test_layout_kvm_pv_cmd() {
assert_eq!(
::std::mem::size_of::<kvm_pv_cmd>(),
32usize,
concat!("Size of: ", stringify!(kvm_pv_cmd))
);
assert_eq!(
::std::mem::align_of::<kvm_pv_cmd>(),
8usize,
concat!("Alignment of ", stringify!(kvm_pv_cmd))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pv_cmd>())).cmd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(kvm_pv_cmd),
"::",
stringify!(cmd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pv_cmd>())).rc as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(kvm_pv_cmd),
"::",
stringify!(rc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pv_cmd>())).rrc as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(kvm_pv_cmd),
"::",
stringify!(rrc)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pv_cmd>())).data as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(kvm_pv_cmd),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pv_cmd>())).flags as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(kvm_pv_cmd),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<kvm_pv_cmd>())).reserved as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(kvm_pv_cmd),
"::",
stringify!(reserved)
)
);
}
pub const sev_cmd_id_KVM_SEV_INIT: sev_cmd_id = 0;
pub const sev_cmd_id_KVM_SEV_ES_INIT: sev_cmd_id = 1;
pub const sev_cmd_id_KVM_SEV_LAUNCH_START: sev_cmd_id = 2;
@ -7517,7 +8177,7 @@ pub const sev_cmd_id_KVM_SEV_DBG_DECRYPT: sev_cmd_id = 17;
pub const sev_cmd_id_KVM_SEV_DBG_ENCRYPT: sev_cmd_id = 18;
pub const sev_cmd_id_KVM_SEV_CERT_EXPORT: sev_cmd_id = 19;
pub const sev_cmd_id_KVM_SEV_NR_MAX: sev_cmd_id = 20;
pub type sev_cmd_id = u32;
pub type sev_cmd_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_cmd {