Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp285156ybv; Tue, 4 Feb 2020 21:38:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxzlBf4iJEuH3tBaEYgrX+VTa1KELbMWihS9CBpJh8DU5jTuoYng9VbeKdQJlxmoAf8cpe4 X-Received: by 2002:aca:5588:: with SMTP id j130mr1726909oib.122.1580881082160; Tue, 04 Feb 2020 21:38:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580881082; cv=none; d=google.com; s=arc-20160816; b=CUh5e58HRky9FG/bP9wHMs6cbhw9AzK9zSMWBOMeaEpU5AHqz5g1l/n+44A12Etq37 Cpn1d3sJP7ZX/TYQeFyknOyDe7ue6Gk/fsZ+/KklAKV/TSDivyFzVf0MYYRib5aguSDk GGYksQmDe+SOD+f1xG7K0UiDT+STLQHssPWGbv1n5jRHH0W6FWlPNCC6vUZRyNQT6mLW Gax7t8bx9ksv0hSbEj1UXl0gDgysdhXs1xa+UPBxB+qrA3eOeWin/ABNvpjbhywVskSr mR+uzHa/NoU7sgYXo6rpXn9GlPVoOP7i/L9+dK6xWHqPAM5WDyM9Ae2eBgNnevcXWm3Y +zsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XxLib1DyGWA3n/jl6h9rliqNTP1O1RA9Yuhg5J8jnQ8=; b=oo5eQRlHzL/31ok6cWPwDu44Pi8tkUYS/Hv26aLXHc+aHJt/QKvCUoQjQGQYsuIa7g x8+Md3wboRGmilHYellye80MntjiOV+3V5k75/vXCh4WbOJVZXHmfnSZs84yQd33DcW3 D8MVQCbYteLmJqkTpoq8KwR4V7XXGnl7CBTKwPpJJsnIUy/md0OcTn6Zsc1aKn+7mRDz mp09GDBePi9r9zE9gOkyHame4sOkHy9lVPgibL8iJCsvi9iGsSQ/My9SXKXBptjD9b+k zKoAQuZgZVcVekhwv0y8d8WL0p8WogLU0UGq4y9MYjRFTvXr6GZ/Ut5lkiytfFjLtny1 fwwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RyoxjiUw; 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 w11si12266243oic.62.2020.02.04.21.37.49; Tue, 04 Feb 2020 21:38:02 -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=RyoxjiUw; 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 S1726359AbgBEFgv (ORCPT + 99 others); Wed, 5 Feb 2020 00:36:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55162 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725385AbgBEFgv (ORCPT ); Wed, 5 Feb 2020 00:36:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580881010; 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=XxLib1DyGWA3n/jl6h9rliqNTP1O1RA9Yuhg5J8jnQ8=; b=RyoxjiUwJvI2I4ITkzXMhsmSEXwJbLsSPQTdUyivPjtYuDdowFtD4xLWCT+8/+ktVfcUs6 qVJYpTtp7Fdg8jAx3DNDhJxmsAqibIGJ/HXKJv3n52Y08GwQL/JShhZ34Mtzj0zf6PnmXc KX7MTW9Sek0XnVFXNfNIELIM3yCJJxs= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-qJT_nZhSN4-BsKgtWprqNQ-1; Wed, 05 Feb 2020 00:36:48 -0500 X-MC-Unique: qJT_nZhSN4-BsKgtWprqNQ-1 Received: by mail-qv1-f72.google.com with SMTP id z39so826715qve.5 for ; Tue, 04 Feb 2020 21:36:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=XxLib1DyGWA3n/jl6h9rliqNTP1O1RA9Yuhg5J8jnQ8=; b=sOPGjUuvZida4bGyiq1Iq4puWXBD/56Z06322TvCDIAXT/d4Ua/KPa38dR7iQ2UMIc HWBUCrWPvNcjitkpMLM+1KY840t0LyZzSzS8yr5Taap8jLGoT+4lJbdE21AgOmXAFRuv jlXQAoogofxerSlRTZLeAtfN7gMpbg954/+X94KH2c0QW27yMuzudvW30B4BAEkXXER7 igLkg0ayEVCktzY/6q42GCPmQ4DqJ5so1Qi0wc6M7XJxdXRTJV1xaucGIHa4T6a4De9S jJpEfJU4j30jvBLV9+pyBe30rV/+9eBgQMER5VhAQ4sxFJ2bCBkXBGiPT0gCp0j0dMKi Ttaw== X-Gm-Message-State: APjAAAW2IrfZwpt/10puRnr1pXjqRKBKt1z/4jQMKFyBGdrdXm0u0bNz WtMKyMWJLBGA8QXtiXPMxfOWhczAlTFZbtIbPTkVzcG2upZw9eQIWAGC8zaWQzqyM+96ijSjzIp phcUc3CirRW7JbdLfxXuV8WLm X-Received: by 2002:ac8:6f09:: with SMTP id g9mr32149790qtv.275.1580881008081; Tue, 04 Feb 2020 21:36:48 -0800 (PST) X-Received: by 2002:ac8:4e43:: with SMTP id e3mr32421061qtw.129.1580880686259; Tue, 04 Feb 2020 21:31:26 -0800 (PST) Received: from redhat.com (bzq-79-176-41-183.red.bezeqint.net. [79.176.41.183]) by smtp.gmail.com with ESMTPSA id y145sm12328322qkb.87.2020.02.04.21.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 21:31:25 -0800 (PST) Date: Wed, 5 Feb 2020 00:31:18 -0500 From: "Michael S. Tsirkin" To: Jason Wang Cc: Tiwei Bie , 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: <20200205003048-mutt-send-email-mst@kernel.org> References: <20200131033651.103534-1-tiwei.bie@intel.com> <7aab2892-bb19-a06a-a6d3-9c28bc4c3400@redhat.com> <20200204005306-mutt-send-email-mst@kernel.org> <20200205020555.GA369236@___> <798e5644-ca28-ee46-c953-688af9bccd3b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <798e5644-ca28-ee46-c953-688af9bccd3b@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 05, 2020 at 11:12:21AM +0800, Jason Wang wrote: > > On 2020/2/5 上午10:05, Tiwei Bie wrote: > > 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 > > > I think so. Michael, do you think this makes sense? > > Thanks to make sure, could you post the suggested argument format for these ioctls? > > > > > > Thanks > > > > > >