From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: IOMMU and domain binding/unbinding logic Date: Thu, 26 Mar 2015 18:09:35 +0100 Message-ID: <20150326170935.GX4441@8bytes.org> References: <20150326165046.GA2965@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150326165046.GA2965-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Jerome Glisse Cc: alexander.deucher-5C7GfCeVMHo@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org Hi Jerome, On Thu, Mar 26, 2015 at 12:50:47PM -0400, Jerome Glisse wrote: > So how comes it still looks like it is working properly ? My best guest > it is because it is by default in passthrough, but i haven't checked that > theory. Your guess is correct, devices that might potentially use IOMMUv2 functionality are identity mapped by default. The reason is that IOMMU hardware implements two dimensional paging, where the addresses in the guest page-tables (the ones translating PASID requests) are translated by the host page-tables. So to be able to use CPU page-tables (mm->pgd) for the IOMMU, the host page-tables need to be identity mapped. The other reason is, as you observed already, that host-only dma mappings need to work in parallel. Joerg