From patchwork Fri Sep 22 08:23: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: 113984 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3011183qgf; Fri, 22 Sep 2017 01:26:08 -0700 (PDT) X-Received: by 10.36.185.9 with SMTP id w9mr5757234ite.75.1506068768129; Fri, 22 Sep 2017 01:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506068768; cv=none; d=google.com; s=arc-20160816; b=V9WIqoHbOQmTEMCJeotbQp6ucMSR30ed2lIh7Xm4e2WnGsCa1VWxT7v1TofPnFk0WC Au9iX3mYp+LWj/m9G70eK2FctAXyUygZ25KkE6nv4wMgAyCpj2+8OjnsgiUMb+xJCs2b bsSXHr7dzFB6q0hhenqlGv1Jo8nAjykYRhC2JgA6RoXdxb07Do1xOEuOs682eti4HEPZ hE+hIwccYi3M6EhkNBrbwL8szPTOpA/sB7/TG96iChu1dWRap6U1sr0lLFBlHfmBpwvs P711PM9e6MF75RUkbLq5GrsOcaI4CHuN6Re732+d23wZg41G+2UqR01GCd2tdLvLVvcN 0jbw== 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=pJyNIWfhAVo2E2CgMcfI/HHFeP51uQR9/ksH+7RgARQ=; b=qQi84+2u8txDNnE3H0Ye2xH1pgaqPK8tS3FABaW8J6sEKSydGdcI9gl0WtdlKMofDx N2ru6FLJBvE9yVLCd/f3iY4GF2TBnIAqY4Go1b7FUYXNTqJPA7MvgnPUre0Ae/Ijik+f nubpxIDX1oUv3rwkoebyLIKc2san+KSRU0BsOk3A09LZ3ecm9IDyP3EhL2e9K9v5xZr+ ZshDRj0kCRXWac36uwc+xGpdI6dQvW4RgSF9YiOdy27a57pTbET1LvdXxnf/zQRGxh55 /oG/0H+9uCaOXittV8WR2XrLw5yK/4rlytn2z8QDmastE5i4P3PkQotYFacvZYbMvk66 NCyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SdzE+0SQ; 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 s5si3469472ita.64.2017.09.22.01.26.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 01:26:08 -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.s=google header.b=SdzE+0SQ; 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 1dvJGS-0004le-VM; Fri, 22 Sep 2017 08:24:48 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvJGR-0004iy-LZ for xen-devel@lists.xenproject.org; Fri, 22 Sep 2017 08:24:47 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id 92/15-03610-FC8C4C95; Fri, 22 Sep 2017 08:24:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRWlGSWpSXmKPExsVyMfTAOt3TJ45 EGhw9LmTxfctkJgdGj8MfrrAEMEaxZuYl5VcksGY0zlrNXnBZtOLc0g3sDYyzBbsYuTiEBGYw SqxYdooZxGERmMcs8WbVTzBHQqCfVWLLwucsXYycQE6exIOJ76DsNIn/C9qZIewKiSXHtrOD2 EICWhJHT81mhRi7g0liUvcvxi5GDg42AROJWR0SIDUiAkoS91ZNZgKpYRaYzyjRNKmXDaRGWC BW4s1+sJksAqoS034+ZwWxeQV8JM7P7oTaJSdx8xyEzQkUX/t/AwvEXm+JrTeuskxgFFzAyLC KUaM4tagstUjX2EgvqSgzPaMkNzEzR9fQwEwvN7W4ODE9NScxqVgvOT93EyMw5BiAYAfj6XWB hxglOZiURHkfHzkSKcSXlJ9SmZFYnBFfVJqTWnyIUYaDQ0mCt/Y4UE6wKDU9tSItMwcY/DBpC Q4eJRHecJA0b3FBYm5xZjpE6hSjJceFO5f+MHEc2HMLSHbcvPuHSYglLz8vVUqcNwCkQQCkIa M0D24cLEIvMcpKCfMyAh0oxFOQWpSbWYIq/4pRnINRSZh3FsgUnsy8Eritr4AOYgI6qHw12EE liQgpqQZGi3udc1aJ8fgIlyxt/bV0kub09xuL40wVtVwT+Nbdnv1sQYPAtD77HasZ7ivIOjpl ugvut1ixX9h6t+FXG2M1/oTAonvfo5inxkSqCr2flpMZEJau13dn8/0J1fePWbyb1sSfcMfq2 PmwrvPXdzRNSnizxuQJ/6z81ctttvsumSk9SePr+/A3SizFGYmGWsxFxYkA3P1RYcsCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-9.tower-27.messagelabs.com!1506068682!118084362!1 X-Originating-IP: [209.85.192.174] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 40318 invoked from network); 22 Sep 2017 08:24:43 -0000 Received: from mail-pf0-f174.google.com (HELO mail-pf0-f174.google.com) (209.85.192.174) by server-9.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Sep 2017 08:24:43 -0000 Received: by mail-pf0-f174.google.com with SMTP id x78so232544pff.10 for ; Fri, 22 Sep 2017 01:24:43 -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=HWroLNIkhQjYUcAWyd7ghBserWIB9IYYwUwfhZwGLVc=; b=SdzE+0SQHQbFHtYN+IdY1aUf71UGzhxUigOK8iAwH91nsdHaR48gnBJlINO0zIYTTJ F2afvUej3tQbU1V6j26K8iqTrWTVyklZSIVF0rhXDw1NfSGx1D6I78ZbRyPd6vSF26AJ 5iEuha1ISw1n/USIUBp4ZxwW+5FUf7Xf49Rk4= 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=HWroLNIkhQjYUcAWyd7ghBserWIB9IYYwUwfhZwGLVc=; b=mgbIKhYvQWn4Klu8xzvILb937pLlGQO2T5K9i8SzJDQ8mxKFXzJvOHnR3ZlOfWqE92 XQ3U7ybAygm39f44Ke8epBUQHQX26Bv3/+gWv8xMei+2JPjAtPvrSL3UPC2xPd0yHq34 OWWNRrQaG9ZloYdH1ouMqQjeqEvzXiaPOrLxHVz0mZx1hANAqHkMfoB9v4ax8Zdzvuhp ojj1AeXICWXHMglRXCE4ncLPgW4R9Z8jPgMb+ZfeKvZD9x7ezQLx6j+TQ3T65O2tGwkb 3ryqQH6t56dBlQFisC7jD5DE91v75MxI2WktsW4abkjLEL0fJFVxV9S5RE+Fsai890I/ s5oA== X-Gm-Message-State: AHPjjUi0Tbkw7P+GbkMpFrhYIDGGu+88lmhYVkap6f2/4tyKBVwQrR0f GDYZ/l+HmLJXm4nAWXG/AmwKB9aIW38= X-Google-Smtp-Source: AOwi7QD83q+Ouua64c3jS8IbZI8ty6L2NeCYWqhboJfhmZzHD6pKVa2cmBg47TXtQAlO7FzC6L9pSw== X-Received: by 10.84.216.94 with SMTP id f30mr8295747plj.80.1506068681514; Fri, 22 Sep 2017 01:24:41 -0700 (PDT) Received: from blr-ubuntu-linaro.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id f74sm5569284pfa.36.2017.09.22.01.24.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 01:24:41 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Fri, 22 Sep 2017 13:53:22 +0530 Message-Id: <1506068606-17066-24-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506068606-17066-1-git-send-email-bhupinder.thakur@linaro.org> References: <1506068606-17066-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 23/27 v10] 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 c340cb7..f92ad3d 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; @@ -344,6 +345,7 @@ int main(int argc, char **argv) char *end; console_type type = CONSOLE_INVAL; bool interactive = 0; + char *console_names = "serial, pv, vuart"; while((ch = getopt_long(argc, argv, sopt, lopt, &opt_ind)) != -1) { switch(ch) { @@ -359,9 +361,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; @@ -437,6 +442,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