From patchwork Mon Aug 7 08:53:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 109541 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp2482208obb; Mon, 7 Aug 2017 01:56:09 -0700 (PDT) X-Received: by 10.36.34.135 with SMTP id o129mr152584ito.85.1502096168960; Mon, 07 Aug 2017 01:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502096168; cv=none; d=google.com; s=arc-20160816; b=n+Te19YTMB638OloGCta85rcv98hUP1fa74j+h1nTOn114G3vZe7nZDAR5tJxd01gT o2RpBYADrw1vnKDhQa4+LQRmZuBKeD4uNzmuC/Jj5qvbcVV0pBb51SP9Q9fMx+lLWi+J qfjpus4aI8tkS3AftE1Fl4HUsSASJeLrv6fuU1OcUFcGbSZbrtPx38i0JVz+O6jDYX13 HCXQ7GL6vEddQIOjiMIhDUV3zRhVkfcz13SkED70W3MGcTWEtgbSOrhLDyYmWSX/6xXC x16NY6k6ReTt3FCXs5caXzWJ+oTrH2UYNRWhkt7SYGbWjdOB9s+ybjcj+R0lsLd3T3vK VOHA== 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=w9ftdLy5hSB18PgKuJ32Jy06KLtxJkgHOsurivVhjzU=; b=Eunj/afF/OWpC7Stz+ueSbPfXoj//IyxjjWRXI/c8OPrm6BijF9CydKQnpuD93so8+ fsBrjiaTqvK0v1HY9RGvfoxgtvsVhvrLsH+v8rQm2/5YwDVlq1aBDuWsO9AVaFPgesWR 7zAUpN5ajbzC+cjyjecb7JP+hHnnm9Fop5q0H2wenUWdgkLhghGeuNFKutwugca/Qc4K 5/3VSZIfLf+HRvZzBrI3kMkfpxSGSnJZuzXYuvX/vUc8olJbrXw4Bn24sf5dZI9FqFm8 wVmISFu5iCqQXNQjk1gCLYuuaEaW/AQkHXWvnLO2Igs+/l2XRKa0P6tZUR8+LTKlDzTe 3kRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=iJFm1+6l; 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 12si8037524iod.182.2017.08.07.01.56.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Aug 2017 01:56: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.b=iJFm1+6l; 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 1dedoH-0005dp-IZ; Mon, 07 Aug 2017 08:54:49 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dedoG-0005c9-LW for xen-devel@lists.xenproject.org; Mon, 07 Aug 2017 08:54:48 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 92/77-02033-7DA28895; Mon, 07 Aug 2017 08:54:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXiVRtsrHtdqyP SoGMZn8X3LZOZHBg9Dn+4whLAGMWamZeUX5HAmnHk6Ue2gtmaFWeXnmNvYDyg1MXIxSEkMJNR Yn3jRlYQh0VgHrPElss32EAcCYF+VolNTxsZuxg5gZw0iRl790PZlRJf9rwHs4UEtCSOnprNC jGqjUni4fJ2IIeDg03ARGJWhwRIjYiAksS9VZOZQGxmgedMEtMu6YDYwgKREm++dbKD2CwCqh JTvj9kA7F5BXwkVi9/wQ6xS07i5rlOZhCbEyh+/tIbFoi93hK3j/UxTmAUWMDIsIpRozi1qCy 1SNfQQi+pKDM9oyQ3MTNH19DAVC83tbg4MT01JzGpWC85P3cTIzC0GIBgB2PTds9DjJIcTEqi vPEr2iKF+JLyUyozEosz4otKc1KLDzHKcHAoSfAmaHZECgkWpaanVqRl5gCDHCYtwcGjJML7Q h0ozVtckJhbnJkOkTrFaMwx6cD2L0wcryb8/8YkxJKXn5cqJc6bAzJJAKQ0ozQPbhAs+i4xyk oJ8zICnSbEU5BalJtZgir/ilGcg1FJmFcaZApPZl4J3L5XQKcwAZ3yJrEV5JSSRISUVANjb/x 2re2fTeOjZuVcd9r2acWFz1Enm/21VXb6H7mzQbFk0poLRdEftHhqld0Wcaz7sCUk2cI6Usvv TcebdI6YNQ5dpq9CJ1qULvjFz/tE/W/c5TIXi7uhx45flnz9/Xh/w6cvXUdZ9qpsmfFcqmav3 /nFC6Y8Dxe5IsetqMvdJm5cVh92ro9TiaU4I9FQi7moOBEASEGeOrkCAAA= X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-6.tower-206.messagelabs.com!1502096086!103296258!1 X-Originating-IP: [74.125.83.51] 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 64451 invoked from network); 7 Aug 2017 08:54:46 -0000 Received: from mail-pg0-f51.google.com (HELO mail-pg0-f51.google.com) (74.125.83.51) by server-6.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 7 Aug 2017 08:54:46 -0000 Received: by mail-pg0-f51.google.com with SMTP id y129so31675153pgy.4 for ; Mon, 07 Aug 2017 01:54:46 -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=/YU+lh7b+xjfpV/n67+Fd1NKvfR4PopWuB/GOGrHOw4=; b=iJFm1+6lVaZahes8SMQqUoWF9hRLkJfVqioolugQ+1Uv7e2vCxw9Cwy/fenu9HHicV jWRykzb6fxhVAt5L2uD1cJ/k8yguh49Z/c60qUFYDWWnGxF4qWHBywyOgy8cxYRViOom fBbKlH1Tj8D+wCzgnRHGtZv0k7G3yACS8A02U= 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=/YU+lh7b+xjfpV/n67+Fd1NKvfR4PopWuB/GOGrHOw4=; b=C4aYsTmFBOiitW4jxyDUsEsMx2ZOvBG/IR6kzfN69GAT+logpBAMDEGleXCen9qTUO JnV6aFzkW16xZ2rJ9NCRlKI7OI7+5f37fHeTd34OZ/TR5Th4zmgctNwxMo1ydMkqnIUL e5Uebftgj5PKg9tMR1M4/c2I0Sb4NPgi8t1nRRlH8bbzQ9GUHqn943iqE0zxY6V1l8hL r/RLU4vZg5+3kjFQqlfHhwGSM4GAG2kXBZlU18dNpA4OT5Twrvtq3Adf65/7dmR3OfMG K9QY4G9ZmgcL4M+tRPcAIDI0+Vv93uML34eIW5+zVxYKlrA7sPXMqcHfc5XD3xp51Gyt B74g== X-Gm-Message-State: AIVw113wTPnm1UCNJ7e7DQ8H3/n90VzYgaIkDiCjG5gwp1ve2CuScr0U J4daAp5DAW9HYON3IQU+yg== X-Received: by 10.84.217.70 with SMTP id e6mr13634070plj.414.1502096085342; Mon, 07 Aug 2017 01:54:45 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com ([103.5.19.18]) by smtp.gmail.com with ESMTPSA id p77sm12604047pfi.153.2017.08.07.01.54.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Aug 2017 01:54:44 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 7 Aug 2017 14:23:17 +0530 Message-Id: <1502095997-31219-26-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502095997-31219-1-git-send-email-bhupinder.thakur@linaro.org> References: <1502095997-31219-1-git-send-email-bhupinder.thakur@linaro.org> Cc: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich Subject: [Xen-devel] [PATCH 25/25 v7] 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" 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: Andrew Cooper CC: George Dunlap CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Tim Deegan CC: Julien Grall Changes since v6: - Added a new section for vuart usage. - I have retained the reviewed-by/acked-by tags as this is a limited change. Kindly review. 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 | 12 ++++++++++++ docs/misc/console.txt | 44 +++++++++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.pod.5.in index 79cb2ea..8a38cf7 100644 --- a/docs/man/xl.cfg.pod.5.in +++ b/docs/man/xl.cfg.pod.5.in @@ -1105,6 +1105,9 @@ Allow a guest to access specific physical IRQs. It is recommended to only use this option for trusted VMs under administrator's control. +If vuart console is enabled then irq 32 is reserved for it. See +L to know how to enable vuart console. + =item B Limit the guest to using at most N event channels (PV interrupts). @@ -2171,6 +2174,15 @@ the domain was created. This requires hardware compatibility with the requested version, either natively or via hardware backwards compatibility support. +=item B + +To enable vuart console, user must specify the following option in the +VM config file: + +vuart = "sbsa_uart" + +Currently, only the "sbsa_uart" model is supported for AArch32 and AARCH64. + =back =head3 x86 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.