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