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: 9720007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6E29960236 for ; Wed, 10 May 2017 14:40:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B8232860F for ; Wed, 10 May 2017 14:40:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39C6028607; Wed, 10 May 2017 14:40:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B45B828619 for ; Wed, 10 May 2017 14:40:06 +0000 (UTC) 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" X-Virus-Scanned: ClamAV using ClamSMTP 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