From patchwork Fri Apr 28 16:01:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 9705027 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 AD87060225 for ; Fri, 28 Apr 2017 16:04:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F5C028688 for ; Fri, 28 Apr 2017 16:04:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9470F2868F; Fri, 28 Apr 2017 16:04:18 +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=-2.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB, 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 4014F28688 for ; Fri, 28 Apr 2017 16:04:18 +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 1d48LP-0000Kg-8n; Fri, 28 Apr 2017 16:02:07 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d48LN-0000IF-Cf for xen-devel@lists.xenproject.org; Fri, 28 Apr 2017 16:02:05 +0000 Received: from [85.158.139.211] by server-4.bemta-5.messagelabs.com id 20/FF-02181-C7763095; Fri, 28 Apr 2017 16:02:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsVyMfTAVt2adOZ Ig0tPGS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oy1ex+xFrTwVXRsncvcwPiFq4uRi0NIYCaj xMYrm1lBHBaBecwSO48eZwNxJAT6WSXWrrvP3sXIAeSkSfSuiO9i5AQyyyXWNMxnBbGFBLQkj p6azQoxqZlJ4tPB3Ywg9WwCJhKzOiRAakQElCTurZrMBFLDLPCWUaL/4ymwZmGBGIkpBzcxg9 gsAqoSm9d0sIHYvALeElOPfGSCWCYncfNcJ1gNp4CPxLX+ZewQi70luhvmsUxgFFjAyLCKUaM 4tagstUjXyEQvqSgzPaMkNzEzR9fQwFQvN7W4ODE9NScxqVgvOT93EyMwtOoZGBh3MN6c7HeI UZKDSUmUt9KdOVKILyk/pTIjsTgjvqg0J7X4EKMMB4eSBK9AGlBOsCg1PbUiLTMHGOQwaQkOH iURXgmQNG9xQWJucWY6ROoUozHHi8vv3zNxPFn54z2TEEtefl6qlDhvVypQqQBIaUZpHtwgWP RdYpSVEuZlZGBgEOIpSC3KzSxBlX/FKM7BqCTMmwOykCczrwRu3yugU5iATmFxYQA5pSQRISX VwCgUsnbPlbk+c9W9zA7Z8PzQ9dDjK6iW22FZuHIPE1tqx8mC7kpnNhkZ5fUKdVOSWjXf3koW XrTrUWGo0IG722JPyNj8PNlbwiHePjc5r/SJqb9J3a2EBuedzy6fZpvgyR+w5Ooel577Ub8rq raYTjzScFL6drFLIoPEzT8zHnS6nRcq6Z/FqMRSnJFoqMVcVJwIAMuaNnC5AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-3.tower-206.messagelabs.com!1493395322!91997165!1 X-Originating-IP: [209.85.192.181] 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 1985 invoked from network); 28 Apr 2017 16:02:03 -0000 Received: from mail-pf0-f181.google.com (HELO mail-pf0-f181.google.com) (209.85.192.181) by server-3.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 28 Apr 2017 16:02:03 -0000 Received: by mail-pf0-f181.google.com with SMTP id v14so50602907pfd.2 for ; Fri, 28 Apr 2017 09:02:03 -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=6fMh5lhHWEE+Qerk0XI0VNtvzfxHZcId/pqsfB06kZg=; b=EgnX2JBsQEHpvrcAVh80ixxjIgIhGtpWSji4Q9YWkZgzNZAPUlWmmbzk0dhPr5gh+v MZMorn3AtyFQPiwBWhrd7ADaWyn5M/k2yZytrwbYKsDTNigF6tCO4fZ9zlGIh7BpKaI/ 5jrvAw9mioSCgaXGsbTAq1e8EdHuMbOlcsFz4= 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=6fMh5lhHWEE+Qerk0XI0VNtvzfxHZcId/pqsfB06kZg=; b=O3CxEydAcEfuebh+rcR4/DVthHT3oDEprwq70KB/16QIDeAgZkB0Nx8AhnANaBuW+f qRKB6cgcULBmYRZQXtkgUqw7AEqnRbV+g3gIrdNIYSdxL/TY8RBQDnI4b1arON+69lNo K4habTypWia5Prl+qF1puO9bHX9BSzbyEGy+dBZJtQ7qOMWOO32VeB9F9lU0UbwnUOhS gQGCBYtYr0xRgcgJDLGvsGDW7HuiBCmp8bYkkO3cS0Ik0mEQBo8kTcAl223oJh6/doUe JpwXmIBLuhArtlJnA5uLc6zJjL6sEQr3xWnmBUrDjZAdokKw4/6DgMHaB0y7Kk1M9eBP 9FjQ== X-Gm-Message-State: AN3rC/7sQckL3IUUCioGyep97+qnYGCwdbD+rO67shmfMl4aO8J8l2wR Of/2fsoiZVXBrHDtW0+0BA== X-Received: by 10.99.3.212 with SMTP id 203mr12964155pgd.0.1493395321989; Fri, 28 Apr 2017 09:02:01 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id n65sm9870239pga.8.2017.04.28.09.01.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 09:02:01 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Fri, 28 Apr 2017 21:31:22 +0530 Message-Id: <1493395284-18430-9-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493395284-18430-1-git-send-email-bhupinder.thakur@linaro.org> References: <1493395284-18430-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Stefano Stabellini , Wei Liu , Andrew Cooper , Ian Jackson , Julien Grall , Jan Beulich Subject: [Xen-devel] [PATCH 08/10 v2] 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 vuart. Signed-off-by: Bhupinder Thakur --- 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..ec5c6e1 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("/console/vtty") + 1, "%s/console/vtty", 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