Skip to content

Commit ce63b2c

Browse files
Oleksandr Andrushchenkodtor
authored andcommitted
xen: Sync up with the canonical protocol definitions in Xen
This is the sync up with the canonical definitions of the input, sound and display protocols in Xen. Changes to kbdif: 1. Add missing string constants for {feature|request}-raw-pointer to align with the rest of the interface file. 2. Add new XenStore feature fields, so it is possible to individually control set of exposed virtual devices for each guest OS: - set feature-disable-keyboard to 1 if no keyboard device needs to be created - set feature-disable-pointer to 1 if no pointer device needs to be created 3. Move multi-touch device parameters to backend nodes: these are described as a part of frontend's XenBus configuration nodes while they belong to backend's configuration. Fix this by moving the parameters to the proper section. Unique-id field: 1. Add unique-id XenBus entry for virtual input and display. 2. Change type of unique-id field to string for sndif to align with display and input protocols. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 29dcea8 commit ce63b2c

3 files changed

Lines changed: 71 additions & 25 deletions

File tree

‎include/xen/interface/io/displif.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@
189189
*
190190
*----------------------------- Connector settings ----------------------------
191191
*
192+
* unique-id
193+
* Values: <string>
194+
*
195+
* After device instance initialization each connector is assigned a
196+
* unique ID, so it can be identified by the backend by this ID.
197+
* This can be UUID or such.
198+
*
192199
* resolution
193200
* Values: <width, uint32_t>x<height, uint32_t>
194201
*
@@ -368,6 +375,7 @@
368375
#define XENDISPL_FIELD_EVT_CHANNEL "evt-event-channel"
369376
#define XENDISPL_FIELD_RESOLUTION "resolution"
370377
#define XENDISPL_FIELD_BE_ALLOC "be-alloc"
378+
#define XENDISPL_FIELD_UNIQUE_ID "unique-id"
371379

372380
/*
373381
******************************************************************************

‎include/xen/interface/io/kbdif.h‎

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@
5151
* corresponding entries in XenStore and puts 1 as the value of the entry.
5252
* If a feature is not supported then 0 must be set or feature entry omitted.
5353
*
54+
* feature-disable-keyboard
55+
* Values: <uint>
56+
*
57+
* If there is no need to expose a virtual keyboard device by the
58+
* frontend then this must be set to 1.
59+
*
60+
* feature-disable-pointer
61+
* Values: <uint>
62+
*
63+
* If there is no need to expose a virtual pointer device by the
64+
* frontend then this must be set to 1.
65+
*
5466
* feature-abs-pointer
5567
* Values: <uint>
5668
*
@@ -63,6 +75,22 @@
6375
* Backends, which support reporting of multi-touch events
6476
* should set this to 1.
6577
*
78+
* feature-raw-pointer
79+
* Values: <uint>
80+
*
81+
* Backends, which support reporting raw (unscaled) absolute coordinates
82+
* for pointer devices should set this to 1. Raw (unscaled) values have
83+
* a range of [0, 0x7fff].
84+
*
85+
*----------------------- Device Instance Parameters ------------------------
86+
*
87+
* unique-id
88+
* Values: <string>
89+
*
90+
* After device instance initialization it is assigned a unique ID,
91+
* so every instance of the frontend can be identified by the backend
92+
* by this ID. This can be UUID or such.
93+
*
6694
*------------------------- Pointer Device Parameters ------------------------
6795
*
6896
* width
@@ -77,6 +105,25 @@
77105
* Maximum Y coordinate (height) to be used by the frontend
78106
* while reporting input events, pixels, [0; UINT32_MAX].
79107
*
108+
*----------------------- Multi-touch Device Parameters ----------------------
109+
*
110+
* multi-touch-num-contacts
111+
* Values: <uint>
112+
*
113+
* Number of simultaneous touches reported.
114+
*
115+
* multi-touch-width
116+
* Values: <uint>
117+
*
118+
* Width of the touch area to be used by the frontend
119+
* while reporting input events, pixels, [0; UINT32_MAX].
120+
*
121+
* multi-touch-height
122+
* Values: <uint>
123+
*
124+
* Height of the touch area to be used by the frontend
125+
* while reporting input events, pixels, [0; UINT32_MAX].
126+
*
80127
*****************************************************************************
81128
* Frontend XenBus Nodes
82129
*****************************************************************************
@@ -98,6 +145,13 @@
98145
*
99146
* Request backend to report multi-touch events.
100147
*
148+
* request-raw-pointer
149+
* Values: <uint>
150+
*
151+
* Request backend to report raw unscaled absolute pointer coordinates.
152+
* This option is only valid if request-abs-pointer is also set.
153+
* Raw unscaled coordinates have the range [0, 0x7fff]
154+
*
101155
*----------------------- Request Transport Parameters -----------------------
102156
*
103157
* event-channel
@@ -117,25 +171,6 @@
117171
*
118172
* OBSOLETE, not recommended for use.
119173
* PFN of the shared page.
120-
*
121-
*----------------------- Multi-touch Device Parameters -----------------------
122-
*
123-
* multi-touch-num-contacts
124-
* Values: <uint>
125-
*
126-
* Number of simultaneous touches reported.
127-
*
128-
* multi-touch-width
129-
* Values: <uint>
130-
*
131-
* Width of the touch area to be used by the frontend
132-
* while reporting input events, pixels, [0; UINT32_MAX].
133-
*
134-
* multi-touch-height
135-
* Values: <uint>
136-
*
137-
* Height of the touch area to be used by the frontend
138-
* while reporting input events, pixels, [0; UINT32_MAX].
139174
*/
140175

141176
/*
@@ -163,9 +198,13 @@
163198

164199
#define XENKBD_DRIVER_NAME "vkbd"
165200

201+
#define XENKBD_FIELD_FEAT_DSBL_KEYBRD "feature-disable-keyboard"
202+
#define XENKBD_FIELD_FEAT_DSBL_POINTER "feature-disable-pointer"
166203
#define XENKBD_FIELD_FEAT_ABS_POINTER "feature-abs-pointer"
204+
#define XENKBD_FIELD_FEAT_RAW_POINTER "feature-raw-pointer"
167205
#define XENKBD_FIELD_FEAT_MTOUCH "feature-multi-touch"
168206
#define XENKBD_FIELD_REQ_ABS_POINTER "request-abs-pointer"
207+
#define XENKBD_FIELD_REQ_RAW_POINTER "request-raw-pointer"
169208
#define XENKBD_FIELD_REQ_MTOUCH "request-multi-touch"
170209
#define XENKBD_FIELD_RING_GREF "page-gref"
171210
#define XENKBD_FIELD_EVT_CHANNEL "event-channel"
@@ -174,6 +213,7 @@
174213
#define XENKBD_FIELD_MT_WIDTH "multi-touch-width"
175214
#define XENKBD_FIELD_MT_HEIGHT "multi-touch-height"
176215
#define XENKBD_FIELD_MT_NUM_CONTACTS "multi-touch-num-contacts"
216+
#define XENKBD_FIELD_UNIQUE_ID "unique-id"
177217

178218
/* OBSOLETE, not recommended for use */
179219
#define XENKBD_FIELD_RING_REF "page-ref"

‎include/xen/interface/io/sndif.h‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,11 @@
278278
* defined under the same device.
279279
*
280280
* unique-id
281-
* Values: <uint32_t>
281+
* Values: <string>
282282
*
283-
* After stream initialization it is assigned a unique ID (within the front
284-
* driver), so every stream of the frontend can be identified by the
285-
* backend by this ID. This is not equal to stream-idx as the later is
286-
* zero based within the device, but this index is contigous within the
287-
* driver.
283+
* After stream initialization it is assigned a unique ID, so every
284+
* stream of the frontend can be identified by the backend by this ID.
285+
* This can be UUID or such.
288286
*
289287
*-------------------- Stream Request Transport Parameters --------------------
290288
*

0 commit comments

Comments
 (0)