#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <xen/interface/xen.h>
#include <xen/page.h>
#include <xen/grant_table.h>
#include <xen/xen.h>
static struct gnttab_vm_area { … } gnttab_shared_vm_area, gnttab_status_vm_area;
int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes,
unsigned long max_nr_gframes,
void **__shared)
{ … }
int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes,
unsigned long max_nr_gframes,
grant_status_t **__shared)
{ … }
void arch_gnttab_unmap(void *shared, unsigned long nr_gframes)
{ … }
static int gnttab_apply(pte_t *pte, unsigned long addr, void *data)
{ … }
static int arch_gnttab_valloc(struct gnttab_vm_area *area, unsigned nr_frames)
{ … }
static void arch_gnttab_vfree(struct gnttab_vm_area *area)
{ … }
int arch_gnttab_init(unsigned long nr_shared, unsigned long nr_status)
{ … }
#ifdef CONFIG_XEN_PVH
#include <xen/events.h>
#include <xen/xen-ops.h>
static int __init xen_pvh_gnttab_setup(void)
{ … }
core_initcall(xen_pvh_gnttab_setup);
#endif