kernel-ark/drivers/xen
Daniel De Graaf d79647aea2 xen/gntdev,gntalloc: Remove unneeded VM flags
The only time when granted pages need to be treated specially is when
using Xen's PTE modification for grant mappings owned by another domain
(that is, only gntdev on PV guests).  Otherwise, the area does not
require VM_DONTCOPY and VM_PFNMAP, since it can be accessed just like
any other page of RAM.

Since the vm_operations_struct close operations decrement reference
counts, a corresponding open function that increments them is required
now that it is possible to have multiple references to a single area.

We are careful in the gntdev to check if we can remove those flags. The
reason that we need to be careful in gntdev on PV guests is because we are
not changing the PFN/MFN mapping on PV; instead, we change the application's
page tables to point to the other domain's memory. This means that the vma
cannot be copied without using another grant mapping hypercall; it also
requires special handling on unmap, which is the reason for gntdev's
dependency on the MMU notifier.

For gntalloc, this is not a concern - the pages are owned by the domain
using the gntalloc device, and can be mapped and unmapped in the same manner
as any other page of memory.

Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v2: Added in git commit "We are.." from email correspondence]
2011-03-09 22:15:28 -05:00
..
xenbus xen/xenbus: fixup checkpatch issues in xenbus_probe* 2011-01-05 16:31:08 -05:00
xenfs Merge branch 'xen/xenbus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen 2011-01-20 16:37:28 -08:00
balloon.c xen: prevent crashes with non-HIGHMEM 32-bit kernels with largeish memory 2010-12-02 15:30:06 -08:00
biomerge.c xen: define BIOVEC_PHYS_MERGEABLE() 2010-10-18 10:40:28 -04:00
cpu_hotplug.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-11 12:18:16 -08:00
events.c Merge branch 'stable/bug-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-01-10 08:48:46 -08:00
evtchn.c Merge branch 'xen/dev-evtchn' into upstream/evtchn 2010-11-18 22:43:38 -08:00
features.c
gntalloc.c xen/gntdev,gntalloc: Remove unneeded VM flags 2011-03-09 22:15:28 -05:00
gntdev.c xen/gntdev,gntalloc: Remove unneeded VM flags 2011-03-09 22:15:28 -05:00
grant-table.c xen/p2m/m2p/gnttab: do not add failed grant maps to m2p override 2011-03-09 19:59:10 -05:00
Kconfig xen: change xen/[gntdev/gntalloc] to default m 2011-02-16 09:30:02 -05:00
Makefile xen-gntalloc: Userspace grant allocation driver 2011-02-14 14:16:17 -05:00
manage.c xen: resume the pv console for hvm guests too 2010-12-02 14:40:48 +00:00
pci.c xen: register xen pci notifier 2010-10-27 18:56:07 +01:00
platform-pci.c xen-platform: use PCI interfaces to request IO and MEM resources. 2011-01-12 10:28:01 -05:00
swiotlb-xen.c swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough. 2010-07-27 11:51:00 -04:00
sys-hypervisor.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xencomm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00