Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp52208ybg; Mon, 27 Jul 2020 23:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6KOgacvoFAq6VDII7qc3nOPZKkQ4JTD4flPlDA0Bbm8GG8mrzImUrwco+1npo8khIlTHF X-Received: by 2002:a17:906:5612:: with SMTP id f18mr14332193ejq.225.1595916632859; Mon, 27 Jul 2020 23:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595916632; cv=none; d=google.com; s=arc-20160816; b=tfUvTkuYdfcHdJi8lpkhpfAqmwf7lNtH0A8RZMiA2BkyojUp0RiNP0W5hqouwpC5C9 3R8oZF7BgmP5HPKCmjx+FezFOCxXtE/lsqkXqhVTh27IwsZMhzzuPvg68AUDL9gtlUsa qLcErAQT2ZoMpBtV6gMRdf1RZsaz231iFZBbgj8VF0Gm4GfLRUJp6cWqK+J28efsoQYr mk1fItvViGSwN0qv5fErPRzQqJGLYW8gURMUl4kEUz6/kjR1U8CU0TTCjJxwrEoqO9is oy9EN5ovtrpVzQKJwN5uwjarXD5KGzS5bd+jIFW8WuImzO1BxZeI2TQWqdChVVSpxqC1 64mQ== 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=PMIJwPkovxZ/CRH016hC8+IWVeMbUF1IJxyAJc8tW8FYY0FH5vGtWZ2aKfc00y6kra XV8wGjU3LGptBxqJohnwEpA/ZsqgVdNr0PC1/NCC8g1jLsf64MGORLiCVGdjffq4YESV mIS/Ji8vCcNV6IuORiU9Mk49eFhWofBZKDjsq6erbwf7sLO1lyz6lLt2xPi9+3GCSbdf r1R85yLyhmLGE9zY+4hPit5AEhEdweUQ3Q9nzYqQBQiXaMd8ggSf4yZxDt4jtZll35sC mPDIjF3OexUghgCQj/PO3AhJGOM3pp2dAk6my3nwZx8vDGU0EgLuYVRRz+fFvekUnmeI uj/w== 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 v21si106650ejx.513.2020.07.27.23.10.10; Mon, 27 Jul 2020 23:10:32 -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 S1727094AbgG1GGG (ORCPT + 99 others); Tue, 28 Jul 2020 02:06:06 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:34834 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726299AbgG1GGG (ORCPT ); Tue, 28 Jul 2020 02:06:06 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.com) with SMTP; 28 Jul 2020 09:06:02 +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 06S662T9016728; Tue, 28 Jul 2020 09:06:02 +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 06S662Tp004224; Tue, 28 Jul 2020 09:06:02 +0300 Received: (from eli@localhost) by nps-server-21.mtl.labs.mlnx (8.14.7/8.14.7/Submit) id 06S662oI004223; Tue, 28 Jul 2020 09:06:02 +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 V3 vhost next 02/10] vdpa_sim: use the batching API Date: Tue, 28 Jul 2020 09:05:31 +0300 Message-Id: <20200728060539.4163-3-eli@mellanox.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200728060539.4163-1-eli@mellanox.com> References: <20200728060539.4163-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