Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5417965pxu; Thu, 22 Oct 2020 01:31:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNOLZfAPK0suXD8KzF1bzG+h4QzMWr4TGget/fs8VIbPwQJEDNXt2UU1t63j3A7Lci8oiL X-Received: by 2002:a17:906:3a8d:: with SMTP id y13mr1239741ejd.460.1603355482498; Thu, 22 Oct 2020 01:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603355482; cv=none; d=google.com; s=arc-20160816; b=e1cTEW+UuMqkQI7UX8E4OEDuy7BnV1z50kVCu/51Oury9QIkdFZJCefiQ/VJ9dUktJ 5aE/vN6mTMxCnXHrfQYTOe8weUyJWg8ZGIbPyjco1gUQJnQC1MO1Ezms+t7FlOuGykl8 L3kjz1VNCjQK3OxRItUVAHys8lP4eVlUQj8N7Pr7VUt2Q6dUrwzkNWumywKhVFwBzNSR SpJejTo43u9RveMxSXqH7Db81pLlPkTbCl/0PlTwekKGcjfZ5ExhlSdaho00jFBzB6bt YrAOd/avrLsmFZXB8doKzGq2SKcoogIlqzN7VgvP8qOkEpXxc+A1ix//+fKTpFQ3dBDW orSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=g4B//qnaxTvyagU4Ta4XmHD0G1WDTvcCQn1ISIno4ag=; b=d/d4mRtMK4hnAOJcLH4B2HnPFIoM+7PggWEaS5N4bGbFfJkK0axCkDzTv2eM31Xb5m zZmw7Eq3fiur4xhBjOrd4cdEuzNv1XyYM0KqQ9K5bBeJTOhspmhzFCvwNpqWLQVfXl1E idQ/loCDSAJNS4c+s3c3xc4qMnV44coyzr/QQ1JxCZIj+5alVZXoARnVc7ZyAimyk9Or CxUxChrRWT7odqSrkdlzqiI5sLU4gfoXDa8pH6vkJ9SxAwZgyXwbP2RK3WC0qqBDTEf8 aCXDG0PRRlVdGG6pQtwBAlgalAm0kPHTmie63cVmYxKPBzCvSLSuXTtTjn8exdCNhYKM 6Apw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Kc5O2xUj; 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 t7si402574ejr.659.2020.10.22.01.31.00; Thu, 22 Oct 2020 01:31:22 -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=Kc5O2xUj; 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 S2508044AbgJVFrk (ORCPT + 99 others); Thu, 22 Oct 2020 01:47:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54329 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2508040AbgJVFrk (ORCPT ); Thu, 22 Oct 2020 01:47:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603345659; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g4B//qnaxTvyagU4Ta4XmHD0G1WDTvcCQn1ISIno4ag=; b=Kc5O2xUjpMbgtyLygBwmqGXIYejZDoWjy8uQWLfUVnn22URh5zE7JB7RNmeum1/ewFa7/t zui+KRLiqqrEQIkCowTx3HT0vciq5iARY6teVfaudiq/ZndceSgsfWmXWaNmBYzfS9tuNh TvtcHj+nMaaC1NEXgGo5nHVLw9mGyO8= 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-55-24ki4_b3MOywOgsTgU-wwA-1; Thu, 22 Oct 2020 01:47:37 -0400 X-MC-Unique: 24ki4_b3MOywOgsTgU-wwA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A3F98797F6; Thu, 22 Oct 2020 05:47:34 +0000 (UTC) Received: from [10.72.13.119] (ovpn-13-119.pek2.redhat.com [10.72.13.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA8CD5C1C7; Thu, 22 Oct 2020 05:47:25 +0000 (UTC) Subject: Re: [PATCH 0/4] vDPA: API for reporting IOVA range To: "Michael S. Tsirkin" Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, 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 References: <20200617032947.6371-1-jasowang@redhat.com> <20201021104508-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <09525e8b-2c7a-de5d-128a-79b5b0725224@redhat.com> Date: Thu, 22 Oct 2020 13:47:19 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201021104508-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/10/21 下午10:45, Michael S. Tsirkin wrote: > On Wed, Jun 17, 2020 at 11:29:43AM +0800, Jason Wang wrote: >> Hi All: >> >> This series introduces API for reporing IOVA range. This is a must for >> userspace to work correclty: >> >> - for the process that uses vhost-vDPA directly to properly allocate >> IOVA >> - for VM(qemu), when vIOMMU is not enabled, fail early if GPA is out >> of range >> - for VM(qemu), when vIOMMU is enabled, determine a valid guest >> address width >> >> Please review. >> >> Thanks > OK so what is the plan here? Change begin-end->first-last and repost? I've posted V2 with this change, but it get some warning for buildbot. Will post a V3. Thanks > >> Jason Wang (4): >> vdpa: introduce config op to get valid iova range >> vdpa_sim: implement get_iova_range bus operation >> vdpa: get_iova_range() is mandatory for device specific DMA >> translation >> vhost: vdpa: report iova range >> >> drivers/vdpa/vdpa.c | 4 ++++ >> drivers/vdpa/vdpa_sim/vdpa_sim.c | 11 +++++++++++ >> drivers/vhost/vdpa.c | 27 +++++++++++++++++++++++++++ >> include/linux/vdpa.h | 14 ++++++++++++++ >> include/uapi/linux/vhost.h | 4 ++++ >> include/uapi/linux/vhost_types.h | 5 +++++ >> 6 files changed, 65 insertions(+) >> >> -- >> 2.20.1