From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6fzX-00084P-Rf for qemu-devel@nongnu.org; Tue, 15 Nov 2016 10:49:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6fzT-0002Ka-TP for qemu-devel@nongnu.org; Tue, 15 Nov 2016 10:49:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43458) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6fzT-0002KP-O9 for qemu-devel@nongnu.org; Tue, 15 Nov 2016 10:49:43 -0500 Date: Tue, 15 Nov 2016 10:49:38 -0500 From: Peter Xu Message-ID: <20161115154710.GA19487@pxdev.xzpeter.org> References: <1479171568-19175-1-git-send-email-peterx@redhat.com> <3d39c9f6-6adc-bfef-b3c6-d30f4b93b06c@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3d39c9f6-6adc-bfef-b3c6-d30f4b93b06c@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH] vfio: avoid adding same iommu mr for notify List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, alex.williamson@redhat.com, bd.aviv@gmail.com, david@gibson.dropbear.id.au On Tue, Nov 15, 2016 at 04:11:57PM +1100, Alexey Kardashevskiy wrote: > On 15/11/16 11:59, Peter Xu wrote: > > When one IOMMU memory region is splitted into multiple memory sections, > > > Out of curiosity - when does this happen? My understanding: each PCI device will have one IOMMU region when with vt-d vIOMMU enabled. After interrupt remapping is enabled, another 0xfeexxxxx region is overlapped to filter out the interrupts (see vtd_find_add_as()). So the big Intel IOMMU region is splitted into several. Of course looks like we can remove the interrupt region and only use one IOMMU region for both DMAR and IR, but I don't think that's a good one, since maybe one day we'll have another scenario that will split a single memory region. In that case, I'd prefer we take care of it during registration. Thanks, -- peterx