From patchwork Wed May 10 14:35:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 99005 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp234350obb; Wed, 10 May 2017 07:39:50 -0700 (PDT) X-Received: by 10.36.72.6 with SMTP id p6mr5820495ita.80.1494427190676; Wed, 10 May 2017 07:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494427190; cv=none; d=google.com; s=arc-20160816; b=MZic8tSDibVHJoaZrl2frDKAVxQ2GuyV09H433ngFzRyneuVg2VLm1nIB7kaviefGH yOjSp0Z36F0jAfgKwiNGuHiNYofWRClsIyGfn4XqrAKRcshZU2vc8dY1rwOIFEZ14Gu7 tW0G/OOrxNS8ECo8tyZ85Tzwm88rMwvoPiByHN+4usA1iosiAFWzVpp52WYPtTk101Ub uw9nfM2pbEfkRkiTu8n/W0gLgtl/hiSD2JDMoDRpW3LVOwD6AwL2Ok234laXdEt7uT73 Ycpai8k6GPnE/KAfvsjofhVl4uO/2zmjT9k8Ysk5U1DYYnwHzp3a05kI/7u8fNuis0mq 7CSw== 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=pFKyo/3iNozSAK2GxC6TgzqAxNvmkLcH6Kg3i93al4E=; b=BmQSlTueThL/saOaFm2Hg98/Hu0yH8xucLdfKlWopRvuahsOEmG2VYvdP3NE2t56i5 C+JvsAPCnwMyJXW6jWgOh9bkv2yiZ+yviY9n6j/kPv6bXyFRvdWEhUs1SyJuhAxNjGVE eyinfY7Q3KgihNgTcSI8jjKeXTNtAtmNxz6U352KzkuaPlCn7bf6n+ujHA2XrP95B7DT dSl0K7Qt9eZuznObUhkx0vAuNT+nu7WclWnAX6c4Rrv3vdmhkrhOGqbdHP/RUIcM0tjT RjfG4/s25YvqO5xZK8S0yxPQoypj2ukQLvdfoj2O4/nETA/a39m6JZjcu0NsXCyR9LqJ k8hw== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id z95si3852161ita.64.2017.05.10.07.39.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 07:39:50 -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 1d8Ska-0004vV-LQ; Wed, 10 May 2017 14:38:00 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8SkZ-0004uZ-Kb for xen-devel@lists.xenproject.org; Wed, 10 May 2017 14:37:59 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id CE/01-03620-7C523195; Wed, 10 May 2017 14:37:59 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRWlGSWpSXmKPExsVyMfTAGt1jqsK RBpP/yFl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkrD6xjLpjLV/H36FTGBsZW7i5GTg4hgZmM EpMPKnUxcnGwCMxjlrhy4ScziCMh0M8q8XzxFNYuRg4gJ07i1cRykAYJgQqJ7R+vMkM0a0kcP TWbFaReSKCZSWLWiuVsIPVsAiYSszokQGpEBJQk7q2azARiMwt4S3w48o8dxBYWiJE48e47O0 g5i4CqROMDN5AwL1DJnU9bWSBWyUncPNcJtopTwEdi0auXLBBrvSUeff7DMoFRYAEjwypGjeL UorLUIl0jM72kosz0jJLcxMwcXUMDM73c1OLixPTUnMSkYr3k/NxNjMCgYgCCHYxnFgQeYpTk YFIS5dXdJRQpxJeUn1KZkVicEV9UmpNafIhRhoNDSYI3SkU4UkiwKDU9tSItMwcY3jBpCQ4eJ RHeZpA0b3FBYm5xZjpE6hSjMceLy+/fM3E8WfnjPZMQS15+XqqUOG8nSKkASGlGaR7cIFjcXW KUlRLmZQQ6TYinILUoN7MEVf4VozgHo5Iw7wWQKTyZeSVw+14BncIEdEoggwDIKSWJCCmpBsZ CKeX3p5iXui9Z/0/u9WtT4eazJZOWBE7azh7Mk+R3Lrnmq/zZ+qZHKxR5TNkS33NcVan+0RoZ dKlm6cYZB2rSt3JetQx/Inbyh8NJ/muRZ8WuHfk96aWt1Pf55u86Dot90p+U/cq4kUslnPXl5 0O188vvlSasWLvLOkpNqsnl4uOvfzfsCD2oxFKckWioxVxUnAgA5EqUHrYCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-14.tower-21.messagelabs.com!1494427077!61024075!1 X-Originating-IP: [209.85.192.172] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 39917 invoked from network); 10 May 2017 14:37:58 -0000 Received: from mail-pf0-f172.google.com (HELO mail-pf0-f172.google.com) (209.85.192.172) by server-14.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 10 May 2017 14:37:58 -0000 Received: by mail-pf0-f172.google.com with SMTP id e64so16910225pfd.1 for ; Wed, 10 May 2017 07:37:58 -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=CDJELpVqmod1G5B3AiRVXaQx1S0QvCBUY3UGK/9AQak=; b=kT4vhzp0svSZPKjqqax1BftUQy9u6aMAbgURcMBEzMCJe9q0SUdlg5eSdPugC7Qhpx uMUkDKrcnUByvPcYTLDCqMnPBiee7rwtjzRAvtJgDTQYjxspbWiIgt7JF6Lwp4LFP8AL kpxCYk37VC8oTdlAmqznjn5wINmbjZiQv1PZs= 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=CDJELpVqmod1G5B3AiRVXaQx1S0QvCBUY3UGK/9AQak=; b=Bc6VPFWrL6WzNT/J5sdhzrLqAI1FlwHhst/zkyXIUjpAb5oYDXPFwW/ofndB4/MYLL yKIbiVJz+CPo/s2HNSag9jB5mSiShe+H/g/DyVVMeWNXyp1yzUeAPCnzCYpS/EaXcyMs Ak7l1c+jNfb3X1jOIRsjZ79ijFKuD9//xaZmQiUH8L6sbm8ofkCy6YT1+UYS2UReAp1F tos0XLEDHe5khBnTP+fFFxgpwsOYfCjukdj8l+NJt/MgtiNkClmXVdG29nhrnMsIRucZ QSOXqIjFG1LabSwyHWOJoUkbTwSWhuBb4TQgGyU/z79uyzA0qelXg+ykCHuep1k72jk2 AqJA== X-Gm-Message-State: AODbwcCW68WPZiOE1H/ZhxfPitnDvFzqZKGCvQeuijxWGpcimey0XSRw u6lRWNzlRZZqP3px X-Received: by 10.98.74.135 with SMTP id c7mr6753909pfj.140.1494427077055; Wed, 10 May 2017 07:37:57 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([61.0.91.57]) by smtp.gmail.com with ESMTPSA id r73sm6167781pfa.65.2017.05.10.07.37.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 May 2017 07:37:56 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Wed, 10 May 2017 20:05:16 +0530 Message-Id: <1494426918-32737-5-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494426918-32737-1-git-send-email-bhupinder.thakur@linaro.org> References: <1494426918-32737-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH 10/12 v3] 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 Acked-by: Wei Liu Reviewed-by: Stefano Stabellini --- tools/console/client/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/console/client/main.c b/tools/console/client/main.c index 977779f..6f4405f 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; @@ -361,6 +362,8 @@ 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"); @@ -436,6 +439,9 @@ 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