Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: MIT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /* Copyright (C) 2006-2016 Oracle Corporation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) #ifndef __VBOXVIDEO_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #define __VBOXVIDEO_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #define VBOX_VIDEO_MAX_SCREENS 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * The last 4096 bytes of the guest VRAM contains the generic info for all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  * DualView chunks: sizes and offsets of chunks. This is filled by miniport.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  * Last 4096 bytes of each chunk contain chunk specific data: framebuffer info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  * etc. This is used exclusively by the corresponding instance of a display
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * The VRAM layout:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  *   Last 4096 bytes - Adapter information area.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  *   4096 bytes aligned miniport heap (value specified in the config rouded up).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  *   Slack - what left after dividing the VRAM.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  *   4096 bytes aligned framebuffers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  *     last 4096 bytes of each framebuffer is the display information area.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)  * The Virtual Graphics Adapter information in the guest VRAM is stored by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25)  * guest video driver using structures prepended by VBOXVIDEOINFOHDR.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)  * When the guest driver writes dword 0 to the VBE_DISPI_INDEX_VBOX_VIDEO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)  * the host starts to process the info. The first element at the start of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)  * the 4096 bytes region should be normally be a LINK that points to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)  * actual information chain. That way the guest driver can have some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)  * fixed layout of the information memory block and just rewrite
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32)  * the link to point to relevant memory chain.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)  * The processing stops at the END element.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)  * The host can access the memory only when the port IO is processed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)  * All data that will be needed later must be copied from these 4096 bytes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)  * But other VRAM can be used by host until the mode is disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)  * The guest driver writes dword 0xffffffff to the VBE_DISPI_INDEX_VBOX_VIDEO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)  * to disable the mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)  * VBE_DISPI_INDEX_VBOX_VIDEO is used to read the configuration information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)  * from the host and issue commands to the host.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)  * The guest writes the VBE_DISPI_INDEX_VBOX_VIDEO index register, the the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)  * following operations with the VBE data register can be performed:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)  * Operation            Result
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)  * write 16 bit value   NOP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)  * read 16 bit value    count of monitors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)  * write 32 bit value   set the vbox cmd value and the cmd processed by the host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)  * read 32 bit value    result of the last vbox command is returned
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) struct vbva_cmd_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	s16 x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	s16 y;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	u16 w;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	u16 h;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)  * The VBVA ring buffer is suitable for transferring large (< 2GB) amount of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65)  * data. For example big bitmaps which do not fit to the buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)  * Guest starts writing to the buffer by initializing a record entry in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)  * records queue. VBVA_F_RECORD_PARTIAL indicates that the record is being
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)  * written. As data is written to the ring buffer, the guest increases
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)  * free_offset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)  * The host reads the records on flushes and processes all completed records.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)  * When host encounters situation when only a partial record presents and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)  * len_and_flags & ~VBVA_F_RECORD_PARTIAL >= VBVA_RING_BUFFER_SIZE -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)  * VBVA_RING_BUFFER_THRESHOLD, the host fetched all record data and updates
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)  * data_offset. After that on each flush the host continues fetching the data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)  * until the record is completed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) #define VBVA_RING_BUFFER_SIZE        (4194304 - 1024)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) #define VBVA_RING_BUFFER_THRESHOLD   (4096)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) #define VBVA_MAX_RECORDS (64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) #define VBVA_F_MODE_ENABLED         0x00000001u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) #define VBVA_F_MODE_VRDP            0x00000002u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) #define VBVA_F_MODE_VRDP_RESET      0x00000004u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) #define VBVA_F_MODE_VRDP_ORDER_MASK 0x00000008u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) #define VBVA_F_STATE_PROCESSING     0x00010000u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) #define VBVA_F_RECORD_PARTIAL       0x80000000u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) struct vbva_record {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	u32 len_and_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)  * The minimum HGSMI heap size is PAGE_SIZE (4096 bytes) and is a restriction of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)  * the runtime heapsimple API. Use minimum 2 pages here, because the info area
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)  * also may contain other data (for example hgsmi_host_flags structure).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) #define VBVA_ADAPTER_INFORMATION_SIZE 65536
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define VBVA_MIN_BUFFER_SIZE          65536
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) /* The value for port IO to let the adapter to interpret the adapter memory. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) #define VBOX_VIDEO_DISABLE_ADAPTER_MEMORY        0xFFFFFFFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) /* The value for port IO to let the adapter to interpret the adapter memory. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) #define VBOX_VIDEO_INTERPRET_ADAPTER_MEMORY      0x00000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)  * The value for port IO to let the adapter to interpret the display memory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)  * The display number is encoded in low 16 bits.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) #define VBOX_VIDEO_INTERPRET_DISPLAY_MEMORY_BASE 0x00010000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) struct vbva_host_flags {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	u32 host_events;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	u32 supported_orders;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) struct vbva_buffer {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	struct vbva_host_flags host_flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	/* The offset where the data start in the buffer. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	u32 data_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	/* The offset where next data must be placed in the buffer. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	u32 free_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	/* The queue of record descriptions. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	struct vbva_record records[VBVA_MAX_RECORDS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	u32 record_first_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	u32 record_free_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	/* Space to leave free when large partial records are transferred. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	u32 partial_write_tresh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	u32 data_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	/* variable size for the rest of the vbva_buffer area in VRAM. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	u8 data[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #define VBVA_MAX_RECORD_SIZE (128 * 1024 * 1024)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) /* guest->host commands */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define VBVA_QUERY_CONF32			 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) #define VBVA_SET_CONF32				 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) #define VBVA_INFO_VIEW				 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) #define VBVA_INFO_HEAP				 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) #define VBVA_FLUSH				 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #define VBVA_INFO_SCREEN			 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) #define VBVA_ENABLE				 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) #define VBVA_MOUSE_POINTER_SHAPE		 8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) /* informs host about HGSMI caps. see vbva_caps below */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #define VBVA_INFO_CAPS				12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) /* configures scanline, see VBVASCANLINECFG below */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) #define VBVA_SCANLINE_CFG			13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) /* requests scanline info, see VBVASCANLINEINFO below */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) #define VBVA_SCANLINE_INFO			14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) /* inform host about VBVA Command submission */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) #define VBVA_CMDVBVA_SUBMIT			16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) /* inform host about VBVA Command submission */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) #define VBVA_CMDVBVA_FLUSH			17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) /* G->H DMA command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) #define VBVA_CMDVBVA_CTL			18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) /* Query most recent mode hints sent */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) #define VBVA_QUERY_MODE_HINTS			19
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)  * Report the guest virtual desktop position and size for mapping host and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)  * guest pointer positions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) #define VBVA_REPORT_INPUT_MAPPING		20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) /* Report the guest cursor position and query the host position. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) #define VBVA_CURSOR_POSITION			21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) /* host->guest commands */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) #define VBVAHG_EVENT				1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) #define VBVAHG_DISPLAY_CUSTOM			2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) /* vbva_conf32::index */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) #define VBOX_VBVA_CONF32_MONITOR_COUNT		0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) #define VBOX_VBVA_CONF32_HOST_HEAP_SIZE		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)  * Returns VINF_SUCCESS if the host can report mode hints via VBVA.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)  * Set value to VERR_NOT_SUPPORTED before calling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) #define VBOX_VBVA_CONF32_MODE_HINT_REPORTING	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)  * Returns VINF_SUCCESS if the host can report guest cursor enabled status via
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)  * VBVA.  Set value to VERR_NOT_SUPPORTED before calling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) #define VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING	3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)  * Returns the currently available host cursor capabilities.  Available if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)  * VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING returns success.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) #define VBOX_VBVA_CONF32_CURSOR_CAPABILITIES	4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) /* Returns the supported flags in vbva_infoscreen.flags. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) #define VBOX_VBVA_CONF32_SCREEN_FLAGS		5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /* Returns the max size of VBVA record. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) #define VBOX_VBVA_CONF32_MAX_RECORD_SIZE	6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) struct vbva_conf32 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	u32 index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	u32 value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) /* Reserved for historical reasons. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED0   BIT(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)  * Guest cursor capability: can the host show a hardware cursor at the host
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)  * pointer location?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #define VBOX_VBVA_CURSOR_CAPABILITY_HARDWARE    BIT(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) /* Reserved for historical reasons. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED2   BIT(2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) /* Reserved for historical reasons.  Must always be unset. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED3   BIT(3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) /* Reserved for historical reasons. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED4   BIT(4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) /* Reserved for historical reasons. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) #define VBOX_VBVA_CURSOR_CAPABILITY_RESERVED5   BIT(5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) struct vbva_infoview {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	/* Index of the screen, assigned by the guest. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	u32 view_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	/* The screen offset in VRAM, the framebuffer starts here. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	u32 view_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	/* The size of the VRAM memory that can be used for the view. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	u32 view_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	/* The recommended maximum size of the VRAM memory for the screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	u32 max_screen_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) struct vbva_flush {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	u32 reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) /* vbva_infoscreen.flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) #define VBVA_SCREEN_F_NONE			0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) #define VBVA_SCREEN_F_ACTIVE			0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)  * The virtual monitor has been disabled by the guest and should be removed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)  * by the host and ignored for purposes of pointer position calculation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) #define VBVA_SCREEN_F_DISABLED			0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)  * The virtual monitor has been blanked by the guest and should be blacked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)  * out by the host using width, height, etc values from the vbva_infoscreen
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)  * request.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) #define VBVA_SCREEN_F_BLANK			0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)  * The virtual monitor has been blanked by the guest and should be blacked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)  * out by the host using the previous mode values for width. height, etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) #define VBVA_SCREEN_F_BLANK2			0x0008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) struct vbva_infoscreen {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	/* Which view contains the screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	u32 view_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	/* Physical X origin relative to the primary screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	s32 origin_x;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	/* Physical Y origin relative to the primary screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	s32 origin_y;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	/* Offset of visible framebuffer relative to the framebuffer start. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	u32 start_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	/* The scan line size in bytes. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	u32 line_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	/* Width of the screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	u32 width;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	/* Height of the screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 	u32 height;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	/* Color depth. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	u16 bits_per_pixel;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 	/* VBVA_SCREEN_F_* */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 	u16 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) /* vbva_enable.flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) #define VBVA_F_NONE				0x00000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) #define VBVA_F_ENABLE				0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) #define VBVA_F_DISABLE				0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) /* extended VBVA to be used with WDDM */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) #define VBVA_F_EXTENDED				0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) /* vbva offset is absolute VRAM offset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) #define VBVA_F_ABSOFFSET			0x00000008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) struct vbva_enable {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	u32 offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 	s32 result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) struct vbva_enable_ex {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 	struct vbva_enable base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	u32 screen_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) struct vbva_mouse_pointer_shape {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	/* The host result. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	s32 result;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	/* VBOX_MOUSE_POINTER_* bit flags. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	u32 flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 	/* X coordinate of the hot spot. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	u32 hot_X;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	/* Y coordinate of the hot spot. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	u32 hot_y;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	/* Width of the pointer in pixels. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	u32 width;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 	/* Height of the pointer in scanlines. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 	u32 height;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 	/* Pointer data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 	 * The data consists of 1 bpp AND mask followed by 32 bpp XOR (color)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	 * mask.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	 * For pointers without alpha channel the XOR mask pixels are 32 bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 	 * values: (lsb)BGR0(msb). For pointers with alpha channel the XOR mask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 	 * consists of (lsb)BGRA(msb) 32 bit values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 	 * Guest driver must create the AND mask for pointers with alpha chan.,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 	 * so if host does not support alpha, the pointer could be displayed as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 	 * a normal color pointer. The AND mask can be constructed from alpha
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 	 * values. For example alpha value >= 0xf0 means bit 0 in the AND mask.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 	 * The AND mask is 1 bpp bitmap with byte aligned scanlines. Size of AND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) 	 * mask, therefore, is and_len = (width + 7) / 8 * height. The padding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 	 * bits at the end of any scanline are undefined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) 	 * The XOR mask follows the AND mask on the next 4 bytes aligned offset:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	 * u8 *xor = and + (and_len + 3) & ~3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 	 * Bytes in the gap between the AND and the XOR mask are undefined.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	 * XOR mask scanlines have no gap between them and size of XOR mask is:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	 * xor_len = width * 4 * height.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 	 * Preallocate 4 bytes for accessing actual data as p->data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 	u8 data[4];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) /* pointer is visible */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) #define VBOX_MOUSE_POINTER_VISIBLE		0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) /* pointer has alpha channel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) #define VBOX_MOUSE_POINTER_ALPHA		0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) /* pointerData contains new pointer shape */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) #define VBOX_MOUSE_POINTER_SHAPE		0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368)  * The guest driver can handle asynch guest cmd completion by reading the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)  * command offset from io port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) #define VBVACAPS_COMPLETEGCMD_BY_IOREAD		0x00000001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) /* the guest driver can handle video adapter IRQs */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) #define VBVACAPS_IRQ				0x00000002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) /* The guest can read video mode hints sent via VBVA. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) #define VBVACAPS_VIDEO_MODE_HINTS		0x00000004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) /* The guest can switch to a software cursor on demand. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) #define VBVACAPS_DISABLE_CURSOR_INTEGRATION	0x00000008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) /* The guest does not depend on host handling the VBE registers. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) #define VBVACAPS_USE_VBVA_ONLY			0x00000010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) struct vbva_caps {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 	s32 rc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 	u32 caps;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) /* Query the most recent mode hints received from the host. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) struct vbva_query_mode_hints {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) 	/* The maximum number of screens to return hints for. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) 	u16 hints_queried_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) 	/* The size of the mode hint structures directly following this one. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) 	u16 hint_structure_guest_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 	/* Return code for the operation. Initialise to VERR_NOT_SUPPORTED. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 	s32 rc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)  * Structure in which a mode hint is returned. The guest allocates an array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398)  * of these immediately after the vbva_query_mode_hints structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399)  * To accommodate future extensions, the vbva_query_mode_hints structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400)  * specifies the size of the vbva_modehint structures allocated by the guest,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401)  * and the host only fills out structure elements which fit into that size. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)  * host should fill any unused members (e.g. dx, dy) or structure space on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)  * end with ~0. The whole structure can legally be set to ~0 to skip a screen.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) struct vbva_modehint {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 	u32 magic;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) 	u32 cx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) 	u32 cy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 	u32 bpp;		/* Which has never been used... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) 	u32 display;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) 	u32 dx;			/* X offset into the virtual frame-buffer. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) 	u32 dy;			/* Y offset into the virtual frame-buffer. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) 	u32 enabled;		/* Not flags. Add new members for new flags. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) #define VBVAMODEHINT_MAGIC 0x0801add9u
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419)  * Report the rectangle relative to which absolute pointer events should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420)  * expressed. This information remains valid until the next VBVA resize event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421)  * for any screen, at which time it is reset to the bounding rectangle of all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422)  * virtual screens and must be re-set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) struct vbva_report_input_mapping {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) 	s32 x;	/* Upper left X co-ordinate relative to the first screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 	s32 y;	/* Upper left Y co-ordinate relative to the first screen. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 	u32 cx;	/* Rectangle width. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 	u32 cy;	/* Rectangle height. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)  * Report the guest cursor position and query the host one. The host may wish
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433)  * to use the guest information to re-position its own cursor (though this is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)  * currently unlikely).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) struct vbva_cursor_position {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 	u32 report_position;	/* Are we reporting a position? */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) 	u32 x;			/* Guest cursor X position */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 	u32 y;			/* Guest cursor Y position */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) #endif