From patchwork Wed Sep 27 06:13:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 114329 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4665333qgf; Tue, 26 Sep 2017 23:16:56 -0700 (PDT) X-Received: by 10.36.26.133 with SMTP id 127mr959368iti.88.1506493016728; Tue, 26 Sep 2017 23:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506493016; cv=none; d=google.com; s=arc-20160816; b=oHu7YbF/J+5PnKzf6MvDtrcW9zbxRVu7Slrt82D0kpWXNfRm/1d6l/RE/9N/SxQD+C 3tWRP+Z/c9C98/FIG7IoQFXUIuS3FgeRgtQAywFn5Wv9HI1bd7qVVZXVPR8uDc4JR9c7 kIm6wjwWk67Xm+t3cXWLn+NrD7euujf/8FIHw8oTpOnXXcTkT95SkajrplUR3gqQsHOI gniAcY+7oKjbzTY42CXTj3kFv3v+hxeIYlBick/HqlLGoeyToiLU7HzJxNR3fQ7Io/dh AzyLIaMiTo8IkPe/55/d18tmvQGhiEvxlSXsqbLIePKbjvB4rJU46fYuQg1gS4KoCYyE geZA== 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=meWU2kwAlTPlDHTcmu56WgYuH0OWxncgLKHGLoKMoUczV7RMDazVewBPSLT0D2b44B 337ix8XVqhRsVwgAz52Amj5IpzqG4IEJVrLQYm+z7iiqRC7qiOVtfaKMI7Rtnx4diAJF 70eY510RB/StGj4QG+ezMqdOyCK30C76k0I8k9xkajrDWqQ+lWi1OoPUncibNgPuf4Zt QqBQKCghyUW8eACa9/nFEf4PBJ61xWbjReh0XNTh+1MefWCNNy+SCymwzOkiFkCvAYaL JBJJOVLdo5P6aIwkYqudytOvd3FGwffQOec6V8mGNYfvClvtzh5GLtJmnpkyfB4C6deQ /Dlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HI+JJsQN; 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 e38si3547062itd.195.2017.09.26.23.16.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2017 23:16:56 -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=HI+JJsQN; 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 1dx5c1-0003J0-NW; Wed, 27 Sep 2017 06:14:25 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx5c0-0003HM-Sn for xen-devel@lists.xenproject.org; Wed, 27 Sep 2017 06:14:24 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 89/9C-18674-0C14BC95; Wed, 27 Sep 2017 06:14:24 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsXiVRtsqLvf8XS kwaF3Shbft0xmcmD0OPzhCksAYxRrZl5SfkUCa0bjrNXsBZdFK84t3cDewDhbsIuRi0NIYDqj xPTPP9hAHBaBecwS55d8Ze9i5OSQEOhnlVg/q6iLkQPIzpP4vs4XIpwmsbR1BQuEXS6xZupFZ hBbSEBL4uip2awQ9gomiUlba0Ba2QRMJGZ1SICERQSUJO6tmswEsopZYD6jRNOkXjaQhLBArM T8d8fB1rIIqEp8PrmUEcTmFfCRmLliHhvELjmJm+c6wXZxAsVP999mg9jlLXFpZT/rBEbBBYw Mqxg1ilOLylKLdA1N9JKKMtMzSnITM3N0DQ1M9XJTi4sT01NzEpOK9ZLzczcxAsONAQh2MJ49 7XmIUZKDSUmUt+b/qUghvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErzzHE5HCgkWpaanVqRl5gADH yYtwcGjJMJ7DSTNW1yQmFucmQ6ROsVoyfGl98YfJo59e24ByY6bd/8wCbHk5eelSonzXgRpEA BpyCjNgxsHi85LjLJSwryMQAcK8RSkFuVmlqDKv2IU52BUEuZdCDKFJzOvBG7rK6CDmIAO6p1 6AuSgkkSElFQDY7iZfGZXlOhhw1VBD5rvna9WC27mbL3x7r9sQzmjOnfX1VOWiat8pc6rxNYG RD54Pc3j6H7horInQgeT9tae2XZBZ8nkNZMe2icziLJvvn/o041ejdkmGmffB4dnu+9aKbWmU WD+l+UuTTumc7d9tP5+zP9a53ex06f/s1nLb5tz6htf+L4EXyWW4oxEQy3mouJEAJeK46DJAg AA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-8.tower-206.messagelabs.com!1506492862!113276141!1 X-Originating-IP: [74.125.83.49] 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 39853 invoked from network); 27 Sep 2017 06:14:23 -0000 Received: from mail-pg0-f49.google.com (HELO mail-pg0-f49.google.com) (74.125.83.49) by server-8.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 27 Sep 2017 06:14:23 -0000 Received: by mail-pg0-f49.google.com with SMTP id m30so7218328pgn.6 for ; Tue, 26 Sep 2017 23:14:23 -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=HI+JJsQNybnWCzPhzjdNUi7V5DIcHGVNRJb/V96JWheJt2VPQ4OJxtAekcLDrmZICD E+8tRI2ygRXFUnkqVchZlacf3QuajPJPQSeYGFgAvxldtPqd5mqaK+H36lnBGj2xCtYn TJ2buvx+IKl4FmPX4u+Rl1Sp7xmMdw+M2jlZE= 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=Z2YRF4qXohkguwrEVoGdhear+LtiiKWd1d6Svpnb7mTZNHPCT8zl1kcFPLaARjXUS4 /QHC6vzZ4tKXjfdB9JCz29EHJniVRa1JxK/ei1Mw/8gczZWoCRpAuAiked9xNGdyVZJN lyVwQ8h0nczEdwOK/ExhakLv/f7TDE6ehUMZBuVDMMDb7JQbdvlpflJg6PjdYVybghuD OwFA5oIQSjPZFEqqPsoFWJInoI7AisMJ0mm4MwnYvzYQYzXOP8bxQR0EhGVMTu2o7bSK TDJ56myKQnTeKihQSlHay+1Tn09dVsaDFuT9GyrUZTMGaT3QSk8k1WBGyNLii2Rc0PoZ a7jg== X-Gm-Message-State: AHPjjUhgbX3tFrAmGGe9mxTRjSeOOSEJG+rxR99LLDNeuRFd/vkFYIzH xw7p827bNL92xKA0yrbkKv0UTosI8WQ= X-Google-Smtp-Source: AOwi7QCQaxF4A2RGy2z+CkUdoWWx4UFzL8Fs0dJArkooxCXZNDX/sSvaLZh9HBMCC69Z7Ai4ivvoaA== X-Received: by 10.98.10.146 with SMTP id 18mr332758pfk.346.1506492861747; Tue, 26 Sep 2017 23:14:21 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (h3.248.139.40.ip.windstream.net. [40.139.248.3]) by smtp.gmail.com with ESMTPSA id s187sm18013485pgb.82.2017.09.26.23.14.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Sep 2017 23:14:21 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Wed, 27 Sep 2017 11:43:32 +0530 Message-Id: <1506492816-25954-24-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506492816-25954-1-git-send-email-bhupinder.thakur@linaro.org> References: <1506492816-25954-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 23/27 v11] 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