From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Philippe Brucker Subject: Re: [PATCH v3 03/16] iommu: introduce iommu invalidate API function Date: Wed, 10 Jan 2018 12:00:31 +0000 Message-ID: <7f8f90e6-5904-a916-8607-ad64dffb867a@arm.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20171228112518.76f9194b@jacob-builder> Content-Language: en-US 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: Jacob Pan Cc: Lan Tianyu , "Liu, Yi L" , "Liu-i9wRM+HIrmnmtl4Z8vJ8Kg761KYD1DLY@public.gmane.org" , Greg Kroah-Hartman , Rafael Wysocki , LKML , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , Jean Delvare , David Woodhouse List-Id: iommu@lists.linux-foundation.org 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