Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
p2m.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/hash.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <asm/cache.h>
#include <asm/setup.h>
#include <asm/xen/page.h>
#include <asm/xen/hypercall.h>
#include <asm/xen/hypervisor.h>
#include <xen/grant_table.h>
#include "multicalls.h"
#include "xen-ops.h"

Go to the source code of this file.

Macros

#define P2M_PER_PAGE   (PAGE_SIZE / sizeof(unsigned long))
 
#define P2M_MID_PER_PAGE   (PAGE_SIZE / sizeof(unsigned long *))
 
#define P2M_TOP_PER_PAGE   (PAGE_SIZE / sizeof(unsigned long **))
 
#define MAX_P2M_PFN   (P2M_TOP_PER_PAGE * P2M_MID_PER_PAGE * P2M_PER_PAGE)
 
#define M2P_OVERRIDE_HASH_SHIFT   10
 
#define M2P_OVERRIDE_HASH   (1 << M2P_OVERRIDE_HASH_SHIFT)
 

Functions

 RESERVE_BRK (p2m_mid, PAGE_SIZE *(MAX_DOMAIN_PAGES/(P2M_PER_PAGE *P2M_MID_PER_PAGE)))
 
 RESERVE_BRK (p2m_mid_mfn, PAGE_SIZE *(MAX_DOMAIN_PAGES/(P2M_PER_PAGE *P2M_MID_PER_PAGE)))
 
 RESERVE_BRK (p2m_mid_identity, PAGE_SIZE *2 *3)
 
 RESERVE_BRK (p2m_populated, PAGE_SIZE *3)
 
void __ref xen_build_mfn_list_list (void)
 
void xen_setup_mfn_list_list (void)
 
void __init xen_build_dynamic_phys_to_machine (void)
 
unsigned long __init xen_revector_p2m_tree (void)
 
unsigned long get_phys_to_machine (unsigned long pfn)
 
 EXPORT_SYMBOL_GPL (get_phys_to_machine)
 
bool __init early_can_reuse_p2m_middle (unsigned long set_pfn, unsigned long set_mfn)
 
bool __init early_set_phys_to_machine (unsigned long pfn, unsigned long mfn)
 
unsigned long __init set_phys_range_identity (unsigned long pfn_s, unsigned long pfn_e)
 
bool __set_phys_to_machine (unsigned long pfn, unsigned long mfn)
 
bool set_phys_to_machine (unsigned long pfn, unsigned long mfn)
 
int m2p_add_override (unsigned long mfn, struct page *page, struct gnttab_map_grant_ref *kmap_op)
 
 EXPORT_SYMBOL_GPL (m2p_add_override)
 
int m2p_remove_override (struct page *page, struct gnttab_map_grant_ref *kmap_op)
 
 EXPORT_SYMBOL_GPL (m2p_remove_override)
 
struct pagem2p_find_override (unsigned long mfn)
 
unsigned long m2p_find_override_pfn (unsigned long mfn, unsigned long pfn)
 
 EXPORT_SYMBOL_GPL (m2p_find_override_pfn)
 

Variables

unsigned long xen_max_p2m_pfn __read_mostly
 

Macro Definition Documentation

#define M2P_OVERRIDE_HASH   (1 << M2P_OVERRIDE_HASH_SHIFT)

Definition at line 851 of file p2m.c.

#define M2P_OVERRIDE_HASH_SHIFT   10

Definition at line 850 of file p2m.c.

#define MAX_P2M_PFN   (P2M_TOP_PER_PAGE * P2M_MID_PER_PAGE * P2M_PER_PAGE)

Definition at line 177 of file p2m.c.

#define P2M_MID_PER_PAGE   (PAGE_SIZE / sizeof(unsigned long *))

Definition at line 174 of file p2m.c.

#define P2M_PER_PAGE   (PAGE_SIZE / sizeof(unsigned long))

Definition at line 173 of file p2m.c.

#define P2M_TOP_PER_PAGE   (PAGE_SIZE / sizeof(unsigned long **))

Definition at line 175 of file p2m.c.

Function Documentation

bool __set_phys_to_machine ( unsigned long  pfn,
unsigned long  mfn 
)

Definition at line 797 of file p2m.c.

bool __init early_can_reuse_p2m_middle ( unsigned long  set_pfn,
unsigned long  set_mfn 
)

Definition at line 665 of file p2m.c.

bool __init early_set_phys_to_machine ( unsigned long  pfn,
unsigned long  mfn 
)

Definition at line 742 of file p2m.c.

EXPORT_SYMBOL_GPL ( get_phys_to_machine  )
EXPORT_SYMBOL_GPL ( m2p_add_override  )
EXPORT_SYMBOL_GPL ( m2p_remove_override  )
EXPORT_SYMBOL_GPL ( m2p_find_override_pfn  )
unsigned long get_phys_to_machine ( unsigned long  pfn)

Definition at line 478 of file p2m.c.

int m2p_add_override ( unsigned long  mfn,
struct page page,
struct gnttab_map_grant_ref kmap_op 
)

Definition at line 873 of file p2m.c.

struct page* m2p_find_override ( unsigned long  mfn)
read

Definition at line 1031 of file p2m.c.

unsigned long m2p_find_override_pfn ( unsigned long  mfn,
unsigned long  pfn 
)

Definition at line 1053 of file p2m.c.

int m2p_remove_override ( struct page page,
struct gnttab_map_grant_ref kmap_op 
)

Definition at line 935 of file p2m.c.

RESERVE_BRK ( p2m_mid  ,
PAGE_SIZE MAX_DOMAIN_PAGES/(P2M_PER_PAGE *P2M_MID_PER_PAGE) 
)
RESERVE_BRK ( p2m_mid_mfn  ,
PAGE_SIZE MAX_DOMAIN_PAGES/(P2M_PER_PAGE *P2M_MID_PER_PAGE) 
)
RESERVE_BRK ( p2m_mid_identity  ,
PAGE_SIZE *2 *  3 
)
RESERVE_BRK ( p2m_populated  ,
PAGE_SIZE 3 
)
unsigned long __init set_phys_range_identity ( unsigned long  pfn_s,
unsigned long  pfn_e 
)

Definition at line 760 of file p2m.c.

bool set_phys_to_machine ( unsigned long  pfn,
unsigned long  mfn 
)

Definition at line 837 of file p2m.c.

void __init xen_build_dynamic_phys_to_machine ( void  )

Definition at line 346 of file p2m.c.

void __ref xen_build_mfn_list_list ( void  )

Definition at line 278 of file p2m.c.

unsigned long __init xen_revector_p2m_tree ( void  )

Definition at line 473 of file p2m.c.

void xen_setup_mfn_list_list ( void  )

Definition at line 336 of file p2m.c.

Variable Documentation

unsigned long xen_max_p2m_pfn __read_mostly

Definition at line 171 of file p2m.c.