Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Oleksandr Andrushchenko and committed by
Dmitry Torokhov
ce63b2c8 29dcea88

+71 -25
+8
include/xen/interface/io/displif.h
··· 189 189 * 190 190 *----------------------------- Connector settings ---------------------------- 191 191 * 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 + * 192 199 * resolution 193 200 * Values: <width, uint32_t>x<height, uint32_t> 194 201 * ··· 375 368 #define XENDISPL_FIELD_EVT_CHANNEL "evt-event-channel" 376 369 #define XENDISPL_FIELD_RESOLUTION "resolution" 377 370 #define XENDISPL_FIELD_BE_ALLOC "be-alloc" 371 + #define XENDISPL_FIELD_UNIQUE_ID "unique-id" 378 372 379 373 /* 380 374 ******************************************************************************
+59 -19
include/xen/interface/io/kbdif.h
··· 51 51 * corresponding entries in XenStore and puts 1 as the value of the entry. 52 52 * If a feature is not supported then 0 must be set or feature entry omitted. 53 53 * 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 + * 54 66 * feature-abs-pointer 55 67 * Values: <uint> 56 68 * ··· 74 62 * 75 63 * Backends, which support reporting of multi-touch events 76 64 * should set this to 1. 65 + * 66 + * feature-raw-pointer 67 + * Values: <uint> 68 + * 69 + * Backends, which support reporting raw (unscaled) absolute coordinates 70 + * for pointer devices should set this to 1. Raw (unscaled) values have 71 + * a range of [0, 0x7fff]. 72 + * 73 + *----------------------- Device Instance Parameters ------------------------ 74 + * 75 + * unique-id 76 + * Values: <string> 77 + * 78 + * After device instance initialization it is assigned a unique ID, 79 + * so every instance of the frontend can be identified by the backend 80 + * by this ID. This can be UUID or such. 77 81 * 78 82 *------------------------- Pointer Device Parameters ------------------------ 79 83 * ··· 103 75 * Values: <uint> 104 76 * 105 77 * Maximum Y coordinate (height) to be used by the frontend 78 + * while reporting input events, pixels, [0; UINT32_MAX]. 79 + * 80 + *----------------------- Multi-touch Device Parameters ---------------------- 81 + * 82 + * multi-touch-num-contacts 83 + * Values: <uint> 84 + * 85 + * Number of simultaneous touches reported. 86 + * 87 + * multi-touch-width 88 + * Values: <uint> 89 + * 90 + * Width of the touch area to be used by the frontend 91 + * while reporting input events, pixels, [0; UINT32_MAX]. 92 + * 93 + * multi-touch-height 94 + * Values: <uint> 95 + * 96 + * Height of the touch area to be used by the frontend 106 97 * while reporting input events, pixels, [0; UINT32_MAX]. 107 98 * 108 99 ***************************************************************************** ··· 145 98 * 146 99 * Request backend to report multi-touch events. 147 100 * 101 + * request-raw-pointer 102 + * Values: <uint> 103 + * 104 + * Request backend to report raw unscaled absolute pointer coordinates. 105 + * This option is only valid if request-abs-pointer is also set. 106 + * Raw unscaled coordinates have the range [0, 0x7fff] 107 + * 148 108 *----------------------- Request Transport Parameters ----------------------- 149 109 * 150 110 * event-channel ··· 171 117 * 172 118 * OBSOLETE, not recommended for use. 173 119 * PFN of the shared page. 174 - * 175 - *----------------------- Multi-touch Device Parameters ----------------------- 176 - * 177 - * multi-touch-num-contacts 178 - * Values: <uint> 179 - * 180 - * Number of simultaneous touches reported. 181 - * 182 - * multi-touch-width 183 - * Values: <uint> 184 - * 185 - * Width of the touch area to be used by the frontend 186 - * while reporting input events, pixels, [0; UINT32_MAX]. 187 - * 188 - * multi-touch-height 189 - * Values: <uint> 190 - * 191 - * Height of the touch area to be used by the frontend 192 - * while reporting input events, pixels, [0; UINT32_MAX]. 193 120 */ 194 121 195 122 /* ··· 198 163 199 164 #define XENKBD_DRIVER_NAME "vkbd" 200 165 166 + #define XENKBD_FIELD_FEAT_DSBL_KEYBRD "feature-disable-keyboard" 167 + #define XENKBD_FIELD_FEAT_DSBL_POINTER "feature-disable-pointer" 201 168 #define XENKBD_FIELD_FEAT_ABS_POINTER "feature-abs-pointer" 169 + #define XENKBD_FIELD_FEAT_RAW_POINTER "feature-raw-pointer" 202 170 #define XENKBD_FIELD_FEAT_MTOUCH "feature-multi-touch" 203 171 #define XENKBD_FIELD_REQ_ABS_POINTER "request-abs-pointer" 172 + #define XENKBD_FIELD_REQ_RAW_POINTER "request-raw-pointer" 204 173 #define XENKBD_FIELD_REQ_MTOUCH "request-multi-touch" 205 174 #define XENKBD_FIELD_RING_GREF "page-gref" 206 175 #define XENKBD_FIELD_EVT_CHANNEL "event-channel" ··· 213 174 #define XENKBD_FIELD_MT_WIDTH "multi-touch-width" 214 175 #define XENKBD_FIELD_MT_HEIGHT "multi-touch-height" 215 176 #define XENKBD_FIELD_MT_NUM_CONTACTS "multi-touch-num-contacts" 177 + #define XENKBD_FIELD_UNIQUE_ID "unique-id" 216 178 217 179 /* OBSOLETE, not recommended for use */ 218 180 #define XENKBD_FIELD_RING_REF "page-ref"
+4 -6
include/xen/interface/io/sndif.h
··· 278 278 * defined under the same device. 279 279 * 280 280 * unique-id 281 - * Values: <uint32_t> 281 + * Values: <string> 282 282 * 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. 288 286 * 289 287 *-------------------- Stream Request Transport Parameters -------------------- 290 288 *