Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from ws5-mx01.kavi.com (ws5-mx01.kavi.com [34.193.7.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4CED1C4167B for ; Fri, 10 Nov 2023 12:32:37 +0000 (UTC) Received: from lists.oasis-open.org (oasis.ws5.connectedcommunity.org [10.110.1.242]) by ws5-mx01.kavi.com (Postfix) with ESMTP id AA0B777871 for ; Fri, 10 Nov 2023 12:32:36 +0000 (UTC) Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id A21C5986D3C for ; Fri, 10 Nov 2023 12:32:36 +0000 (UTC) Received: from host09.ws5.connectedcommunity.org (host09.ws5.connectedcommunity.org [10.110.1.97]) by lists.oasis-open.org (Postfix) with QMQP id 97638986D0C; Fri, 10 Nov 2023 12:32:36 +0000 (UTC) Mailing-List: contact virtio-comment-help@lists.oasis-open.org; run by ezmlm List-ID: Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 8A141986D16 for ; Fri, 10 Nov 2023 12:32:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at kavi.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWW/k2zdHqKBuQijkDLVk8dkNNVGj7+KNSVZgLOrMH9N3tF45UB5fBF0IChJvEnW/y4QDaHo2gCBdzI0M1qBODJ0SOYzNlrMQhIK0ylQ+g1fP9CrrWBNyoW5K7tEDETeidbCtPyAIVKpnpwE7SDEVF4dBER2IU037o/xv1jTV3pxXLRtx7w2aJ+nnJVx+z/Brkr9wodWzJEu4/lUMC75z4Cz+v6v6r8B3LIwODGOiiR99p41uLT0+eo9Bkk/Lb2TXcJ4Pz9SYfu50bYhYKyhfnHRjRyJGKpBxZ1P/apKO0YJ2CBNo3p6cMpz4kbDS7v8fHjCpMFXwaMl3KYqQK72Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gpR1oB/h6f/4jb8CuYnIC9Z0m0GWFxVXM4hCY32wR5Y=; b=RNYH9Db4mf0SnKyHS5e25tfto45ZNyrLSRqq3bq8jm9oAtcMlISs2R2V6IGjaR4vmRyI8iAwzZudba/9Bm33Ito6bPAAEwPBN1EKDHQEo61efGNAy4miGai+Hbt7igTlYecQpRGxlGZNlWlEw7m4fAJL/MWcYVc1962tIXacHJTuUzrSElIO+H9c97CFWWaftKAJl4KMxdxFTB9JqEMDekqqqpKTd0/AdlVwHyUsXXqYwnkRVRucf+pSqP/bU1rSDqJPJs131SzP43JJRw432Nw7SbmJF929sZN4P6kdiIQOutCw2GI740qkrW55OM44JcQCw0FbsCOlhp2XoZn9Yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=lists.oasis-open.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C From: Parav Pandit To: , , CC: , , , , , , "Parav Pandit" Date: Fri, 10 Nov 2023 14:31:54 +0200 Message-ID: <20231110123200.2082779-3-parav@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231110123200.2082779-1-parav@nvidia.com> References: <20231110123200.2082779-1-parav@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB51:EE_|CY5PR12MB6453:EE_ X-MS-Office365-Filtering-Correlation-Id: dbadeb08-5bb7-4312-6628-08dbe1e91ccc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QmdvUgzrpVpiZM5h3vEBpq7MGwoOPmxCa1ifSYOEVEtzANU2F7dlqtD2IJCvu/tUPYhKQzPb5aQCdg4eo9ip+mVfVPAsEZDDEyesvBLksbg8/kzpFR1HBooKTwC7NQiczHN+Netg6U1JewPg+aeog7LHMm3cqVYubhHrWwQUaY7/f13v3noNJAITATrG8jsBTIDqUfTScjzcXcB3V/vXhxL8aNkTZ0BEQoyqdizvEW0Y4ZpNFuRUQfOI0ovSYZYRhjXSXO7ep6/WXIXMuizprt+nXEU/YW7iePJ7a3gWc6L6LzEYIQdulEwHTymelXvjhPHwqM2NHBxriM/GGKkDC5+h0Pwk8u8H8ebbhViNl3kavzIN8SPy7WEz5z4+1ucVNvah6dwRyf2L5dTRzCHXLOliLWPssnMXPoiTp6BV//CFF8k6XQeZXRC1K4Xj0X71sxGNDaAzIV6eJ0+NDtiMH7TKOt0DyXiqZcfD7L4/8AJhGxsOgwhOk8kqoFqTgU84wWmTmww8oCzs/FdsPZwqXTJ+tGYqqNJGaFVETbLTQyDY6Dc6G+rm/81PqB6+CUEpcOf8HhRkB8Wv1RA+9fohw2Yul9HeUacw7HBfH2d/fRrK0SNkqeQFjvlfLU14lF74v0BSuRZQ8LBwH3IK1E7Ugn3/AHnVCpm/Rlbc7JrIo5sJvlcLBzB2kHQfFUm7QvhJbfXuneJzX7VDSicCu1cCokTNBrQwUzaNV7idM7o7bHNu3QiCXNfAJjkbjJ5Ri5ziDqgbhyACvJAjX+EmZrPvgg== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(396003)(136003)(39860400002)(376002)(346002)(230922051799003)(451199024)(186009)(64100799003)(82310400011)(1800799009)(40470700004)(36840700001)(46966006)(83380400001)(2906002)(6666004)(426003)(336012)(41300700001)(40460700003)(36860700001)(47076005)(966005)(82740400003)(7636003)(356005)(478600001)(86362001)(316002)(70586007)(110136005)(36756003)(70206006)(54906003)(4326008)(8936002)(8676002)(107886003)(1076003)(5660300002)(2616005)(40480700001)(26005)(16526019);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2023 12:32:32.7812 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dbadeb08-5bb7-4312-6628-08dbe1e91ccc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB51.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6453 Subject: [virtio-comment] [PATCH v4 2/8] admin: Redefine reserved2 as command specific output Currently when a command wants to get two distinct types of data in the result, such as one consumed by the driver, other to be zero copied to some user buffers, the driver needs to prepare an extra descriptor for driver consumed field. When such a field is <= 4 bytes, extra descriptor is an overhead. virtio_admin_command already has 4B of reserved for the device writable area. Utilize it to define as device writable output. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/176 Signed-off-by: Parav Pandit --- admin.tex | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/admin.tex b/admin.tex index 6eeef58..c86813d 100644 --- a/admin.tex +++ b/admin.tex @@ -90,8 +90,7 @@ \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti /* Device-writable part */ le16 status; le16 status_qualifier; - /* unused, reserved for future extensions */ - u8 reserved2[4]; + u8 command_specific_output[4]; u8 command_specific_result[]; }; \end{lstlisting} @@ -192,11 +191,15 @@ \subsection{Group administration commands}\label{sec:Basic Facilities of a Virti \hline \end{tabularx} -Each command uses a different \field{command_specific_data} and -\field{command_specific_result} structures and the length of +Each command uses a different \field{command_specific_data}, +\field{command_specific_output} and +\field{command_specific_result} fields. The length of \field{command_specific_data} and \field{command_specific_result} -depends on these structures and is described separately or is -implicit in the structure description. +depends on the command and is described separately or is +implicit in the structure description. The \field{command_specific_output} +describes any command specific output which is up to 4 bytes size. The +\field{command_specific_output} contain one or more command specific +fields. Before sending any group administration commands to the device, the driver needs to communicate to the device which commands it is going to -- 2.34.1 This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC. In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting. Subscribe: virtio-comment-subscribe@lists.oasis-open.org Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org List help: virtio-comment-help@lists.oasis-open.org List archive: https://lists.oasis-open.org/archives/virtio-comment/ Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists Committee: https://www.oasis-open.org/committees/virtio/ Join OASIS: https://www.oasis-open.org/join/