linux/include/xen
Stefano Stabellini 0930bba674 xen: modify kernel mappings corresponding to granted pages
If we want to use granted pages for AIO, changing the mappings of a user
vma and the corresponding p2m is not enough, we also need to update the
kernel mappings accordingly.
Currently this is only needed for pages that are created for user usages
through /dev/xen/gntdev. As in, pages that have been in use by the
kernel and use the P2M will not need this special mapping.
However there are no guarantees that in the future the kernel won't
start accessing pages through the 1:1 even for internal usage.

In order to avoid the complexity of dealing with highmem, we allocated
the pages lowmem.
We issue a HYPERVISOR_grant_table_op right away in
m2p_add_override and we remove the mappings using another
HYPERVISOR_grant_table_op in m2p_remove_override.
Considering that m2p_add_override and m2p_remove_override are called
once per page we use multicalls and hypercall batching.

Use the kmap_op pointer directly as argument to do the mapping as it is
guaranteed to be present up until the unmapping is done.
Before issuing any unmapping multicalls, we need to make sure that the
mapping has already being done, because we need the kmap->handle to be
set correctly.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[v1: Removed GRANT_FRAME_BIT usage]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-09-29 10:32:58 -04:00
..
interface Merge branch 'stable/vga.support' into stable/drivers 2011-06-21 09:25:41 -04:00
balloon.h xen: add an "highmem" parameter to alloc_xenballooned_pages 2011-09-29 09:56:52 -04:00
events.h xen/pci: Remove 'xen_allocate_pirq_gsi'. 2011-07-11 13:19:33 -04:00
evtchn.h xen: add /dev/xen/evtchn driver 2009-03-30 09:26:49 -07:00
features.h xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
gntalloc.h xen/gntalloc,gntdev: Add unmap notify ioctl 2011-02-14 14:16:17 -05:00
gntdev.h xen/gntalloc,gntdev: Add unmap notify ioctl 2011-02-14 14:16:17 -05:00
grant_table.h xen: modify kernel mappings corresponding to granted pages 2011-09-29 10:32:58 -04:00
hvc-console.h xen: Add __attribute__((format(printf... where appropriate 2011-06-30 12:14:40 -04:00
hvm.h x86/xen: event channels delivery on HVM. 2010-07-22 16:45:59 -07:00
Kbuild xen: add privcmd driver 2010-10-20 16:22:29 -07:00
page.h xen: add extra pages to balloon 2010-11-19 22:15:59 -08:00
platform_pci.h xen: pvhvm: make it clearer that XEN_UNPLUG_* define bits in a bitfield 2010-08-23 12:01:35 +01:00
privcmd.h xen: fix header export to userspace 2010-11-16 10:57:05 -08:00
swiotlb-xen.h swiotlb-xen: SWIOTLB library for Xen PV guest with PCI passthrough. 2010-07-27 11:51:00 -04:00
tmem.h xen: tmem: self-ballooning and frontswap-selfshrinking 2011-07-08 12:26:21 -06:00
xen-ops.h xen: suspend: add "arch" to pre/post suspend hooks 2011-02-25 16:43:12 +00:00
xen.h xen: move Xen-testing predicates to common header 2009-11-04 08:47:24 -08:00
xenbus.h xen: Add __attribute__((format(printf... where appropriate 2011-06-30 12:14:40 -04:00
xencomm.h xen: import arch generic part of xencomm 2008-04-24 23:57:32 +02:00