From patchwork Wed Jun 27 03:49:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venu Busireddy X-Patchwork-Id: 10490461 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 63D0260375 for ; Wed, 27 Jun 2018 03:51:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 533FB1FFB2 for ; Wed, 27 Jun 2018 03:51:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45A5A26242; Wed, 27 Jun 2018 03:51:30 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D10D41FFB2 for ; Wed, 27 Jun 2018 03:51:29 +0000 (UTC) Received: from localhost ([::1]:56322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY1UP-0007mO-4P for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 Jun 2018 23:51:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY1T4-0006lP-DL for qemu-devel@nongnu.org; Tue, 26 Jun 2018 23:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fY1T1-0006JC-9O for qemu-devel@nongnu.org; Tue, 26 Jun 2018 23:50:06 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:58370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fY1T0-0006I1-WF for qemu-devel@nongnu.org; Tue, 26 Jun 2018 23:50:03 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5R3nNig039329; Wed, 27 Jun 2018 03:50:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=Ovi+bRGIFjE2acKcnI/FbOa54O4jprl/f0zyjrZsID4=; b=rPGzewaFE4gQEDjCXus4+if47UHrfaaM69BGvq7Guw0u0JB/6Cz6IqMFagPbNII5V5Oa iBzECZRR8M+jvk/ILyZryJ6RZcx+/bgKf2RR/NbMzP3nbu0W90N4+OpI8Q8z1iE8kbFk H0F+ejARdmO5H89fvo1gectKXsMhR3gRnjsbyGDL+GNVFfKEy3ktnunx2Gx7zNT9/oWP h5ngDV5h+j+nQXoqbRa+6fTBwQ3HjeRXNDoWudKjGQp+/k91/4dHPe5rI8jfNLDQn45R Rxzn4cDjrZjoUmmLsDl+RG1XK02DEDkJyNBPymTH9x12yCAqwNoigJMLwHTXw5B9bx0n ug== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2jum57u0jp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Jun 2018 03:50:00 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5R3nx0Z023575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Jun 2018 03:49:59 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5R3nxKZ019347; Wed, 27 Jun 2018 03:49:59 GMT Received: from troi.attlocal.net (/10.154.103.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 Jun 2018 20:49:58 -0700 From: Venu Busireddy To: venu.busireddy@oracle.com, "Michael S . Tsirkin" , Marcel Apfelbaum Date: Tue, 26 Jun 2018 22:49:35 -0500 Message-Id: <20180627034935.20276-6-venu.busireddy@oracle.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180627034935.20276-1-venu.busireddy@oracle.com> References: <20180627034935.20276-1-venu.busireddy@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8936 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=984 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806270042 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 Subject: [Qemu-devel] [PATCH v2 virtio 1/1] Add "Group Identifier" to virtio PCI capabilities. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add VIRTIO_PCI_CAP_GROUP_ID_CFG (Group Identifier) capability to the virtio PCI capabilities to allow for the grouping of devices. Signed-off-by: Venu Busireddy --- content.tex | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/content.tex b/content.tex index be18234..27581c1 100644 --- a/content.tex +++ b/content.tex @@ -599,6 +599,8 @@ The fields are interpreted as follows: #define VIRTIO_PCI_CAP_DEVICE_CFG 4 /* PCI configuration access */ #define VIRTIO_PCI_CAP_PCI_CFG 5 +/* Group Identifier */ +#define VIRTIO_PCI_CAP_GROUP_ID_CFG 6 \end{lstlisting} Any other value is reserved for future use. @@ -997,6 +999,40 @@ address \field{cap.length} bytes within a BAR range specified by some other Virtio Structure PCI Capability of type other than \field{VIRTIO_PCI_CAP_PCI_CFG}. +\subsubsection{Group Identifier capability}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Group Identifier capability} + +The VIRTIO_PCI_CAP_GROUP_ID_CFG capability provides means for grouping devices together. + +The capability is immediately followed by an identifier of arbitrary size as below: + +\begin{lstlisting} +struct virtio_pci_group_id_cap { + struct virtio_pci_cap cap; + u8 group_id[]; /* Group Identifier */ +}; +\end{lstlisting} + +The fields \field{cap.bar}, \field{cap.length}, \field{cap.offset} +and \field{group_id} are read-only for the driver. + +The specification does not impose any restrictions on the structure +or size of group_id[], except that the size must be a multiple of 4. +Devices are free to declare this array as large as needed, as long as +the combined size of all capabilities can be accommodated within the +PCI configuration space. + +The field \field{cap.cap_len} indicates the length of the group identifier +\field{group_id}. The fields \field{cap.bar}, \field{cap.offset} and +\field{cap.length} should be set to 0. + +\devicenormative{\paragraph}{Group Identifier capability}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Group Identifier capability} + +The device MAY present the VIRTIO_PCI_CAP_GROUP_ID_CFG capability. + +\drivernormative{\paragraph}{Group Identifier capability}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Group Identifier capability} + +The driver MUST NOT write to group_id[] area. + \subsubsection{Legacy Interfaces: A Note on PCI Device Layout}\label{sec:Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Legacy Interfaces: A Note on PCI Device Layout} Transitional devices MUST present part of configuration