From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932531AbcBANIm (ORCPT ); Mon, 1 Feb 2016 08:08:42 -0500 Received: from prv-mh.provo.novell.com ([137.65.248.74]:47533 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932174AbcBANIj convert rfc822-to-8bit (ORCPT ); Mon, 1 Feb 2016 08:08:39 -0500 Message-Id: <56AF66E302000078000CCF90@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Mon, 01 Feb 2016 06:08:35 -0700 From: "Jan Beulich" To: "David Vrabel" Cc: "xen-devel" , "Boris Ostrovsky" , "Konrad Rzeszutek Wilk" , Subject: Re: [PATCH] Xen/PCI: correct notifier used for device removal References: <56AF566002000078000CCE71@prv-mh.provo.novell.com> <56AF4911.8030208@citrix.com> <56AF5AAB02000078000CCED7@prv-mh.provo.novell.com> <56AF578D.6000004@citrix.com> In-Reply-To: <56AF578D.6000004@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 01.02.16 at 14:03, wrote: > On 01/02/16 12:16, Jan Beulich wrote: >>>>> On 01.02.16 at 13:01, wrote: >>> On 01/02/16 11:58, Jan Beulich wrote: >>>> Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE in order to allow >>>> avoiding removal of IOMMU mappings before the driver actually got >>>> unbound from the device. Naturally we should be using this too. >>> >>> Because otherwise...? What happens if we don't make this change? >>> >>> Removing IOMMU mappings for a device when the driver is still bound to >>> the device looks wrong to me. Surely the device is still active and may >>> still be performing DMA at this point? >> >> Exactly - you answered your own question (as does the commit >> referred to). > > I misread, sorry. I think I will reword this as: > > "Commit 599bad38cf added BUS_NOTIFY_REMOVED_DEVICE to defer the removal > of IOMMU mappings until the driver has been unbound from the device > (i.e., until it is guaranteed that there are no outstanding DMA > transactions). If you want this, then I think you should add "... or IRQs". Thanks, Jan