Hi Stefano,

> On 5 May 2022, at 01:23, Stefano Stabellini <sstabell...@kernel.org> wrote:
> 
> From: Stefano Stabellini <stefano.stabell...@xilinx.com>
> 
> Sync the xs_wire.h header file in Linux with the one in Xen.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabell...@xilinx.com>
> ---
> include/xen/interface/io/xs_wire.h | 34 +++++++++++++++++++++++++++---
> 1 file changed, 31 insertions(+), 3 deletions(-)
> 
> diff --git a/include/xen/interface/io/xs_wire.h 
> b/include/xen/interface/io/xs_wire.h
> index d40a44f09b16..04dca77abc45 100644
> --- a/include/xen/interface/io/xs_wire.h
> +++ b/include/xen/interface/io/xs_wire.h
> @@ -10,7 +10,8 @@
> 
> enum xsd_sockmsg_type
> {
> -    XS_DEBUG,
> +    XS_CONTROL,
> +#define XS_DEBUG XS_CONTROL
>     XS_DIRECTORY,
>     XS_READ,
>     XS_GET_PERMS,
> @@ -30,8 +31,13 @@ enum xsd_sockmsg_type
>     XS_IS_DOMAIN_INTRODUCED,
>     XS_RESUME,
>     XS_SET_TARGET,
> -    XS_RESTRICT,
> -    XS_RESET_WATCHES,
> +    /* XS_RESTRICT has been removed */
> +    XS_RESET_WATCHES = XS_SET_TARGET + 2,
> +    XS_DIRECTORY_PART,
> +
> +    XS_TYPE_COUNT,      /* Number of valid types. */
> +
> +    XS_INVALID = 0xffff /* Guaranteed to remain an invalid type */
> };
> 

I’ve checked and seems that here there is this missing?

@@ -59,8 +71,10 @@ static struct xsd_errors xsd_errors[] 
__attribute__((unused)) = {
     XSD_ERROR(EROFS),
     XSD_ERROR(EBUSY),
     XSD_ERROR(EAGAIN),
-    XSD_ERROR(EISCONN)
+    XSD_ERROR(EISCONN),
+    XSD_ERROR(E2BIG)
 };

> #define XS_WRITE_NONE "NONE"
> @@ -87,9 +93,31 @@ struct xenstore_domain_interface {
>     char rsp[XENSTORE_RING_SIZE]; /* Replies and async watch events. */
>     XENSTORE_RING_IDX req_cons, req_prod;
>     XENSTORE_RING_IDX rsp_cons, rsp_prod;
> +    uint32_t server_features; /* Bitmap of features supported by the server 
> */
> +    uint32_t connection;
> +    uint32_t error;
> };
> 
> /* Violating this is very bad.  See docs/misc/xenstore.txt. */
> #define XENSTORE_PAYLOAD_MAX 4096
> 
> +/* Violating these just gets you an error back */
> +#define XENSTORE_ABS_PATH_MAX 3072
> +#define XENSTORE_REL_PATH_MAX 2048
> +
> +/* The ability to reconnect a ring */
> +#define XENSTORE_SERVER_FEATURE_RECONNECTION 1
> +/* The presence of the "error" field in the ring page */
> +#define XENSTORE_SERVER_FEATURE_ERROR        2
> +
> +/* Valid values for the connection field */
> +#define XENSTORE_CONNECTED 0 /* the steady-state */
> +#define XENSTORE_RECONNECT 1 /* guest has initiated a reconnect */
> +
> +/* Valid values for the error field */
> +#define XENSTORE_ERROR_NONE    0 /* No error */
> +#define XENSTORE_ERROR_COMM    1 /* Communication problem */
> +#define XENSTORE_ERROR_RINGIDX 2 /* Invalid ring index */
> +#define XENSTORE_ERROR_PROTO   3 /* Protocol violation (payload too long) */
> +
> #endif /* _XS_WIRE_H */
> -- 
> 2.25.1
> 
> 

Reply via email to