Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp940177rdb; Fri, 1 Dec 2023 02:49:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnrDmC58pc56BCmiA8gB4iKiuhWRGyleYvUShdpH0f2ylY3UZ3w/iL39S5eSSLG6PNK+0P X-Received: by 2002:a05:6a20:3c8b:b0:181:74fe:ba83 with SMTP id b11-20020a056a203c8b00b0018174feba83mr27116519pzj.40.1701427786517; Fri, 01 Dec 2023 02:49:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701427786; cv=pass; d=google.com; s=arc-20160816; b=zhkHShXqE7iAg6bfL3l83+qD8YTIZVTF6EloqqQWet3pvRCZc/XbaZ5ytXwtJnKlUz G+Bb2AtAg7nkQUqTa05DeaCLaEX9EmswBVx40wK1TOvHtpFQ5CfQmUXO92B7Ga7tCemE CXq0fbDMiyTGAsBX8y+gHLxW/FPUUxN5UwMkxTtsktjnAtgvqWdXT62uMLK34IF95GJs BxAMIpu/leBY//6w/+FK5Msh9m5Yr1/T9hJuHzdEDB6P46M/D2HBF71AmImVTUq99F7l PMWWxFUVOUTmExeO6s0fdm9vTDMTSLpcwtIz9uO1iT8Zy8maAz5bOquw4cN9T2PHt9Li A0Cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IBN3VhtLOxK0QpYiOrL3s1k0DcnOLMnsNwxCZKecFEI=; fh=0ZoAfpUuBzi0z9x0PoyNrYHZC5Aml4rtEs5IsTUnmtE=; b=tE46+ldDkuPAUyqmFQ+Gbjr3BokLGv1Vv0J8Hv6WuRL0giht6e2YiSJ4vAzorvA4BA SuY2aVy2RCl0uj3i3nXSRHPDHCZLVfqD9XhVbOcbfggAM5jIuru5wZold4iQDFrl1Raw pTa+zaX5IU2BXxJu4X35QCu1dKjFgX6gt0RdpfY76dYNeO7JJ12FtW26sSvtYTRW/fDE cDrRpkyj/2Jo4ucRePy9FwHE3sfOdyXuEZFSGMIGB5keIsllLAQ1J85pnLeGP0SfdKGC ezwSjeY9FImzSuhdQKijzO9tARsTanD5066yESjXyhnb4sx8nElNJPHB0I869tAPyEon JnEw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=dckyIJtj; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j35-20020a632323000000b005b8ebaa2937si2960762pgj.47.2023.12.01.02.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 02:49:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=dckyIJtj; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BD72880D8840; Fri, 1 Dec 2023 02:49:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378399AbjLAKt0 (ORCPT + 99 others); Fri, 1 Dec 2023 05:49:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378378AbjLAKtZ (ORCPT ); Fri, 1 Dec 2023 05:49:25 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2041.outbound.protection.outlook.com [40.107.243.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC60B196; Fri, 1 Dec 2023 02:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iSA0KTtQir9HYsmW0RBX64q0cwy+a1xgEa81zPt1MFa17mpxxWQbscQcCtIzpM/npXewgqlO3cBMamV1cNHhAXHWHD5xsUH+o1oK5k64BtO93JeZGMMtISXlOGQef++HrmgweKaZfNch59udxBHntMt2kavlePvrHaTn6Kiw1M8PMi6u8eIGt98Bro8Fge7iModrht5SZ2SIeZBhLx8YbfuIpPfNPv/4q8vtYgp8CoM+DD7vkyoqo+Xpf9N2I1Ua9tQDFL4+CNic0aQPdnqy4GIXNA+3PQiATYZYuyl8qsRfHLAuMswHKSpWSMu3JDbPcPIlkvI9lPM09tg1pHZZrA== 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=IBN3VhtLOxK0QpYiOrL3s1k0DcnOLMnsNwxCZKecFEI=; b=M4RQdSG4IrIXTcZ/UH3hqaYG6yqxcARCdfZQRsu4iGHaOZ8y2M9ezBSXKa8vr1TD11O3wOuskfiw/AVK20B/8r4X8/Q5Ge32GYMcWWzqAk/GMxZ7R+7je0uyIoEcPaR5IkPghYoKSQgTwKQSCTQdE1viuwTwCuMDgv1Ax42vx6k8F3irmcBWrLYMJOKLK5iJPLZHFtoCgmzy48Ffl8K4hDQuQkxkGn28fBsyx5G0KW/k5yIj4464qKeYh08XUzYdGykudYtwsZuyprC5QZhGNFW6BiBKGvxgs1JqdLD+OET+Hzp6uj6tAXr0vzJqGq9XP0J3x/6aX1heLvHQyMDSZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IBN3VhtLOxK0QpYiOrL3s1k0DcnOLMnsNwxCZKecFEI=; b=dckyIJtjNq2HsUT28qtDw/0g//OgjMcUMbDalgD6Yzc2D+HWoAWC1GCkSVKafs73LfwoUZvAkJawmMtc3BTCA3APN/LSExjJR9CL1iFcWhTxBO+U7Wtd/GwJTpcl10h8dR3KJuD8pyV2YZgJ28gZTrdEFw3ccCGj2F1z1kkc0zBLu0BTEOUnGUEtHutReTvw+7+E1u3c2emN2nueA5PJ5gCQXimJcXhhOUwbdRqYVg3cXhsOdta+RvDy4W7IEXV3apIqCsdYs0f1TIE8+q6RSnoCtCzThmtqje92pnKa2YEY/ITGFqvCoeCk67+K1MhnDUUhYINSbtCkfVgEVNrgaw== Received: from MN2PR18CA0014.namprd18.prod.outlook.com (2603:10b6:208:23c::19) by DM6PR12MB4338.namprd12.prod.outlook.com (2603:10b6:5:2a2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.24; Fri, 1 Dec 2023 10:49:27 +0000 Received: from BL02EPF0001A0F9.namprd03.prod.outlook.com (2603:10b6:208:23c:cafe::64) by MN2PR18CA0014.outlook.office365.com (2603:10b6:208:23c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.24 via Frontend Transport; Fri, 1 Dec 2023 10:49:27 +0000 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 Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0001A0F9.mail.protection.outlook.com (10.167.242.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.17 via Frontend Transport; Fri, 1 Dec 2023 10:49:27 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 1 Dec 2023 02:49:13 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 1 Dec 2023 02:49:13 -0800 Received: from c-237-113-220-225.mtl.labs.mlnx (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Fri, 1 Dec 2023 02:49:10 -0800 From: Dragos Tatulea To: "Michael S . Tsirkin" , Jason Wang , Eugenio Perez Martin , Si-Wei Liu , Saeed Mahameed , Leon Romanovsky , CC: Dragos Tatulea , , , Gal Pressman , Parav Pandit , Xuan Zhuo Subject: [PATCH vhost 0/7] vdpa/mlx5: Add support for resumable vqs Date: Fri, 1 Dec 2023 12:48:50 +0200 Message-ID: <20231201104857.665737-1-dtatulea@nvidia.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0F9:EE_|DM6PR12MB4338:EE_ X-MS-Office365-Filtering-Correlation-Id: a7d2c6d0-8a0e-4229-b24e-08dbf25b3088 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZN8kHCAn27B1dQTHbmTpXfGlfJw0CvspC2PlpK2+SBSPDLj3sGgfMjvDQBayC8aMq8kbOYdDXyfklh0BbXx5tGKtea4PFIjU2GqTxR3pFK1jmdRSoovs2IwsqiVWesdngwysw46Bw+yT/KgSXok7wDkYrX/+4+WufGxLMjoeioesBdJ9XR5Rg9o/M28P1SJlAMYgyHDbfe2Jy86os5CBbr1lhWuxzzDqhtw+jnW8EsBFZxglidyk83ansC1FLxNzSjbNiOg4ICmr+Dbb2D8S8KMYQq5uJk3O1r/Li4AMamEa5vKAVmisybX9RVjNuCc+sDNiuttxZhutTcKjAkAWvtQsq1jgQObaknqtFYPuwVD6bofR/KoGynJf9r1RCUf6Ry6F6cqi2zRitQLl0uUn/+y55baeAOtz3NoahydKQWkxnDjvGc9X32RTE96ApQ1a9gjtHWhH7CwqhYJRGg0htQ/btbo2LmdKccG2t+M4d/sjN4wySywPx7OmV++NqA0LaJkNB+vK+hbt9YlX2BTHmbhVwvfa+Tfjm3RgOuw7ljq+eZcSa53Md+ErAtjPeouxIguK+4zYEYJbkZuq5irGvqQfr6iXRpNoDk92d9nLqbpwfFCeFAWAhAx9EsEOf7FRIeWiZwzDsIaC0c/UD6A+Qh0XAmIq6P1blRAz22eeDpoX94XdSSfNpHXf3s/erpU7eJzzpN45Hd/TfE+tygVIyjK6PSaI7O6DSI0ew0QT4kHOJlX8ZReTTg2i0BEeXhMVs57SNZNf+a3KiaKsrNNQs4YmLc3NKeIZErMe2A1WyX8= 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)(346002)(136003)(39860400002)(376002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(82310400011)(46966006)(40470700004)(36840700001)(40480700001)(40460700003)(2906002)(36860700001)(7636003)(82740400003)(47076005)(356005)(36756003)(41300700001)(5660300002)(86362001)(83380400001)(6666004)(336012)(1076003)(426003)(26005)(2616005)(966005)(478600001)(110136005)(316002)(70586007)(54906003)(4326008)(70206006)(8676002)(8936002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2023 10:49:27.1236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7d2c6d0-8a0e-4229-b24e-08dbf25b3088 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: BL02EPF0001A0F9.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4338 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 01 Dec 2023 02:49:43 -0800 (PST) Add support for resumable vqs in the driver. This is a firmware feature that can be used for the following benefits: - Full device .suspend/.resume. - .set_map doesn't need to destroy and create new vqs anymore just to update the map. When resumable vqs are supported it is enough to suspend the vqs, set the new maps, and then resume the vqs. The first patch exposes the relevant bits in mlx5_ifc.h. That means it needs to be applied to the mlx5-vhost tree [0] first. Once applied there, the change has to be pulled from mlx5-vhost into the vhost tree and only then the remaining patches can be applied. Same flow as the vq descriptor mappings patchset [1]. To be able to use resumable vqs properly, support for selectively modifying vq parameters was needed. This is what the middle part of the series consists of. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-vhost [1] https://lore.kernel.org/virtualization/20231018171456.1624030-2-dtatulea@nvidia.com/ Dragos Tatulea (7): vdpa/mlx5: Expose resumable vq capability vdpa/mlx5: Split function into locked and unlocked variants vdpa/mlx5: Allow modifying multiple vq fields in one modify command vdpa/mlx5: Introduce per vq and device resume vdpa/mlx5: Mark vq addrs for modification in hw vq vdpa/mlx5: Mark vq state for modification in hw vq vdpa/mlx5: Use vq suspend/resume during .set_map drivers/vdpa/mlx5/core/mr.c | 31 +++--- drivers/vdpa/mlx5/net/mlx5_vnet.c | 172 +++++++++++++++++++++++++---- include/linux/mlx5/mlx5_ifc.h | 3 +- include/linux/mlx5/mlx5_ifc_vdpa.h | 4 + 4 files changed, 174 insertions(+), 36 deletions(-) -- 2.42.0