From patchwork Mon Sep 18 10:32:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 112891 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3501244qgf; Mon, 18 Sep 2017 03:34:58 -0700 (PDT) X-Received: by 10.107.32.70 with SMTP id g67mr20132821iog.77.1505730898152; Mon, 18 Sep 2017 03:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505730898; cv=none; d=google.com; s=arc-20160816; b=vI7Z/YIFp0MoGfc+xh/PsbsoMY6oG65PLAyS4EZFNOjo38TUnYUfCASdQKuCe56QbM kVfM9T+iPDgWWEdShP1vpo7ojazIz6w+2ljGofm9rVBtC2IJ5ps+AUw2kOXlaNX205Vw Wl3jt73zVIVCWNWLsLzqMzYcQKoWJuyhzlfN8EsCIl2nUCpgg1/CvtlMMm+GwK83rwuw SuDB+cxVYCMzXvG3qtQQRH9FCc+arb0xZtYbTgw5zBWoyGx1wUr8RnUoFVGTydnro17Q He2R1VzbrcmmyenOGi9y7z2Iu01zA/sCUJE+iXn+Qd7xgGQudhm1KkyYdT6kHJkgOoge 9s8A== 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=ie6qGAJUwEgvoQGEwPrrd+1282X+hLWj2ZbAL23mEUeu2jj7RZ6dDR31P8WswQUE2r +tt+fCD0PSV4UwDNtWy3+8BPGRkcob3pu/72GCP0xvWm7tyrc4tKYQNwlSHdLVS/gfwv aZe46mIzdY1oZqi31dnIg74PwfTUxvcfZiN+zeVQgmmOGO/INthHyz+SWJ40PSnAm2iH 0PSwLj1VZcIhlSjAmmrwUE5kKKof0da6v4wstOl3YbdjTqzdyr1OO9FDXTWazr5H/TlG EKuwB07u6/eyZIQ5NQXc2jtXINlq9lQj7/xqHW2Y3SkKtYSPxADHs7T4CKynlpmwiCw8 LZww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=H229b+2J; 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 g199si4359793itb.97.2017.09.18.03.34.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 03:34:58 -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=H229b+2J; 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 1dttMo-0002lj-UI; Mon, 18 Sep 2017 10:33:30 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dttMn-0002jV-UV for xen-devel@lists.xenproject.org; Mon, 18 Sep 2017 10:33:30 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id AD/AE-01812-9F0AFB95; Mon, 18 Sep 2017 10:33:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsVyMfTAZt0fC/Z HGvx6J2nxfctkJgdGj8MfrrAEMEaxZuYl5VcksGY0zlrNXnBZtOLc0g3sDYyzBbsYuTiEBKYx Skw5spwJxGERmMcs8ezCAlYQR0Kgn1Xi0dq9QBlOICdN4lvnYpYuRg4w+9kXHohwlcTz5yfZQ GwhAS2Jo6dms0JM3cEk0TC9jwmknk3ARGJWhwRIjYiAksS9VZPBljELzGeUaJrUC9YsLBAj8X f+b1aQehYBVYnfV/1AwrwCPhKvF7axQOySk7h5rpMZxOYEip9f/4AVYq+3xLxfVxgnMAouYGR YxahenFpUllqka6yXVJSZnlGSm5iZo2toYKyXm1pcnJiempOYVKyXnJ+7iREYbgxAsIOx+YvT IUZJDiYlUV7RyP2RQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4380HygkWpaanVqRl5gADHyYtw cGjJMKbAgx+Id7igsTc4sx0iNQpRkuOC3cu/WHiOLDnFpDsuHn3D5MQS15+XqqUOMQ8AZCGjN I8uHGw6LzEKCslzMsIdKAQT0FqUW5mCar8K0ZxDkYlYV45kLU8mXklcFtfAR3EBHRQy449IAe VJCKkpBoYZ2y+uVtx95Il57K7D65YkPh9T7OFHet6g7+HZ16On7K9d1a6U//SlkOnpq/0u+4m UJkQP8mSQVJjZ6frrKv1DkIanG5bXq23FD6hfaeU/2vTokTVlKYDlx6nfHm31qnT6py3nC/T0 pbgbAdVuUc3j5XxN3Q7P3vQk1eY6n24Q0vCOb7yqbauEktxRqKhFnNRcSIA96s3kckCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-14.tower-31.messagelabs.com!1505730807!115127721!1 X-Originating-IP: [209.85.192.179] 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 62668 invoked from network); 18 Sep 2017 10:33:28 -0000 Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by server-14.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 18 Sep 2017 10:33:28 -0000 Received: by mail-pf0-f179.google.com with SMTP id q76so35570pfq.2 for ; Mon, 18 Sep 2017 03:33:28 -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=H229b+2Jdrk+ZMUQ5y+af84pyXhM8Ix2mUUnjnewhYS4qDQB2u7to6t8XrMNREXXBA IzZQb+dQsv7zdw1btt6DgHSd74WSZGO//RSHDQa2s+JZwR55eczi2r2ZJjED0nYQ2Ntp 3ezMkyQq6uUrEPIiR+cPSEh7wWgj6iJ4xhViE= 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=ju2cZJL8kG6ApOvbCHNP73j6kK3ZZdmixcsx+9pTGxnjV6louwY/ibTVt3sQvBmS/X q7rJtniFI04SuR9qRX2Qkg/Rpj3XSL5ld4x29HgwG3pITFC6OPfXwbVrutkguq+resxh 3OPDgTQz45kLd/64HjRNS7f8uGnTglRlVj9r1KXppS7Jg6t2zqWvfEoC8cMRC9Bcq+LL 0aW+Bw8eDldPemaCikZaJbtU8daptAJNI2Lr2HacswcYLv9fGcT3Pi/83/KVXfWqi03X h92es7RzKWXOtO4SMycVoom4GZfJojnxqO8UqTDMX0cpFllk1v8C2DViV1iOUArXCIbU lhag== X-Gm-Message-State: AHPjjUgUmYqo9OC2K8cn9Nkzvld/W6Se2EQDv5uw0Rpp8+PrMa47AVHH pktrU1nXQcOzfpt3rAbm+w== X-Google-Smtp-Source: ADKCNb6fmhoJ4RDwxMiqrPJNREouD+kA2mDiUMPanrxVvzhcz84IHdcIaQ2i0zjhyqc/S5uZ1+/POg== X-Received: by 10.99.117.91 with SMTP id f27mr31357575pgn.376.1505730806723; Mon, 18 Sep 2017 03:33:26 -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 b7sm12937845pge.79.2017.09.18.03.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Sep 2017 03:33:26 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 18 Sep 2017 16:02:07 +0530 Message-Id: <1505730731-10947-24-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505730731-10947-1-git-send-email-bhupinder.thakur@linaro.org> References: <1505730731-10947-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 23/27 v9] 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