From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964918AbbJ0Pkt (ORCPT ); Tue, 27 Oct 2015 11:40:49 -0400 Received: from foss.arm.com ([217.140.101.70]:57137 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964816AbbJ0Pks (ORCPT ); Tue, 27 Oct 2015 11:40:48 -0400 Date: Tue, 27 Oct 2015 15:40:44 +0000 From: Will Deacon To: Alex Williamson Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "eric.auger" Subject: Re: [RFC PATCH] vfio/type1: Do not support IOMMUs that allow bypass Message-ID: <20151027154043.GF1689@arm.com> References: <20151015205046.28129.50479.stgit@gimli.home> <5621039F.50609@linaro.org> <1445010682.4059.508.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445010682.4059.508.camel@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 16, 2015 at 09:51:22AM -0600, Alex Williamson wrote: > On Fri, 2015-10-16 at 16:03 +0200, Eric Auger wrote: > > Hi Alex, > > On 10/15/2015 10:52 PM, Alex Williamson wrote: > > > We can only provide isolation if DMA is forced through the IOMMU > > > aperture. Don't allow type1 to be used if this is not the case. > > > > > > Signed-off-by: Alex Williamson > > > --- > > > > > > Eric, I see a number of IOMMU drivers enable this, do the ones you > > > care about for ARM set geometry.force_aperture? Thanks, > > I am currently using arm-smmu.c. I don't see force_aperture being set. > > Hi Will, Hi Alex, > Would it be possible to add iommu_domain_geometry support to arm-smmu.c? > In addition to this test to verify that DMA cannot bypass the IOMMU, I'd > eventually like to pass the aperture information out through the VFIO > API. Thanks, The slight snag here is that we don't know which SMMU in the system the domain is attached to at the point when the geometry is queried, so I can't give you an upper bound on the aperture. For example, if there is an SMMU with a 32-bit input address and another with a 48-bit input address. We could play the same horrible games that we do with the pgsize bitmap, and truncate some global aperture everytime we probe an SMMU device, but I'd really like to have fewer hacks like that if possible. The root of the problem is still that domains are allocated for a bus, rather than an IOMMU instance. Will