[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] xenconsole: Add connected flag


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 7 Aug 2025 17:58:15 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LY54khLp+kjz5rHvyNQ6+xUysKQi2R8LFJ3RRKANeeA=; b=a5s51g5XIJqL4hNEDeRmOK11iQfIGDMCEJBq1clQzRCyw3CQatpphQ1dBXuLF+rmmtshBV9v7e7FJ47Lgd/+Ydy5R/LaveEgqhRkA6OrhE7Rj8YhhM3/AxHLw56Fv/FLekQ4EKamWJDVzV32zxXzSbPu8rS/3l3opQJ747X7+eEMEL3rbkHLoswU4PUi2ksndmo/3gNT+D9ZnNtNpkQxpjERNp1vQ1ftsYzgEqBcgdr3SL3zwmm0nAnfMlC82GvxxsVOYya4bgtxUujOUnYg0rBpvHAAha52lTrgu2mwpnZpbq5Py7QMSpJhN1eneDoneZhll9oNV1lsORVmQcRgKA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VlyiORexYDgSRd38Oygbwxn1WRI0MkNKlvfszzqb7ga39hGeqeTdMS4olrb1XPj1pNtDYjB3g1C0BuuBwFoHFUxybSiA5ECmKKa5ig6lFONZpW70FyiiUoCmS4b71ak5XecrCSt8TU9jbu+UNaIwF1DcP/waJK9VCUsWQtqFfPFrkeH8xOr3BxwGRPmTV4Ux6nBWw0D+hq7dxFpEv+YU4HCxWjfcjPPt5frn/UQJ/8WgbQMBg9BjVJ1cHqqy1y5R05uvmsI5dZVgzmA8KUq6yh/Kh9YslyvJHbPNrSP0mu49MWKRWXEeIz92EnHXdFMDim6nZwdhd2B4WHd69qAd3g==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 07 Aug 2025 21:58:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-08-07 05:19, Jan Beulich wrote:
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).

It could become a bit in a multi-flag field, dut the structure has a good bit of space to the end of the page, A named field, "connection", sounds good.

Thanks,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.