From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 3/5] vDPA: introduce vDPA bus Date: Tue, 21 Jan 2020 09:17:45 -0500 Message-ID: <20200121091636-mutt-send-email-mst@kernel.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200121140456.GA12330@mellanox.com> Sender: netdev-owner@vger.kernel.org To: Jason Gunthorpe Cc: Jason Wang , 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 List-Id: virtualization@lists.linuxfoundation.org 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 requires > > > 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. -- MST