magma/
magma.rs

1/* automatically generated by rust-bindgen 0.71.1 */
2
3// Copyright 2021 The Fuchsia Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style license that can be
5// found in the LICENSE file.
6
7use zerocopy::{FromBytes, Immutable, IntoBytes};
8
9pub const MAGMA_API_VERSION: u32 = 9;
10pub const MAGMA_VENDOR_ID_MALI: u32 = 5045;
11pub const MAGMA_VENDOR_ID_INTEL: u32 = 32902;
12pub type magma_query_t = u64;
13pub type magma_status_t = i32;
14pub type magma_cache_operation_t = u32;
15pub type magma_cache_policy_t = u32;
16pub type magma_format_t = u32;
17pub type magma_format_modifier_t = u64;
18pub type magma_colorspace_t = u32;
19pub type magma_coherency_domain_t = u32;
20pub type magma_buffer_range_op_t = u32;
21pub type magma_bool_t = u8;
22pub type magma_device_t = u64;
23pub type magma_buffer_t = u64;
24pub type magma_semaphore_t = u64;
25pub type magma_perf_count_pool_t = u64;
26pub type magma_connection_t = u64;
27pub type magma_sysmem_connection_t = u64;
28pub type magma_handle_t = u32;
29pub type magma_buffer_id_t = u64;
30pub type magma_semaphore_id_t = u64;
31#[repr(C)]
32#[derive(Copy, Clone)]
33pub struct magma_poll_item {
34    pub __bindgen_anon_1: magma_poll_item__bindgen_ty_1,
35    pub type_: u32,
36    pub condition: u32,
37    pub result: u32,
38    pub unused: u32,
39}
40#[repr(C)]
41#[derive(Copy, Clone)]
42pub union magma_poll_item__bindgen_ty_1 {
43    pub semaphore: magma_semaphore_t,
44    pub handle: magma_handle_t,
45}
46impl Default for magma_poll_item__bindgen_ty_1 {
47    fn default() -> Self {
48        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
49        unsafe {
50            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
51            s.assume_init()
52        }
53    }
54}
55impl Default for magma_poll_item {
56    fn default() -> Self {
57        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
58        unsafe {
59            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
60            s.assume_init()
61        }
62    }
63}
64pub type magma_poll_item_t = magma_poll_item;
65#[repr(C)]
66#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
67pub struct magma_exec_resource {
68    pub buffer_id: magma_buffer_id_t,
69    pub offset: u64,
70    pub length: u64,
71}
72pub type magma_exec_resource_t = magma_exec_resource;
73#[repr(C)]
74#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
75pub struct magma_exec_command_buffer {
76    pub resource_index: u32,
77    pub unused: u32,
78    pub start_offset: u64,
79}
80pub type magma_exec_command_buffer_t = magma_exec_command_buffer;
81#[repr(C)]
82#[derive(Debug, Copy, Clone)]
83pub struct magma_command_descriptor {
84    pub resource_count: u32,
85    pub command_buffer_count: u32,
86    pub wait_semaphore_count: u32,
87    pub signal_semaphore_count: u32,
88    pub resources: *mut magma_exec_resource,
89    pub command_buffers: *mut magma_exec_command_buffer,
90    pub semaphore_ids: *mut u64,
91    pub flags: u64,
92}
93impl Default for magma_command_descriptor {
94    fn default() -> Self {
95        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
96        unsafe {
97            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
98            s.assume_init()
99        }
100    }
101}
102pub type magma_command_descriptor_t = magma_command_descriptor;
103#[repr(C)]
104#[derive(Debug, Copy, Clone)]
105pub struct magma_inline_command_buffer {
106    pub data: *mut ::std::os::raw::c_void,
107    pub size: u64,
108    pub semaphore_ids: *mut u64,
109    pub semaphore_count: u32,
110    pub __bindgen_padding_0: [u8; 4usize],
111}
112impl Default for magma_inline_command_buffer {
113    fn default() -> Self {
114        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
115        unsafe {
116            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
117            s.assume_init()
118        }
119    }
120}
121pub type magma_inline_command_buffer_t = magma_inline_command_buffer;
122#[repr(C)]
123#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
124pub struct magma_total_time_query_result {
125    pub gpu_time_ns: u64,
126    pub monotonic_time_ns: u64,
127}
128pub type magma_total_time_query_result_t = magma_total_time_query_result;
129#[repr(C)]
130#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
131pub struct magma_buffer_offset {
132    pub buffer_id: u64,
133    pub offset: u64,
134    pub length: u64,
135}
136pub type magma_buffer_offset_t = magma_buffer_offset;
137#[repr(C)]
138#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
139pub struct magma_buffer_info {
140    pub committed_byte_count: u64,
141    pub size: u64,
142}
143pub type magma_buffer_info_t = magma_buffer_info;
144#[repr(C)]
145#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
146pub struct magma_image_create_info {
147    pub drm_format: u64,
148    pub drm_format_modifiers: [u64; 16usize],
149    pub width: u32,
150    pub height: u32,
151    pub flags: u64,
152}
153pub type magma_image_create_info_t = magma_image_create_info;
154#[repr(C)]
155#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
156pub struct magma_image_info {
157    pub plane_strides: [u64; 4usize],
158    pub plane_offsets: [u32; 4usize],
159    pub drm_format_modifier: u64,
160    pub coherency_domain: u32,
161    pub unused: u32,
162}
163pub type magma_image_info_t = magma_image_info;
164pub type magma_priority_t = u64;
165unsafe extern "C" {
166    #[doc = "\n \\brief Imports and takes ownership of a channel to a device. Takes ownership of |device_channel|\n        on both success and failure.\n \\param device_channel A channel connecting to a gpu class device.\n \\param device_out Returned device.\n"]
167    pub fn magma_device_import(
168        device_channel: magma_handle_t,
169        device_out: *mut magma_device_t,
170    ) -> magma_status_t;
171}
172unsafe extern "C" {
173    #[doc = "\n \\brief Releases a handle to a device\n \\param device An open device.\n"]
174    pub fn magma_device_release(device: magma_device_t);
175}
176unsafe extern "C" {
177    #[doc = "\n \\brief Performs a query synchronously. On MAGMA_STATUS_OK, a given query |id| will return either\n        a buffer in |result_buffer_out|, or a value in |result_out|. A NULL pointer may be\n        provided for whichever result parameter is not needed.\n \\param device An open device.\n \\param id A vendor-specific ID.\n \\param result_buffer_out Handle to the returned buffer.\n \\param result_out Pointer to a uint64 result.\n"]
178    pub fn magma_device_query(
179        device: magma_device_t,
180        id: u64,
181        result_buffer_out: *mut magma_handle_t,
182        result_out: *mut u64,
183    ) -> magma_status_t;
184}
185unsafe extern "C" {
186    #[doc = "\n \\brief Opens a connection to a device.\n \\param device An open device\n \\param connection_out Returned connection.\n"]
187    pub fn magma_device_create_connection(
188        device: magma_device_t,
189        connection_out: *mut magma_connection_t,
190    ) -> magma_status_t;
191}
192unsafe extern "C" {
193    #[doc = "\n \\brief Releases the given connection.\n \\param connection An open connection.\n"]
194    pub fn magma_connection_release(connection: magma_connection_t);
195}
196unsafe extern "C" {
197    #[doc = "\n \\brief If a system driver error occurs, the connection will be closed, and this interface will\n        eventually return the error. This interface does not flush messages that may be pending\n        (see magma_connection_flush).\n \\param connection An open connection.\n"]
198    pub fn magma_connection_get_error(connection: magma_connection_t) -> magma_status_t;
199}
200unsafe extern "C" {
201    #[doc = "\n \\brief Creates a context on the given connection.\n \\param connection An open connection.\n \\param context_id_out The returned context id.\n"]
202    pub fn magma_connection_create_context(
203        connection: magma_connection_t,
204        context_id_out: *mut u32,
205    ) -> magma_status_t;
206}
207unsafe extern "C" {
208    #[doc = "\n \\brief Releases the context associated with the given id.\n \\param connection An open connection.\n \\param context_id A valid context id.\n"]
209    pub fn magma_connection_release_context(connection: magma_connection_t, context_id: u32);
210}
211unsafe extern "C" {
212    #[doc = "\n \\brief Creates a memory buffer of at least the given size.\n \\param connection An open connection.\n \\param size Requested buffer size.\n \\param size_out The returned buffer's actual size.\n \\param buffer_out The returned buffer.\n \\param id_out The buffer id of the buffer.\n"]
213    pub fn magma_connection_create_buffer(
214        connection: magma_connection_t,
215        size: u64,
216        size_out: *mut u64,
217        buffer_out: *mut magma_buffer_t,
218        id_out: *mut magma_buffer_id_t,
219    ) -> magma_status_t;
220}
221unsafe extern "C" {
222    #[doc = "\n \\brief Releases the given memory buffer.\n \\param connection An open connection.\n \\param buffer A valid buffer.\n"]
223    pub fn magma_connection_release_buffer(connection: magma_connection_t, buffer: magma_buffer_t);
224}
225unsafe extern "C" {
226    #[doc = "\n \\brief Imports and takes ownership of the buffer referred to by the given handle. Takes\n        ownership of |buffer_handle| on both success and failure.\n \\param connection An open connection.\n \\param buffer_handle A valid handle.\n \\param size_out The size of the buffer in bytes.\n \\param buffer_out The returned buffer.\n \\param id_out The buffer id of the buffer.\n"]
227    pub fn magma_connection_import_buffer(
228        connection: magma_connection_t,
229        buffer_handle: magma_handle_t,
230        size_out: *mut u64,
231        buffer_out: *mut magma_buffer_t,
232        id_out: *mut magma_buffer_id_t,
233    ) -> magma_status_t;
234}
235unsafe extern "C" {
236    #[doc = "\n \\brief Creates a semaphore.\n \\param connection An open connection.\n \\param semaphore_out The returned semaphore.\n \\param id_out The id of the semaphore.\n"]
237    pub fn magma_connection_create_semaphore(
238        connection: magma_connection_t,
239        semaphore_out: *mut magma_semaphore_t,
240        id_out: *mut magma_semaphore_id_t,
241    ) -> magma_status_t;
242}
243unsafe extern "C" {
244    #[doc = "\n \\brief Releases the given semaphore.\n \\param connection An open connection.\n \\param semaphore A valid semaphore.\n"]
245    pub fn magma_connection_release_semaphore(
246        connection: magma_connection_t,
247        semaphore: magma_semaphore_t,
248    );
249}
250unsafe extern "C" {
251    #[doc = "\n \\brief Imports and takes ownership of the semaphore referred to by the given handle. Takes\n        ownership of |semaphore_handle| on both success and failure.\n \\param connection An open connection.\n \\param semaphore_handle A valid semaphore handle.\n \\param flags Pass MAGMA_IMPORT_SEMAPHORE_ONESHOT to prevent auto-reset after wait.\n \\param semaphore_out The returned semaphore.\n \\param id_out The id of the semaphore.\n"]
252    pub fn magma_connection_import_semaphore2(
253        connection: magma_connection_t,
254        semaphore_handle: magma_handle_t,
255        flags: u64,
256        semaphore_out: *mut magma_semaphore_t,
257        id_out: *mut magma_semaphore_id_t,
258    ) -> magma_status_t;
259}
260unsafe extern "C" {
261    #[doc = "\n \\brief Perform an operation on a range of a buffer\n \\param connection An open connection.\n \\param buffer A valid buffer.\n \\param options Options for the operation.\n \\param start_offset Byte offset into the buffer.\n \\param length Length (in bytes) of the region to operate on.\n"]
262    pub fn magma_connection_perform_buffer_op(
263        connection: magma_connection_t,
264        buffer: magma_buffer_t,
265        options: u32,
266        start_offset: u64,
267        length: u64,
268    ) -> magma_status_t;
269}
270unsafe extern "C" {
271    #[doc = "\n \\brief Maps a buffer range onto the hardware in the connection's address space at the given\n        address. Depending on the MSD this may automatically commit and populate that range.\n \\param connection An open connection.\n \\param hw_va Destination virtual address for the mapping.\n \\param buffer A valid buffer.\n \\param offset Offset into the buffer.\n \\param length Length in bytes of the range to map.\n \\param map_flags A valid MAGMA_MAP_FLAGS value.\n"]
272    pub fn magma_connection_map_buffer(
273        connection: magma_connection_t,
274        hw_va: u64,
275        buffer: magma_buffer_t,
276        offset: u64,
277        length: u64,
278        map_flags: u64,
279    ) -> magma_status_t;
280}
281unsafe extern "C" {
282    #[doc = "\n \\brief Releases the mapping at the given hardware address.\n \\param connection An open connection.\n \\param hw_va A hardware virtual address associated with an existing mapping of the given buffer.\n \\param buffer A valid buffer.\n"]
283    pub fn magma_connection_unmap_buffer(
284        connection: magma_connection_t,
285        hw_va: u64,
286        buffer: magma_buffer_t,
287    );
288}
289unsafe extern "C" {
290    #[doc = "\n \\brief Submits command buffers for execution on the hardware.\n \\param connection An open connection.\n \\param context_id A valid context id.\n \\param descriptor A pointer to the command descriptor.\n"]
291    pub fn magma_connection_execute_command(
292        connection: magma_connection_t,
293        context_id: u32,
294        descriptor: *mut magma_command_descriptor_t,
295    ) -> magma_status_t;
296}
297unsafe extern "C" {
298    #[doc = "\n \\brief Submits a series of commands for execution on the hardware without using a command\n        buffer.\n \\param connection An open connection.\n \\param context_id A valid context ID.\n \\param command_count The number of commands in the provided buffer.\n \\param command_buffers An array of command_count magma_inline_command_buffer structs.\n"]
299    pub fn magma_connection_execute_immediate_commands(
300        connection: magma_connection_t,
301        context_id: u32,
302        command_count: u64,
303        command_buffers: *mut magma_inline_command_buffer_t,
304    ) -> magma_status_t;
305}
306unsafe extern "C" {
307    #[doc = "\n \\brief Submits a series of commands for execution on the hardware without using a command\n        buffer.\n \\param connection An open connection.\n \\param context_id A valid context ID.\n \\param command_count The number of commands in the provided buffer.\n \\param command_buffers An array of command_count magma_inline_command_buffer structs.\n"]
308    pub fn magma_connection_execute_inline_commands(
309        connection: magma_connection_t,
310        context_id: u32,
311        command_count: u64,
312        command_buffers: *mut magma_inline_command_buffer_t,
313    ) -> magma_status_t;
314}
315unsafe extern "C" {
316    #[doc = "\n \\brief Incurs a round-trip to the system driver, used to ensure all previous messages have been\n        observed, but not necessarily completed.  If a system driver error occurs, the connection\n        will be closed, and this interface will return the error.\n \\param connection An open connection.\n"]
317    pub fn magma_connection_flush(connection: magma_connection_t) -> magma_status_t;
318}
319unsafe extern "C" {
320    #[doc = "\n \\brief Returns a handle that can be waited on to determine when the connection has data in the\n        notification channel. This channel has the same lifetime as the connection and must not\n        be closed by the client.\n \\param connection An open connection.\n"]
321    pub fn magma_connection_get_notification_channel_handle(
322        connection: magma_connection_t,
323    ) -> magma_handle_t;
324}
325unsafe extern "C" {
326    #[doc = "\n \\brief Reads a notification from the channel into the given buffer.  Message sizes may vary\n        depending on the MSD.  If the buffer provided is too small for the message,\n        MAGMA_STATUS_INVALID_ARGS will be returned and the size of message will be returned in\n        the buffer_size_out parameter.\n \\param connection An open connection.\n \\param buffer Buffer into which to read notification data.\n \\param buffer_size Size of the given buffer.\n \\param buffer_size_out Returned size of the notification data written to the buffer, or 0 if\n        there are no messages pending.\n \\param more_data_out True if there is more notification data waiting.\n"]
327    pub fn magma_connection_read_notification_channel(
328        connection: magma_connection_t,
329        buffer: *mut ::std::os::raw::c_void,
330        buffer_size: u64,
331        buffer_size_out: *mut u64,
332        more_data_out: *mut magma_bool_t,
333    ) -> magma_status_t;
334}
335unsafe extern "C" {
336    #[doc = "\n \\brief Cleans, and optionally invalidates, the cache for the region of memory specified by the\n        given buffer, offset, and size, and write the contents to ram.\n \\param buffer A valid buffer.\n \\param offset An offset into the buffer. Must be less than or equal to the buffer's size.\n \\param size Size of region to be cleaned. Offset + size must be less than or equal to the\n        buffer's size.\n \\param operation One of MAGMA_CACHE_OPERATION_CLEAN or MAGMA_CACHE_OPERATION_CLEAN_INVALIDATE.\n"]
337    pub fn magma_buffer_clean_cache(
338        buffer: magma_buffer_t,
339        offset: u64,
340        size: u64,
341        operation: magma_cache_operation_t,
342    ) -> magma_status_t;
343}
344unsafe extern "C" {
345    #[doc = "\n \\brief Configures the cache for the given buffer.\n \\param buffer A valid buffer.\n \\param policy One of MAGMA_CACHE_POLICY_[CACHED|WRITE_COMBINING|UNCACHED].\n"]
346    pub fn magma_buffer_set_cache_policy(
347        buffer: magma_buffer_t,
348        policy: magma_cache_policy_t,
349    ) -> magma_status_t;
350}
351unsafe extern "C" {
352    #[doc = "\n \\brief Queries the cache policy for a buffer.\n \\param buffer A valid buffer.\n \\param cache_policy_out The returned cache policy.\n"]
353    pub fn magma_buffer_get_cache_policy(
354        buffer: magma_buffer_t,
355        cache_policy_out: *mut magma_cache_policy_t,
356    ) -> magma_status_t;
357}
358unsafe extern "C" {
359    #[doc = "\n \\brief Sets a name for the buffer for use in debugging tools.\n \\param buffer A valid buffer.\n \\param name The 0-terminated name of the buffer. May be truncated.\n"]
360    pub fn magma_buffer_set_name(
361        buffer: magma_buffer_t,
362        name: *const ::std::os::raw::c_char,
363    ) -> magma_status_t;
364}
365unsafe extern "C" {
366    #[doc = "\n \\brief Get information on a magma buffer\n \\param buffer A valid buffer.\n \\param info_out Pointer to struct that receives the buffer info.\n"]
367    pub fn magma_buffer_get_info(
368        buffer: magma_buffer_t,
369        info_out: *mut magma_buffer_info_t,
370    ) -> magma_status_t;
371}
372unsafe extern "C" {
373    #[doc = "\n \\brief Gets a platform handle for the given buffer. This can be used to perform a CPU mapping of\n        the buffer using the standard syscall.  The handle may be released without invalidating\n        such CPU mappings.\n \\param buffer A valid buffer.\n \\param handle_out Pointer to the returned handle.\n"]
374    pub fn magma_buffer_get_handle(
375        buffer: magma_buffer_t,
376        handle_out: *mut magma_handle_t,
377    ) -> magma_status_t;
378}
379unsafe extern "C" {
380    #[doc = "\n \\brief Exports the given buffer, returning a handle that may be imported into a connection.\n \\param buffer A valid buffer.\n \\param buffer_handle_out The returned handle.\n"]
381    pub fn magma_buffer_export(
382        buffer: magma_buffer_t,
383        buffer_handle_out: *mut magma_handle_t,
384    ) -> magma_status_t;
385}
386unsafe extern "C" {
387    #[doc = "\n \\brief Signals the given semaphore.\n \\param semaphore A valid semaphore.\n"]
388    pub fn magma_semaphore_signal(semaphore: magma_semaphore_t);
389}
390unsafe extern "C" {
391    #[doc = "\n \\brief Resets the given semaphore.\n \\param semaphore A valid semaphore.\n"]
392    pub fn magma_semaphore_reset(semaphore: magma_semaphore_t);
393}
394unsafe extern "C" {
395    #[doc = "\n \\brief Exports the given semaphore, returning a handle that may be imported into a connection\n \\param semaphore A valid semaphore.\n \\param semaphore_handle_out The returned handle.\n"]
396    pub fn magma_semaphore_export(
397        semaphore: magma_semaphore_t,
398        semaphore_handle_out: *mut magma_handle_t,
399    ) -> magma_status_t;
400}
401unsafe extern "C" {
402    #[doc = "\n \\brief Waits for at least one of the given items to meet a condition. Does not reset any\n        semaphores. When MAGMA_STATUS_OK is returned, results are returned in the items array.\n        MAGMA_STATUS_TIMED_OUT is returned if no conditions are met before the given timeout\n        expires. If the notification channel handle is included in the item list, and the magma\n        connection is closed, then MAGMA_STATUS_CONNECTION_LOST is returned.\n \\param items Array of poll items. Type should be either MAGMA_POLL_TYPE_SEMAPHORE or\n        MAGMA_POLL_TYPE_HANDLE. Condition may be set to MAGMA_POLL_CONDITION_SIGNALED OR\n        MAGMA_POLL_CONDITION_READABLE. If condition is 0 the item is ignored. Item results are\n        set to the condition that was satisfied, otherwise 0. If the same item is given twice the\n        behavior is undefined.\n \\param count Number of poll items in the array.\n \\param timeout_ns Time in ns to wait before returning MAGMA_STATUS_TIMED_OUT.\n"]
403    pub fn magma_poll(items: *mut magma_poll_item_t, count: u32, timeout_ns: u64)
404        -> magma_status_t;
405}
406unsafe extern "C" {
407    #[doc = "\n \\brief Initializes tracing. This should be called on Fuchsia; on other platforms it's not needed\n        and will just close the given handle.\n \\param channel An open connection to a tracing provider.\n"]
408    pub fn magma_initialize_tracing(channel: magma_handle_t) -> magma_status_t;
409}
410unsafe extern "C" {
411    #[doc = "\n \\brief Initializes logging, used for debug and some exceptional error reporting. This should be\n        called on Fuchsia; on other platforms it's not needed and will just close the given\n        handle.\n \\param channel An open connection to the syslog service.\n"]
412    pub fn magma_initialize_logging(channel: magma_handle_t) -> magma_status_t;
413}
414unsafe extern "C" {
415    #[doc = "\n \\brief Tries to enable access to performance counters. Returns MAGMA_STATUS_OK if counters were\n        successfully enabled or MAGMA_STATUS_ACCESS_DENIED if channel is for the wrong device and\n        counters were not successfully enabled previously.\n \\param connection An open connection to a device.\n \\param channel A handle to a channel to a gpu-performance-counter device.\n"]
416    pub fn magma_connection_enable_performance_counter_access(
417        connection: magma_connection_t,
418        channel: magma_handle_t,
419    ) -> magma_status_t;
420}
421unsafe extern "C" {
422    #[doc = "\n \\brief Enables a set of performance counters (the precise definition depends on the driver).\n        Disables enabled performance counters that are not in the new set. Performance counters\n        will also be automatically disabled on connection close. Performance counter access must\n        have been enabled using magma_connection_enable_performance_counter_access before calling\n        this method.\n \\param connection An open connection to a device.\n \\param counters An implementation-defined list of counters.\n \\param counters_count The number of entries in |counters|.\n"]
423    pub fn magma_connection_enable_performance_counters(
424        connection: magma_connection_t,
425        counters: *mut u64,
426        counters_count: u64,
427    ) -> magma_status_t;
428}
429unsafe extern "C" {
430    #[doc = "\n \\brief Create a pool of buffers that performance counters can be dumped into. Performance\n        counter access must have been enabled using\n        magma_connection_enable_performance_counter_access before calling this method.\n \\param connection An open connection to a device.\n \\param pool_id_out A new pool id. Must not currently be in use.\n \\param notification_handle_out A handle that should be waited on.\n"]
431    pub fn magma_connection_create_performance_counter_buffer_pool(
432        connection: magma_connection_t,
433        pool_id_out: *mut magma_perf_count_pool_t,
434        notification_handle_out: *mut magma_handle_t,
435    ) -> magma_status_t;
436}
437unsafe extern "C" {
438    #[doc = "\n \\brief Releases a pool of performance counter buffers. Performance counter access must have been\n        enabled using magma_connection_enable_performance_counter_access before calling this\n        method.\n \\param connection An open connection to a device.\n \\param pool_id An existing pool id.\n"]
439    pub fn magma_connection_release_performance_counter_buffer_pool(
440        connection: magma_connection_t,
441        pool_id: magma_perf_count_pool_t,
442    ) -> magma_status_t;
443}
444unsafe extern "C" {
445    #[doc = "\n \\brief Adds a an array of buffers + offset to the pool. |offsets[n].buffer_id| is the koid of a\n        buffer that was previously imported using ImportBuffer(). The same buffer may be added to\n        multiple pools. The pool will hold on to a reference to the buffer even after\n        ReleaseBuffer is called.  When dumped into this entry, counters will be written starting\n        at |offsets[n].offset| bytes into the buffer, and up to |offsets[n].offset| +\n        |offsets[n].size|. |offsets[n].size| must be large enough to fit all enabled counters.\n        Performance counter access must have been enabled using\n        magma_connection_enable_performance_counter_access before calling this method.\n \\param connection An open connection to a device.\n \\param pool_id An existing pool.\n \\param offsets An array of offsets to add.\n \\param offsets_count The number of elements in offsets.\n"]
446    pub fn magma_connection_add_performance_counter_buffer_offsets_to_pool(
447        connection: magma_connection_t,
448        pool_id: magma_perf_count_pool_t,
449        offsets: *const magma_buffer_offset_t,
450        offsets_count: u64,
451    ) -> magma_status_t;
452}
453unsafe extern "C" {
454    #[doc = "\n \\brief Removes every offset of a buffer from the pool. Performance counter access must have been\n        enabled using magma_connection_enable_performance_counter_access before calling this\n        method.\n \\param connection An open connection to a device.\n \\param pool_id An existing pool.\n \\param buffer A magma_buffer\n"]
455    pub fn magma_connection_remove_performance_counter_buffer_from_pool(
456        connection: magma_connection_t,
457        pool_id: magma_perf_count_pool_t,
458        buffer: magma_buffer_t,
459    ) -> magma_status_t;
460}
461unsafe extern "C" {
462    #[doc = "\n \\brief Triggers dumping of the performance counters into a buffer pool. May fail silently if\n        there are no buffers in the pool. |trigger_id| is an arbitrary ID assigned by the client\n        that can be returned in OnPerformanceCounterReadCompleted. Performance counter access\n        must have been enabled using magma_connection_enable_performance_counter_access before\n        calling this method.\n \\param connection An open connection to a device.\n \\param pool_id An existing pool\n \\param trigger_id An arbitrary ID assigned by the client that will be returned in\n        OnPerformanceCounterReadCompleted.\n"]
463    pub fn magma_connection_dump_performance_counters(
464        connection: magma_connection_t,
465        pool_id: magma_perf_count_pool_t,
466        trigger_id: u32,
467    ) -> magma_status_t;
468}
469unsafe extern "C" {
470    #[doc = "\n \\brief Sets the values of all listed performance counters to 0. May not be supported by some\n        hardware. Performance counter access must have been enabled using\n        magma_connection_enable_performance_counter_access before calling this method.\n \\param connection An open connection to a device.\n \\param counters An implementation-defined list of counters.\n \\param counters_count The number of entries in |counters|.\n"]
471    pub fn magma_connection_clear_performance_counters(
472        connection: magma_connection_t,
473        counters: *mut u64,
474        counters_count: u64,
475    ) -> magma_status_t;
476}
477unsafe extern "C" {
478    #[doc = "\n \\brief Reads one performance counter completion event, if available.\n \\param connection An open connection to a device.\n \\param pool_id An existing pool.\n \\param trigger_id_out The trigger ID for this event.\n \\param buffer_id_out The buffer ID for this event.\n \\param buffer_offset_out The buffer offset for this event.\n \\param time_out The monotonic time this event happened.\n \\param result_flags_out A set of flags giving more information about this event.\n"]
479    pub fn magma_connection_read_performance_counter_completion(
480        connection: magma_connection_t,
481        pool_id: magma_perf_count_pool_t,
482        trigger_id_out: *mut u32,
483        buffer_id_out: *mut u64,
484        buffer_offset_out: *mut u32,
485        time_out: *mut u64,
486        result_flags_out: *mut u32,
487    ) -> magma_status_t;
488}
489unsafe extern "C" {
490    #[doc = "\n \\brief Creates an image buffer backed by a buffer collection given a DRM format and optional\n        modifier, as specified in the create info.\n \\param connection An open connection.\n \\param create_info Input parameters describing the image.\n \\param size_out The size of the image buffer in bytes\n \\param image_out The image buffer.\n \\param buffer_id_out The ID of the image buffer.\n"]
491    pub fn magma_virt_connection_create_image(
492        connection: magma_connection_t,
493        create_info: *mut magma_image_create_info_t,
494        size_out: *mut u64,
495        image_out: *mut magma_buffer_t,
496        buffer_id_out: *mut magma_buffer_id_t,
497    ) -> magma_status_t;
498}
499unsafe extern "C" {
500    #[doc = "\n \\brief Returns parameters for an image created with virtmagma_create_image.\n \\param connection An open connection.\n \\param image The image buffer.\n \\param image_info_out Output parameters describing the image.\n"]
501    pub fn magma_virt_connection_get_image_info(
502        connection: magma_connection_t,
503        image: magma_buffer_t,
504        image_info_out: *mut magma_image_info_t,
505    ) -> magma_status_t;
506}
507unsafe extern "C" {
508    #[doc = "\n \\brief Creates a context on the given connection.\n \\param connection An open connection.\n \\param priority The priority of the connection. Higher numbers are higher priorities.\n \\param context_id_out The returned context id.\n"]
509    pub fn magma_connection_create_context2(
510        connection: magma_connection_t,
511        priority: magma_priority_t,
512        context_id_out: *mut u32,
513    ) -> magma_status_t;
514}
515pub type __u32 = ::std::os::raw::c_uint;
516pub type __u64 = ::std::os::raw::c_ulonglong;
517#[repr(C)]
518#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
519pub struct virtmagma_ioctl_args_handshake {
520    pub handshake_inout: __u32,
521    pub version_out: __u32,
522}
523#[repr(C)]
524#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
525pub struct virtmagma_ioctl_args_magma_command {
526    pub request_address: __u64,
527    pub request_size: __u64,
528    pub response_address: __u64,
529    pub response_size: __u64,
530}
531#[repr(C)]
532#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
533pub struct virtmagma_command_descriptor {
534    pub descriptor_size: __u64,
535    pub descriptor: __u64,
536    pub resource_size: __u64,
537    pub resources: __u64,
538    pub command_buffer_size: __u64,
539    pub command_buffers: __u64,
540    pub semaphore_size: __u64,
541    pub semaphores: __u64,
542}
543#[repr(C)]
544#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
545pub struct virtmagma_create_image_wrapper {
546    pub create_info: __u64,
547    pub create_info_size: __u64,
548}
549#[repr(C)]
550#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
551pub struct virtmagma_get_image_info_wrapper {
552    pub image_info_out: __u64,
553    pub image_info_size: __u64,
554}
555#[repr(C)]
556#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
557pub struct virtmagma_buffer_set_name_wrapper {
558    pub name_address: __u64,
559    pub name_size: __u64,
560}
561pub const MAGMA_STATUS_OK: magma_status_t = 0;
562pub const MAGMA_STATUS_INTERNAL_ERROR: magma_status_t = -1;
563pub const MAGMA_STATUS_INVALID_ARGS: magma_status_t = -2;
564pub const MAGMA_STATUS_MEMORY_ERROR: magma_status_t = -4;
565pub const MAGMA_STATUS_TIMED_OUT: magma_status_t = -7;
566pub const MAGMA_IMAGE_CREATE_FLAGS_PRESENTABLE: u32 = 1;
567pub const MAGMA_IMAGE_CREATE_FLAGS_VULKAN_USAGE: u32 = 2;
568pub const MAGMA_MAX_IMAGE_PLANES: u32 = 4;
569pub const MAGMA_COHERENCY_DOMAIN_CPU: magma_coherency_domain_t = 0;
570pub const MAGMA_COHERENCY_DOMAIN_RAM: magma_coherency_domain_t = 1;
571pub const MAGMA_COHERENCY_DOMAIN_INACCESSIBLE: magma_coherency_domain_t = 2;
572pub const MAGMA_POLL_TYPE_SEMAPHORE: u32 = 1;
573pub const MAGMA_POLL_TYPE_HANDLE: u32 = 2;
574pub const MAGMA_POLL_CONDITION_SIGNALED: u32 = 3;
575pub const MAGMA_CACHE_POLICY_CACHED: magma_cache_policy_t = 0;
576pub const MAGMA_CACHE_POLICY_WRITE_COMBINING: magma_cache_policy_t = 1;
577pub const MAGMA_CACHE_POLICY_UNCACHED: magma_cache_policy_t = 2;
578pub const MAGMA_QUERY_VENDOR_ID: magma_query_t = 0;
579pub const MAGMA_IMPORT_SEMAPHORE_ONE_SHOT: u64 = 1;
580#[repr(C, packed)]
581#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
582pub struct virtio_magma_config {
583    pub dummy: u64,
584}
585pub type virtio_magma_config_t = virtio_magma_config;
586pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_IMPORT: virtio_magma_ctrl_type = 4142;
587pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_RELEASE: virtio_magma_ctrl_type = 4143;
588pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_QUERY: virtio_magma_ctrl_type = 4177;
589pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_CREATE_CONNECTION: virtio_magma_ctrl_type =
590    4146;
591pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE: virtio_magma_ctrl_type = 4100;
592pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_GET_ERROR: virtio_magma_ctrl_type =
593    4101;
594pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_CONTEXT:
595    virtio_magma_ctrl_type = 4102;
596pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_CONTEXT:
597    virtio_magma_ctrl_type = 4103;
598pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_BUFFER: virtio_magma_ctrl_type =
599    4181;
600pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_BUFFER:
601    virtio_magma_ctrl_type = 4105;
602pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_IMPORT_BUFFER: virtio_magma_ctrl_type =
603    4180;
604pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_SEMAPHORE:
605    virtio_magma_ctrl_type = 4185;
606pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_SEMAPHORE:
607    virtio_magma_ctrl_type = 4131;
608pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_IMPORT_SEMAPHORE2:
609    virtio_magma_ctrl_type = 4187;
610pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_PERFORM_BUFFER_OP:
611    virtio_magma_ctrl_type = 4161;
612pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_MAP_BUFFER: virtio_magma_ctrl_type =
613    4178;
614pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_UNMAP_BUFFER: virtio_magma_ctrl_type =
615    4179;
616pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_EXECUTE_COMMAND:
617    virtio_magma_ctrl_type = 4176;
618pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_EXECUTE_IMMEDIATE_COMMANDS:
619    virtio_magma_ctrl_type = 4129;
620pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_EXECUTE_INLINE_COMMANDS:
621    virtio_magma_ctrl_type = 4130;
622pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_FLUSH: virtio_magma_ctrl_type = 4175;
623pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_GET_NOTIFICATION_CHANNEL_HANDLE:
624    virtio_magma_ctrl_type = 4138;
625pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_READ_NOTIFICATION_CHANNEL:
626    virtio_magma_ctrl_type = 4166;
627pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_CLEAN_CACHE: virtio_magma_ctrl_type = 4110;
628pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_SET_CACHE_POLICY: virtio_magma_ctrl_type =
629    4111;
630pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_CACHE_POLICY: virtio_magma_ctrl_type =
631    4112;
632pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_SET_NAME: virtio_magma_ctrl_type = 4160;
633pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_INFO: virtio_magma_ctrl_type = 4162;
634pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_HANDLE: virtio_magma_ctrl_type = 4171;
635pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_EXPORT: virtio_magma_ctrl_type = 4183;
636pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_SIGNAL: virtio_magma_ctrl_type = 4133;
637pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_RESET: virtio_magma_ctrl_type = 4134;
638pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_EXPORT: virtio_magma_ctrl_type = 4184;
639pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_POLL: virtio_magma_ctrl_type = 4148;
640pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INITIALIZE_TRACING: virtio_magma_ctrl_type = 4141;
641pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INITIALIZE_LOGGING: virtio_magma_ctrl_type = 4147;
642pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTER_ACCESS:
643    virtio_magma_ctrl_type = 4149;
644pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS:
645    virtio_magma_ctrl_type = 4152;
646pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 4153 ;
647pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 4154 ;
648pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ADD_PERFORMANCE_COUNTER_BUFFER_OFFSETS_TO_POOL : virtio_magma_ctrl_type = 4155 ;
649pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_REMOVE_PERFORMANCE_COUNTER_BUFFER_FROM_POOL : virtio_magma_ctrl_type = 4156 ;
650pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_DUMP_PERFORMANCE_COUNTERS:
651    virtio_magma_ctrl_type = 4157;
652pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CLEAR_PERFORMANCE_COUNTERS:
653    virtio_magma_ctrl_type = 4158;
654pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_READ_PERFORMANCE_COUNTER_COMPLETION:
655    virtio_magma_ctrl_type = 4159;
656pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_VIRT_CONNECTION_CREATE_IMAGE:
657    virtio_magma_ctrl_type = 4182;
658pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_VIRT_CONNECTION_GET_IMAGE_INFO:
659    virtio_magma_ctrl_type = 4168;
660pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_CONTEXT2:
661    virtio_magma_ctrl_type = 4188;
662pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_RELEASE_HANDLE: virtio_magma_ctrl_type =
663    4172;
664pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_MAP: virtio_magma_ctrl_type = 4173;
665pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_UNMAP: virtio_magma_ctrl_type = 4174;
666pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_IMPORT: virtio_magma_ctrl_type = 8238;
667pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_RELEASE: virtio_magma_ctrl_type = 8239;
668pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_QUERY: virtio_magma_ctrl_type = 8273;
669pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_CREATE_CONNECTION:
670    virtio_magma_ctrl_type = 8242;
671pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE: virtio_magma_ctrl_type =
672    8196;
673pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_GET_ERROR: virtio_magma_ctrl_type =
674    8197;
675pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_CONTEXT:
676    virtio_magma_ctrl_type = 8198;
677pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_CONTEXT:
678    virtio_magma_ctrl_type = 8199;
679pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_BUFFER:
680    virtio_magma_ctrl_type = 8277;
681pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_BUFFER:
682    virtio_magma_ctrl_type = 8201;
683pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_IMPORT_BUFFER:
684    virtio_magma_ctrl_type = 8276;
685pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_SEMAPHORE:
686    virtio_magma_ctrl_type = 8281;
687pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_SEMAPHORE:
688    virtio_magma_ctrl_type = 8227;
689pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_IMPORT_SEMAPHORE2:
690    virtio_magma_ctrl_type = 8283;
691pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_PERFORM_BUFFER_OP:
692    virtio_magma_ctrl_type = 8257;
693pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_MAP_BUFFER: virtio_magma_ctrl_type =
694    8274;
695pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_UNMAP_BUFFER: virtio_magma_ctrl_type =
696    8275;
697pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_COMMAND:
698    virtio_magma_ctrl_type = 8272;
699pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_IMMEDIATE_COMMANDS:
700    virtio_magma_ctrl_type = 8225;
701pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_INLINE_COMMANDS:
702    virtio_magma_ctrl_type = 8226;
703pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_FLUSH: virtio_magma_ctrl_type = 8271;
704pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_GET_NOTIFICATION_CHANNEL_HANDLE:
705    virtio_magma_ctrl_type = 8234;
706pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_READ_NOTIFICATION_CHANNEL:
707    virtio_magma_ctrl_type = 8262;
708pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_CLEAN_CACHE: virtio_magma_ctrl_type =
709    8206;
710pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_SET_CACHE_POLICY: virtio_magma_ctrl_type =
711    8207;
712pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_CACHE_POLICY: virtio_magma_ctrl_type =
713    8208;
714pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_SET_NAME: virtio_magma_ctrl_type = 8256;
715pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_INFO: virtio_magma_ctrl_type = 8258;
716pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_HANDLE: virtio_magma_ctrl_type = 8267;
717pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_EXPORT: virtio_magma_ctrl_type = 8279;
718pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_SIGNAL: virtio_magma_ctrl_type = 8229;
719pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_RESET: virtio_magma_ctrl_type = 8230;
720pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_EXPORT: virtio_magma_ctrl_type = 8280;
721pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_POLL: virtio_magma_ctrl_type = 8244;
722pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INITIALIZE_TRACING: virtio_magma_ctrl_type =
723    8237;
724pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INITIALIZE_LOGGING: virtio_magma_ctrl_type =
725    8243;
726pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTER_ACCESS:
727    virtio_magma_ctrl_type = 8245;
728pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS:
729    virtio_magma_ctrl_type = 8248;
730pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 8249 ;
731pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 8250 ;
732pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ADD_PERFORMANCE_COUNTER_BUFFER_OFFSETS_TO_POOL : virtio_magma_ctrl_type = 8251 ;
733pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_REMOVE_PERFORMANCE_COUNTER_BUFFER_FROM_POOL : virtio_magma_ctrl_type = 8252 ;
734pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_DUMP_PERFORMANCE_COUNTERS:
735    virtio_magma_ctrl_type = 8253;
736pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CLEAR_PERFORMANCE_COUNTERS:
737    virtio_magma_ctrl_type = 8254;
738pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_READ_PERFORMANCE_COUNTER_COMPLETION : virtio_magma_ctrl_type = 8255 ;
739pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_VIRT_CONNECTION_CREATE_IMAGE:
740    virtio_magma_ctrl_type = 8278;
741pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_VIRT_CONNECTION_GET_IMAGE_INFO:
742    virtio_magma_ctrl_type = 8264;
743pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_CONTEXT2:
744    virtio_magma_ctrl_type = 8284;
745pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_RELEASE_HANDLE: virtio_magma_ctrl_type =
746    8268;
747pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_MAP: virtio_magma_ctrl_type = 8269;
748pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_UNMAP: virtio_magma_ctrl_type = 8270;
749pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_UNIMPLEMENTED: virtio_magma_ctrl_type =
750    12289;
751pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INTERNAL: virtio_magma_ctrl_type = 12290;
752pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_HOST_DISCONNECTED: virtio_magma_ctrl_type =
753    12291;
754pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_OUT_OF_MEMORY: virtio_magma_ctrl_type =
755    12292;
756pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INVALID_COMMAND: virtio_magma_ctrl_type =
757    12293;
758pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INVALID_ARGUMENT: virtio_magma_ctrl_type =
759    12294;
760pub type virtio_magma_ctrl_type = ::std::os::raw::c_ushort;
761#[repr(C, packed)]
762#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
763pub struct virtio_magma_ctrl_hdr {
764    pub type_: u32,
765    pub flags: u32,
766}
767pub type virtio_magma_ctrl_hdr_t = virtio_magma_ctrl_hdr;
768#[repr(C, packed)]
769#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
770pub struct virtio_magma_device_import_ctrl {
771    pub hdr: virtio_magma_ctrl_hdr_t,
772    pub device_channel: u32,
773}
774pub type virtio_magma_device_import_ctrl_t = virtio_magma_device_import_ctrl;
775#[repr(C, packed)]
776#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
777pub struct virtio_magma_device_import_resp {
778    pub hdr: virtio_magma_ctrl_hdr_t,
779    pub device_out: u64,
780    pub result_return: u64,
781}
782pub type virtio_magma_device_import_resp_t = virtio_magma_device_import_resp;
783#[repr(C, packed)]
784#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
785pub struct virtio_magma_device_release_ctrl {
786    pub hdr: virtio_magma_ctrl_hdr_t,
787    pub device: u64,
788}
789pub type virtio_magma_device_release_ctrl_t = virtio_magma_device_release_ctrl;
790#[repr(C, packed)]
791#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
792pub struct virtio_magma_device_release_resp {
793    pub hdr: virtio_magma_ctrl_hdr_t,
794}
795pub type virtio_magma_device_release_resp_t = virtio_magma_device_release_resp;
796#[repr(C, packed)]
797#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
798pub struct virtio_magma_device_query_ctrl {
799    pub hdr: virtio_magma_ctrl_hdr_t,
800    pub device: u64,
801    pub id: u64,
802}
803pub type virtio_magma_device_query_ctrl_t = virtio_magma_device_query_ctrl;
804#[repr(C, packed)]
805#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
806pub struct virtio_magma_device_query_resp {
807    pub hdr: virtio_magma_ctrl_hdr_t,
808    pub result_buffer_out: u64,
809    pub result_out: u64,
810    pub result_return: u64,
811}
812pub type virtio_magma_device_query_resp_t = virtio_magma_device_query_resp;
813#[repr(C, packed)]
814#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
815pub struct virtio_magma_device_create_connection_ctrl {
816    pub hdr: virtio_magma_ctrl_hdr_t,
817    pub device: u64,
818}
819pub type virtio_magma_device_create_connection_ctrl_t = virtio_magma_device_create_connection_ctrl;
820#[repr(C, packed)]
821#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
822pub struct virtio_magma_device_create_connection_resp {
823    pub hdr: virtio_magma_ctrl_hdr_t,
824    pub connection_out: u64,
825    pub result_return: u64,
826}
827pub type virtio_magma_device_create_connection_resp_t = virtio_magma_device_create_connection_resp;
828#[repr(C, packed)]
829#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
830pub struct virtio_magma_connection_release_ctrl {
831    pub hdr: virtio_magma_ctrl_hdr_t,
832    pub connection: u64,
833}
834pub type virtio_magma_connection_release_ctrl_t = virtio_magma_connection_release_ctrl;
835#[repr(C, packed)]
836#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
837pub struct virtio_magma_connection_release_resp {
838    pub hdr: virtio_magma_ctrl_hdr_t,
839}
840pub type virtio_magma_connection_release_resp_t = virtio_magma_connection_release_resp;
841#[repr(C, packed)]
842#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
843pub struct virtio_magma_connection_get_error_ctrl {
844    pub hdr: virtio_magma_ctrl_hdr_t,
845    pub connection: u64,
846}
847pub type virtio_magma_connection_get_error_ctrl_t = virtio_magma_connection_get_error_ctrl;
848#[repr(C, packed)]
849#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
850pub struct virtio_magma_connection_get_error_resp {
851    pub hdr: virtio_magma_ctrl_hdr_t,
852    pub result_return: u64,
853}
854pub type virtio_magma_connection_get_error_resp_t = virtio_magma_connection_get_error_resp;
855#[repr(C, packed)]
856#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
857pub struct virtio_magma_connection_create_context_ctrl {
858    pub hdr: virtio_magma_ctrl_hdr_t,
859    pub connection: u64,
860}
861pub type virtio_magma_connection_create_context_ctrl_t =
862    virtio_magma_connection_create_context_ctrl;
863#[repr(C, packed)]
864#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
865pub struct virtio_magma_connection_create_context_resp {
866    pub hdr: virtio_magma_ctrl_hdr_t,
867    pub context_id_out: u64,
868    pub result_return: u64,
869}
870pub type virtio_magma_connection_create_context_resp_t =
871    virtio_magma_connection_create_context_resp;
872#[repr(C, packed)]
873#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
874pub struct virtio_magma_connection_release_context_ctrl {
875    pub hdr: virtio_magma_ctrl_hdr_t,
876    pub connection: u64,
877    pub context_id: u32,
878}
879pub type virtio_magma_connection_release_context_ctrl_t =
880    virtio_magma_connection_release_context_ctrl;
881#[repr(C, packed)]
882#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
883pub struct virtio_magma_connection_release_context_resp {
884    pub hdr: virtio_magma_ctrl_hdr_t,
885}
886pub type virtio_magma_connection_release_context_resp_t =
887    virtio_magma_connection_release_context_resp;
888#[repr(C, packed)]
889#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
890pub struct virtio_magma_connection_create_buffer_ctrl {
891    pub hdr: virtio_magma_ctrl_hdr_t,
892    pub connection: u64,
893    pub size: u64,
894}
895pub type virtio_magma_connection_create_buffer_ctrl_t = virtio_magma_connection_create_buffer_ctrl;
896#[repr(C, packed)]
897#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
898pub struct virtio_magma_connection_create_buffer_resp {
899    pub hdr: virtio_magma_ctrl_hdr_t,
900    pub size_out: u64,
901    pub buffer_out: u64,
902    pub id_out: u64,
903    pub result_return: u64,
904}
905pub type virtio_magma_connection_create_buffer_resp_t = virtio_magma_connection_create_buffer_resp;
906#[repr(C, packed)]
907#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
908pub struct virtio_magma_connection_release_buffer_ctrl {
909    pub hdr: virtio_magma_ctrl_hdr_t,
910    pub connection: u64,
911    pub buffer: u64,
912}
913pub type virtio_magma_connection_release_buffer_ctrl_t =
914    virtio_magma_connection_release_buffer_ctrl;
915#[repr(C, packed)]
916#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
917pub struct virtio_magma_connection_release_buffer_resp {
918    pub hdr: virtio_magma_ctrl_hdr_t,
919}
920pub type virtio_magma_connection_release_buffer_resp_t =
921    virtio_magma_connection_release_buffer_resp;
922#[repr(C, packed)]
923#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
924pub struct virtio_magma_connection_import_buffer_ctrl {
925    pub hdr: virtio_magma_ctrl_hdr_t,
926    pub connection: u64,
927    pub buffer_handle: u32,
928}
929pub type virtio_magma_connection_import_buffer_ctrl_t = virtio_magma_connection_import_buffer_ctrl;
930#[repr(C, packed)]
931#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
932pub struct virtio_magma_connection_import_buffer_resp {
933    pub hdr: virtio_magma_ctrl_hdr_t,
934    pub size_out: u64,
935    pub buffer_out: u64,
936    pub id_out: u64,
937    pub result_return: u64,
938}
939pub type virtio_magma_connection_import_buffer_resp_t = virtio_magma_connection_import_buffer_resp;
940#[repr(C, packed)]
941#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
942pub struct virtio_magma_connection_create_semaphore_ctrl {
943    pub hdr: virtio_magma_ctrl_hdr_t,
944    pub connection: u64,
945}
946pub type virtio_magma_connection_create_semaphore_ctrl_t =
947    virtio_magma_connection_create_semaphore_ctrl;
948#[repr(C, packed)]
949#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
950pub struct virtio_magma_connection_create_semaphore_resp {
951    pub hdr: virtio_magma_ctrl_hdr_t,
952    pub semaphore_out: u64,
953    pub id_out: u64,
954    pub result_return: u64,
955}
956pub type virtio_magma_connection_create_semaphore_resp_t =
957    virtio_magma_connection_create_semaphore_resp;
958#[repr(C, packed)]
959#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
960pub struct virtio_magma_connection_release_semaphore_ctrl {
961    pub hdr: virtio_magma_ctrl_hdr_t,
962    pub connection: u64,
963    pub semaphore: u64,
964}
965pub type virtio_magma_connection_release_semaphore_ctrl_t =
966    virtio_magma_connection_release_semaphore_ctrl;
967#[repr(C, packed)]
968#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
969pub struct virtio_magma_connection_release_semaphore_resp {
970    pub hdr: virtio_magma_ctrl_hdr_t,
971}
972pub type virtio_magma_connection_release_semaphore_resp_t =
973    virtio_magma_connection_release_semaphore_resp;
974#[repr(C, packed)]
975#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
976pub struct virtio_magma_connection_import_semaphore2_ctrl {
977    pub hdr: virtio_magma_ctrl_hdr_t,
978    pub connection: u64,
979    pub semaphore_handle: u32,
980    pub flags: u64,
981}
982pub type virtio_magma_connection_import_semaphore2_ctrl_t =
983    virtio_magma_connection_import_semaphore2_ctrl;
984#[repr(C, packed)]
985#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
986pub struct virtio_magma_connection_import_semaphore2_resp {
987    pub hdr: virtio_magma_ctrl_hdr_t,
988    pub semaphore_out: u64,
989    pub id_out: u64,
990    pub result_return: u64,
991}
992pub type virtio_magma_connection_import_semaphore2_resp_t =
993    virtio_magma_connection_import_semaphore2_resp;
994#[repr(C, packed)]
995#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
996pub struct virtio_magma_connection_perform_buffer_op_ctrl {
997    pub hdr: virtio_magma_ctrl_hdr_t,
998    pub connection: u64,
999    pub buffer: u64,
1000    pub options: u32,
1001    pub start_offset: u64,
1002    pub length: u64,
1003}
1004pub type virtio_magma_connection_perform_buffer_op_ctrl_t =
1005    virtio_magma_connection_perform_buffer_op_ctrl;
1006#[repr(C, packed)]
1007#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1008pub struct virtio_magma_connection_perform_buffer_op_resp {
1009    pub hdr: virtio_magma_ctrl_hdr_t,
1010    pub result_return: u64,
1011}
1012pub type virtio_magma_connection_perform_buffer_op_resp_t =
1013    virtio_magma_connection_perform_buffer_op_resp;
1014#[repr(C, packed)]
1015#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1016pub struct virtio_magma_connection_map_buffer_ctrl {
1017    pub hdr: virtio_magma_ctrl_hdr_t,
1018    pub connection: u64,
1019    pub hw_va: u64,
1020    pub buffer: u64,
1021    pub offset: u64,
1022    pub length: u64,
1023    pub map_flags: u64,
1024}
1025pub type virtio_magma_connection_map_buffer_ctrl_t = virtio_magma_connection_map_buffer_ctrl;
1026#[repr(C, packed)]
1027#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1028pub struct virtio_magma_connection_map_buffer_resp {
1029    pub hdr: virtio_magma_ctrl_hdr_t,
1030    pub result_return: u64,
1031}
1032pub type virtio_magma_connection_map_buffer_resp_t = virtio_magma_connection_map_buffer_resp;
1033#[repr(C, packed)]
1034#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1035pub struct virtio_magma_connection_unmap_buffer_ctrl {
1036    pub hdr: virtio_magma_ctrl_hdr_t,
1037    pub connection: u64,
1038    pub hw_va: u64,
1039    pub buffer: u64,
1040}
1041pub type virtio_magma_connection_unmap_buffer_ctrl_t = virtio_magma_connection_unmap_buffer_ctrl;
1042#[repr(C, packed)]
1043#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1044pub struct virtio_magma_connection_unmap_buffer_resp {
1045    pub hdr: virtio_magma_ctrl_hdr_t,
1046}
1047pub type virtio_magma_connection_unmap_buffer_resp_t = virtio_magma_connection_unmap_buffer_resp;
1048#[repr(C, packed)]
1049#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1050pub struct virtio_magma_connection_execute_command_ctrl {
1051    pub hdr: virtio_magma_ctrl_hdr_t,
1052    pub connection: u64,
1053    pub context_id: u32,
1054    pub descriptor: u64,
1055}
1056pub type virtio_magma_connection_execute_command_ctrl_t =
1057    virtio_magma_connection_execute_command_ctrl;
1058#[repr(C, packed)]
1059#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1060pub struct virtio_magma_connection_execute_command_resp {
1061    pub hdr: virtio_magma_ctrl_hdr_t,
1062    pub result_return: u64,
1063}
1064pub type virtio_magma_connection_execute_command_resp_t =
1065    virtio_magma_connection_execute_command_resp;
1066#[repr(C, packed)]
1067#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1068pub struct virtio_magma_connection_execute_immediate_commands_ctrl {
1069    pub hdr: virtio_magma_ctrl_hdr_t,
1070    pub connection: u64,
1071    pub context_id: u32,
1072    pub command_count: u64,
1073    pub command_buffers: u64,
1074}
1075pub type virtio_magma_connection_execute_immediate_commands_ctrl_t =
1076    virtio_magma_connection_execute_immediate_commands_ctrl;
1077#[repr(C, packed)]
1078#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1079pub struct virtio_magma_connection_execute_immediate_commands_resp {
1080    pub hdr: virtio_magma_ctrl_hdr_t,
1081    pub result_return: u64,
1082}
1083pub type virtio_magma_connection_execute_immediate_commands_resp_t =
1084    virtio_magma_connection_execute_immediate_commands_resp;
1085#[repr(C, packed)]
1086#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1087pub struct virtio_magma_connection_execute_inline_commands_ctrl {
1088    pub hdr: virtio_magma_ctrl_hdr_t,
1089    pub connection: u64,
1090    pub context_id: u32,
1091    pub command_count: u64,
1092    pub command_buffers: u64,
1093}
1094pub type virtio_magma_connection_execute_inline_commands_ctrl_t =
1095    virtio_magma_connection_execute_inline_commands_ctrl;
1096#[repr(C, packed)]
1097#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1098pub struct virtio_magma_connection_execute_inline_commands_resp {
1099    pub hdr: virtio_magma_ctrl_hdr_t,
1100    pub result_return: u64,
1101}
1102pub type virtio_magma_connection_execute_inline_commands_resp_t =
1103    virtio_magma_connection_execute_inline_commands_resp;
1104#[repr(C, packed)]
1105#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1106pub struct virtio_magma_connection_flush_ctrl {
1107    pub hdr: virtio_magma_ctrl_hdr_t,
1108    pub connection: u64,
1109}
1110pub type virtio_magma_connection_flush_ctrl_t = virtio_magma_connection_flush_ctrl;
1111#[repr(C, packed)]
1112#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1113pub struct virtio_magma_connection_flush_resp {
1114    pub hdr: virtio_magma_ctrl_hdr_t,
1115    pub result_return: u64,
1116}
1117pub type virtio_magma_connection_flush_resp_t = virtio_magma_connection_flush_resp;
1118#[repr(C, packed)]
1119#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1120pub struct virtio_magma_connection_get_notification_channel_handle_ctrl {
1121    pub hdr: virtio_magma_ctrl_hdr_t,
1122    pub connection: u64,
1123}
1124pub type virtio_magma_connection_get_notification_channel_handle_ctrl_t =
1125    virtio_magma_connection_get_notification_channel_handle_ctrl;
1126#[repr(C, packed)]
1127#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1128pub struct virtio_magma_connection_get_notification_channel_handle_resp {
1129    pub hdr: virtio_magma_ctrl_hdr_t,
1130    pub result_return: u32,
1131}
1132pub type virtio_magma_connection_get_notification_channel_handle_resp_t =
1133    virtio_magma_connection_get_notification_channel_handle_resp;
1134#[repr(C, packed)]
1135#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1136pub struct virtio_magma_connection_read_notification_channel_ctrl {
1137    pub hdr: virtio_magma_ctrl_hdr_t,
1138    pub connection: u64,
1139    pub buffer: u64,
1140    pub buffer_size: u64,
1141}
1142pub type virtio_magma_connection_read_notification_channel_ctrl_t =
1143    virtio_magma_connection_read_notification_channel_ctrl;
1144#[repr(C, packed)]
1145#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1146pub struct virtio_magma_connection_read_notification_channel_resp {
1147    pub hdr: virtio_magma_ctrl_hdr_t,
1148    pub buffer_size_out: u64,
1149    pub more_data_out: u64,
1150    pub result_return: u64,
1151}
1152pub type virtio_magma_connection_read_notification_channel_resp_t =
1153    virtio_magma_connection_read_notification_channel_resp;
1154#[repr(C, packed)]
1155#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1156pub struct virtio_magma_buffer_clean_cache_ctrl {
1157    pub hdr: virtio_magma_ctrl_hdr_t,
1158    pub buffer: u64,
1159    pub offset: u64,
1160    pub size: u64,
1161    pub operation: u64,
1162}
1163pub type virtio_magma_buffer_clean_cache_ctrl_t = virtio_magma_buffer_clean_cache_ctrl;
1164#[repr(C, packed)]
1165#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1166pub struct virtio_magma_buffer_clean_cache_resp {
1167    pub hdr: virtio_magma_ctrl_hdr_t,
1168    pub result_return: u64,
1169}
1170pub type virtio_magma_buffer_clean_cache_resp_t = virtio_magma_buffer_clean_cache_resp;
1171#[repr(C, packed)]
1172#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1173pub struct virtio_magma_buffer_set_cache_policy_ctrl {
1174    pub hdr: virtio_magma_ctrl_hdr_t,
1175    pub buffer: u64,
1176    pub policy: u64,
1177}
1178pub type virtio_magma_buffer_set_cache_policy_ctrl_t = virtio_magma_buffer_set_cache_policy_ctrl;
1179#[repr(C, packed)]
1180#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1181pub struct virtio_magma_buffer_set_cache_policy_resp {
1182    pub hdr: virtio_magma_ctrl_hdr_t,
1183    pub result_return: u64,
1184}
1185pub type virtio_magma_buffer_set_cache_policy_resp_t = virtio_magma_buffer_set_cache_policy_resp;
1186#[repr(C, packed)]
1187#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1188pub struct virtio_magma_buffer_get_cache_policy_ctrl {
1189    pub hdr: virtio_magma_ctrl_hdr_t,
1190    pub buffer: u64,
1191}
1192pub type virtio_magma_buffer_get_cache_policy_ctrl_t = virtio_magma_buffer_get_cache_policy_ctrl;
1193#[repr(C, packed)]
1194#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1195pub struct virtio_magma_buffer_get_cache_policy_resp {
1196    pub hdr: virtio_magma_ctrl_hdr_t,
1197    pub cache_policy_out: u64,
1198    pub result_return: u64,
1199}
1200pub type virtio_magma_buffer_get_cache_policy_resp_t = virtio_magma_buffer_get_cache_policy_resp;
1201#[repr(C, packed)]
1202#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1203pub struct virtio_magma_buffer_set_name_ctrl {
1204    pub hdr: virtio_magma_ctrl_hdr_t,
1205    pub buffer: u64,
1206    pub name: u64,
1207}
1208pub type virtio_magma_buffer_set_name_ctrl_t = virtio_magma_buffer_set_name_ctrl;
1209#[repr(C, packed)]
1210#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1211pub struct virtio_magma_buffer_set_name_resp {
1212    pub hdr: virtio_magma_ctrl_hdr_t,
1213    pub result_return: u64,
1214}
1215pub type virtio_magma_buffer_set_name_resp_t = virtio_magma_buffer_set_name_resp;
1216#[repr(C, packed)]
1217#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1218pub struct virtio_magma_buffer_get_info_ctrl {
1219    pub hdr: virtio_magma_ctrl_hdr_t,
1220    pub buffer: u64,
1221    pub info_out: u64,
1222}
1223pub type virtio_magma_buffer_get_info_ctrl_t = virtio_magma_buffer_get_info_ctrl;
1224#[repr(C, packed)]
1225#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1226pub struct virtio_magma_buffer_get_info_resp {
1227    pub hdr: virtio_magma_ctrl_hdr_t,
1228    pub result_return: u64,
1229}
1230pub type virtio_magma_buffer_get_info_resp_t = virtio_magma_buffer_get_info_resp;
1231#[repr(C, packed)]
1232#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1233pub struct virtio_magma_buffer_get_handle_ctrl {
1234    pub hdr: virtio_magma_ctrl_hdr_t,
1235    pub buffer: u64,
1236}
1237pub type virtio_magma_buffer_get_handle_ctrl_t = virtio_magma_buffer_get_handle_ctrl;
1238#[repr(C, packed)]
1239#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1240pub struct virtio_magma_buffer_get_handle_resp {
1241    pub hdr: virtio_magma_ctrl_hdr_t,
1242    pub handle_out: u64,
1243    pub result_return: u64,
1244}
1245pub type virtio_magma_buffer_get_handle_resp_t = virtio_magma_buffer_get_handle_resp;
1246#[repr(C, packed)]
1247#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1248pub struct virtio_magma_buffer_export_ctrl {
1249    pub hdr: virtio_magma_ctrl_hdr_t,
1250    pub buffer: u64,
1251}
1252pub type virtio_magma_buffer_export_ctrl_t = virtio_magma_buffer_export_ctrl;
1253#[repr(C, packed)]
1254#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1255pub struct virtio_magma_buffer_export_resp {
1256    pub hdr: virtio_magma_ctrl_hdr_t,
1257    pub buffer_handle_out: u64,
1258    pub result_return: u64,
1259}
1260pub type virtio_magma_buffer_export_resp_t = virtio_magma_buffer_export_resp;
1261#[repr(C, packed)]
1262#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1263pub struct virtio_magma_semaphore_signal_ctrl {
1264    pub hdr: virtio_magma_ctrl_hdr_t,
1265    pub semaphore: u64,
1266}
1267pub type virtio_magma_semaphore_signal_ctrl_t = virtio_magma_semaphore_signal_ctrl;
1268#[repr(C, packed)]
1269#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1270pub struct virtio_magma_semaphore_signal_resp {
1271    pub hdr: virtio_magma_ctrl_hdr_t,
1272}
1273pub type virtio_magma_semaphore_signal_resp_t = virtio_magma_semaphore_signal_resp;
1274#[repr(C, packed)]
1275#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1276pub struct virtio_magma_semaphore_reset_ctrl {
1277    pub hdr: virtio_magma_ctrl_hdr_t,
1278    pub semaphore: u64,
1279}
1280pub type virtio_magma_semaphore_reset_ctrl_t = virtio_magma_semaphore_reset_ctrl;
1281#[repr(C, packed)]
1282#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1283pub struct virtio_magma_semaphore_reset_resp {
1284    pub hdr: virtio_magma_ctrl_hdr_t,
1285}
1286pub type virtio_magma_semaphore_reset_resp_t = virtio_magma_semaphore_reset_resp;
1287#[repr(C, packed)]
1288#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1289pub struct virtio_magma_semaphore_export_ctrl {
1290    pub hdr: virtio_magma_ctrl_hdr_t,
1291    pub semaphore: u64,
1292}
1293pub type virtio_magma_semaphore_export_ctrl_t = virtio_magma_semaphore_export_ctrl;
1294#[repr(C, packed)]
1295#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1296pub struct virtio_magma_semaphore_export_resp {
1297    pub hdr: virtio_magma_ctrl_hdr_t,
1298    pub semaphore_handle_out: u64,
1299    pub result_return: u64,
1300}
1301pub type virtio_magma_semaphore_export_resp_t = virtio_magma_semaphore_export_resp;
1302#[repr(C, packed)]
1303#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1304pub struct virtio_magma_poll_ctrl {
1305    pub hdr: virtio_magma_ctrl_hdr_t,
1306    pub items: u64,
1307    pub count: u32,
1308    pub timeout_ns: u64,
1309}
1310pub type virtio_magma_poll_ctrl_t = virtio_magma_poll_ctrl;
1311#[repr(C, packed)]
1312#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1313pub struct virtio_magma_poll_resp {
1314    pub hdr: virtio_magma_ctrl_hdr_t,
1315    pub result_return: u64,
1316}
1317pub type virtio_magma_poll_resp_t = virtio_magma_poll_resp;
1318#[repr(C, packed)]
1319#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1320pub struct virtio_magma_initialize_tracing_ctrl {
1321    pub hdr: virtio_magma_ctrl_hdr_t,
1322    pub channel: u32,
1323}
1324pub type virtio_magma_initialize_tracing_ctrl_t = virtio_magma_initialize_tracing_ctrl;
1325#[repr(C, packed)]
1326#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1327pub struct virtio_magma_initialize_tracing_resp {
1328    pub hdr: virtio_magma_ctrl_hdr_t,
1329    pub result_return: u64,
1330}
1331pub type virtio_magma_initialize_tracing_resp_t = virtio_magma_initialize_tracing_resp;
1332#[repr(C, packed)]
1333#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1334pub struct virtio_magma_initialize_logging_ctrl {
1335    pub hdr: virtio_magma_ctrl_hdr_t,
1336    pub channel: u32,
1337}
1338pub type virtio_magma_initialize_logging_ctrl_t = virtio_magma_initialize_logging_ctrl;
1339#[repr(C, packed)]
1340#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1341pub struct virtio_magma_initialize_logging_resp {
1342    pub hdr: virtio_magma_ctrl_hdr_t,
1343    pub result_return: u64,
1344}
1345pub type virtio_magma_initialize_logging_resp_t = virtio_magma_initialize_logging_resp;
1346#[repr(C, packed)]
1347#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1348pub struct virtio_magma_connection_enable_performance_counter_access_ctrl {
1349    pub hdr: virtio_magma_ctrl_hdr_t,
1350    pub connection: u64,
1351    pub channel: u32,
1352}
1353pub type virtio_magma_connection_enable_performance_counter_access_ctrl_t =
1354    virtio_magma_connection_enable_performance_counter_access_ctrl;
1355#[repr(C, packed)]
1356#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1357pub struct virtio_magma_connection_enable_performance_counter_access_resp {
1358    pub hdr: virtio_magma_ctrl_hdr_t,
1359    pub result_return: u64,
1360}
1361pub type virtio_magma_connection_enable_performance_counter_access_resp_t =
1362    virtio_magma_connection_enable_performance_counter_access_resp;
1363#[repr(C, packed)]
1364#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1365pub struct virtio_magma_connection_enable_performance_counters_ctrl {
1366    pub hdr: virtio_magma_ctrl_hdr_t,
1367    pub connection: u64,
1368    pub counters: u64,
1369    pub counters_count: u64,
1370}
1371pub type virtio_magma_connection_enable_performance_counters_ctrl_t =
1372    virtio_magma_connection_enable_performance_counters_ctrl;
1373#[repr(C, packed)]
1374#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1375pub struct virtio_magma_connection_enable_performance_counters_resp {
1376    pub hdr: virtio_magma_ctrl_hdr_t,
1377    pub result_return: u64,
1378}
1379pub type virtio_magma_connection_enable_performance_counters_resp_t =
1380    virtio_magma_connection_enable_performance_counters_resp;
1381#[repr(C, packed)]
1382#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1383pub struct virtio_magma_connection_create_performance_counter_buffer_pool_ctrl {
1384    pub hdr: virtio_magma_ctrl_hdr_t,
1385    pub connection: u64,
1386}
1387pub type virtio_magma_connection_create_performance_counter_buffer_pool_ctrl_t =
1388    virtio_magma_connection_create_performance_counter_buffer_pool_ctrl;
1389#[repr(C, packed)]
1390#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1391pub struct virtio_magma_connection_create_performance_counter_buffer_pool_resp {
1392    pub hdr: virtio_magma_ctrl_hdr_t,
1393    pub pool_id_out: u64,
1394    pub notification_handle_out: u64,
1395    pub result_return: u64,
1396}
1397pub type virtio_magma_connection_create_performance_counter_buffer_pool_resp_t =
1398    virtio_magma_connection_create_performance_counter_buffer_pool_resp;
1399#[repr(C, packed)]
1400#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1401pub struct virtio_magma_connection_release_performance_counter_buffer_pool_ctrl {
1402    pub hdr: virtio_magma_ctrl_hdr_t,
1403    pub connection: u64,
1404    pub pool_id: u64,
1405}
1406pub type virtio_magma_connection_release_performance_counter_buffer_pool_ctrl_t =
1407    virtio_magma_connection_release_performance_counter_buffer_pool_ctrl;
1408#[repr(C, packed)]
1409#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1410pub struct virtio_magma_connection_release_performance_counter_buffer_pool_resp {
1411    pub hdr: virtio_magma_ctrl_hdr_t,
1412    pub result_return: u64,
1413}
1414pub type virtio_magma_connection_release_performance_counter_buffer_pool_resp_t =
1415    virtio_magma_connection_release_performance_counter_buffer_pool_resp;
1416#[repr(C, packed)]
1417#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1418pub struct virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl {
1419    pub hdr: virtio_magma_ctrl_hdr_t,
1420    pub connection: u64,
1421    pub pool_id: u64,
1422    pub offsets: u64,
1423    pub offsets_count: u64,
1424}
1425pub type virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl_t =
1426    virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl;
1427#[repr(C, packed)]
1428#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1429pub struct virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp {
1430    pub hdr: virtio_magma_ctrl_hdr_t,
1431    pub result_return: u64,
1432}
1433pub type virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp_t =
1434    virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp;
1435#[repr(C, packed)]
1436#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1437pub struct virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl {
1438    pub hdr: virtio_magma_ctrl_hdr_t,
1439    pub connection: u64,
1440    pub pool_id: u64,
1441    pub buffer: u64,
1442}
1443pub type virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl_t =
1444    virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl;
1445#[repr(C, packed)]
1446#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1447pub struct virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp {
1448    pub hdr: virtio_magma_ctrl_hdr_t,
1449    pub result_return: u64,
1450}
1451pub type virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp_t =
1452    virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp;
1453#[repr(C, packed)]
1454#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1455pub struct virtio_magma_connection_dump_performance_counters_ctrl {
1456    pub hdr: virtio_magma_ctrl_hdr_t,
1457    pub connection: u64,
1458    pub pool_id: u64,
1459    pub trigger_id: u32,
1460}
1461pub type virtio_magma_connection_dump_performance_counters_ctrl_t =
1462    virtio_magma_connection_dump_performance_counters_ctrl;
1463#[repr(C, packed)]
1464#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1465pub struct virtio_magma_connection_dump_performance_counters_resp {
1466    pub hdr: virtio_magma_ctrl_hdr_t,
1467    pub result_return: u64,
1468}
1469pub type virtio_magma_connection_dump_performance_counters_resp_t =
1470    virtio_magma_connection_dump_performance_counters_resp;
1471#[repr(C, packed)]
1472#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1473pub struct virtio_magma_connection_clear_performance_counters_ctrl {
1474    pub hdr: virtio_magma_ctrl_hdr_t,
1475    pub connection: u64,
1476    pub counters: u64,
1477    pub counters_count: u64,
1478}
1479pub type virtio_magma_connection_clear_performance_counters_ctrl_t =
1480    virtio_magma_connection_clear_performance_counters_ctrl;
1481#[repr(C, packed)]
1482#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1483pub struct virtio_magma_connection_clear_performance_counters_resp {
1484    pub hdr: virtio_magma_ctrl_hdr_t,
1485    pub result_return: u64,
1486}
1487pub type virtio_magma_connection_clear_performance_counters_resp_t =
1488    virtio_magma_connection_clear_performance_counters_resp;
1489#[repr(C, packed)]
1490#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1491pub struct virtio_magma_connection_read_performance_counter_completion_ctrl {
1492    pub hdr: virtio_magma_ctrl_hdr_t,
1493    pub connection: u64,
1494    pub pool_id: u64,
1495}
1496pub type virtio_magma_connection_read_performance_counter_completion_ctrl_t =
1497    virtio_magma_connection_read_performance_counter_completion_ctrl;
1498#[repr(C, packed)]
1499#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1500pub struct virtio_magma_connection_read_performance_counter_completion_resp {
1501    pub hdr: virtio_magma_ctrl_hdr_t,
1502    pub trigger_id_out: u64,
1503    pub buffer_id_out: u64,
1504    pub buffer_offset_out: u64,
1505    pub time_out: u64,
1506    pub result_flags_out: u64,
1507    pub result_return: u64,
1508}
1509pub type virtio_magma_connection_read_performance_counter_completion_resp_t =
1510    virtio_magma_connection_read_performance_counter_completion_resp;
1511#[repr(C, packed)]
1512#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1513pub struct virtio_magma_virt_connection_create_image_ctrl {
1514    pub hdr: virtio_magma_ctrl_hdr_t,
1515    pub connection: u64,
1516    pub create_info: u64,
1517}
1518pub type virtio_magma_virt_connection_create_image_ctrl_t =
1519    virtio_magma_virt_connection_create_image_ctrl;
1520#[repr(C, packed)]
1521#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1522pub struct virtio_magma_virt_connection_create_image_resp {
1523    pub hdr: virtio_magma_ctrl_hdr_t,
1524    pub size_out: u64,
1525    pub image_out: u64,
1526    pub buffer_id_out: u64,
1527    pub result_return: u64,
1528}
1529pub type virtio_magma_virt_connection_create_image_resp_t =
1530    virtio_magma_virt_connection_create_image_resp;
1531#[repr(C, packed)]
1532#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1533pub struct virtio_magma_virt_connection_get_image_info_ctrl {
1534    pub hdr: virtio_magma_ctrl_hdr_t,
1535    pub connection: u64,
1536    pub image: u64,
1537    pub image_info_out: u64,
1538}
1539pub type virtio_magma_virt_connection_get_image_info_ctrl_t =
1540    virtio_magma_virt_connection_get_image_info_ctrl;
1541#[repr(C, packed)]
1542#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1543pub struct virtio_magma_virt_connection_get_image_info_resp {
1544    pub hdr: virtio_magma_ctrl_hdr_t,
1545    pub result_return: u64,
1546}
1547pub type virtio_magma_virt_connection_get_image_info_resp_t =
1548    virtio_magma_virt_connection_get_image_info_resp;
1549#[repr(C, packed)]
1550#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1551pub struct virtio_magma_connection_create_context2_ctrl {
1552    pub hdr: virtio_magma_ctrl_hdr_t,
1553    pub connection: u64,
1554    pub priority: u64,
1555}
1556pub type virtio_magma_connection_create_context2_ctrl_t =
1557    virtio_magma_connection_create_context2_ctrl;
1558#[repr(C, packed)]
1559#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1560pub struct virtio_magma_connection_create_context2_resp {
1561    pub hdr: virtio_magma_ctrl_hdr_t,
1562    pub context_id_out: u64,
1563    pub result_return: u64,
1564}
1565pub type virtio_magma_connection_create_context2_resp_t =
1566    virtio_magma_connection_create_context2_resp;
1567#[repr(C, packed)]
1568#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1569pub struct virtio_magma_internal_release_handle_ctrl {
1570    pub hdr: virtio_magma_ctrl_hdr_t,
1571    pub handle: u32,
1572}
1573pub type virtio_magma_internal_release_handle_ctrl_t = virtio_magma_internal_release_handle_ctrl;
1574#[repr(C, packed)]
1575#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1576pub struct virtio_magma_internal_release_handle_resp {
1577    pub hdr: virtio_magma_ctrl_hdr_t,
1578    pub result_return: u64,
1579}
1580pub type virtio_magma_internal_release_handle_resp_t = virtio_magma_internal_release_handle_resp;
1581#[repr(C, packed)]
1582#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1583pub struct virtio_magma_internal_map_ctrl {
1584    pub hdr: virtio_magma_ctrl_hdr_t,
1585    pub buffer: u32,
1586    pub length: u64,
1587}
1588pub type virtio_magma_internal_map_ctrl_t = virtio_magma_internal_map_ctrl;
1589#[repr(C, packed)]
1590#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1591pub struct virtio_magma_internal_map_resp {
1592    pub hdr: virtio_magma_ctrl_hdr_t,
1593    pub address_out: u64,
1594    pub result_return: u64,
1595}
1596pub type virtio_magma_internal_map_resp_t = virtio_magma_internal_map_resp;
1597#[repr(C, packed)]
1598#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1599pub struct virtio_magma_internal_unmap_ctrl {
1600    pub hdr: virtio_magma_ctrl_hdr_t,
1601    pub buffer: u32,
1602    pub address: u64,
1603}
1604pub type virtio_magma_internal_unmap_ctrl_t = virtio_magma_internal_unmap_ctrl;
1605#[repr(C, packed)]
1606#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1607pub struct virtio_magma_internal_unmap_resp {
1608    pub hdr: virtio_magma_ctrl_hdr_t,
1609    pub result_return: u64,
1610}
1611pub type virtio_magma_internal_unmap_resp_t = virtio_magma_internal_unmap_resp;