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