Skip to main content

magma/
magma.rs

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