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