From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute Date: Mon, 30 Jan 2012 15:30:10 +0100 Message-ID: <20120130143010.GS19255@amd.com> References: <1326983405-319-1-git-send-email-joerg.roedel@amd.com> <1326983405-319-3-git-send-email-joerg.roedel@amd.com> <20120120160344.GG2205@amd.com> <4F219A9C.8000400@freescale.com> <20120126183116.GI19255@amd.com> <4F219E82.106@freescale.com> <20120126185101.GJ19255@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: 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: Sethi Varun-B16395 Cc: Ohad Ben-Cohen , Wood Scott-B07421 , Tony Lindgren , Hiroshi DOYU , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , Laurent Pinchart , David Brown , David Woodhouse List-Id: iommu@lists.linux-foundation.org On Mon, Jan 30, 2012 at 06:27:30AM +0000, Sethi Varun-B16395 wrote: > Can you please explain how would IOMMU remapping be used, based on the > force_aperture flag. If force_aperture is flase the dma-api code needs to check if remapping is required at all. It performs the following checks: * Does the physical address of the buffer not overlap with the aperture? * Fits the buffer into the device's dma address mask? If both questions are answered with yes no remapping is required and dma-api just returns the physical address. Otherwise it calls into the dma-api to create a mapping. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753376Ab2A3ObM (ORCPT ); Mon, 30 Jan 2012 09:31:12 -0500 Received: from tx2ehsobe003.messaging.microsoft.com ([65.55.88.13]:17106 "EHLO TX2EHSOBE007.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753167Ab2A3ObK (ORCPT ); Mon, 30 Jan 2012 09:31:10 -0500 X-SpamScore: -13 X-BigFish: VPS-13(zz98dKzz1202hzz15d4Rz2dhc1bhc31hc1ah668h839h944h) X-Forefront-Antispam-Report: CIP:163.181.249.109;KIP:(null);UIP:(null);IPV:NLI;H:ausb3twp02.amd.com;RD:none;EFVD:NLI X-WSS-ID: 0LYM8BS-02-06O-02 X-M-MSG: Date: Mon, 30 Jan 2012 15:30:10 +0100 From: Joerg Roedel To: Sethi Varun-B16395 CC: Wood Scott-B07421 , "iommu@lists.linux-foundation.org" , Ohad Ben-Cohen , Tony Lindgren , Hiroshi DOYU , "linux-kernel@vger.kernel.org" , Laurent Pinchart , David Brown , David Woodhouse Subject: Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute Message-ID: <20120130143010.GS19255@amd.com> References: <1326983405-319-1-git-send-email-joerg.roedel@amd.com> <1326983405-319-3-git-send-email-joerg.roedel@amd.com> <20120120160344.GG2205@amd.com> <4F219A9C.8000400@freescale.com> <20120126183116.GI19255@amd.com> <4F219E82.106@freescale.com> <20120126185101.GJ19255@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: amd.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 30, 2012 at 06:27:30AM +0000, Sethi Varun-B16395 wrote: > Can you please explain how would IOMMU remapping be used, based on the > force_aperture flag. If force_aperture is flase the dma-api code needs to check if remapping is required at all. It performs the following checks: * Does the physical address of the buffer not overlap with the aperture? * Fits the buffer into the device's dma address mask? If both questions are answered with yes no remapping is required and dma-api just returns the physical address. Otherwise it calls into the dma-api to create a mapping. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632