Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp187857ybv; Tue, 4 Feb 2020 19:13:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzv9qihiuTBEuF58AAkAFepsNh9vCh3p8abX14s01W85kYgVaOxBWSbo8ms5lU5JMzdzw19 X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr24112526otc.123.1580872439408; Tue, 04 Feb 2020 19:13:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580872439; cv=none; d=google.com; s=arc-20160816; b=KvmWW/Xn/toEs4RK6BaFgh6n+FrMfECai/e3UT6LsyqQv7oEFml9SYIgh3ndp/39gr VnUgRMmV9oRCq+AgUzPl4eLKAdRoO6JY+McBVK0rnhg+qEr7wLOMNW4+/3yiHUKYZ8OZ r5xHv4Pq+gbwguueMUuj3JRdaY+VqBLQ2q8JOxuEn9P+/AYD/OmcrS+Z6rIw5ZKNNbXj rcWzpurCemBbbCejQUl8oipBB5u4y8/KIxUD5WcR1lfOCJ6lEkszF73WZnv0yR30MluL 36c/jzb66+0HO0TVfP5KQf+YYrduAhrBpyDwaXzaDyBl4/6u5miwM3VJKGyDSj71a6LT o6AA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2wZYjlhnV9uQbMJ2hRMQnRxhJ0yidR93PS5+uUhhjmc=; b=dRiz+NPxpjPvMFymXKOsLU04d6oH/tmKcSX/CCAd2lNrCRBPH2Hxj1xVQsiSVsRhvN IkdcUsgzrp+O7M1O1SkXNnEW9LfLB7Vnx682tS924vexFq8rLUqg3CBEPDggJ6sf8EEn 2kjiq97VH73U7ScV1jvW0cnjE8lwj3yEAE8aPUCANqG7ZhuY/wCZmc9SAFXT72mcDRG6 kxigeNghScuONLOvBX3x2fx+TlUedVRUoz9IGvecpd3k5Vvk3yT5EdAGafz3HDYcPBNa jat+pAeg3cV7Tw68T/YLEubuTWtV4e71q/RX2yKviSIzJX7YPtacvzwZ4hONyQkcFQqQ 8Uvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Stdyg3mj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d197si10310179oig.115.2020.02.04.19.13.46; Tue, 04 Feb 2020 19:13:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Stdyg3mj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727792AbgBEDMk (ORCPT + 99 others); Tue, 4 Feb 2020 22:12:40 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:29140 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727816AbgBEDMk (ORCPT ); Tue, 4 Feb 2020 22:12:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580872359; 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=2wZYjlhnV9uQbMJ2hRMQnRxhJ0yidR93PS5+uUhhjmc=; b=Stdyg3mjIL71F8OHc4uKa8HaN3z175wsU2fxMZOpR/qR5sXTcN32fRNLH2pX+sWlb+aSes LwD4/vtNo3WaTpConuUBGRBjAzBXXt4QDJ3AT3akDt2oeYpOLguFhwmdOaB8c/EBFEKxDs ph4u7haZaNELUMll1eyTxsgItwzq/uY= 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-227-KYZusS0vPcmHoCCLxMdNTw-1; Tue, 04 Feb 2020 22:12:37 -0500 X-MC-Unique: KYZusS0vPcmHoCCLxMdNTw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C898018AB2C0; Wed, 5 Feb 2020 03:12:34 +0000 (UTC) Received: from [10.72.13.188] (ovpn-13-188.pek2.redhat.com [10.72.13.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id 966281001B3F; Wed, 5 Feb 2020 03:12:22 +0000 (UTC) Subject: Re: [PATCH] vhost: introduce vDPA based backend To: Tiwei Bie Cc: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, shahafs@mellanox.com, jgg@mellanox.com, rob.miller@broadcom.com, haotian.wang@sifive.com, eperezma@redhat.com, lulu@redhat.com, parav@mellanox.com, rdunlap@infradead.org, hch@infradead.org, jiri@mellanox.com, hanand@xilinx.com, mhabets@solarflare.com, maxime.coquelin@redhat.com, lingshan.zhu@intel.com, dan.daly@intel.com, cunming.liang@intel.com, zhihong.wang@intel.com References: <20200131033651.103534-1-tiwei.bie@intel.com> <7aab2892-bb19-a06a-a6d3-9c28bc4c3400@redhat.com> <20200204005306-mutt-send-email-mst@kernel.org> <20200205020555.GA369236@___> From: Jason Wang Message-ID: <798e5644-ca28-ee46-c953-688af9bccd3b@redhat.com> Date: Wed, 5 Feb 2020 11:12:21 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200205020555.GA369236@___> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/2/5 =E4=B8=8A=E5=8D=8810:05, Tiwei Bie wrote: > On Tue, Feb 04, 2020 at 02:46:16PM +0800, Jason Wang wrote: >> On 2020/2/4 =E4=B8=8B=E5=8D=882:01, Michael S. Tsirkin wrote: >>> On Tue, Feb 04, 2020 at 11:30:11AM +0800, Jason Wang wrote: >>>> 5) generate diffs of memory table and using IOMMU API to setup the d= ma >>>> mapping in this method >>> Frankly I think that's a bunch of work. Why not a MAP/UNMAP interface= ? >>> >> Sure, so that basically VHOST_IOTLB_UPDATE/INVALIDATE I think? > Do you mean we let userspace to only use VHOST_IOTLB_UPDATE/INVALIDATE > to do the DMA mapping in vhost-vdpa case? When vIOMMU isn't available, > userspace will set msg->iova to GPA, otherwise userspace will set > msg->iova to GIOVA, and vhost-vdpa module will get HPA from msg->uaddr? > > Thanks, > Tiwei I think so. Michael, do you think this makes sense? Thanks > >> Thanks >> >>