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