From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 04/11] VT-d: Change {un}map_range functions to implement {un}map interface Date: Fri, 29 Jan 2010 10:05:26 +0100 Message-ID: <20100129090526.GT17809@8bytes.org> References: <1264678682-30655-1-git-send-email-joerg.roedel@amd.com> <1264678682-30655-5-git-send-email-joerg.roedel@amd.com> <1264712382.9059.1109.camel@macbook.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Joerg Roedel , iommu@lists.linux-foundation.org, Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: David Woodhouse Return-path: Content-Disposition: inline In-Reply-To: <1264712382.9059.1109.camel@macbook.infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Jan 29, 2010 at 09:59:42AM +1300, David Woodhouse wrote: > On Thu, 2010-01-28 at 12:37 +0100, Joerg Roedel wrote: > > This patch changes the iommu-api functions for mapping and > > unmapping page ranges to use the new page-size based > > interface. This allows to remove the range based functions > > later. > > > + size = 0x1000UL << gfp_order; > > Um, that's not a page-size based interface. Page size isn't always 4KiB; > this code runs on IA64 too. > > We have enough fun with CPU vs. DMA page size on IA64 already :) Ah right. So this should be size = PAGE_SIZE << gfp_order; Right? The interface is meant to map the same amount of memory which alloc_pages(gfp_order) would return. Same for the return value of the unmap function. Joerg