From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965215AbeAJL6O (ORCPT + 1 other); Wed, 10 Jan 2018 06:58:14 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40746 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934213AbeAJL6N (ORCPT ); Wed, 10 Jan 2018 06:58:13 -0500 Subject: Re: [PATCH v3 03/16] iommu: introduce iommu invalidate API function To: Jacob Pan Cc: "iommu@lists.linux-foundation.org" , LKML , Joerg Roedel , David Woodhouse , Greg Kroah-Hartman , Rafael Wysocki , Alex Williamson , Lan Tianyu , "Liu, Yi L" , "Liu@mail.linuxfoundation.org" , Jean Delvare References: <1510944914-54430-1-git-send-email-jacob.jun.pan@linux.intel.com> <1510944914-54430-4-git-send-email-jacob.jun.pan@linux.intel.com> <9fe883f7-8650-20f2-4db1-1539b3e927ae@arm.com> <20171228112518.76f9194b@jacob-builder> From: Jean-Philippe Brucker Message-ID: <7f8f90e6-5904-a916-8607-ad64dffb867a@arm.com> Date: Wed, 10 Jan 2018 12:00:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20171228112518.76f9194b@jacob-builder> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 28/12/17 19:25, Jacob Pan wrote: [...] >>> + * @size: 2^size of 4K pages, 0 for 4k, 9 for 2MB, >>> etc. >> >> Having only power of two invalidation seems too restrictive for a >> software interface. You might have the same problem as above, where >> the guest or userspace needs to send lots of invalidation requests, >> They could be multiplexed by passing an arbitrary range instead. How >> about making @size a __u64? >> > Sure if you have such need for non power of two. So it will be __u64 of > 4k pages? 4k granule would work for us right now, but other architectures may plan to support arbitrary sizes. The map/unmap API does support arbitrary sizes, so it might be better to have a byte granularity in @size. Thanks, Jean