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. 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"]
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_INLINE_COMMANDS:
731 virtio_magma_ctrl_type = 4130;
732pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_FLUSH: virtio_magma_ctrl_type = 4175;
733pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_GET_NOTIFICATION_CHANNEL_HANDLE:
734 virtio_magma_ctrl_type = 4138;
735pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_READ_NOTIFICATION_CHANNEL:
736 virtio_magma_ctrl_type = 4166;
737pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_CLEAN_CACHE: virtio_magma_ctrl_type = 4110;
738pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_SET_CACHE_POLICY: virtio_magma_ctrl_type =
739 4111;
740pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_CACHE_POLICY: virtio_magma_ctrl_type =
741 4112;
742pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_SET_NAME: virtio_magma_ctrl_type = 4160;
743pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_INFO: virtio_magma_ctrl_type = 4162;
744pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_HANDLE: virtio_magma_ctrl_type = 4171;
745pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_EXPORT: virtio_magma_ctrl_type = 4183;
746pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_SIGNAL: virtio_magma_ctrl_type = 4133;
747pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_RESET: virtio_magma_ctrl_type = 4134;
748pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_EXPORT: virtio_magma_ctrl_type = 4184;
749pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_POLL: virtio_magma_ctrl_type = 4148;
750pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INITIALIZE_TRACING: virtio_magma_ctrl_type = 4141;
751pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INITIALIZE_LOGGING: virtio_magma_ctrl_type = 4147;
752pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTER_ACCESS:
753 virtio_magma_ctrl_type = 4149;
754pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS:
755 virtio_magma_ctrl_type = 4152;
756pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 4153 ;
757pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 4154 ;
758pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ADD_PERFORMANCE_COUNTER_BUFFER_OFFSETS_TO_POOL : virtio_magma_ctrl_type = 4155 ;
759pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_REMOVE_PERFORMANCE_COUNTER_BUFFER_FROM_POOL : virtio_magma_ctrl_type = 4156 ;
760pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_DUMP_PERFORMANCE_COUNTERS:
761 virtio_magma_ctrl_type = 4157;
762pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CLEAR_PERFORMANCE_COUNTERS:
763 virtio_magma_ctrl_type = 4158;
764pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_READ_PERFORMANCE_COUNTER_COMPLETION:
765 virtio_magma_ctrl_type = 4159;
766pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_VIRT_CONNECTION_CREATE_IMAGE:
767 virtio_magma_ctrl_type = 4182;
768pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_VIRT_CONNECTION_GET_IMAGE_INFO:
769 virtio_magma_ctrl_type = 4168;
770pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_CONTEXT2:
771 virtio_magma_ctrl_type = 4188;
772pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_RELEASE_HANDLE: virtio_magma_ctrl_type =
773 4172;
774pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_MAP: virtio_magma_ctrl_type = 4173;
775pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_UNMAP: virtio_magma_ctrl_type = 4174;
776pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_IMPORT: virtio_magma_ctrl_type = 8238;
777pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_RELEASE: virtio_magma_ctrl_type = 8239;
778pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ENUMERATE_DEVICES: virtio_magma_ctrl_type = 8240;
779pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_QUERY: virtio_magma_ctrl_type = 8273;
780pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_CREATE_CONNECTION:
781 virtio_magma_ctrl_type = 8242;
782pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE: virtio_magma_ctrl_type =
783 8196;
784pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_GET_ERROR: virtio_magma_ctrl_type =
785 8197;
786pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_CONTEXT:
787 virtio_magma_ctrl_type = 8198;
788pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_CONTEXT:
789 virtio_magma_ctrl_type = 8199;
790pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_BUFFER:
791 virtio_magma_ctrl_type = 8277;
792pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_BUFFER:
793 virtio_magma_ctrl_type = 8201;
794pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_IMPORT_BUFFER:
795 virtio_magma_ctrl_type = 8276;
796pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_SEMAPHORE:
797 virtio_magma_ctrl_type = 8281;
798pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_SEMAPHORE:
799 virtio_magma_ctrl_type = 8227;
800pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_IMPORT_SEMAPHORE2:
801 virtio_magma_ctrl_type = 8283;
802pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_PERFORM_BUFFER_OP:
803 virtio_magma_ctrl_type = 8257;
804pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_MAP_BUFFER: virtio_magma_ctrl_type =
805 8274;
806pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_UNMAP_BUFFER: virtio_magma_ctrl_type =
807 8275;
808pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_COMMAND:
809 virtio_magma_ctrl_type = 8272;
810pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_INLINE_COMMANDS:
811 virtio_magma_ctrl_type = 8226;
812pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_FLUSH: virtio_magma_ctrl_type = 8271;
813pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_GET_NOTIFICATION_CHANNEL_HANDLE:
814 virtio_magma_ctrl_type = 8234;
815pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_READ_NOTIFICATION_CHANNEL:
816 virtio_magma_ctrl_type = 8262;
817pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_CLEAN_CACHE: virtio_magma_ctrl_type =
818 8206;
819pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_SET_CACHE_POLICY: virtio_magma_ctrl_type =
820 8207;
821pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_CACHE_POLICY: virtio_magma_ctrl_type =
822 8208;
823pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_SET_NAME: virtio_magma_ctrl_type = 8256;
824pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_INFO: virtio_magma_ctrl_type = 8258;
825pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_HANDLE: virtio_magma_ctrl_type = 8267;
826pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_EXPORT: virtio_magma_ctrl_type = 8279;
827pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_SIGNAL: virtio_magma_ctrl_type = 8229;
828pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_RESET: virtio_magma_ctrl_type = 8230;
829pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_EXPORT: virtio_magma_ctrl_type = 8280;
830pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_POLL: virtio_magma_ctrl_type = 8244;
831pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INITIALIZE_TRACING: virtio_magma_ctrl_type =
832 8237;
833pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INITIALIZE_LOGGING: virtio_magma_ctrl_type =
834 8243;
835pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTER_ACCESS:
836 virtio_magma_ctrl_type = 8245;
837pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS:
838 virtio_magma_ctrl_type = 8248;
839pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 8249 ;
840pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL : virtio_magma_ctrl_type = 8250 ;
841pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ADD_PERFORMANCE_COUNTER_BUFFER_OFFSETS_TO_POOL : virtio_magma_ctrl_type = 8251 ;
842pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_REMOVE_PERFORMANCE_COUNTER_BUFFER_FROM_POOL : virtio_magma_ctrl_type = 8252 ;
843pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_DUMP_PERFORMANCE_COUNTERS:
844 virtio_magma_ctrl_type = 8253;
845pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CLEAR_PERFORMANCE_COUNTERS:
846 virtio_magma_ctrl_type = 8254;
847pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_READ_PERFORMANCE_COUNTER_COMPLETION : virtio_magma_ctrl_type = 8255 ;
848pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_VIRT_CONNECTION_CREATE_IMAGE:
849 virtio_magma_ctrl_type = 8278;
850pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_VIRT_CONNECTION_GET_IMAGE_INFO:
851 virtio_magma_ctrl_type = 8264;
852pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_CONTEXT2:
853 virtio_magma_ctrl_type = 8284;
854pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_RELEASE_HANDLE: virtio_magma_ctrl_type =
855 8268;
856pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_MAP: virtio_magma_ctrl_type = 8269;
857pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_UNMAP: virtio_magma_ctrl_type = 8270;
858pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_UNIMPLEMENTED: virtio_magma_ctrl_type =
859 12289;
860pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INTERNAL: virtio_magma_ctrl_type = 12290;
861pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_HOST_DISCONNECTED: virtio_magma_ctrl_type =
862 12291;
863pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_OUT_OF_MEMORY: virtio_magma_ctrl_type =
864 12292;
865pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INVALID_COMMAND: virtio_magma_ctrl_type =
866 12293;
867pub const virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INVALID_ARGUMENT: virtio_magma_ctrl_type =
868 12294;
869pub type virtio_magma_ctrl_type = ::std::os::raw::c_ushort;
870#[repr(C, packed)]
871#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
872pub struct virtio_magma_ctrl_hdr {
873 pub type_: u32,
874 pub flags: u32,
875}
876pub type virtio_magma_ctrl_hdr_t = virtio_magma_ctrl_hdr;
877#[repr(C, packed)]
878#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
879pub struct virtio_magma_device_import_ctrl {
880 pub hdr: virtio_magma_ctrl_hdr_t,
881 pub device_channel: u32,
882}
883pub type virtio_magma_device_import_ctrl_t = virtio_magma_device_import_ctrl;
884#[repr(C, packed)]
885#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
886pub struct virtio_magma_device_import_resp {
887 pub hdr: virtio_magma_ctrl_hdr_t,
888 pub device_out: u64,
889 pub result_return: u64,
890}
891pub type virtio_magma_device_import_resp_t = virtio_magma_device_import_resp;
892#[repr(C, packed)]
893#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
894pub struct virtio_magma_device_release_ctrl {
895 pub hdr: virtio_magma_ctrl_hdr_t,
896 pub device: u64,
897}
898pub type virtio_magma_device_release_ctrl_t = virtio_magma_device_release_ctrl;
899#[repr(C, packed)]
900#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
901pub struct virtio_magma_device_release_resp {
902 pub hdr: virtio_magma_ctrl_hdr_t,
903}
904pub type virtio_magma_device_release_resp_t = virtio_magma_device_release_resp;
905#[repr(C, packed)]
906#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
907pub struct virtio_magma_enumerate_devices_ctrl {
908 pub hdr: virtio_magma_ctrl_hdr_t,
909 pub device_namespace: u64,
910 pub device_directory_channel: u32,
911 pub device_count_inout: u64,
912 pub device_path_size: u32,
913}
914pub type virtio_magma_enumerate_devices_ctrl_t = virtio_magma_enumerate_devices_ctrl;
915#[repr(C, packed)]
916#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
917pub struct virtio_magma_enumerate_devices_resp {
918 pub hdr: virtio_magma_ctrl_hdr_t,
919 pub device_paths_out: u64,
920 pub result_return: u64,
921}
922pub type virtio_magma_enumerate_devices_resp_t = virtio_magma_enumerate_devices_resp;
923#[repr(C, packed)]
924#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
925pub struct virtio_magma_device_query_ctrl {
926 pub hdr: virtio_magma_ctrl_hdr_t,
927 pub device: u64,
928 pub id: u64,
929}
930pub type virtio_magma_device_query_ctrl_t = virtio_magma_device_query_ctrl;
931#[repr(C, packed)]
932#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
933pub struct virtio_magma_device_query_resp {
934 pub hdr: virtio_magma_ctrl_hdr_t,
935 pub result_buffer_out: u64,
936 pub result_out: u64,
937 pub result_return: u64,
938}
939pub type virtio_magma_device_query_resp_t = virtio_magma_device_query_resp;
940#[repr(C, packed)]
941#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
942pub struct virtio_magma_device_create_connection_ctrl {
943 pub hdr: virtio_magma_ctrl_hdr_t,
944 pub device: u64,
945}
946pub type virtio_magma_device_create_connection_ctrl_t = virtio_magma_device_create_connection_ctrl;
947#[repr(C, packed)]
948#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
949pub struct virtio_magma_device_create_connection_resp {
950 pub hdr: virtio_magma_ctrl_hdr_t,
951 pub connection_out: u64,
952 pub result_return: u64,
953}
954pub type virtio_magma_device_create_connection_resp_t = virtio_magma_device_create_connection_resp;
955#[repr(C, packed)]
956#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
957pub struct virtio_magma_connection_release_ctrl {
958 pub hdr: virtio_magma_ctrl_hdr_t,
959 pub connection: u64,
960}
961pub type virtio_magma_connection_release_ctrl_t = virtio_magma_connection_release_ctrl;
962#[repr(C, packed)]
963#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
964pub struct virtio_magma_connection_release_resp {
965 pub hdr: virtio_magma_ctrl_hdr_t,
966}
967pub type virtio_magma_connection_release_resp_t = virtio_magma_connection_release_resp;
968#[repr(C, packed)]
969#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
970pub struct virtio_magma_connection_get_error_ctrl {
971 pub hdr: virtio_magma_ctrl_hdr_t,
972 pub connection: u64,
973}
974pub type virtio_magma_connection_get_error_ctrl_t = virtio_magma_connection_get_error_ctrl;
975#[repr(C, packed)]
976#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
977pub struct virtio_magma_connection_get_error_resp {
978 pub hdr: virtio_magma_ctrl_hdr_t,
979 pub result_return: u64,
980}
981pub type virtio_magma_connection_get_error_resp_t = virtio_magma_connection_get_error_resp;
982#[repr(C, packed)]
983#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
984pub struct virtio_magma_connection_create_context_ctrl {
985 pub hdr: virtio_magma_ctrl_hdr_t,
986 pub connection: u64,
987}
988pub type virtio_magma_connection_create_context_ctrl_t =
989 virtio_magma_connection_create_context_ctrl;
990#[repr(C, packed)]
991#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
992pub struct virtio_magma_connection_create_context_resp {
993 pub hdr: virtio_magma_ctrl_hdr_t,
994 pub context_id_out: u64,
995 pub result_return: u64,
996}
997pub type virtio_magma_connection_create_context_resp_t =
998 virtio_magma_connection_create_context_resp;
999#[repr(C, packed)]
1000#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1001pub struct virtio_magma_connection_release_context_ctrl {
1002 pub hdr: virtio_magma_ctrl_hdr_t,
1003 pub connection: u64,
1004 pub context_id: u32,
1005}
1006pub type virtio_magma_connection_release_context_ctrl_t =
1007 virtio_magma_connection_release_context_ctrl;
1008#[repr(C, packed)]
1009#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1010pub struct virtio_magma_connection_release_context_resp {
1011 pub hdr: virtio_magma_ctrl_hdr_t,
1012}
1013pub type virtio_magma_connection_release_context_resp_t =
1014 virtio_magma_connection_release_context_resp;
1015#[repr(C, packed)]
1016#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1017pub struct virtio_magma_connection_create_buffer_ctrl {
1018 pub hdr: virtio_magma_ctrl_hdr_t,
1019 pub connection: u64,
1020 pub size: u64,
1021}
1022pub type virtio_magma_connection_create_buffer_ctrl_t = virtio_magma_connection_create_buffer_ctrl;
1023#[repr(C, packed)]
1024#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1025pub struct virtio_magma_connection_create_buffer_resp {
1026 pub hdr: virtio_magma_ctrl_hdr_t,
1027 pub size_out: u64,
1028 pub buffer_out: u64,
1029 pub id_out: u64,
1030 pub result_return: u64,
1031}
1032pub type virtio_magma_connection_create_buffer_resp_t = virtio_magma_connection_create_buffer_resp;
1033#[repr(C, packed)]
1034#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1035pub struct virtio_magma_connection_release_buffer_ctrl {
1036 pub hdr: virtio_magma_ctrl_hdr_t,
1037 pub connection: u64,
1038 pub buffer: u64,
1039}
1040pub type virtio_magma_connection_release_buffer_ctrl_t =
1041 virtio_magma_connection_release_buffer_ctrl;
1042#[repr(C, packed)]
1043#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1044pub struct virtio_magma_connection_release_buffer_resp {
1045 pub hdr: virtio_magma_ctrl_hdr_t,
1046}
1047pub type virtio_magma_connection_release_buffer_resp_t =
1048 virtio_magma_connection_release_buffer_resp;
1049#[repr(C, packed)]
1050#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1051pub struct virtio_magma_connection_import_buffer_ctrl {
1052 pub hdr: virtio_magma_ctrl_hdr_t,
1053 pub connection: u64,
1054 pub buffer_handle: u32,
1055}
1056pub type virtio_magma_connection_import_buffer_ctrl_t = virtio_magma_connection_import_buffer_ctrl;
1057#[repr(C, packed)]
1058#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1059pub struct virtio_magma_connection_import_buffer_resp {
1060 pub hdr: virtio_magma_ctrl_hdr_t,
1061 pub size_out: u64,
1062 pub buffer_out: u64,
1063 pub id_out: u64,
1064 pub result_return: u64,
1065}
1066pub type virtio_magma_connection_import_buffer_resp_t = virtio_magma_connection_import_buffer_resp;
1067#[repr(C, packed)]
1068#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1069pub struct virtio_magma_connection_create_semaphore_ctrl {
1070 pub hdr: virtio_magma_ctrl_hdr_t,
1071 pub connection: u64,
1072}
1073pub type virtio_magma_connection_create_semaphore_ctrl_t =
1074 virtio_magma_connection_create_semaphore_ctrl;
1075#[repr(C, packed)]
1076#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1077pub struct virtio_magma_connection_create_semaphore_resp {
1078 pub hdr: virtio_magma_ctrl_hdr_t,
1079 pub semaphore_out: u64,
1080 pub id_out: u64,
1081 pub result_return: u64,
1082}
1083pub type virtio_magma_connection_create_semaphore_resp_t =
1084 virtio_magma_connection_create_semaphore_resp;
1085#[repr(C, packed)]
1086#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1087pub struct virtio_magma_connection_release_semaphore_ctrl {
1088 pub hdr: virtio_magma_ctrl_hdr_t,
1089 pub connection: u64,
1090 pub semaphore: u64,
1091}
1092pub type virtio_magma_connection_release_semaphore_ctrl_t =
1093 virtio_magma_connection_release_semaphore_ctrl;
1094#[repr(C, packed)]
1095#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1096pub struct virtio_magma_connection_release_semaphore_resp {
1097 pub hdr: virtio_magma_ctrl_hdr_t,
1098}
1099pub type virtio_magma_connection_release_semaphore_resp_t =
1100 virtio_magma_connection_release_semaphore_resp;
1101#[repr(C, packed)]
1102#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1103pub struct virtio_magma_connection_import_semaphore2_ctrl {
1104 pub hdr: virtio_magma_ctrl_hdr_t,
1105 pub connection: u64,
1106 pub semaphore_handle: u32,
1107 pub flags: u64,
1108}
1109pub type virtio_magma_connection_import_semaphore2_ctrl_t =
1110 virtio_magma_connection_import_semaphore2_ctrl;
1111#[repr(C, packed)]
1112#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1113pub struct virtio_magma_connection_import_semaphore2_resp {
1114 pub hdr: virtio_magma_ctrl_hdr_t,
1115 pub semaphore_out: u64,
1116 pub id_out: u64,
1117 pub result_return: u64,
1118}
1119pub type virtio_magma_connection_import_semaphore2_resp_t =
1120 virtio_magma_connection_import_semaphore2_resp;
1121#[repr(C, packed)]
1122#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1123pub struct virtio_magma_connection_perform_buffer_op_ctrl {
1124 pub hdr: virtio_magma_ctrl_hdr_t,
1125 pub connection: u64,
1126 pub buffer: u64,
1127 pub options: u32,
1128 pub start_offset: u64,
1129 pub length: u64,
1130}
1131pub type virtio_magma_connection_perform_buffer_op_ctrl_t =
1132 virtio_magma_connection_perform_buffer_op_ctrl;
1133#[repr(C, packed)]
1134#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1135pub struct virtio_magma_connection_perform_buffer_op_resp {
1136 pub hdr: virtio_magma_ctrl_hdr_t,
1137 pub result_return: u64,
1138}
1139pub type virtio_magma_connection_perform_buffer_op_resp_t =
1140 virtio_magma_connection_perform_buffer_op_resp;
1141#[repr(C, packed)]
1142#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1143pub struct virtio_magma_connection_map_buffer_ctrl {
1144 pub hdr: virtio_magma_ctrl_hdr_t,
1145 pub connection: u64,
1146 pub hw_va: u64,
1147 pub buffer: u64,
1148 pub offset: u64,
1149 pub length: u64,
1150 pub map_flags: u64,
1151}
1152pub type virtio_magma_connection_map_buffer_ctrl_t = virtio_magma_connection_map_buffer_ctrl;
1153#[repr(C, packed)]
1154#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1155pub struct virtio_magma_connection_map_buffer_resp {
1156 pub hdr: virtio_magma_ctrl_hdr_t,
1157 pub result_return: u64,
1158}
1159pub type virtio_magma_connection_map_buffer_resp_t = virtio_magma_connection_map_buffer_resp;
1160#[repr(C, packed)]
1161#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1162pub struct virtio_magma_connection_unmap_buffer_ctrl {
1163 pub hdr: virtio_magma_ctrl_hdr_t,
1164 pub connection: u64,
1165 pub hw_va: u64,
1166 pub buffer: u64,
1167}
1168pub type virtio_magma_connection_unmap_buffer_ctrl_t = virtio_magma_connection_unmap_buffer_ctrl;
1169#[repr(C, packed)]
1170#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1171pub struct virtio_magma_connection_unmap_buffer_resp {
1172 pub hdr: virtio_magma_ctrl_hdr_t,
1173}
1174pub type virtio_magma_connection_unmap_buffer_resp_t = virtio_magma_connection_unmap_buffer_resp;
1175#[repr(C, packed)]
1176#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1177pub struct virtio_magma_connection_execute_command_ctrl {
1178 pub hdr: virtio_magma_ctrl_hdr_t,
1179 pub connection: u64,
1180 pub context_id: u32,
1181 pub descriptor: u64,
1182}
1183pub type virtio_magma_connection_execute_command_ctrl_t =
1184 virtio_magma_connection_execute_command_ctrl;
1185#[repr(C, packed)]
1186#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1187pub struct virtio_magma_connection_execute_command_resp {
1188 pub hdr: virtio_magma_ctrl_hdr_t,
1189 pub result_return: u64,
1190}
1191pub type virtio_magma_connection_execute_command_resp_t =
1192 virtio_magma_connection_execute_command_resp;
1193#[repr(C, packed)]
1194#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1195pub struct virtio_magma_connection_execute_inline_commands_ctrl {
1196 pub hdr: virtio_magma_ctrl_hdr_t,
1197 pub connection: u64,
1198 pub context_id: u32,
1199 pub command_count: u64,
1200 pub command_buffers: u64,
1201}
1202pub type virtio_magma_connection_execute_inline_commands_ctrl_t =
1203 virtio_magma_connection_execute_inline_commands_ctrl;
1204#[repr(C, packed)]
1205#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1206pub struct virtio_magma_connection_execute_inline_commands_resp {
1207 pub hdr: virtio_magma_ctrl_hdr_t,
1208 pub result_return: u64,
1209}
1210pub type virtio_magma_connection_execute_inline_commands_resp_t =
1211 virtio_magma_connection_execute_inline_commands_resp;
1212#[repr(C, packed)]
1213#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1214pub struct virtio_magma_connection_flush_ctrl {
1215 pub hdr: virtio_magma_ctrl_hdr_t,
1216 pub connection: u64,
1217}
1218pub type virtio_magma_connection_flush_ctrl_t = virtio_magma_connection_flush_ctrl;
1219#[repr(C, packed)]
1220#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1221pub struct virtio_magma_connection_flush_resp {
1222 pub hdr: virtio_magma_ctrl_hdr_t,
1223 pub result_return: u64,
1224}
1225pub type virtio_magma_connection_flush_resp_t = virtio_magma_connection_flush_resp;
1226#[repr(C, packed)]
1227#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1228pub struct virtio_magma_connection_get_notification_channel_handle_ctrl {
1229 pub hdr: virtio_magma_ctrl_hdr_t,
1230 pub connection: u64,
1231}
1232pub type virtio_magma_connection_get_notification_channel_handle_ctrl_t =
1233 virtio_magma_connection_get_notification_channel_handle_ctrl;
1234#[repr(C, packed)]
1235#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1236pub struct virtio_magma_connection_get_notification_channel_handle_resp {
1237 pub hdr: virtio_magma_ctrl_hdr_t,
1238 pub result_return: u32,
1239}
1240pub type virtio_magma_connection_get_notification_channel_handle_resp_t =
1241 virtio_magma_connection_get_notification_channel_handle_resp;
1242#[repr(C, packed)]
1243#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1244pub struct virtio_magma_connection_read_notification_channel_ctrl {
1245 pub hdr: virtio_magma_ctrl_hdr_t,
1246 pub connection: u64,
1247 pub buffer: u64,
1248 pub buffer_size: u64,
1249}
1250pub type virtio_magma_connection_read_notification_channel_ctrl_t =
1251 virtio_magma_connection_read_notification_channel_ctrl;
1252#[repr(C, packed)]
1253#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1254pub struct virtio_magma_connection_read_notification_channel_resp {
1255 pub hdr: virtio_magma_ctrl_hdr_t,
1256 pub buffer_size_out: u64,
1257 pub more_data_out: u64,
1258 pub result_return: u64,
1259}
1260pub type virtio_magma_connection_read_notification_channel_resp_t =
1261 virtio_magma_connection_read_notification_channel_resp;
1262#[repr(C, packed)]
1263#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1264pub struct virtio_magma_buffer_clean_cache_ctrl {
1265 pub hdr: virtio_magma_ctrl_hdr_t,
1266 pub buffer: u64,
1267 pub offset: u64,
1268 pub size: u64,
1269 pub operation: u64,
1270}
1271pub type virtio_magma_buffer_clean_cache_ctrl_t = virtio_magma_buffer_clean_cache_ctrl;
1272#[repr(C, packed)]
1273#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1274pub struct virtio_magma_buffer_clean_cache_resp {
1275 pub hdr: virtio_magma_ctrl_hdr_t,
1276 pub result_return: u64,
1277}
1278pub type virtio_magma_buffer_clean_cache_resp_t = virtio_magma_buffer_clean_cache_resp;
1279#[repr(C, packed)]
1280#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1281pub struct virtio_magma_buffer_set_cache_policy_ctrl {
1282 pub hdr: virtio_magma_ctrl_hdr_t,
1283 pub buffer: u64,
1284 pub policy: u64,
1285}
1286pub type virtio_magma_buffer_set_cache_policy_ctrl_t = virtio_magma_buffer_set_cache_policy_ctrl;
1287#[repr(C, packed)]
1288#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1289pub struct virtio_magma_buffer_set_cache_policy_resp {
1290 pub hdr: virtio_magma_ctrl_hdr_t,
1291 pub result_return: u64,
1292}
1293pub type virtio_magma_buffer_set_cache_policy_resp_t = virtio_magma_buffer_set_cache_policy_resp;
1294#[repr(C, packed)]
1295#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1296pub struct virtio_magma_buffer_get_cache_policy_ctrl {
1297 pub hdr: virtio_magma_ctrl_hdr_t,
1298 pub buffer: u64,
1299}
1300pub type virtio_magma_buffer_get_cache_policy_ctrl_t = virtio_magma_buffer_get_cache_policy_ctrl;
1301#[repr(C, packed)]
1302#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1303pub struct virtio_magma_buffer_get_cache_policy_resp {
1304 pub hdr: virtio_magma_ctrl_hdr_t,
1305 pub cache_policy_out: u64,
1306 pub result_return: u64,
1307}
1308pub type virtio_magma_buffer_get_cache_policy_resp_t = virtio_magma_buffer_get_cache_policy_resp;
1309#[repr(C, packed)]
1310#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1311pub struct virtio_magma_buffer_set_name_ctrl {
1312 pub hdr: virtio_magma_ctrl_hdr_t,
1313 pub buffer: u64,
1314 pub name: u64,
1315}
1316pub type virtio_magma_buffer_set_name_ctrl_t = virtio_magma_buffer_set_name_ctrl;
1317#[repr(C, packed)]
1318#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1319pub struct virtio_magma_buffer_set_name_resp {
1320 pub hdr: virtio_magma_ctrl_hdr_t,
1321 pub result_return: u64,
1322}
1323pub type virtio_magma_buffer_set_name_resp_t = virtio_magma_buffer_set_name_resp;
1324#[repr(C, packed)]
1325#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1326pub struct virtio_magma_buffer_get_info_ctrl {
1327 pub hdr: virtio_magma_ctrl_hdr_t,
1328 pub buffer: u64,
1329 pub info_out: u64,
1330}
1331pub type virtio_magma_buffer_get_info_ctrl_t = virtio_magma_buffer_get_info_ctrl;
1332#[repr(C, packed)]
1333#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1334pub struct virtio_magma_buffer_get_info_resp {
1335 pub hdr: virtio_magma_ctrl_hdr_t,
1336 pub result_return: u64,
1337}
1338pub type virtio_magma_buffer_get_info_resp_t = virtio_magma_buffer_get_info_resp;
1339#[repr(C, packed)]
1340#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1341pub struct virtio_magma_buffer_get_handle_ctrl {
1342 pub hdr: virtio_magma_ctrl_hdr_t,
1343 pub buffer: u64,
1344}
1345pub type virtio_magma_buffer_get_handle_ctrl_t = virtio_magma_buffer_get_handle_ctrl;
1346#[repr(C, packed)]
1347#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1348pub struct virtio_magma_buffer_get_handle_resp {
1349 pub hdr: virtio_magma_ctrl_hdr_t,
1350 pub handle_out: u64,
1351 pub result_return: u64,
1352}
1353pub type virtio_magma_buffer_get_handle_resp_t = virtio_magma_buffer_get_handle_resp;
1354#[repr(C, packed)]
1355#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1356pub struct virtio_magma_buffer_export_ctrl {
1357 pub hdr: virtio_magma_ctrl_hdr_t,
1358 pub buffer: u64,
1359}
1360pub type virtio_magma_buffer_export_ctrl_t = virtio_magma_buffer_export_ctrl;
1361#[repr(C, packed)]
1362#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1363pub struct virtio_magma_buffer_export_resp {
1364 pub hdr: virtio_magma_ctrl_hdr_t,
1365 pub buffer_handle_out: u64,
1366 pub result_return: u64,
1367}
1368pub type virtio_magma_buffer_export_resp_t = virtio_magma_buffer_export_resp;
1369#[repr(C, packed)]
1370#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1371pub struct virtio_magma_semaphore_signal_ctrl {
1372 pub hdr: virtio_magma_ctrl_hdr_t,
1373 pub semaphore: u64,
1374}
1375pub type virtio_magma_semaphore_signal_ctrl_t = virtio_magma_semaphore_signal_ctrl;
1376#[repr(C, packed)]
1377#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1378pub struct virtio_magma_semaphore_signal_resp {
1379 pub hdr: virtio_magma_ctrl_hdr_t,
1380}
1381pub type virtio_magma_semaphore_signal_resp_t = virtio_magma_semaphore_signal_resp;
1382#[repr(C, packed)]
1383#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1384pub struct virtio_magma_semaphore_reset_ctrl {
1385 pub hdr: virtio_magma_ctrl_hdr_t,
1386 pub semaphore: u64,
1387}
1388pub type virtio_magma_semaphore_reset_ctrl_t = virtio_magma_semaphore_reset_ctrl;
1389#[repr(C, packed)]
1390#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1391pub struct virtio_magma_semaphore_reset_resp {
1392 pub hdr: virtio_magma_ctrl_hdr_t,
1393}
1394pub type virtio_magma_semaphore_reset_resp_t = virtio_magma_semaphore_reset_resp;
1395#[repr(C, packed)]
1396#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1397pub struct virtio_magma_semaphore_export_ctrl {
1398 pub hdr: virtio_magma_ctrl_hdr_t,
1399 pub semaphore: u64,
1400}
1401pub type virtio_magma_semaphore_export_ctrl_t = virtio_magma_semaphore_export_ctrl;
1402#[repr(C, packed)]
1403#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1404pub struct virtio_magma_semaphore_export_resp {
1405 pub hdr: virtio_magma_ctrl_hdr_t,
1406 pub semaphore_handle_out: u64,
1407 pub result_return: u64,
1408}
1409pub type virtio_magma_semaphore_export_resp_t = virtio_magma_semaphore_export_resp;
1410#[repr(C, packed)]
1411#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1412pub struct virtio_magma_poll_ctrl {
1413 pub hdr: virtio_magma_ctrl_hdr_t,
1414 pub items: u64,
1415 pub count: u32,
1416 pub timeout_ns: u64,
1417}
1418pub type virtio_magma_poll_ctrl_t = virtio_magma_poll_ctrl;
1419#[repr(C, packed)]
1420#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1421pub struct virtio_magma_poll_resp {
1422 pub hdr: virtio_magma_ctrl_hdr_t,
1423 pub result_return: u64,
1424}
1425pub type virtio_magma_poll_resp_t = virtio_magma_poll_resp;
1426#[repr(C, packed)]
1427#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1428pub struct virtio_magma_initialize_tracing_ctrl {
1429 pub hdr: virtio_magma_ctrl_hdr_t,
1430 pub channel: u32,
1431}
1432pub type virtio_magma_initialize_tracing_ctrl_t = virtio_magma_initialize_tracing_ctrl;
1433#[repr(C, packed)]
1434#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1435pub struct virtio_magma_initialize_tracing_resp {
1436 pub hdr: virtio_magma_ctrl_hdr_t,
1437 pub result_return: u64,
1438}
1439pub type virtio_magma_initialize_tracing_resp_t = virtio_magma_initialize_tracing_resp;
1440#[repr(C, packed)]
1441#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1442pub struct virtio_magma_initialize_logging_ctrl {
1443 pub hdr: virtio_magma_ctrl_hdr_t,
1444 pub channel: u32,
1445}
1446pub type virtio_magma_initialize_logging_ctrl_t = virtio_magma_initialize_logging_ctrl;
1447#[repr(C, packed)]
1448#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1449pub struct virtio_magma_initialize_logging_resp {
1450 pub hdr: virtio_magma_ctrl_hdr_t,
1451 pub result_return: u64,
1452}
1453pub type virtio_magma_initialize_logging_resp_t = virtio_magma_initialize_logging_resp;
1454#[repr(C, packed)]
1455#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1456pub struct virtio_magma_connection_enable_performance_counter_access_ctrl {
1457 pub hdr: virtio_magma_ctrl_hdr_t,
1458 pub connection: u64,
1459 pub channel: u32,
1460}
1461pub type virtio_magma_connection_enable_performance_counter_access_ctrl_t =
1462 virtio_magma_connection_enable_performance_counter_access_ctrl;
1463#[repr(C, packed)]
1464#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1465pub struct virtio_magma_connection_enable_performance_counter_access_resp {
1466 pub hdr: virtio_magma_ctrl_hdr_t,
1467 pub result_return: u64,
1468}
1469pub type virtio_magma_connection_enable_performance_counter_access_resp_t =
1470 virtio_magma_connection_enable_performance_counter_access_resp;
1471#[repr(C, packed)]
1472#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1473pub struct virtio_magma_connection_enable_performance_counters_ctrl {
1474 pub hdr: virtio_magma_ctrl_hdr_t,
1475 pub connection: u64,
1476 pub counters: u64,
1477 pub counters_count: u64,
1478}
1479pub type virtio_magma_connection_enable_performance_counters_ctrl_t =
1480 virtio_magma_connection_enable_performance_counters_ctrl;
1481#[repr(C, packed)]
1482#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1483pub struct virtio_magma_connection_enable_performance_counters_resp {
1484 pub hdr: virtio_magma_ctrl_hdr_t,
1485 pub result_return: u64,
1486}
1487pub type virtio_magma_connection_enable_performance_counters_resp_t =
1488 virtio_magma_connection_enable_performance_counters_resp;
1489#[repr(C, packed)]
1490#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1491pub struct virtio_magma_connection_create_performance_counter_buffer_pool_ctrl {
1492 pub hdr: virtio_magma_ctrl_hdr_t,
1493 pub connection: u64,
1494}
1495pub type virtio_magma_connection_create_performance_counter_buffer_pool_ctrl_t =
1496 virtio_magma_connection_create_performance_counter_buffer_pool_ctrl;
1497#[repr(C, packed)]
1498#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1499pub struct virtio_magma_connection_create_performance_counter_buffer_pool_resp {
1500 pub hdr: virtio_magma_ctrl_hdr_t,
1501 pub pool_id_out: u64,
1502 pub notification_handle_out: u64,
1503 pub result_return: u64,
1504}
1505pub type virtio_magma_connection_create_performance_counter_buffer_pool_resp_t =
1506 virtio_magma_connection_create_performance_counter_buffer_pool_resp;
1507#[repr(C, packed)]
1508#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1509pub struct virtio_magma_connection_release_performance_counter_buffer_pool_ctrl {
1510 pub hdr: virtio_magma_ctrl_hdr_t,
1511 pub connection: u64,
1512 pub pool_id: u64,
1513}
1514pub type virtio_magma_connection_release_performance_counter_buffer_pool_ctrl_t =
1515 virtio_magma_connection_release_performance_counter_buffer_pool_ctrl;
1516#[repr(C, packed)]
1517#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1518pub struct virtio_magma_connection_release_performance_counter_buffer_pool_resp {
1519 pub hdr: virtio_magma_ctrl_hdr_t,
1520 pub result_return: u64,
1521}
1522pub type virtio_magma_connection_release_performance_counter_buffer_pool_resp_t =
1523 virtio_magma_connection_release_performance_counter_buffer_pool_resp;
1524#[repr(C, packed)]
1525#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1526pub struct virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl {
1527 pub hdr: virtio_magma_ctrl_hdr_t,
1528 pub connection: u64,
1529 pub pool_id: u64,
1530 pub offsets: u64,
1531 pub offsets_count: u64,
1532}
1533pub type virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl_t =
1534 virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl;
1535#[repr(C, packed)]
1536#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1537pub struct virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp {
1538 pub hdr: virtio_magma_ctrl_hdr_t,
1539 pub result_return: u64,
1540}
1541pub type virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp_t =
1542 virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp;
1543#[repr(C, packed)]
1544#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1545pub struct virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl {
1546 pub hdr: virtio_magma_ctrl_hdr_t,
1547 pub connection: u64,
1548 pub pool_id: u64,
1549 pub buffer: u64,
1550}
1551pub type virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl_t =
1552 virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl;
1553#[repr(C, packed)]
1554#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1555pub struct virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp {
1556 pub hdr: virtio_magma_ctrl_hdr_t,
1557 pub result_return: u64,
1558}
1559pub type virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp_t =
1560 virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp;
1561#[repr(C, packed)]
1562#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1563pub struct virtio_magma_connection_dump_performance_counters_ctrl {
1564 pub hdr: virtio_magma_ctrl_hdr_t,
1565 pub connection: u64,
1566 pub pool_id: u64,
1567 pub trigger_id: u32,
1568}
1569pub type virtio_magma_connection_dump_performance_counters_ctrl_t =
1570 virtio_magma_connection_dump_performance_counters_ctrl;
1571#[repr(C, packed)]
1572#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1573pub struct virtio_magma_connection_dump_performance_counters_resp {
1574 pub hdr: virtio_magma_ctrl_hdr_t,
1575 pub result_return: u64,
1576}
1577pub type virtio_magma_connection_dump_performance_counters_resp_t =
1578 virtio_magma_connection_dump_performance_counters_resp;
1579#[repr(C, packed)]
1580#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1581pub struct virtio_magma_connection_clear_performance_counters_ctrl {
1582 pub hdr: virtio_magma_ctrl_hdr_t,
1583 pub connection: u64,
1584 pub counters: u64,
1585 pub counters_count: u64,
1586}
1587pub type virtio_magma_connection_clear_performance_counters_ctrl_t =
1588 virtio_magma_connection_clear_performance_counters_ctrl;
1589#[repr(C, packed)]
1590#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1591pub struct virtio_magma_connection_clear_performance_counters_resp {
1592 pub hdr: virtio_magma_ctrl_hdr_t,
1593 pub result_return: u64,
1594}
1595pub type virtio_magma_connection_clear_performance_counters_resp_t =
1596 virtio_magma_connection_clear_performance_counters_resp;
1597#[repr(C, packed)]
1598#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1599pub struct virtio_magma_connection_read_performance_counter_completion_ctrl {
1600 pub hdr: virtio_magma_ctrl_hdr_t,
1601 pub connection: u64,
1602 pub pool_id: u64,
1603}
1604pub type virtio_magma_connection_read_performance_counter_completion_ctrl_t =
1605 virtio_magma_connection_read_performance_counter_completion_ctrl;
1606#[repr(C, packed)]
1607#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1608pub struct virtio_magma_connection_read_performance_counter_completion_resp {
1609 pub hdr: virtio_magma_ctrl_hdr_t,
1610 pub trigger_id_out: u64,
1611 pub buffer_id_out: u64,
1612 pub buffer_offset_out: u64,
1613 pub time_out: u64,
1614 pub result_flags_out: u64,
1615 pub result_return: u64,
1616}
1617pub type virtio_magma_connection_read_performance_counter_completion_resp_t =
1618 virtio_magma_connection_read_performance_counter_completion_resp;
1619#[repr(C, packed)]
1620#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1621pub struct virtio_magma_virt_connection_create_image_ctrl {
1622 pub hdr: virtio_magma_ctrl_hdr_t,
1623 pub connection: u64,
1624 pub create_info: u64,
1625}
1626pub type virtio_magma_virt_connection_create_image_ctrl_t =
1627 virtio_magma_virt_connection_create_image_ctrl;
1628#[repr(C, packed)]
1629#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1630pub struct virtio_magma_virt_connection_create_image_resp {
1631 pub hdr: virtio_magma_ctrl_hdr_t,
1632 pub size_out: u64,
1633 pub image_out: u64,
1634 pub buffer_id_out: u64,
1635 pub result_return: u64,
1636}
1637pub type virtio_magma_virt_connection_create_image_resp_t =
1638 virtio_magma_virt_connection_create_image_resp;
1639#[repr(C, packed)]
1640#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1641pub struct virtio_magma_virt_connection_get_image_info_ctrl {
1642 pub hdr: virtio_magma_ctrl_hdr_t,
1643 pub connection: u64,
1644 pub image: u64,
1645 pub image_info_out: u64,
1646}
1647pub type virtio_magma_virt_connection_get_image_info_ctrl_t =
1648 virtio_magma_virt_connection_get_image_info_ctrl;
1649#[repr(C, packed)]
1650#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1651pub struct virtio_magma_virt_connection_get_image_info_resp {
1652 pub hdr: virtio_magma_ctrl_hdr_t,
1653 pub result_return: u64,
1654}
1655pub type virtio_magma_virt_connection_get_image_info_resp_t =
1656 virtio_magma_virt_connection_get_image_info_resp;
1657#[repr(C, packed)]
1658#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1659pub struct virtio_magma_connection_create_context2_ctrl {
1660 pub hdr: virtio_magma_ctrl_hdr_t,
1661 pub connection: u64,
1662 pub priority: u64,
1663}
1664pub type virtio_magma_connection_create_context2_ctrl_t =
1665 virtio_magma_connection_create_context2_ctrl;
1666#[repr(C, packed)]
1667#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1668pub struct virtio_magma_connection_create_context2_resp {
1669 pub hdr: virtio_magma_ctrl_hdr_t,
1670 pub context_id_out: u64,
1671 pub result_return: u64,
1672}
1673pub type virtio_magma_connection_create_context2_resp_t =
1674 virtio_magma_connection_create_context2_resp;
1675#[repr(C, packed)]
1676#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1677pub struct virtio_magma_internal_release_handle_ctrl {
1678 pub hdr: virtio_magma_ctrl_hdr_t,
1679 pub handle: u32,
1680}
1681pub type virtio_magma_internal_release_handle_ctrl_t = virtio_magma_internal_release_handle_ctrl;
1682#[repr(C, packed)]
1683#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1684pub struct virtio_magma_internal_release_handle_resp {
1685 pub hdr: virtio_magma_ctrl_hdr_t,
1686 pub result_return: u64,
1687}
1688pub type virtio_magma_internal_release_handle_resp_t = virtio_magma_internal_release_handle_resp;
1689#[repr(C, packed)]
1690#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1691pub struct virtio_magma_internal_map_ctrl {
1692 pub hdr: virtio_magma_ctrl_hdr_t,
1693 pub buffer: u32,
1694 pub length: u64,
1695}
1696pub type virtio_magma_internal_map_ctrl_t = virtio_magma_internal_map_ctrl;
1697#[repr(C, packed)]
1698#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1699pub struct virtio_magma_internal_map_resp {
1700 pub hdr: virtio_magma_ctrl_hdr_t,
1701 pub address_out: u64,
1702 pub result_return: u64,
1703}
1704pub type virtio_magma_internal_map_resp_t = virtio_magma_internal_map_resp;
1705#[repr(C, packed)]
1706#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1707pub struct virtio_magma_internal_unmap_ctrl {
1708 pub hdr: virtio_magma_ctrl_hdr_t,
1709 pub buffer: u32,
1710 pub address: u64,
1711}
1712pub type virtio_magma_internal_unmap_ctrl_t = virtio_magma_internal_unmap_ctrl;
1713#[repr(C, packed)]
1714#[derive(Debug, Default, Copy, Clone, IntoBytes, FromBytes, Immutable)]
1715pub struct virtio_magma_internal_unmap_resp {
1716 pub hdr: virtio_magma_ctrl_hdr_t,
1717 pub result_return: u64,
1718}
1719pub type virtio_magma_internal_unmap_resp_t = virtio_magma_internal_unmap_resp;