From patchwork Mon Jul 17 13:06:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 9844965 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 8291B6037F for ; Mon, 17 Jul 2017 13:10:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74C9028503 for ; Mon, 17 Jul 2017 13:10:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 699C028524; Mon, 17 Jul 2017 13:10:10 +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 3D1AE28521 for ; Mon, 17 Jul 2017 13:10:09 +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 1dX5l8-0005Ns-5t; Mon, 17 Jul 2017 13:08:22 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dX5l6-0005Ll-T3 for xen-devel@lists.xenproject.org; Mon, 17 Jul 2017 13:08:21 +0000 Received: from [85.158.137.68] by server-16.bemta-3.messagelabs.com id BE/8F-01732-4C6BC695; Mon, 17 Jul 2017 13:08:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRWlGSWpSXmKPExsXiVRtspHt4W06 kQed+fovvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPPtissBedUKq4sVm9gPCnXxcjJISQwnVGi /1ZAFyMXB4vAPGaJpeuesYMkJAT6WSUm9LhC2GkSixe0s0HY5RJ31zWzQjRrSRw9NZsVpFlIo JVJ4ubW3UxdjBwcbAImErM6JEBqRASUJO6tmswEUsMsMJ9RomlSL9ggYYFIia9LHjCC2CwCqh Kb121mB+nlFfCReNbJAbFLTuLmuU5mEJsTKHxmw2omiL3eEjePTGSawCiwgJFhFaNGcWpRWWq RrqGFXlJRZnpGSW5iZo6uoYGxXm5qcXFiempOYlKxXnJ+7iZGYFDVMzAw7mD8fdrzEKMkB5OS KO9FtuxIIb6k/JTKjMTijPii0pzU4kOMMhwcShK8m7fmRAoJFqWmp1akZeYAwxsmLcHBoyTCW w2S5i0uSMwtzkyHSJ1iNOaYdGD7FyaOVxP+f2MSYsnLz0uVEuddAVIqAFKaUZoHNwgWd5cYZa WEeRkZGBiEeApSi3IzS1DlXzGKczAqCfN+2gI0hSczrwRu3yugU5iAThH2BTulJBEhJdXAyH3 YkvdB/6kNvxgs4z5LJavpyak9V16REhP1NcUz5vAcDv5w9/aIfcG+PT7t/38p21180fv1tSzz 89sqzGWTbsz/yJDhe07dOe1EaYdyxD3v9zw3JrPzZPMsnpS3vHXu4zv/LTadWTeLXzAjfdvi9 X8+3j2qK/T1IZtDzxTBTk2rI9+e/VkvqMRSnJFoqMVcVJwIAIUzkXi2AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-14.tower-31.messagelabs.com!1500296897!105653538!1 X-Originating-IP: [74.125.83.50] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 39704 invoked from network); 17 Jul 2017 13:08:18 -0000 Received: from mail-pg0-f50.google.com (HELO mail-pg0-f50.google.com) (74.125.83.50) by server-14.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 Jul 2017 13:08:18 -0000 Received: by mail-pg0-f50.google.com with SMTP id u5so17094770pgq.3 for ; Mon, 17 Jul 2017 06:08:18 -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=8w66EsmXPT9pb3sTCRbxsiTS4cM7vEwLM/tUk51OCcU=; b=Bt5PphZ8A+l+Ta9vjCazvKRwm95xZPmA4Hct43kmaUvQrbycAlqTub9ClEF/o0eM68 lBzmt5a4UlvmRN0GFbgqTE7HFyjg7udqEmPnAWL2rfyl5y/XLIx+7euybrcbZIrJH6X3 c61cbKS/Sv6JVF8OhkkZK3t4N2Vei0q/pMB3w= 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=8w66EsmXPT9pb3sTCRbxsiTS4cM7vEwLM/tUk51OCcU=; b=C/k6HYoi6WoIpTr6mq3vvAEuqmb6r2YdaK0ZyGTo+RXnGaRBhPMrlEurWNXKto9yrD 5NHya92ntsLJCzXCVoMSTQQmpTEsDiQmcGWMxDeJwExBVL+WTCQD5rbyFKDXyA9QsGEO f3+nETs3UmP0qYvjJenKNP/G6YLLPUcyijukDSEyHiqpeOn1Q+0n2gChllve+PvVtsRT Hld0m2m2EUYk/LtwdrCSS84AWONvNUPZxbl8gV10vPQZ9BObrYtZQc5FdNRgG0JSnEtm kk9wXcwyAl87OoH7+ScKmrSNSzWHw1rKF3FNwNMesW+SQcPQK+kf639HioGZQtheFu2X Jqfw== X-Gm-Message-State: AIVw112PuJSL6AwMj5F45vB6fxOTdQNMWw1eVdeDm6z02LJl+2iwgW9w Rxcgzcv7IAmwB8R5DAFdXg== X-Received: by 10.84.254.7 with SMTP id b7mr6410086plm.132.1500296897140; Mon, 17 Jul 2017 06:08:17 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id z69sm15705665pgz.42.2017.07.17.06.08.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 06:08:16 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 17 Jul 2017 18:36:55 +0530 Message-Id: <1500296815-10243-26-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500296815-10243-1-git-send-email-bhupinder.thakur@linaro.org> References: <1500296815-10243-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Wei Liu , Julien Grall , Stefano Stabellini , Ian Jackson Subject: [Xen-devel] [PATCH 25/25 v6] xen/arm: vpl011: Update documentation for vuart console support 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 1. Update documentation for a new vuart option added. 2. Update documentation about SPI irq reserved for vuart. 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: - Minor change to rename "pl011" to "sbsa_uart". Since it is a minor change I have retained the reviewed-by and acked-by tags. docs/man/xl.cfg.pod.5.in | 9 +++++++++ docs/misc/console.txt | 44 +++++++++++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.pod.5.in index 79cb2ea..75f9169 100644 --- a/docs/man/xl.cfg.pod.5.in +++ b/docs/man/xl.cfg.pod.5.in @@ -1105,6 +1105,15 @@ Allow a guest to access specific physical IRQs. It is recommended to only use this option for trusted VMs under administrator's control. +If the virtual uart is enabled then irq 32 is reserved for it. By +default, it is disabled. If the user specifies the following option in +the VM config file then the vuart gets enabled. Today, only the +"sbsa_uart" model is supported. + +vuart = "sbsa_uart" + +Currently vuart console is available only for ARM64. + =item B Limit the guest to using at most N event channels (PV interrupts). diff --git a/docs/misc/console.txt b/docs/misc/console.txt index 16da805..d081acc 100644 --- a/docs/misc/console.txt +++ b/docs/misc/console.txt @@ -19,7 +19,20 @@ The first PV console path in xenstore remains: /local/domain/$DOMID/console -the other PV consoles follow the conventional xenstore device path and +The virtual UART console path in xenstore is defined as: + +/local/domain/$DOMID/vuart/0 + +The vuart console provides access to a virtual SBSA UART on ARM64 systems. +To enable vuart the following line has to be added to the guest configuration +file: + +vuart = "sbsa_uart" + +In Linux you can select the virtual SBSA UART by using the "ttyAMA0" +console instead of "hvc0". + +The other PV consoles follow the conventional xenstore device path and live in: /local/domain/$DOMID/device/console/$DEVID. @@ -61,6 +74,14 @@ output = pty The backend will write the pty device name to the "tty" node in the console frontend. +For the PV console the tty node is added at + +/local/domain/$DOMID/console/tty + +For the virtual UART console the tty node is added at + +/local/domain/$DOMID/vuart/0/tty + If the toolstack wants a listening Unix domain socket to be created at path , a connection accepted and data proxied to the console, it will write: @@ -79,8 +100,8 @@ For example: ioemu The supported values are only xenconsoled or ioemu; xenconsoled has -several limitations: it can only be used for the first PV console and it -can only connect to a pty. +several limitations: it can only be used for the first PV or virtual UART +console and it can only connect to a pty. Emulated serials are provided by qemu-dm only to hvm guests; the number of emulated serials depends on how many "-serial" command line options @@ -90,14 +111,15 @@ xenstore in the following path: /local/domain/$DOMID/serial/$SERIAL_NUM/tty -xenconsole is the tool to connect to a PV console or an emulated serial -that has a pty as output. Xenconsole takes a domid as parameter plus an -optional console type (pv for PV consoles or serial for emulated -serials) and console number. Depending on the type and console -number, xenconsole will look for the tty node in different xenstore -paths, as described above. If the user doesn't specify the console type -xenconsole will try to guess: if the guest is a pv guest it defaults to -PV console, if the guest is an hvm guest it defaults to emulated serial. +xenconsole is the tool to connect to a PV or virtual UART console or an +emulated serial that has a pty as output. Xenconsole takes a domid as +parameter plus an optional console type (pv for PV consoles, vuart for +virtual UART or serial for emulated serials) and console number. +Depending on the type and console number, xenconsole will look for the tty +node in different xenstore paths, as described above. If the user doesn't +specify the console type xenconsole will try to guess: if the guest is a pv +guest it defaults to PV console, if the guest is an hvm guest it defaults to +emulated serial. By default xl creates a pv console for hvm guests, plus an emulated serial if the user specified 'serial = "pty"' in the VM config file.