mmu: bring back fault handler for file vma

I expect file and anonymous to differ strongly again with the addition of
shared buffers. Right now it is just a copy (except for the heap marking)

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
mmu: page out class

To avoid overloading "change_perm"'s meaning, and taking advantage of our nice
template based page walker, this patch creates another walker that will unmap
a range of pages, marking them all as non present.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
uio: super structure around uio

I am using the same name as solaris code expect. The first field is an uio,
and the rest is something that we will use in specialized functions.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
zfs: provide a dmu mapping function

That will allow us to read a dmu arc-backed buffer and acquire a pointer to it,
instead of copying it somewhere else. This function will both do mapping and
unmapping, depending on its last parameter.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
vfs: allow a mapping operation

We won't require all filesystems to implement it, those who don't should return
ENOSYS.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
zfs posix: map and unmap functions

Provide a map and unmap function that maps directly into the ARC cache.  Most
of the boilerplate code is inspired in the read function, but I have decided to
leave it separate to avoid complicating the original functions.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
mmu: inform the address of the mapping to the page mapper

That is important information, and it is not available at the time of creation
of the page map. Update it later.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
mmu: add perm and shared flag to file mapper

Shared flag will be used to determine whether we should try to back this map
directly in the underlying filesystem. perm will use to resolve write mappings

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
mmu: map the underlying file directly from filesystem page cache

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
mmu: don't map huge pages when doing shared mappings

because they will be backed by ZFS buffers, let's simplify by supporting
only small pages.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
tests: test for larger-than-memory mmaps.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>