From patchwork Mon Aug 28 08:56:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupinder Thakur X-Patchwork-Id: 111128 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp4548359qge; Mon, 28 Aug 2017 01:59:08 -0700 (PDT) X-Received: by 10.107.20.143 with SMTP id 137mr5378068iou.96.1503910748673; Mon, 28 Aug 2017 01:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503910748; cv=none; d=google.com; s=arc-20160816; b=xB1IIeRmYDlJwq2+oTnAhm1aQ1hd7CSQMjOZeKLqH5F4dG+0MxgI0RbCEEeoYRmXza sMkLIjcDWRVdApXR9Oro1ixeEB9XLXec/YxoHblLxVifFumkJsDNEP3/aR5ppFubk1bf LASS5swmUx8F8yTbEMCPnH2kpG+hPS5GAjqSgeqkr5mBjIXGaj6kcqAK2jnQXDnoScPl UxIGRXPLaFQ4RoXKhuKBku1N6dh7Wv5kS6RsLr9b+xAJNqybJb7jyjicW3qLEfPGudme fXr/kSTq9OhJt+3eBpaMzUgHVMpFXj4yxkexQXPfAjvYYtx1ZyDQcovvLKXSKuHfmnPP fiHg== 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=g2paoFP36Z2G8Am70pAqGgJ28/fYBnKzt3PJ5DFmXqg=; b=wNsN3tqfU6DAD5aQz30D77Q/i76ItmbFLXlftg/FNp4zhDvhe0WPvWg7uGyXuVNr/F Dt3MkAiR6D61cQ5hdMIGQC8ooDbZ+iy43znFb39ID1pXraSEuoTS/6z3j3i/H8q51362 QyTp1ycMyU+mLbxf1wx9y0I5YJ3xZ6mHg/cVXBUHsoNHa6WBP36v1SCCkGHMAd8wKaN4 1ePKGU0Yi7r/f+dFrd3uu2tojt5LTA2Nrz3MzK5wzuLkv5SQlC00Ew+2rOoku89PVu7s EqVLFfSfllst4Dgwj5sKkiQnfqp7Qn8dbP3HgE4vZhelbnLExvS+04qRbXXlyWaLFGls VSqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KRSIU8OI; 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 n13si8269332iti.61.2017.08.28.01.59.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Aug 2017 01:59: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.s=google header.b=KRSIU8OI; 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 1dmFrc-00060f-Db; Mon, 28 Aug 2017 08:57:44 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmFrb-0005zJ-SF for xen-devel@lists.xenproject.org; Mon, 28 Aug 2017 08:57:43 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id CA/ED-09901-70BD3A95; Mon, 28 Aug 2017 08:57:43 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCIsWRWlGSWpSXmKPExsVyMfTAWl2224s jDTY0qVl83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBnTjrSzFHRoVrw/sJylgXGDUhcjF4eQwExG iaunrrOBOCwC85glvr14zAjiSAj0s0q8+XuDvYuRE8hJk1i6+CIbhF0qcaX9MZgtJKAlcfTUb FYIez+TxMZtrl2MHBxsAiYSszokQMIiAkoS91ZNZgKxmQWeM0lMu6QDYgsLREps6ljFCGKzCK hKfPpyFGwkr4CPxMmFe6HWykncPNfJDGJzAsV3rL3LDrHKW6Lr9QfWCYwCCxgZVjGqF6cWlaU W6ZroJRVlpmeU5CZm5ugaGpjp5aYWFyemp+YkJhXrJefnbmIEhhUDEOxg7L7sf4hRkoNJSZR3 Z8XiSCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvCE3gXKCRanpqRVpmTnAAIdJS3DwKInw/rgBl OYtLkjMLc5Mh0idYjTmuHJl3RcmjikHtn9hEmLJy89LlRLn9QGZJABSmlGaBzcIFnmXGGWlhH kZgU4T4ilILcrNLEGVf8UozsGoJMzrDTKFJzOvBG7fK6BTmIBOURRcCHJKSSJCSqqBsXK3mG9 6xqHTK+VEd20/WP9Mmul+5mMBY+a+y19eLfGpXhLk8W5KYVnhvJeblO8fdHn0POC5LVecNt+d bV+5Nhro6/2NC0mXsXms5tM84V5ypOUhw74FvxNZBb3P6e9coDFf33qFjva2r1vCYkNnL1Gv/ fOIJWtZRPXhvTqr0qLagvg7DZ/yK7EUZyQaajEXFScCAI7QFhy3AgAA X-Env-Sender: bhupinder.thakur@linaro.org X-Msg-Ref: server-14.tower-27.messagelabs.com!1503910661!101313179!1 X-Originating-IP: [209.85.192.173] 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 5105 invoked from network); 28 Aug 2017 08:57:42 -0000 Received: from mail-pf0-f173.google.com (HELO mail-pf0-f173.google.com) (209.85.192.173) by server-14.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 28 Aug 2017 08:57:42 -0000 Received: by mail-pf0-f173.google.com with SMTP id r62so14501053pfj.0 for ; Mon, 28 Aug 2017 01:57:42 -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=cSHu2U1ZfxFQQTkLTiZ5BW3g3nAvizN7zbMQVfp8XzY=; b=KRSIU8OIqvVkvWaWDovUFu3Af8sLF3Dt3iTsWgrs67s7FQUhiS+RnqPAKtBEvMvFIM qzTC+Zeo9U0JUN1U7Az8vgTvSb7A33LVarC8ubD1/BaSRxVXyyMV4Wuwbwdz5TnQy1VY 5x0ANrF+Bk7h2jzlwxHBEoljDZ8mJoITAYpzQ= 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=cSHu2U1ZfxFQQTkLTiZ5BW3g3nAvizN7zbMQVfp8XzY=; b=pNcKLKNeJ4kVmq6wuhawVQqzEzziuep6hOZftVPgiM8h+KOZ/NdfVolY/jAOnqiEdC q18PP4GKiFM9Rowfshb3epp8oZR+1rD2QDsIO+wx/q0kiJj8fq5FUzoKbA5xHm5gnZdJ WFvCYjvfGaqo7dP7AHgv8SUnaXXVW14gcwtQyOrpu0ts9cffy6v5FoHwNdLkymaF8Pwm DUcsVLRphX0c6jX1pl5K/dZWpOaWrEKDF7LwvzWc2a3/aAb1WXYipk2xtIuGLz9Hz4EB jyawAIyZTevmral0tCds9G1nQUn+Pa/MabRNVfsizne4585e/1BtSSxaYcBWHLktcQh2 aXhg== X-Gm-Message-State: AHYfb5gSHfanXEUEYk7LU2UEFFe+dX+d4XHeTetvx+HBT5zNxxuCv0MR ewjRZy9zwfuvfJgIxQ5CiA== X-Received: by 10.99.2.72 with SMTP id 69mr6767736pgc.42.1503910660747; Mon, 28 Aug 2017 01:57:40 -0700 (PDT) Received: from blr-ubuntu-linaro.wlan.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d88sm21713569pfl.158.2017.08.28.01.57.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Aug 2017 01:57:40 -0700 (PDT) From: Bhupinder Thakur To: xen-devel@lists.xenproject.org Date: Mon, 28 Aug 2017 14:26:08 +0530 Message-Id: <1503910570-24427-26-git-send-email-bhupinder.thakur@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503910570-24427-1-git-send-email-bhupinder.thakur@linaro.org> References: <1503910570-24427-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 v8] 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 ARM. + =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 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.