Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1018933ybh; Thu, 16 Jul 2020 00:24:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE8Zx8dmZNCISK78q44JsPSpe+W2DjRPlv9zlWcaKeG+mEVTLqAKJMkuF+BjLTcEa8iQGE X-Received: by 2002:a17:906:46d1:: with SMTP id k17mr2468516ejs.446.1594884270023; Thu, 16 Jul 2020 00:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594884270; cv=none; d=google.com; s=arc-20160816; b=mOCbPKqt3GML1gOYStmRKJ1Pv+83D/VSSotdCyckT/Y0GrSgjXUUAfNkj+B5+mbs/N 1cTrUNb6nnWeNBMIgdSxzr8Bok6SPyc/eMfdboX6FDuRB3np9x3GVb5QDlVwvnq9s6hn FC/lHjzJE+XzSFT+LcKDoVCn2J1KRw2Zf1oDZO7OOx9ccNRI7CL3LvQ/q2cZyz1ynJtm Ltef6nGMCBwgIL5La+fmTZJIXkTdC/0RQKOloWgxMHxNsvoCanLXd8ym4EWu659fgKSO Gzyr6FwxScM+mtd9WCwOfR51wOLHF94GzpmAtbHLG1xm17pScrwOQOeYwoQpjilwhTbg 9Jog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9sa0HB0dIqbyOlwJDeNv0NxLep+PLicwlBqn5I1+9VA=; b=gJoEsIqhkkH8fhif/GI9I2uVI0tAAI0NnS/W9uGym6dFthUItYfZtydEWVfJnJTKrR 4aBgqqw1iyA9aVgS3Te47UpNIU1r1JTdhgp/YYoI4MGymkqyNgXOXZJ3N05R/Lu7XoIn dNVZY1onzNFmyJa7yrJTYwH/7A7RIZ1/GlqsqncGOUnz3Gz9aiAjOKWH0xmGj0p9OuOy O7+hxdCGAuwtHJfcBCK94FJ4wq5pUoDxRP7D8dhL3I6sQgOsrujyB+YzWbxo0PZ1F3Al tnHgT+JF59oRNOkM5Gihs1FIBQIE0Xd/h8dPyVrhWwXd+Xv5resAscj6gO5nEIKnNglD mZaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si446747ejd.441.2020.07.16.00.24.07; Thu, 16 Jul 2020 00:24:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728404AbgGPHXq (ORCPT + 99 others); Thu, 16 Jul 2020 03:23:46 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:60003 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728318AbgGPHXl (ORCPT ); Thu, 16 Jul 2020 03:23:41 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.com) with SMTP; 16 Jul 2020 10:23:35 +0300 Received: from nps-server-21.mtl.labs.mlnx (nps-server-21.mtl.labs.mlnx [10.237.240.120]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06G7NZTR006458; Thu, 16 Jul 2020 10:23:35 +0300 Received: from nps-server-21.mtl.labs.mlnx (localhost [127.0.0.1]) by nps-server-21.mtl.labs.mlnx (8.14.7/8.14.7) with ESMTP id 06G7NZ1E005414; Thu, 16 Jul 2020 10:23:35 +0300 Received: (from eli@localhost) by nps-server-21.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 06G7NZms005413; Thu, 16 Jul 2020 10:23:35 +0300 From: Eli Cohen To: mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: shahafs@mellanox.com, saeedm@mellanox.com Subject: [PATCH vhost next 02/10] vdpa_sim: use the batching API Date: Thu, 16 Jul 2020 10:23:19 +0300 Message-Id: <20200716072327.5359-3-eli@mellanox.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200716072327.5359-1-eli@mellanox.com> References: <20200716072327.5359-1-eli@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason Wang Change-Id: I3751f1aecce285e0f61530c69616852d49e5f547 Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 20 -------------------- drivers/vhost/vdpa.c | 1 - 2 files changed, 21 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index c7334cc65bb2..82d1068af3ef 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -548,24 +548,6 @@ static int vdpasim_set_map(struct vdpa_device *vdpa, return ret; } -static int vdpasim_dma_map(struct vdpa_device *vdpa, u64 iova, u64 size, - u64 pa, u32 perm) -{ - struct vdpasim *vdpasim = vdpa_to_sim(vdpa); - - return vhost_iotlb_add_range(vdpasim->iommu, iova, - iova + size - 1, pa, perm); -} - -static int vdpasim_dma_unmap(struct vdpa_device *vdpa, u64 iova, u64 size) -{ - struct vdpasim *vdpasim = vdpa_to_sim(vdpa); - - vhost_iotlb_del_range(vdpasim->iommu, iova, iova + size - 1); - - return 0; -} - static void vdpasim_free(struct vdpa_device *vdpa) { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); @@ -598,8 +580,6 @@ static const struct vdpa_config_ops vdpasim_net_config_ops = { .set_config = vdpasim_set_config, .get_generation = vdpasim_get_generation, .set_map = vdpasim_set_map, - .dma_map = vdpasim_dma_map, - .dma_unmap = vdpasim_dma_unmap, .free = vdpasim_free, }; diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 8827ae31f96d..65195b30133b 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -533,7 +533,6 @@ static int vhost_vdpa_map(struct vhost_vdpa *v, static void vhost_vdpa_unmap(struct vhost_vdpa *v, u64 iova, u64 size) { - struct vhost_dev *dev = &v->vdev; struct vdpa_device *vdpa = v->vdpa; const struct vdpa_config_ops *ops = vdpa->config; -- 2.27.0