Re: [PATCH kernel] powerpc/mm_iommu: Allow pinning large regions

2019-04-07 Thread David Gibson
On Tue, Apr 02, 2019 at 03:31:01PM +1100, Alexey Kardashevskiy wrote: > When called with vmas_arg==NULL, get_user_pages_longterm() allocates > an array of nr_pages*8 which can easily get greater that the max order, > for example, registering memory for a 256GB guest does this and fails > in __alloc

[PATCH kernel] powerpc/mm_iommu: Allow pinning large regions

2019-04-01 Thread Alexey Kardashevskiy
When called with vmas_arg==NULL, get_user_pages_longterm() allocates an array of nr_pages*8 which can easily get greater that the max order, for example, registering memory for a 256GB guest does this and fails in __alloc_pages_nodemask(). This adds a loop over chunks of entries to fit the max ord