From patchwork Thu Jun 22 07:38:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 106158 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2327057qgd; Thu, 22 Jun 2017 00:41:05 -0700 (PDT) X-Received: by 10.36.8.195 with SMTP id 186mr685668itc.76.1498117265480; Thu, 22 Jun 2017 00:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498117265; cv=none; d=google.com; s=arc-20160816; b=VqNmygTGMVlZzEWM0ifZ9+Zngr51RrTEqlqfEKAxPz9TcEfCRM5EJDGRxKxljYt3wP Edkd9M3BqjqiZu0x4JHzjeS2oCR56iFkNSQeTSchcYswjA4j5fxalzDrPrUwUf4qPive UvNDgr/wuQdw29BJZRCc/zevI41TMrnVRhOZNYTOBBYO+i1B2Gf+bwwdTSQzooeHhG/A oEJHVQSQGmfbqsqJeUWJAT3q4i2zKY+asxEXUDUJgIdVIzjNxoDeNWyYl+lJZvz3ASgP g8odidlrsRq4/wYdY0DIZx4l7hCYOiiRGsuf+EeoTC7jhCQAVzxqehs0O24Is37pktIM EE+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=SXz199bqt3Za+NbIMM8ebZm8llkqGOhM78VglRWxa1k=; b=LVJvIKFPFatznRcs7sjgvnG9fL0jqTjI6nkl+2X+ALJX+nE5hAvzpmrvETUl+aHMAT EklMMU4fVtbKdPVDVZ8YhEFL7AS/VXyxEcEVyeROY2Ij9dd38tG0PzGJLBA6DTqdWEge TeYt7zagoPzT0fuiNgClgxkZiHw79m37qJbkY/inCYGBaVXRDK2lMyHQG64m4ZIGrsyG azLLmq6NtGyMnPkoVQUbYshnIOcTGsx8BPsQL9a72qmiv7f9gYyRnTRy+mmfMtsXWc1n DSi6OJ6GnMQqF/0xwl5V5R2ZPqBjZpHMZLrq7rkDDvaNSZCGtDqKMxsH5TeLs0vw8aus ehkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=O5ZOlkMt; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id s103si708822ioi.238.2017.06.22.00.41.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 00:41:05 -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 header.b=O5ZOlkMt; 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 1dNwiU-0005yh-4x; Thu, 22 Jun 2017 07:39:50 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNwiS-0005wd-QB for xen-devel@lists.xenproject.org; Thu, 22 Jun 2017 07:39:48 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id 3E/FA-03696-4447B495; Thu, 22 Jun 2017 07:39:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRWlGSWpSXmKPExsVyMfTABl3nEu9 Ig6XNuhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b5rb8YC56LVGz7t5u5gXGXQBcjF4eQwAxG ievPO1m7GDk5WATmMUs8nVINkpAQ6GeVaHxykA0kISGQJvG9cy4ThF0hcbl1MzOILSSgJXH01 GxWiEn7mCTa170Hcjg42ARMJGZ1SIDUiAgoSdxbNZkJpIZZYD6jRNOkXrChwgIxEnc+f2SD2K wqsfN5PyNIL6+Aj8SBW3EQu+Qkbp7rBNvFCRResWMhO8Reb4ldZyazTGAUWMDIsIpRvTi1qCy 1SNdUL6koMz2jJDcxM0fX0MBMLze1uDgxPTUnMalYLzk/dxMjMKwYgGAH4/TL/ocYJTmYlER5 Nxd7RwrxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4J1XBJQTLEpNT61Iy8wBBjhMWoKDR0mEtyUPK M1bXJCYW5yZDpE6xWjMceXKui9MHFMObP/CJMSSl5+XKiXOOxtkkgBIaUZpHtwgWORdYpSVEu ZlBDpNiKcgtSg3swRV/hWjOAejkjCvPsgUnsy8Erh9r4BOYQI65cURD5BTShIRUlINjPs+64V GTjLkCnJ5dk/mXQPfYS/dNSUv4kS9Vqy4cqLXbUMPp/CF7a6NThIShS9VjtRMm3qt9+f950/s YhviA0Tvz1XZ+4zpTzCT7PqZB4x+GGjY+1wwf21akRR8999qzqtCn0U31+kqZpl8s72gt4ZTS kaoo3+zd8aT2s3rbrBv+PTH0/3ILCWW4oxEQy3mouJEAL2qIK+3AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-3.tower-27.messagelabs.com!1498117186!108618030!1 X-Originating-IP: [209.85.192.176] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32599 invoked from network); 22 Jun 2017 07:39:47 -0000 Received: from mail-pf0-f176.google.com (HELO mail-pf0-f176.google.com) (209.85.192.176) by server-3.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Jun 2017 07:39:47 -0000 Received: by mail-pf0-f176.google.com with SMTP id s66so5122518pfs.1 for ; Thu, 22 Jun 2017 00:39:47 -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=d1KBn+iFCfLFvWRPZsedtUmjRYNyzhLYEpMJ1vpscqw=; b=O5ZOlkMtafBo7Y3hqjdCYmTl4DqPB8K7mBtv0DFEucZYJRwaPl2eRRXJMYz3hsSMd0 PYa/sajU5v3pVqA5itmMAMmpywQc8xDBQVggxn2Ysw2Zj/vHxg+exTvJ9Q8VyADF9ayv ro1/M9INLtvryoOIlDQhwnNo/jMRz+DOo+VpI= 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=d1KBn+iFCfLFvWRPZsedtUmjRYNyzhLYEpMJ1vpscqw=; b=Y1IVapv+SmFhJjyi8xCCzHloXfU7PWXWD+ad0IEoXxJyRmIg0AwH7i7GJKkfLGStp6 Adjo43USPGJ2ilJ26qCt0Q0sEMRcwdcRxER8jB8w9vgE8K84HMbMqfFmNK1MuiXviGiW 1+A4dcN1JpJMcF5GB3EPTvc+lFbiI//TiabrMbwKnQdNkJ8Ihy3Fg7MQrf0x45dqPN6Z iT+lKTHZjLiHbBs0I65nSrEbvXVlDFulIrsy56V0SVGNCPsfeYG3rPIKTIxuYDFB3yhF CZB7XbWfANs8uUz4Xe8cL5d47V/M3BA5luMgn87M/4cBffOxm6qAzWp0TNgP4dWDl5IN ScJg== X-Gm-Message-State: AKS2vOzTwP5ZniMsfAo95WrEeGRF8r4rmAQHQo7UDXb3vn3oB+6txsgc +c3QnoNA5NujAV6VC+qGQw== X-Received: by 10.99.123.81 with SMTP id k17mr1267735pgn.71.1498117186016; Thu, 22 Jun 2017 00:39:46 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id w69sm1883591pfk.107.2017.06.22.00.39.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 00:39:45 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Thu, 22 Jun 2017 13:08:50 +0530 Message-Id: <1498117132-27139-16-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498117132-27139-1-git-send-email-bhupinder.thakur@linaro.org> References: <1498117132-27139-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 15/17 v5] xen/arm: vpl011: Add a new vuart console type to xenconsole client 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" Add a new console type VUART to connect to guest's emualated vuart console. Signed-off-by: Bhupinder Thakur Reviewed-by: Stefano Stabellini Acked-by: Wei Liu --- CC: Ian Jackson CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall Changes since v4: - Removed the vuart compile time flag so that vuart code is compiled always. Changes since v3: - The vuart console support is under CONFIG_VUART_CONSOLE option. - Since there is a change from last review, I have not included reviewed-by tag from Stefano and acked-by tag from Wei. tools/console/client/main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/console/client/main.c b/tools/console/client/main.c index 977779f..3dbb06f 100644 --- a/tools/console/client/main.c +++ b/tools/console/client/main.c @@ -76,7 +76,7 @@ static void usage(const char *program) { "\n" " -h, --help display this help and exit\n" " -n, --num N use console number N\n" - " --type TYPE console type. must be 'pv' or 'serial'\n" + " --type TYPE console type. must be 'pv', 'serial' or 'vuart'\n" " --start-notify-fd N file descriptor used to notify parent\n" , program); } @@ -264,6 +264,7 @@ typedef enum { CONSOLE_INVAL, CONSOLE_PV, CONSOLE_SERIAL, + CONSOLE_VUART, } console_type; static struct termios stdin_old_attr; @@ -343,6 +344,7 @@ int main(int argc, char **argv) char *end; console_type type = CONSOLE_INVAL; bool interactive = 0; + char *console_names = "serial, pv, vuart"; if (isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) interactive = 1; @@ -361,9 +363,12 @@ int main(int argc, char **argv) type = CONSOLE_SERIAL; else if (!strcmp(optarg, "pv")) type = CONSOLE_PV; + else if (!strcmp(optarg, "vuart")) + type = CONSOLE_VUART; else { fprintf(stderr, "Invalid type argument\n"); - fprintf(stderr, "Console types supported are: serial, pv\n"); + fprintf(stderr, "Console types supported are: %s\n", + console_names); exit(EINVAL); } break; @@ -436,6 +441,10 @@ int main(int argc, char **argv) else snprintf(path, strlen(dom_path) + strlen("/device/console/%d/tty") + 5, "%s/device/console/%d/tty", dom_path, num); } + if (type == CONSOLE_VUART) { + snprintf(path, strlen(dom_path) + strlen("/vuart/0/tty") + 1, + "%s/vuart/0/tty", dom_path); + } /* FIXME consoled currently does not assume domain-0 doesn't have a console which is good when we break domain-0 up. To keep us