linux_dsm_epyc7002/drivers/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
..
xen-pciback xen/pciback: remove duplicated #include 2011-08-03 14:34:52 -04:00
xenbus xen: Add module alias to autoload backend drivers 2011-06-30 12:15:33 -04: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: add an "highmem" parameter to alloc_xenballooned_pages 2011-09-29 09:56:52 -04: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 xen/pci: Remove 'xen_allocate_pirq_gsi'. 2011-07-11 13:19:33 -04:00
evtchn.c treewide: remove extra semicolons 2011-04-10 17:01:05 +02:00
features.c xen: clean up asm/xen/hypervisor.h 2008-12-16 21:50:31 +01:00
gntalloc.c xen/gntdev,gntalloc: Remove unneeded VM flags 2011-03-09 22:15:28 -05:00
gntdev.c xen: modify kernel mappings corresponding to granted pages 2011-09-29 10:32:58 -04:00
grant-table.c xen: modify kernel mappings corresponding to granted pages 2011-09-29 10:32:58 -04:00
Kconfig xen/self-balloon: Add dependency on tmem. 2011-08-03 14:34:57 -04:00
Makefile Merge branch 'stable/xen-pciback-0.6.3' into stable/drivers 2011-07-20 15:33:51 -04:00
manage.c PM: Remove sysdev suspend, resume and shutdown operations 2011-05-11 21:37:15 +02:00
pci.c xen: register xen pci notifier 2010-10-27 18:56:07 +01:00
platform-pci.c xen: no need to delay xen_setup_shutdown_event for hvm guests anymore 2011-02-25 16:43:03 +00:00
swiotlb-xen.c Merge branch 'stable/xen-swiotlb.bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6 2011-06-09 12:52:44 -07:00
sys-hypervisor.c drivers/xen/sys-hypervisor: Cleanup code/data sections definitions 2011-05-19 11:30:41 -04:00
tmem.c xen: prepare tmem shim to handle frontswap 2011-06-17 15:06:20 -06:00
xen-balloon.c xen: tmem: self-ballooning and frontswap-selfshrinking 2011-07-08 12:26:21 -06:00
xen-selfballoon.c xen/balloon: Fix compile errors - missing header files. 2011-08-03 14:34:55 -04: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