On 07.08.2025 03:56, Jason Andryuk wrote: > --- a/xen/include/public/io/console.h > +++ b/xen/include/public/io/console.h > @@ -19,6 +19,19 @@ struct xencons_interface { > char out[2048]; > XENCONS_RING_IDX in_cons, in_prod; > XENCONS_RING_IDX out_cons, out_prod; > +/* > + * Flag values signaling from backend to frontend whether the console is > + * connected. i.e. Whether it will be serviced and emptied. > + * > + * The flag starts as disconnected. > + */ > +#define XENCONSOLE_DISCONNECTED 1 > +/* > + * The flag is set to connected when the backend connects and the console > + * will be serviced. > + */ > +#define XENCONSOLE_CONNECTED 0 > + uint32_t flag; > };
Even if the field name is singular, there's the possible reading of everything together as the connected state merely taking one bit, with other bits available for future use. IOW I think the field wants giving a less generic name, and perhaps also shrinking to unsigned char (or uint8_t, but char is being used in the structure already anyway). Jan