Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp108959pxa; Fri, 21 Aug 2020 02:31:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPVM5JKCtWxmKRyEhrKW0Qcx/agK2elqTxh8W8sVZQOlNA+bNCCd/YR2YZW+pl+dQTijF9 X-Received: by 2002:aa7:d286:: with SMTP id w6mr1885656edq.221.1598002278388; Fri, 21 Aug 2020 02:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598002278; cv=none; d=google.com; s=arc-20160816; b=AKrz0URf7JysOJ2Jeb9YN3OhqK5TMpNOOEQYhiB2SYWiUbCEGVcQm/UTKZ33eQijub Jb9batZVaYCAhkGqNlpiN3oaS9QCXs9pg48tTX+O7HeOJRoavhqwwEdrTod9f//zGOa9 kYW8ND5g/JYWWPEpObBta7DrucvjkrZFoYYGJLSJnuIP1l736PAr49jUIQop8UmI54i4 gdJeKgb5Gzyh0u7hq+yEatoKXF1nTPpy99QcpsGR2A+48bdZrF/s0EvOw++g+E5X7yjB 74iCgz7GZrKfS0MaQ0TQbDIEjh4OctfxYOeuuxguwacFJlNBwalf0a7UmchzErhPN4Ww m0Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=JjMCOzpJotfhpqv5rwTIXLpouUojwObpb+Um6+p3l6o=; b=NRmKz34/xXmggsdSIK2lsDsOoCKbAJlXih+qfIaku9alUIzD+12dYPU6LDoLwKAqRz MkuqwMLjPnyT+ashsud+qvmjnmG/Xs4rqlemTiGwY6uCLRHbDGAjSdpclA4QAMSyg8Rt SYKF5uCxysOkBQQhy25K6B/JdznAQjTwRDiBFYcFfF6BfCU9OcCzAVWbjyfglPYAkXFU zRsar0PlRgzYfgw5FtZVuPURjMo3X6GASQAJ3kcLbYdlksjhm+KcmYQTxDrYy/G0ZHHO Nz1kUG7vMK7tYCW5XOt7Kg9PwT0Baq1xvDwm57RHYic8vyoE925bXsszWi3cYfQE9LCx 1oqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X00bfB2H; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si1111231edb.548.2020.08.21.02.30.55; Fri, 21 Aug 2020 02:31:18 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X00bfB2H; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728467AbgHUJ2v (ORCPT + 99 others); Fri, 21 Aug 2020 05:28:51 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:55426 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728461AbgHUJ2q (ORCPT ); Fri, 21 Aug 2020 05:28:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598002125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=JjMCOzpJotfhpqv5rwTIXLpouUojwObpb+Um6+p3l6o=; b=X00bfB2HtEnZd/lTuxC4yr7gzI+tnAV00o/5mkdVe6Zi4DGSE2FZP4A+PMff7DjCgskYwE MXRsi0FLhfwYyUyTIDJuJnHlZUzf+GyGMEQZW7/rn8/W3NCYUgfRs73/yVawOsj0CYkCeq Fjlub1DK0q+swnAYN+QT8XYYRnMXReg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-UHmgBtRlMzi2jd2R4zBR0A-1; Fri, 21 Aug 2020 05:28:43 -0400 X-MC-Unique: UHmgBtRlMzi2jd2R4zBR0A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C195873084; Fri, 21 Aug 2020 09:28:42 +0000 (UTC) Received: from hp-dl380pg8-01.lab.eng.pek2.redhat.com (hp-dl380pg8-01.lab.eng.pek2.redhat.com [10.73.8.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BA2B7E30F; Fri, 21 Aug 2020 09:28:34 +0000 (UTC) From: Jason Wang To: mst@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: rob.miller@broadcom.com, lingshan.zhu@intel.com, eperezma@redhat.com, lulu@redhat.com, shahafs@mellanox.com, hanand@xilinx.com, mhabets@solarflare.com, gdawar@xilinx.com, saugatm@xilinx.com, vmireyno@marvell.com, zhangweining@ruijie.com.cn, eli@mellanox.com, Jason Wang Subject: [PATCH V2 3/3] vdpa_sim: implement get_iova_range() Date: Fri, 21 Aug 2020 05:28:13 -0400 Message-Id: <20200821092813.8952-4-jasowang@redhat.com> In-Reply-To: <20200821092813.8952-1-jasowang@redhat.com> References: <20200821092813.8952-1-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 62d640327145..89854e17c3c2 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -574,6 +574,16 @@ static u32 vdpasim_get_generation(struct vdpa_device *vdpa) return vdpasim->generation; } +struct vdpa_iova_range vdpasim_get_iova_range(struct vdpa_device *vdpa) +{ + struct vdpa_iova_range range = { + .first = 0ULL, + .last = ULLONG_MAX, + }; + + return range; +} + static int vdpasim_set_map(struct vdpa_device *vdpa, struct vhost_iotlb *iotlb) { @@ -657,6 +667,7 @@ static const struct vdpa_config_ops vdpasim_net_config_ops = { .get_config = vdpasim_get_config, .set_config = vdpasim_set_config, .get_generation = vdpasim_get_generation, + .get_iova_range = vdpasim_get_iova_range, .dma_map = vdpasim_dma_map, .dma_unmap = vdpasim_dma_unmap, .free = vdpasim_free, @@ -683,6 +694,7 @@ static const struct vdpa_config_ops vdpasim_net_batch_config_ops = { .get_config = vdpasim_get_config, .set_config = vdpasim_set_config, .get_generation = vdpasim_get_generation, + .get_iova_range = vdpasim_get_iova_range, .set_map = vdpasim_set_map, .free = vdpasim_free, }; -- 2.18.1