1 /* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6 #ifndef _UAPI_LINUX_VSOC_SHM_H 7 #define _UAPI_LINUX_VSOC_SHM_H 8 #include <linux/types.h> 9 struct fd_scoped_permission { 10 __u32 begin_offset; 11 __u32 end_offset; 12 __u32 owner_offset; 13 __u32 owned_value; 14 }; 15 #define VSOC_REGION_FREE ((__u32)0) 16 struct fd_scoped_permission_arg { 17 struct fd_scoped_permission perm; 18 __s32 managed_region_fd; 19 }; 20 #define VSOC_NODE_FREE ((__u32)0) 21 struct vsoc_signal_table_layout { 22 23 __u32 num_nodes_lg2; 24 25 __u32 futex_uaddr_table_offset; 26 27 __u32 interrupt_signalled_offset; 28 }; 29 #define VSOC_REGION_WHOLE ((__s32)0) 30 #define VSOC_DEVICE_NAME_SZ 16 31 struct vsoc_device_region { 32 __u16 current_version; 33 __u16 min_compatible_version; 34 __u32 region_begin_offset; 35 __u32 region_end_offset; 36 __u32 offset_of_region_data; 37 struct vsoc_signal_table_layout guest_to_host_signal_table; 38 struct vsoc_signal_table_layout host_to_guest_signal_table; 39 40 char device_name[VSOC_DEVICE_NAME_SZ]; 41 42 __u32 managed_by; 43 }; 44 struct vsoc_shm_layout_descriptor { 45 __u16 major_version; 46 __u16 minor_version; 47 48 __u32 size; 49 50 __u32 region_count; 51 52 __u32 vsoc_region_desc_offset; 53 }; 54 #define CURRENT_VSOC_LAYOUT_MAJOR_VERSION 2 55 #define CURRENT_VSOC_LAYOUT_MINOR_VERSION 0 56 #define VSOC_CREATE_FD_SCOPED_PERMISSION \ 57 _IOW(0xF5, 0, struct fd_scoped_permission) 58 #define VSOC_GET_FD_SCOPED_PERMISSION _IOR(0xF5, 1, struct fd_scoped_permission) 59 #define VSOC_MAYBE_SEND_INTERRUPT_TO_HOST _IO(0xF5, 2) 60 #define VSOC_WAIT_FOR_INCOMING_INTERRUPT _IO(0xF5, 3) 61 #define VSOC_DESCRIBE_REGION _IOR(0xF5, 4, struct vsoc_device_region) 62 #define VSOC_SELF_INTERRUPT _IO(0xF5, 5) 63 #define VSOC_SEND_INTERRUPT_TO_HOST _IO(0xF5, 6) 64 enum wait_types { 65 VSOC_WAIT_UNDEFINED = 0, 66 VSOC_WAIT_IF_EQUAL = 1, 67 VSOC_WAIT_IF_EQUAL_TIMEOUT = 2 68 }; 69 struct vsoc_cond_wait { 70 71 __u32 offset; 72 73 __u32 value; 74 75 __u64 wake_time_sec; 76 77 __u32 wake_time_nsec; 78 79 __u32 wait_type; 80 81 __u32 wakes; 82 83 __u32 reserved_1; 84 }; 85 #define VSOC_COND_WAIT _IOWR(0xF5, 7, struct vsoc_cond_wait) 86 #define VSOC_COND_WAKE _IO(0xF5, 8) 87 #endif 88