Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp140687ybv; Tue, 4 Feb 2020 18:07:18 -0800 (PST) X-Google-Smtp-Source: APXvYqygn8XfncrrEHLyb8rLBTTfORjM4BervC51Xr8ojeoimGyBsHSE2KeoARkFpm7/nO2+B5cd X-Received: by 2002:a9d:2184:: with SMTP id s4mr7681490otb.121.1580868438242; Tue, 04 Feb 2020 18:07:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580868438; cv=none; d=google.com; s=arc-20160816; b=SV0xcyi30g/1woj5XXUO4r7R4W6noFETrJJtqNpXRoKixoyzHszdkg83oVse3WNIWX ZWit7P/QlkjAH1rzMH8Zlh9DiGSpfYnHwPzyjUxosD9+yCNA104AjG6bHpia7G16wym4 h1Lb/ePx2mU9XXpUHToXjk0eI0423rYZ2vGra7OeiHGAymlmohr/pGY2Y822vCAS4jMw NVgrBdhwsld/HOMcAbp5I3BzmIpYvfc6m8ZHyAIWd0ftwgacX46kPMkE2wYbaaGglctF rXTtInFeTydiF44em2zzYTjd1pXRBQoi9B2LPybzrsQICeigoYrGDu6UDSu7pXTQbfA4 e8Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Y3GVvLQ5geVmNyKUMgdLebbNunI/Q2ZtadT1NF1goNw=; b=m3eEdBuRD9lwozzxFQ6fVDZQaswAgDXaZRd+jDqVbIhg6500znMdHmxkJMTsd3krIE o5Xlo3SeZn0BRnLq8adJRVk7N8masqUy9IUPtrtL2dvXFlg6c/EDxTq5NhDTwoKHBOdh zeWkxiyZPqyh1YHvs8gP842NZsXIc6iwWkECVQ6Iy8UIuFijO7pwWeBFBzmVQH8mujyR wdNlwhF3fI+UqvJOw3TeAhaaCvi4vZIkCTi3qqBwOGgihJOGoAES45Lqv0Lx1pdF/+qE 9ZPRd/1TMDn1E1WMEOIqvwMZaeik3VL3Sje4JdXD87IvO5SJBFHsjxi/8IEnR7b6ilG3 gfwQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si12015522oto.169.2020.02.04.18.07.06; Tue, 04 Feb 2020 18:07:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbgBECGJ (ORCPT + 99 others); Tue, 4 Feb 2020 21:06:09 -0500 Received: from mga11.intel.com ([192.55.52.93]:32641 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727714AbgBECGI (ORCPT ); Tue, 4 Feb 2020 21:06:08 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2020 18:06:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,404,1574150400"; d="scan'208";a="249555008" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.74]) by orsmga002.jf.intel.com with ESMTP; 04 Feb 2020 18:06:03 -0800 Date: Wed, 5 Feb 2020 10:05:55 +0800 From: Tiwei Bie To: Jason Wang 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 Subject: Re: [PATCH] vhost: introduce vDPA based backend Message-ID: <20200205020555.GA369236@___> References: <20200131033651.103534-1-tiwei.bie@intel.com> <7aab2892-bb19-a06a-a6d3-9c28bc4c3400@redhat.com> <20200204005306-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 04, 2020 at 02:46:16PM +0800, Jason Wang wrote: > On 2020/2/4 下午2: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 dma > > > 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 > > Thanks > >