From patchwork Mon Apr 3 09:44:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 96602 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp18536qgd; Mon, 3 Apr 2017 02:47:09 -0700 (PDT) X-Received: by 10.36.60.82 with SMTP id m79mr9101834ita.107.1491212829337; Mon, 03 Apr 2017 02:47:09 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id f77si14293083iof.203.2017.04.03.02.47.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 02:47:09 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuyXz-0001ZT-FN; Mon, 03 Apr 2017 09:45:15 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuyXy-0001YL-4M for xen-devel@lists.xenproject.org; Mon, 03 Apr 2017 09:45:14 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id E2/18-04817-9A912E85; Mon, 03 Apr 2017 09:45:13 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprPIsWRWlGSWpSXmKPExsXiVRtsrLtC8lG Eway1/Bbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b6VYfYCr7wVGybs5y1gXECdxcjF4eQwAxG iT3zdzKBOCwC85glJk+eygbiSAj0s0r8/9IO5HACOTESLy6/Y4GwqyUuzvnDBGILCWhJHD01m xViVCuTxMa57xi7GDk42ARMJGZ1SIDUiAgoSdxbNRlsA7PAfEaJvT1nWUESwgIJEtvfPQcbxC KgKjFj82cWkF5eAW+JRRNcIHbJSdw818kMEuYU8JG49SoBYq23xKv709gmMAosYGRYxahRnFp Ullqka2isl1SUmZ5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kRGFgMQLCD8cuygEOMkhxM SqK8b+48jBDiS8pPqcxILM6ILyrNSS0+xCjDwaEkwZsr8ShCSLAoNT21Ii0zBxjiMGkJDh4lE d5JIGne4oLE3OLMdIjUKUZdjg/9h98wCbHk5eelSonz7gcpEgApyijNgxsBi7dLjLJSwryMQE cJ8RSkFuVmlqDKv2IU52BUEuadBzKFJzOvBG7TK6AjmICOeAJyP29xSSJCSqqB8cCaCS94bzq djQveGalsw6upISrkPP+XfWf8Be9VUgLxkzKPsN76/VPQo/Zh0P/GEvPZdjdl5JJ4NBuvKC6/ IXqDY+bC5baz3nuxFd4/tS5Tc6Hdt8/BJxdyZy5kuaeb92n19YNcKqs2vj6y7ExM05uy7rj12 uc1PjD8D3hwm8VeR9aOSU9rpRJLcUaioRZzUXEiAHBsZ02yAgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-13.tower-27.messagelabs.com!1491212711!85735454!1 X-Originating-IP: [74.125.83.51] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34772 invoked from network); 3 Apr 2017 09:45:12 -0000 Received: from mail-pg0-f51.google.com (HELO mail-pg0-f51.google.com) (74.125.83.51) by server-13.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 3 Apr 2017 09:45:12 -0000 Received: by mail-pg0-f51.google.com with SMTP id 81so115405717pgh.2 for ; Mon, 03 Apr 2017 02:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u/hDLidcS2Dwx5ykcCUoL+F/0YkmMCPtg1iR9D9ErlY=; b=BrGoNPbtcwnljIrreBIvDnJwxy/OgXBqymq+YPSQV9Cua/Vdx5ansBfyPunyqkzmib 74FPv37BIdSpPtaBOP0LPKeJbSMDNRkiu43Wg0m1cXmGf7GwSDilYcyFyrFdtVAkoFYN NTff/etCEhmurMR08LAddYETpuk7IT0nM/2oM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=u/hDLidcS2Dwx5ykcCUoL+F/0YkmMCPtg1iR9D9ErlY=; b=UFo9j9zQ+7rl6QIglwC+yltL6ppMLUccwTiLWd/Ct+5qOpVm63ZgFUSD3enTgBUDfH FYUikmOJDS5/5DB++k78QUY7EA9iPpWWZ4xHhAyRQznhZFKkXK+Bl213sRGvqFuTaTHO j38uV6xW09qoXpsROt5V0HeD3NK0QEJSEPV9pvnpi5CULmtxQYjeyAsMAP1IIm+gAbJI 9TtdFAY2sL/EGx1NSbi5RwRviYgVdMr7iWpx7WrDL2nSh46tnyUQ/52AQuZF7NjOSkWu drz0VA/3WjlaQYfC5umrYF083/OuyzLpi6epxEEDMSOyGx/hIVpuRwWaViMPp305kYCw PNog== X-Gm-Message-State: AFeK/H0oMPK0lpY4mREv00EDlB/HbHOPbvf3QsWXf58gWHQbMCI0IJWC/ioBjCiS0hi9Kuoa X-Received: by 10.84.176.100 with SMTP id u91mr21087227plb.112.1491212710820; Mon, 03 Apr 2017 02:45:10 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([202.46.23.54]) by smtp.gmail.com with ESMTPSA id y7sm24751844pfk.93.2017.04.03.02.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 02:45:10 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 3 Apr 2017 15:14:30 +0530 Message-Id: <1491212673-13476-8-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491212673-13476-1-git-send-email-bhupinder.thakur@linaro.org> References: <1491212673-13476-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 07/10] xen/arm: vpl011: Add a new console type to domain structure in xenconsole X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Modify the domain structure to to make console specific fields as an array indexed by the console type. Two console types are defined - PV and VCON. Signed-off-by: Bhupinder Thakur --- tools/console/daemon/io.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index 7e6a886..0cd1fee 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -61,6 +61,10 @@ /* Duration of each time period in ms */ #define RATE_LIMIT_PERIOD 200 +#define MAX_CONSOLE 2 +#define CONSOLE_TYPE_PV 0 +#define CONSOLE_TYPE_VCON 1 + extern int log_reload; extern int log_guest; extern int log_hv; @@ -91,23 +95,25 @@ struct buffer { struct domain { int domid; - int master_fd; - int master_pollfd_idx; - int slave_fd; - int log_fd; + int master_fd[MAX_CONSOLE]; + int master_pollfd_idx[MAX_CONSOLE]; + int slave_fd[MAX_CONSOLE]; + int log_fd[MAX_CONSOLE]; bool is_dead; unsigned last_seen; - struct buffer buffer; + struct buffer buffer[MAX_CONSOLE]; struct domain *next; char *conspath; - int ring_ref; - xenevtchn_port_or_error_t local_port; - xenevtchn_port_or_error_t remote_port; + int ring_ref[MAX_CONSOLE]; + xenevtchn_port_or_error_t local_port[MAX_CONSOLE]; + xenevtchn_port_or_error_t remote_port[MAX_CONSOLE]; xenevtchn_handle *xce_handle; int xce_pollfd_idx; - struct xencons_interface *interface; + struct xencons_interface *interface[MAX_CONSOLE]; int event_count; long long next_period; + int console_data_pending; + bool vcon_enabled; }; static struct domain *dom_head;