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