History

xen: sync xs_wire.h header with upstream xen

Sync the xs_wire.h header file in Linux with the one in Xen.

Stefano Stabellini committed 4 years ago

Commit 62db0fa1 parent 1591a651 file · +33 −4Browse files

Showing the changes to include (1 of 1 file). Show all

Unified · Split

include/xen/interface/io/xs_wire.h+33−4
@@ -10,7 +10,8 @@ · 9 unmodified lines
10 10
11enum xsd_sockmsg_type11enum xsd_sockmsg_type
12{12{
13 XS_DEBUG,13 XS_CONTROL,
14#define XS_DEBUG XS_CONTROL
14 XS_DIRECTORY,15 XS_DIRECTORY,
15 XS_READ,16 XS_READ,
16 XS_GET_PERMS,17 XS_GET_PERMS,
@@ -30,8 +31,13 @@ enum xsd_sockmsg_type · 13 unmodified lines
30 XS_IS_DOMAIN_INTRODUCED,31 XS_IS_DOMAIN_INTRODUCED,
31 XS_RESUME,32 XS_RESUME,
32 XS_SET_TARGET,33 XS_SET_TARGET,
33 XS_RESTRICT,34 /* XS_RESTRICT has been removed */
34 XS_RESET_WATCHES,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 */
35};41};
36 42
37#define XS_WRITE_NONE "NONE"43#define XS_WRITE_NONE "NONE"
@@ -59,7 +65,8 @@ static struct xsd_errors xsd_errors[] __attribute__((unused)) = { · 21 unmodified lines
59 XSD_ERROR(EROFS),65 XSD_ERROR(EROFS),
60 XSD_ERROR(EBUSY),66 XSD_ERROR(EBUSY),
61 XSD_ERROR(EAGAIN),67 XSD_ERROR(EAGAIN),
62 XSD_ERROR(EISCONN)68 XSD_ERROR(EISCONN),
69 XSD_ERROR(E2BIG)
63};70};
64 71
65struct xsd_sockmsg72struct xsd_sockmsg
@@ -87,9 +94,31 @@ struct xenstore_domain_interface { · 21 unmodified lines
87 char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */94 char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */
88 XENSTORE_RING_IDX req_cons, req_prod;95 XENSTORE_RING_IDX req_cons, req_prod;
89 XENSTORE_RING_IDX rsp_cons, rsp_prod;96 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;
90};100};
91 101
92/* Violating this is very bad. See docs/misc/xenstore.txt. */102/* Violating this is very bad. See docs/misc/xenstore.txt. */
93#define XENSTORE_PAYLOAD_MAX 4096103#define XENSTORE_PAYLOAD_MAX 4096
94 104
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
95#endif /* _XS_WIRE_H */124#endif /* _XS_WIRE_H */