]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Xen: Fix retry calls into PRIVCMD_MMAPBATCH*.
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Fri, 23 Aug 2013 17:10:06 +0000 (18:10 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 30 Aug 2013 12:44:53 +0000 (08:44 -0400)
commita5deabe0e62203350369020687c3fc3b7445a0d0
treec336f20e2618949cd250aae388060baaef4182df
parent669b0ae961e87c824233475e987b2d39996d4849
Xen: Fix retry calls into PRIVCMD_MMAPBATCH*.

When a foreign mapper attempts to map guest frames that are paged out,
the mapper receives an ENOENT response and will have to try again
while a helper process pages the target frame back in.

Gating checks on PRIVCMD_MMAPBATCH* ioctl args were preventing retries
of mapping calls.

Permit subsequent calls to update a sub-range of the VMA, iff nothing
is yet mapped in that range.

Since it is now valid to call PRIVCMD_MMAPBATCH* multiple times, only
set vma->vm_private_data if the parameters are valid and (if
necessary) the pages for the auto_translated_physmap case have been
allocated.  This prevents subsequent calls from incorrectly entering
the 'retry' path when there are no pages allocated etc.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/privcmd.c