Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3954965rdg; Wed, 18 Oct 2023 10:26:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtT/djKIjlFVWaO9Pl1dXycGVdgvjTP9o/IgYa7fR56sPPTF0eiGErWqTeumSAGLTomAYI X-Received: by 2002:a05:6a20:841e:b0:141:69d:8041 with SMTP id c30-20020a056a20841e00b00141069d8041mr7848739pzd.48.1697649979234; Wed, 18 Oct 2023 10:26:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697649979; cv=none; d=google.com; s=arc-20160816; b=sSaXxhzjcW34wmDN6y3QBmM1sXj9zhdHAAj+e4zxQe070z0OZ5jBfAG3PmXePdKikV yI2FntRer0uJwRK+pyGA0ITeawzGLJYfe8TVT54tUFfNqWE1DlDI/EQdp8RU7u9XYvUB +ktL2qq7WlmbudFO89qUgnqE4r1KoDlHxjO13gWWiMOzXPokoFAZvFmzmgbNqjEJ+hQO f6tE5We+FAfJZCesWUqd8sweFJ8S3r0vXZZj+LuZKM9+BfdGewvH3HCyItcxMCJUChMy wlSzqmLpE56fRVwh2htax4eqPDV5m7UpdYQD2AmFQiK3v/abncWmzyGhlTcI/pUWrS22 gb7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5AOd0/hJo+xQgO9OcEYZKv2n43WMiR7HBnvKw0ANJXA=; fh=kpvFEDB7rY9Gh9ZXo/tMWpz7VGEfd+t4l0SucyC8pt8=; b=zcQrxdq/KNq0R00LP+SgJylp8EyAVZ0qGJTPzY1iMiutWX+oPrzziQ5z8T10T9MRi4 xsqb4+U1fFGAPr0jrMv92+KGzlThb/44B440oENexp/znlFNsc+RReqCciuXYCxxJ+pQ 7PrwizSs6XzCUbaGLV85xglZO4fLyFzT5gaOXfSFidvbLmax/22/2/d62yRjMH29f4tp 1UcT7861chOdY2uBpBlvjgI5fHgeRDYI/UdaNgmGXKnZipXJGqtpzUCQPZi12+KUvbka WwOu+HKDEchAixLwgtHPE+hbP8WblPtoq/bNOrbxjFEJOh3/AFLS+k4a7ShBBzd0PhPH lYAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RpLe8K5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bf7-20020a656d07000000b005ab1fd6fbc1si2693068pgb.847.2023.10.18.10.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:26:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RpLe8K5m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CF8D080FCE0A; Wed, 18 Oct 2023 10:26:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbjJRRZr (ORCPT + 99 others); Wed, 18 Oct 2023 13:25:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbjJRRZp (ORCPT ); Wed, 18 Oct 2023 13:25:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45DA84482 for ; Wed, 18 Oct 2023 10:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697649895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5AOd0/hJo+xQgO9OcEYZKv2n43WMiR7HBnvKw0ANJXA=; b=RpLe8K5mAbONvk3pVUNsI4+KdLJWkb4Zd9ewl7cxXQAdsznE4rGSePUyLJFZV8w27RY0b4 i9ifvv9a0k6avUvykWdoY4WksisMo9a39GlOOQELElu2KislSdpYgCyQbG6VKGGHfv+yCk uTlHixqRbVjrgO5F6jvHbypvUdwpEc4= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-wKcdzogVMbO8MJ8zqYjt0Q-1; Wed, 18 Oct 2023 13:24:53 -0400 X-MC-Unique: wKcdzogVMbO8MJ8zqYjt0Q-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c51a7df557so40675041fa.0 for ; Wed, 18 Oct 2023 10:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697649892; x=1698254692; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5AOd0/hJo+xQgO9OcEYZKv2n43WMiR7HBnvKw0ANJXA=; b=oPARvJzAUh7RcgkeJhn9MYFUIz596E5nwULRc4e6X0NOYj+a06vxCveLaiz4sn5tJQ rTKqGq+Wdo1MJOUhObX945HkgAiIdu9Nwv7xt1glvnDAxK1Ep/GZS7roeIC3FyztWZHk CRUaoJa+2mouKfJDsvXzWfVctkg1QkoRDVbthxbznKQzt0eXySwfu1rPfPuOI6qSUx6Q C+Tx17U/etTXmBTwVL4jF+U2d1BGcybzFt90+qCvyUq3YDzFOJmZqb6sQK+gGXhirbKz +rRvfUiIGnhAhNx1N/KzoZaJ6SDdsEkIdlaDrklzBJr/9FRE9vdftAnYGNJSfQbVViEs D3Pg== X-Gm-Message-State: AOJu0Yx8v5Rg6Lc8ZomwDaZ3P6S8bPj0Qcq3QLTnMQBSPm+RukGniZE2 YQjBCgOjcoKnWhoZaeRG/cb4F8Z2JsMUHzDXkZ2DW5I9CEyyQwZRZcHP2COaAERZZR6N1MUg6x4 EtMf0Fbjmdqar/QzavWbqUGZG X-Received: by 2002:a2e:3619:0:b0:2bf:a9b6:d254 with SMTP id d25-20020a2e3619000000b002bfa9b6d254mr3934018lja.50.1697649892292; Wed, 18 Oct 2023 10:24:52 -0700 (PDT) X-Received: by 2002:a2e:3619:0:b0:2bf:a9b6:d254 with SMTP id d25-20020a2e3619000000b002bfa9b6d254mr3933990lja.50.1697649891837; Wed, 18 Oct 2023 10:24:51 -0700 (PDT) Received: from redhat.com ([2a02:14f:1f2:2037:f34:d61b:7da0:a7be]) by smtp.gmail.com with ESMTPSA id r9-20020a05600c320900b0040644e699a0sm2184668wmp.45.2023.10.18.10.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:24:51 -0700 (PDT) Date: Wed, 18 Oct 2023 13:24:46 -0400 From: "Michael S. Tsirkin" To: Dragos Tatulea Cc: Jason Wang , Eugenio Perez Martin , Si-Wei Liu , Saeed Mahameed , Leon Romanovsky , virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Parav Pandit , Xuan Zhuo Subject: Re: [PATCH vhost v4 00/16] vdpa: Add support for vq descriptor mappings Message-ID: <20231018132347-mutt-send-email-mst@kernel.org> References: <20231018171456.1624030-2-dtatulea@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231018171456.1624030-2-dtatulea@nvidia.com> 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 18 Oct 2023 10:26:16 -0700 (PDT) On Wed, Oct 18, 2023 at 08:14:39PM +0300, Dragos Tatulea wrote: > This patch series adds support for vq descriptor table mappings which > are used to improve vdpa live migration downtime. The improvement comes > from using smaller mappings which take less time to create and destroy > in hw. > > The first part adds the vdpa core changes from Si-Wei [0]. > > The second part adds support in mlx5_vdpa: > - Refactor the mr code to be able to cleanly add descriptor mappings. > - Add hardware descriptor mr support. > - Properly update iotlb for cvq during ASID switch. > > Changes in v4: > > - Improved the handling of empty iotlbs. See mlx5_vdpa_change_map > section in patch "12/16 vdpa/mlx5: Improve mr upate flow". > - Fixed a invalid usage of desc_group_mkey hw vq field when the > capability is not there. See patch > "15/16 vdpa/mlx5: Enable hw support for vq descriptor map". At this point, whether this patchset makes it in 6.7 will largely depend on how many rcs there are in 6.6, so it can get some time in next. > Changes in v3: > > - dup_iotlb now checks for src == dst case and returns an error. > - Renamed iotlb parameter in dup_iotlb to dst. > - Removed a redundant check of the asid value. > - Fixed a commit message. > - mx5_ifc.h patch has been applied to mlx5-vhost tree. When applying > this series please pull from that tree first. > > Changes in v2: > > - The "vdpa/mlx5: Enable hw support for vq descriptor mapping" change > was split off into two patches to avoid merge conflicts into the tree > of Linus. > > The first patch contains only changes for mlx5_ifc.h. This must be > applied into the mlx5-vdpa tree [1] first. Once this patch is applied > on mlx5-vdpa, the change has to be pulled fom mlx5-vdpa into the vhost > tree and only then the remaining patches can be applied. > > [0] https://lore.kernel.org/virtualization/1694248959-13369-1-git-send-email-si-wei.liu@oracle.com > [1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-vhost > > Dragos Tatulea (13): > vdpa/mlx5: Expose descriptor group mkey hw capability > vdpa/mlx5: Create helper function for dma mappings > vdpa/mlx5: Decouple cvq iotlb handling from hw mapping code > vdpa/mlx5: Take cvq iotlb lock during refresh > vdpa/mlx5: Collapse "dvq" mr add/delete functions > vdpa/mlx5: Rename mr destroy functions > vdpa/mlx5: Allow creation/deletion of any given mr struct > vdpa/mlx5: Move mr mutex out of mr struct > vdpa/mlx5: Improve mr update flow > vdpa/mlx5: Introduce mr for vq descriptor > vdpa/mlx5: Enable hw support for vq descriptor mapping > vdpa/mlx5: Make iotlb helper functions more generic > vdpa/mlx5: Update cvq iotlb mapping on ASID change > > Si-Wei Liu (3): > vdpa: introduce dedicated descriptor group for virtqueue > vhost-vdpa: introduce descriptor group backend feature > vhost-vdpa: uAPI to get dedicated descriptor group id > > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 31 +++-- > drivers/vdpa/mlx5/core/mr.c | 194 ++++++++++++++++------------- > drivers/vdpa/mlx5/core/resources.c | 6 +- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 105 +++++++++++----- > drivers/vhost/vdpa.c | 27 ++++ > include/linux/mlx5/mlx5_ifc.h | 8 +- > include/linux/mlx5/mlx5_ifc_vdpa.h | 7 +- > include/linux/vdpa.h | 11 ++ > include/uapi/linux/vhost.h | 8 ++ > include/uapi/linux/vhost_types.h | 5 + > 10 files changed, 272 insertions(+), 130 deletions(-) > > -- > 2.41.0