From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E02DBC35249 for ; Wed, 5 Feb 2020 03:12:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B468E2085B for ; Wed, 5 Feb 2020 03:12:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Stdyg3mj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727789AbgBEDMk (ORCPT ); Tue, 4 Feb 2020 22:12:40 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:23744 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727792AbgBEDMk (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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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 >> >>