Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4496663ybl; Tue, 21 Jan 2020 22:20:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzg+KaptpEmKu9CF4pi/Bg9kTSQ2od+wVeWHw/C37sN5KRxy54VE5bGnaphp8AU60aBcbLJ X-Received: by 2002:a9d:3f61:: with SMTP id m88mr6082354otc.56.1579674023858; Tue, 21 Jan 2020 22:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579674023; cv=none; d=google.com; s=arc-20160816; b=ZLCpj8hS/6JCF0lZ5j/lSDlCI3fUtv8Ym9H5rUbzDJd76b59eEzYnpyL5ef0OfeYeh eACF0Pe2MKDmlihV56ryHYXv+75EuRD5q2c/AXH3A/Lhwyov/qYNfLch/bXrVHgKJ1b0 nqFpEkA9dtVouonAHpNxYE7O2cW1NPjxB3z0iSgU5n3Y7S8sCKa+X4blO5zM3NGyhAtB /YWkfQnUElUIX/7Qv3xWaR4BAvoPfUVq7TQ7LIR2OKtxAWN6aI9BTHsqUOGrXR/1zolv 2rQqeHJ/TRln5ijSUTkuPqpNXqeKZgqEmSWdmRJML/1tqkHpcOv56Whzt5upUlUn6jbv NJ9Q== 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=46Fyq8DajrI/VyojMmIDzfpBih5cCQHJwjUiK8iJUVM=; b=Pajo2iwGvaFDT1Re4spl+D7/tLdJU1UYLe92V/tIMiH6QDNgrIk9I/DeEO4A8UWglE 7299hjJQW4KHKdCX3tPZZ85rCWG7JeenkSrlQiGrCuDy8iV7QiVZwZ0200FAqcQJPAm1 LdGCm++AYFKHtP6h/okPkHd5SdINOf1Rv/vNN//WN+WnOSe4gVAkFZjMR+hJE8IEj+FF 7aRWxnZk88jaPWxTLpyxYES5JEqDyMjA/5j/P0mcw7rZorMEpfB3iFy09pRJb0Eh0oyS 5Tda/YAIIs5dTe4UsvFV1QemsJmhP+iFKGvq+d2uFpIHoXudbagEPnL2AkVpTbeXsrgD kgng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Wn5QGTxL; 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 l17si22623176otk.218.2020.01.21.22.20.01; Tue, 21 Jan 2020 22:20:23 -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=Wn5QGTxL; 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 S1726036AbgAVGS1 (ORCPT + 99 others); Wed, 22 Jan 2020 01:18:27 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41232 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725924AbgAVGS0 (ORCPT ); Wed, 22 Jan 2020 01:18:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579673905; 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=46Fyq8DajrI/VyojMmIDzfpBih5cCQHJwjUiK8iJUVM=; b=Wn5QGTxLd1d4T+nvQ1/tbd8pOdgc1gV7cxWM7/f5R+P8aM/ai/mzhws4hkncNceXwY8mzQ tyDOTyLz8wUCY6NLE13esPXRH87H6Ns8vQyrelWP0QYg5FMNTE7Wd8whb6ox5jkUyM5ert kZkPbLwQi36fA8FrqpOlvMGBOJzSd1Y= 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-405-koa7asbiOJCyfjv1xRzSyw-1; Wed, 22 Jan 2020 01:18:24 -0500 X-MC-Unique: koa7asbiOJCyfjv1xRzSyw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ED1991902EA0; Wed, 22 Jan 2020 06:18:20 +0000 (UTC) Received: from [10.72.12.103] (ovpn-12-103.pek2.redhat.com [10.72.12.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 957EB5D9E2; Wed, 22 Jan 2020 06:18:02 +0000 (UTC) Subject: Re: [PATCH 3/5] vDPA: introduce vDPA bus To: "Michael S. Tsirkin" , Jason Gunthorpe Cc: Shahaf Shuler , Rob Miller , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Netdev , "Bie, Tiwei" , "maxime.coquelin@redhat.com" , "Liang, Cunming" , "Wang, Zhihong" , "Wang, Xiao W" , "haotian.wang@sifive.com" , "Zhu, Lingshan" , "eperezma@redhat.com" , "lulu@redhat.com" , Parav Pandit , "Tian, Kevin" , "stefanha@redhat.com" , "rdunlap@infradead.org" , "hch@infradead.org" , Ariel Adam , "jakub.kicinski@netronome.com" , Jiri Pirko , "hanand@xilinx.com" , "mhabets@solarflare.com" References: <239b042c-2d9e-0eec-a1ef-b03b7e2c5419@redhat.com> <20200120174933.GB3891@mellanox.com> <2a324cec-2863-58f4-c58a-2414ee32c930@redhat.com> <20200121004047-mutt-send-email-mst@kernel.org> <20200121031506-mutt-send-email-mst@kernel.org> <20200121140456.GA12330@mellanox.com> <20200121091636-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <26fa6211-6625-6dc6-f5df-7a124d8c53ae@redhat.com> Date: Wed, 22 Jan 2020 14:18:01 +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: <20200121091636-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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/1/21 =E4=B8=8B=E5=8D=8810:17, Michael S. Tsirkin wrote: > On Tue, Jan 21, 2020 at 02:05:04PM +0000, Jason Gunthorpe wrote: >> On Tue, Jan 21, 2020 at 03:15:43AM -0500, Michael S. Tsirkin wrote: >>>> This sounds more flexible e.g driver may choose to implement static = mapping >>>> one through commit. But a question here, it looks to me this still r= equires >>>> the DMA to be synced with at least commit here. Otherwise device may= get DMA >>>> fault? Or device is expected to be paused DMA during begin? >>>> >>>> Thanks >>> For example, commit might switch one set of tables for another, >>> without need to pause DMA. >> I'm not aware of any hardware that can do something like this >> completely atomically.. > FWIW VTD can do this atomically. > >> Any mapping change API has to be based around add/remove regions >> without any active DMA (ie active DMA is a guest error the guest can >> be crashed if it does this) >> >> Jason > Right, lots of cases are well served by only changing parts of > mapping that aren't in active use. Memory hotplug is such a case. > That's not the same as a completely static mapping. For hotplug it should be fine with current Qemu since it belongs to=20 different memory regions. So each dimm should have its own dedicated map=20 entries in IOMMU. But I'm not sure if the merging logic in current vhost memory listener=20 may cause any trouble, we may need to disable it. Thanks >