Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1555286ybh; Mon, 20 Jul 2020 00:57:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ1h35wLQXSlNJ7x3oNZtpNUbfqzpS+7tI044OWrz5JakRq3QyIL9wpjRTc5ENPdM6WVBr X-Received: by 2002:a05:6402:1a4b:: with SMTP id bf11mr19477081edb.191.1595231820114; Mon, 20 Jul 2020 00:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595231820; cv=none; d=google.com; s=arc-20160816; b=xCLhGQM31qL50HDHCnzH0HDsjx9/K3tLuApndZdqEsZnwz5fxfP90HP1G7t6SIp7O2 pI+p+bj67uYkICi7MZzODEhhLUX2VSSZEnxNomI2Obvpm804aF9ZRt9rSbILWvGJQveW 9IZ8nPi0SN2taD6+p/e5u4/X5KAcYbBg+ZEZgZzuohWN5+51eZI/+vJScRzW2Kpd9eeO 6fpekLYNONwkvCxcvOFS69fwtAqStk2HWIuJzlc3bkB9h/jd7nhICE6xFO9Y9z4LhR22 VybqcoMHVMusGl1cSmsjTFPu1O1bWch4yybQn9+I6oscuVFLSDGIA5GGA2NgLRbPogs+ AE7Q== 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=hck6csmKG4yzwRKkPt+YPxdLMPe51jygDp+VNmcShhQ=; b=XAQaHjRpm01Dfhb+98sFCwfu69Ti+bCjBaZk7xgzQtDs1G0oOPAiFh08OtBNmQm3cO DwRs7ubw7AwUK9lI2bOq2eX73UntuRsQLlIraglBji6z++WkDOLUEuIZLNoe53Aow3Cs 72CSMo1q1nXPYSRtHgpOasFVtQaSLpzEnxz2FPurNUs6kmeYWYG2znlzjx3+mAsIzs4f iB24qAEGL6sKbKiGQ16Wux/GzCFLrdlxzWct0tBpWmIIIF8nLPW3H7k0C/fQRVhDzeKh fEc9bCIVCsbgvemWIpsnQq+fHSP/iJfKZTvXjfoDLsCLrkkGKPEXpX6F+8EMVI2JZT8b zuSg== 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 me7si9888303ejb.716.2020.07.20.00.56.37; Mon, 20 Jul 2020 00:57:00 -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 S1726699AbgGTHxs (ORCPT + 99 others); Mon, 20 Jul 2020 03:53:48 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41246 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725815AbgGTHxr (ORCPT ); Mon, 20 Jul 2020 03:53:47 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.com) with SMTP; 20 Jul 2020 10:53:45 +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 06K7rjgJ008217; Mon, 20 Jul 2020 10:53:45 +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 06K7ETfh032183; Mon, 20 Jul 2020 10:14:29 +0300 Received: (from eli@localhost) by nps-server-21.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 06K7ETPs032182; Mon, 20 Jul 2020 10:14:29 +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, parav@mellanox.com Subject: [PATCH V2 vhost next 02/10] vdpa_sim: use the batching API Date: Mon, 20 Jul 2020 10:14:08 +0300 Message-Id: <20200720071416.32112-3-eli@mellanox.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200720071416.32112-1-eli@mellanox.com> References: <20200720071416.32112-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.26.0