@@ -30,6 +30,7 @@ pub const VHOST_IOTLB_ACCESS_FAIL: raw::c_uchar = 4;
30
30
pub const VHOST_IOTLB_BATCH_BEGIN : raw:: c_uchar = 5 ;
31
31
pub const VHOST_IOTLB_BATCH_END : raw:: c_uchar = 6 ;
32
32
pub const VHOST_IOTLB_MSG : raw:: c_int = 1 ;
33
+ pub const VHOST_IOTLB_MSG_V2 : raw:: c_uint = 2 ;
33
34
pub const VHOST_PAGE_SIZE : raw:: c_uint = 4096 ;
34
35
pub const VHOST_VIRTIO : raw:: c_uint = 175 ;
35
36
pub const VHOST_VRING_LITTLE_ENDIAN : raw:: c_uint = 0 ;
@@ -172,6 +173,34 @@ impl Default for vhost_msg__bindgen_ty_1 {
172
173
}
173
174
}
174
175
176
+ #[ repr( C ) ]
177
+ #[ derive( Copy , Clone ) ]
178
+ pub struct vhost_msg_v2 {
179
+ pub type_ : raw:: c_uint ,
180
+ pub reserved : raw:: c_uint ,
181
+ pub __bindgen_anon_1 : vhost_msg_v2__bindgen_ty_1 ,
182
+ }
183
+
184
+ impl Default for vhost_msg_v2 {
185
+ fn default ( ) -> Self {
186
+ unsafe { :: std:: mem:: zeroed ( ) }
187
+ }
188
+ }
189
+
190
+ #[ repr( C ) ]
191
+ #[ derive( Copy , Clone ) ]
192
+ pub union vhost_msg_v2__bindgen_ty_1 {
193
+ pub iotlb : vhost_iotlb_msg ,
194
+ pub padding : [ raw:: c_uchar ; 64usize ] ,
195
+ _bindgen_union_align : [ u64 ; 8usize ] ,
196
+ }
197
+
198
+ impl Default for vhost_msg_v2__bindgen_ty_1 {
199
+ fn default ( ) -> Self {
200
+ unsafe { :: std:: mem:: zeroed ( ) }
201
+ }
202
+ }
203
+
175
204
#[ repr( C ) ]
176
205
#[ derive( Debug , Default , Copy , Clone ) ]
177
206
pub struct vhost_memory_region {
@@ -323,6 +352,34 @@ mod tests {
323
352
) ;
324
353
}
325
354
355
+ #[ test]
356
+ fn bindgen_test_layout_vhost_msg_v2__bindgen_ty_1 ( ) {
357
+ assert_eq ! (
358
+ :: std:: mem:: size_of:: <vhost_msg_v2__bindgen_ty_1>( ) ,
359
+ 64usize ,
360
+ concat!( "Size of: " , stringify!( vhost_msg_v2__bindgen_ty_1) )
361
+ ) ;
362
+ assert_eq ! (
363
+ :: std:: mem:: align_of:: <vhost_msg_v2__bindgen_ty_1>( ) ,
364
+ 8usize ,
365
+ concat!( "Alignment of " , stringify!( vhost_msg_v2__bindgen_ty_1) )
366
+ ) ;
367
+ }
368
+
369
+ #[ test]
370
+ fn bindgen_test_layout_vhost_msg_v2 ( ) {
371
+ assert_eq ! (
372
+ :: std:: mem:: size_of:: <vhost_msg_v2>( ) ,
373
+ 72usize ,
374
+ concat!( "Size of: " , stringify!( vhost_msg_v2) )
375
+ ) ;
376
+ assert_eq ! (
377
+ :: std:: mem:: align_of:: <vhost_msg_v2>( ) ,
378
+ 8usize ,
379
+ concat!( "Alignment of " , stringify!( vhost_msg_v2) )
380
+ ) ;
381
+ }
382
+
326
383
#[ test]
327
384
fn bindgen_test_layout_vhost_memory_region ( ) {
328
385
assert_eq ! (
0 commit comments