From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: IOMMU Query Date: Thu, 24 Mar 2011 07:10:19 +0100 Message-ID: <20110324061019.GA18867@8bytes.org> References: <4D8A719C.1020305@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4D8A719C.1020305@codeaurora.org> Sender: kvm-owner@vger.kernel.org To: Stepan Moskovchenko Cc: Abhilash Kesavan , joerg.roedel@amd.com, linux-arm-msm@vger.kernel.org, kvm@vger.kernel.org, iommu@lists.linux-foundation.org, pullip.cho@samsung.com List-Id: linux-arm-msm@vger.kernel.org On Wed, Mar 23, 2011 at 03:18:04PM -0700, Stepan Moskovchenko wrote: > Consistency between multiple IOMMUs can be maintained. Map and unmap > operations happen on a 'domain' structure (which is intended to abstract > a page table), and a domain can be attached to one or more IOMMU > devices, assuming that all your IOMMUs use the same page table format. The IOMMU-API even supports it if your IOMMUs have different page-table formats. The driver can just setup page-tables in every possible format on map/unmap and use the appropriate one for each device. So this is possible if wanted. > The IOMMU layer itself does not handle virtual space management. Its > sole responsibility is to set up the mappings. You would need something > else to do the management for you. There have been some discussions > about it in the past... Which is by the way the point of the IOMMU-API. If you want address space management done the the DMA-API is the better choice to implement for your IOMMU. The DMA-API manages the address space itself. Something was needed that allows the driver to manage the address space itself (for KVM device passthrough). This was not possible with the DMA-API so the IOMMU-API was introduced. Your IOMMU driver can also implement both APIs like the x86 IOMMU drivers do (VT-d and AMD-Vi). Regards, Joerg