From patchwork Tue Jun 19 16:32:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venu Busireddy X-Patchwork-Id: 10475163 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 DEEB1601D7 for ; Tue, 19 Jun 2018 17:33:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCF9928867 for ; Tue, 19 Jun 2018 17:33:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C161A28997; Tue, 19 Jun 2018 17:33:44 +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 3435528867 for ; Tue, 19 Jun 2018 17:33:43 +0000 (UTC) Received: from localhost ([::1]:44058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVKVj-0004uh-5W for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Jun 2018 13:33:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVJZD-0004Xf-2X for qemu-devel@nongnu.org; Tue, 19 Jun 2018 12:33:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVJZ8-0002lg-51 for qemu-devel@nongnu.org; Tue, 19 Jun 2018 12:33:15 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:41566) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fVJZ7-0002kl-Sw for qemu-devel@nongnu.org; Tue, 19 Jun 2018 12:33:10 -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 w5JGT4e6015409; Tue, 19 Jun 2018 16:33:08 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=uuyYpnTzEd8cgP7+4gJazis1YaczLuMQyk8tpdNB5NU=; b=QTvNatVMqrczDBC4zBwIJvu3hHLzJZ9LP6mxnQTpkbME1Fq6SprzX05sN/wLutUwOqV5 05D1QtRDGmJj0edObvjubJGgMa8sPFxBwHYEmVBt5frN6HEH3ymBIKT6zktDJtE5sm1F i+c8IpJ/qQZt0tDUdjcfc+f2IekrEeG185pkRQN7SbfSDoADQZCdpCAO7nRpdldDg+Bv BHt3+5scIY90rurrCa0TJ7z/ke+UhE9JOPuGooiSw5pk7hQsTDMmWGlmswr436LySDVp F/w6CeFI7kKZlVXx93VhjYJQRie2vB+o6abrSm7iVBDXhVtOQ0ybgCdsZp+LT8xwmZaB nw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2jmt01h1v0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jun 2018 16:33:08 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5JGX7bK000763 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jun 2018 16:33:07 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5JGX7mB011598; Tue, 19 Jun 2018 16:33:07 GMT Received: from localhost.localdomain (/10.159.242.141) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Jun 2018 09:33:07 -0700 From: Venu Busireddy To: venu.busireddy@oracle.com, "Michael S . Tsirkin" , Marcel Apfelbaum Date: Tue, 19 Jun 2018 11:32:28 -0500 Message-Id: <20180619163228.13790-5-venu.busireddy@oracle.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180619163228.13790-1-venu.busireddy@oracle.com> References: <20180619163228.13790-1-venu.busireddy@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8929 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806190182 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 X-Mailman-Approved-At: Tue, 19 Jun 2018 13:31:57 -0400 Subject: [Qemu-devel] [PATCH virtio 1/1] Add "Group Identifier" support 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 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/content.tex b/content.tex index 7a92cb1..7ea6267 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,47 @@ 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 size or +structure of group_id[]. Vendors 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. + +If there is enough room in the PCI configuration space to accommodate +the group identifier, the fields \field{cap.bar}, \field{cap.offset} +and \field{cap.length} should be set to 0. + +If there isn't enough room, some or all of the group identifier can be +presented in the BAR region, in which case the fields \field{cap.bar}, +\field{cap.offset} and \field{cap.length} should be set appropriately. + +In either case, the field \field{cap.cap_len} indicates the length of +the group identifier information present in the configuration space +itself. + +\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 or the BAR region. + \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