From patchwork Fri Sep 22 08:23:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 113994 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3011427qgf; Fri, 22 Sep 2017 01:26:25 -0700 (PDT) X-Received: by 10.36.177.9 with SMTP id o9mr5653433itf.44.1506068785324; Fri, 22 Sep 2017 01:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506068785; cv=none; d=google.com; s=arc-20160816; b=xVyYh4osljyx7bpnR8d8ldurrXlpIlp5iKTnCteh/3R+T4/l4OVarXaVw1fthHfeAp ZTGQ2JaEDR3D4rSssluUUJqLGy/AexNIMIpxbyJcIsiEPpTmOc78HwOYK9e7NIhOQitE clRwlWXDIVr3U7TfNq6sPLjNJbrk7ii52ii6CSFxYbzzFy5+CTNCChkFnXE9IiXSRNuk Cah3OGrPsjK5v9ACYHU5RaEFtJz1B0NotmHb1Q+E4cHF6v7fsT86Bfy2oWRAVTbqDq4n 9YQQosYZ2Sk0YR609occBmSYLjc8ptdHOc1vACRs6QFodLA5ZR/DxLTSTo9cSinH3oB3 pDRA== 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=LDkp4vb2s3MmBG1ZCxeOsr+xia053wtYTgkt6nh0LO4=; b=PSWcxQGqQ0lyZPv/BxizKUHPe+dPRWdcR/hydSM9IQvJMxO5fRf7pefsFesc83qHjv Mf2yoLZu7zdq8Nwwgn8HGAg/AJIWsSJrM3x5C3B+8Vhejsjg73JuSOkIdv2L7QVfWAp/ GTQBpEwxWenjJKjV+JGHAFiIpV+TMjmr1UUgMhIREX5Kw8soksmUaqNHNCxCNJWLHl5V Ze5XLPv1EztnKKSzism/LFCJcXwnmwnFE/qCYExGerFgfbrl12pcQ6y7RAavg+Qydecm sOvi6HOFWBizxQ/sC1UnXdfr9OwK6I8BoNtjPuSwc2k+zzDdn7GYuto/XM5rclx8u5g3 6Qhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=foYITdKr; 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 d184si2061364itg.161.2017.09.22.01.26.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 01:26:25 -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=foYITdKr; 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 1dvJGX-0004uW-E5; Fri, 22 Sep 2017 08:24:53 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvJGW-0004rR-8v for xen-devel@lists.xenproject.org; Fri, 22 Sep 2017 08:24:52 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id E3/09-25201-3D8C4C95; Fri, 22 Sep 2017 08:24:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKIsWRWlGSWpSXmKPExsVyMfTAOt1LJ45 EGmzbZGDxfctkJgdGj8MfrrAEMEaxZuYl5VcksGbMuXyWuaBDs2L2HJUGxg1KXYxcHEICMxkl Vlw5xgbisAjMY5Z4c2IVO4gjIdDPKnH44GyWLkYOICdP4tBKrS5GTiAzTeJ6z1ZWCLtS4vqrs 2wgtpCAlsTRU7NZIewdTBIN64NBWtkETCRmdUiAhEUElCTurZrMBGIzCzxnkph2SQfEFhaIkv iyowuslUVAVeLc7ptgNbwCPhJzn5xgglglJ3HzXCcziM0JFF/7fwMLxCpvia03rrJMYBRcwMi wilGjOLWoLLVI18hIL6koMz2jJDcxM0fX0MBULze1uDgxPTUnMalYLzk/dxMjMNjqGRgYdzDu afc7xCjJwaQkyvv4yJFIIb6k/JTKjMTijPii0pzU4kOMMhwcShK8348D5QSLUtNTK9Iyc4BhD 5OW4OBREuHlBYa+EG9xQWJucWY6ROoUoyXHhTuX/jBxHNhzC0h23Lz7h0mIJS8/L1VKnHc+yD wBkIaM0jy4cbDYvMQoKyXMy8jAwCDEU5BalJtZgir/ilGcg1FJmPc6yBSezLwSuK2vgA5iAjq ofDXYQSWJCCmpBsaOFVYlOre9VR5ozI5mdXl7PG5W/n7Wc5Z/BFQM5vBu+2NTunn1gZY3SaL2 jvoJtkE+wZ+3TJnT7mZw70Nf9r4b4v+CpboVZi80UC66wMSdqbawZbIe/077PbdKjwtzKwmdE J13cum5yx6LTKOXxPppvP2p9e9LmV5PW6NS77SCjGmxqvEyS5VYijMSDbWYi4oTAR40evXIAg AA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-6.tower-206.messagelabs.com!1506068689!109914456!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 42201 invoked from network); 22 Sep 2017 08:24:50 -0000 Received: from mail-pf0-f174.google.com (HELO mail-pf0-f174.google.com) (209.85.192.174) by server-6.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 22 Sep 2017 08:24:50 -0000 Received: by mail-pf0-f174.google.com with SMTP id d187so231998pfg.11 for ; Fri, 22 Sep 2017 01:24:50 -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=0dDjqhXxWsv/zS1ps0b/tJGOGIRU9n88m8CQHyVX6Ts=; b=foYITdKrvUBzoW7DMuYXaEpjdxTDQ5X4nRAfLMMCCkpk0rHrrbG6UanJnpV3xdvZsk N3LImGmVpUylsvVDgk3unqoq0GQLqr37xHgxC1AK2OncGQv8VBoHUEjIGE9SA4JeQkT5 Y/lEv0uY2cjIRmUk3ARSCgbo4aDOiI5q34Hv0= 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=0dDjqhXxWsv/zS1ps0b/tJGOGIRU9n88m8CQHyVX6Ts=; b=lO3Vygbw+mJT3PiIsoK4PeekPmjV3wVYzxAHylXs8c9okz1vvckXnZswXv072Cs5Ma m8ljM/qI7KRkbaTd9ajQN3VgIKEAeYQHEeEiYORZdusk4UOOR9CjrPxTFJ/hfsFoJOaf 4iVdKYRsvOZNzrYx8P25Yv/34U0XjiJD0D3/RkxzwusMgQLMbTNul8uQY2+vPLrjVIA5 JdHsJnDprECZ3pBWfrZCKRDO1ToIE43Y970NQeu9sUFKCM7NfUUQp+UD98dAJbTfl7bT gcy3CGhhstnloo2xUOHyO7AM9rNQ0G08t1cbeqMGdle83JS6ZR7e9wj8/CEBfMwDfPc3 N7QA== X-Gm-Message-State: AHPjjUjnJu2ZkgSZODKkO8d/DL2ZogzL3WW9CtpIWGk01TOIWWkVrRd8 hJuj2IXFU7NgcsO9bsI1w8oqZRfVhuA= X-Google-Smtp-Source: AOwi7QAviLZN6kQxlSt4vfCDlty+hss08sVFARgSjNlaqWvMvXxue95bNIkEt7ORJ4S6gvMpFkVMSw== X-Received: by 10.98.158.78 with SMTP id s75mr8510573pfd.156.1506068688995; Fri, 22 Sep 2017 01:24:48 -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.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Sep 2017 01:24:48 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Fri, 22 Sep 2017 13:53:24 +0530 Message-Id: <1506068606-17066-26-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: Stefano Stabellini , Wei Liu , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich Subject: [Xen-devel] [PATCH 25/27 v10] 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 247ae99..f1d2a7a 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). @@ -2220,6 +2223,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 ARM. + =back =head3 x86 diff --git a/docs/misc/console.txt b/docs/misc/console.txt index 16da805..4e180f8 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 ARM 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.