[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH Hyperlaunch v2] xenconsole: Add connected flag
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Fri, 20 Dec 2024 10:38:24 -0500
- 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=xpOFmIDrrLM3gcmeYZK6B8PRv3c0B1xLvAXUsFbFV/I=; b=FtzbzS7brfjw5BJympC4lukdAvSFUKSV/0usb2/F9wGq9BVMuXUpjveisVyww1xLuPr/ZFILVILgh3T2ZVKOqw73nI/SG+TuU589kXdbZkmx7wz1/7SdwIE+kusvO7e2NaGWbrM/uPmSR2oGF5aQr6SrPViYu34YgOI9iWBfV4cqr8vW0ujIyRgLENmeHKmYkGQEIY6UpvfWd3Zqza5zXzn2nBDEqsXkqQcsbBvKpPoJpzIQDhSBZuwF0+qiErd4A7mwyBdt4T4SwLa3o/pytH3UkKqEwqkq+X+gNQkyQvwKDMQRll6LA7YC2iTXQScGX35HlYx4x4+u3Am9rwlmew==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n78cBcXrDnzcRg/oKgp08JlxHj78HFjtFkLfW2KWZPJJ/+BuY++lGXNcuC4Pn68mzN3xYtKuQJW/YjSz8pYy4IJVcmbvPJ/ZLFUjFTzk8Gx7DmBrqofqPuoEFXmZ5U8yfaO0Nye4f5qf0XA02BJ0NG2qMGHTGhLMyOhH9J+Py20QOI/TmoxlQPCPn8qNPrr5jbufVcJMJg6KgwfgvaQZrzoA+OLx8fi6gPcIGMlhyKFPVagysqYBTnd9z5ZbyUs8+cOK2zCUZUAkaIfQF0BrWheKUYU5PYQ1UDcRvg9a37sBIBjFrmqmiV6TrOnG/sDce4uKRHgI40LTHxIND9lFbQ==
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 20 Dec 2024 15:40:03 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2024-12-20 08:00, Jan Beulich wrote:
On 19.12.2024 23:32, 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 0
+/*
+ * The flag is set to connected when the backend connects and the console
+ * will be serviced.
+ */
+#define XENCONSOLE_CONNECTED 1
+ uint32_t flag;
};
Given no other information, how would a guest know that it can actually
expect the flag to (eventually) become set?
You mean that without some other flag to indicate the presence of this
flag, the guest wouldn't know whether this field should change? Yes,
that is a good point.
Non-hyperlaunch, a new xenconsoled would set the flag ~before the guest
starts. AIUI, there is no explicit synchronization between the
toolstack and xenconsoled that the console is connected before the guest
is unpaused.
Old kernels without checking the flag will just use the console.
A new kernel, with an old xenconsoled, would never see the flag set and
would never use the console.
Thanks,
Jason
|