Skip to content

Commit 62db0fa

Browse files
Stefano Stabellinijgross1
authored andcommitted
xen: sync xs_wire.h header with upstream xen
Sync the xs_wire.h header file in Linux with the one in Xen. Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]>
1 parent 1591a65 commit 62db0fa

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

include/xen/interface/io/xs_wire.h

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
enum xsd_sockmsg_type
1212
{
13-
XS_DEBUG,
13+
XS_CONTROL,
14+
#define XS_DEBUG XS_CONTROL
1415
XS_DIRECTORY,
1516
XS_READ,
1617
XS_GET_PERMS,
@@ -30,8 +31,13 @@ enum xsd_sockmsg_type
3031
XS_IS_DOMAIN_INTRODUCED,
3132
XS_RESUME,
3233
XS_SET_TARGET,
33-
XS_RESTRICT,
34-
XS_RESET_WATCHES,
34+
/* XS_RESTRICT has been removed */
35+
XS_RESET_WATCHES = XS_SET_TARGET + 2,
36+
XS_DIRECTORY_PART,
37+
38+
XS_TYPE_COUNT, /* Number of valid types. */
39+
40+
XS_INVALID = 0xffff /* Guaranteed to remain an invalid type */
3541
};
3642

3743
#define XS_WRITE_NONE "NONE"
@@ -59,7 +65,8 @@ static struct xsd_errors xsd_errors[] __attribute__((unused)) = {
5965
XSD_ERROR(EROFS),
6066
XSD_ERROR(EBUSY),
6167
XSD_ERROR(EAGAIN),
62-
XSD_ERROR(EISCONN)
68+
XSD_ERROR(EISCONN),
69+
XSD_ERROR(E2BIG)
6370
};
6471

6572
struct xsd_sockmsg
@@ -87,9 +94,31 @@ struct xenstore_domain_interface {
8794
char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */
8895
XENSTORE_RING_IDX req_cons, req_prod;
8996
XENSTORE_RING_IDX rsp_cons, rsp_prod;
97+
uint32_t server_features; /* Bitmap of features supported by the server */
98+
uint32_t connection;
99+
uint32_t error;
90100
};
91101

92102
/* Violating this is very bad. See docs/misc/xenstore.txt. */
93103
#define XENSTORE_PAYLOAD_MAX 4096
94104

105+
/* Violating these just gets you an error back */
106+
#define XENSTORE_ABS_PATH_MAX 3072
107+
#define XENSTORE_REL_PATH_MAX 2048
108+
109+
/* The ability to reconnect a ring */
110+
#define XENSTORE_SERVER_FEATURE_RECONNECTION 1
111+
/* The presence of the "error" field in the ring page */
112+
#define XENSTORE_SERVER_FEATURE_ERROR 2
113+
114+
/* Valid values for the connection field */
115+
#define XENSTORE_CONNECTED 0 /* the steady-state */
116+
#define XENSTORE_RECONNECT 1 /* guest has initiated a reconnect */
117+
118+
/* Valid values for the error field */
119+
#define XENSTORE_ERROR_NONE 0 /* No error */
120+
#define XENSTORE_ERROR_COMM 1 /* Communication problem */
121+
#define XENSTORE_ERROR_RINGIDX 2 /* Invalid ring index */
122+
#define XENSTORE_ERROR_PROTO 3 /* Protocol violation (payload too long) */
123+
95124
#endif /* _XS_WIRE_H */

0 commit comments

Comments
 (0)