Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
page.h File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/pfn.h>
#include <linux/mm.h>
#include <asm/uaccess.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <xen/interface/xen.h>
#include <xen/grant_table.h>
#include <xen/features.h>

Go to the source code of this file.

Data Structures

struct  xmaddr
 
struct  xpaddr
 

Macros

#define XMADDR(x)   ((xmaddr_t) { .maddr = (x) })
 
#define XPADDR(x)   ((xpaddr_t) { .paddr = (x) })
 
#define INVALID_P2M_ENTRY   (~0UL)
 
#define FOREIGN_FRAME_BIT   (1UL<<(BITS_PER_LONG-1))
 
#define IDENTITY_FRAME_BIT   (1UL<<(BITS_PER_LONG-2))
 
#define FOREIGN_FRAME(m)   ((m) | FOREIGN_FRAME_BIT)
 
#define IDENTITY_FRAME(m)   ((m) | IDENTITY_FRAME_BIT)
 
#define MAX_DOMAIN_PAGES   ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE))
 
#define virt_to_machine(v)   (phys_to_machine(XPADDR(__pa(v))))
 
#define virt_to_pfn(v)   (PFN_DOWN(__pa(v)))
 
#define virt_to_mfn(v)   (pfn_to_mfn(virt_to_pfn(v)))
 
#define mfn_to_virt(m)   (__va(mfn_to_pfn(m) << PAGE_SHIFT))
 
#define pmd_val_ma(v)   ((v).pmd)
 
#define pud_val_ma(v)   ((v).pud)
 
#define __pmd_ma(x)   ((pmd_t) { (x) } )
 
#define pgd_val_ma(x)   ((x).pgd)
 

Typedefs

typedef struct xmaddr xmaddr_t
 
typedef struct xpaddr xpaddr_t
 

Functions

unsigned long get_phys_to_machine (unsigned long pfn)
 
bool set_phys_to_machine (unsigned long pfn, unsigned long mfn)
 
bool __init early_set_phys_to_machine (unsigned long pfn, unsigned long mfn)
 
bool __set_phys_to_machine (unsigned long pfn, unsigned long mfn)
 
unsigned long set_phys_range_identity (unsigned long pfn_s, unsigned long pfn_e)
 
int m2p_add_override (unsigned long mfn, struct page *page, struct gnttab_map_grant_ref *kmap_op)
 
int m2p_remove_override (struct page *page, struct gnttab_map_grant_ref *kmap_op)
 
struct pagem2p_find_override (unsigned long mfn)
 
unsigned long m2p_find_override_pfn (unsigned long mfn, unsigned long pfn)
 
void xen_set_domain_pte (pte_t *ptep, pte_t pteval, unsigned domid)
 
xmaddr_t arbitrary_virt_to_machine (void *address)
 
unsigned long arbitrary_virt_to_mfn (void *vaddr)
 
void make_lowmem_page_readonly (void *vaddr)
 
void make_lowmem_page_readwrite (void *vaddr)
 

Variables

unsigned longmachine_to_phys_mapping
 
unsigned long machine_to_phys_nr
 

Macro Definition Documentation

#define __pmd_ma (   x)    ((pmd_t) { (x) } )

Definition at line 204 of file page.h.

#define FOREIGN_FRAME (   m)    ((m) | FOREIGN_FRAME_BIT)

Definition at line 35 of file page.h.

#define FOREIGN_FRAME_BIT   (1UL<<(BITS_PER_LONG-1))

Definition at line 33 of file page.h.

#define IDENTITY_FRAME (   m)    ((m) | IDENTITY_FRAME_BIT)

Definition at line 36 of file page.h.

#define IDENTITY_FRAME_BIT   (1UL<<(BITS_PER_LONG-2))

Definition at line 34 of file page.h.

#define INVALID_P2M_ENTRY   (~0UL)

Definition at line 32 of file page.h.

#define MAX_DOMAIN_PAGES   ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE))

Definition at line 39 of file page.h.

#define mfn_to_virt (   m)    (__va(mfn_to_pfn(m) << PAGE_SHIFT))

Definition at line 171 of file page.h.

#define pgd_val_ma (   x)    ((x).pgd)

Definition at line 206 of file page.h.

#define pmd_val_ma (   v)    ((v).pmd)

Definition at line 198 of file page.h.

#define pud_val_ma (   v)    ((v).pud)

Definition at line 202 of file page.h.

#define virt_to_machine (   v)    (phys_to_machine(XPADDR(__pa(v))))

Definition at line 168 of file page.h.

#define virt_to_mfn (   v)    (pfn_to_mfn(virt_to_pfn(v)))

Definition at line 170 of file page.h.

#define virt_to_pfn (   v)    (PFN_DOWN(__pa(v)))

Definition at line 169 of file page.h.

#define XMADDR (   x)    ((xmaddr_t) { .maddr = (x) })

Definition at line 28 of file page.h.

#define XPADDR (   x)    ((xpaddr_t) { .paddr = (x) })

Definition at line 29 of file page.h.

Typedef Documentation

Function Documentation

bool __set_phys_to_machine ( unsigned long  pfn,
unsigned long  mfn 
)

Definition at line 797 of file p2m.c.

xmaddr_t arbitrary_virt_to_machine ( void address)

Definition at line 133 of file mmu.c.

unsigned long arbitrary_virt_to_mfn ( void vaddr)

Definition at line 126 of file mmu.c.

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

Definition at line 742 of file p2m.c.

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.

void make_lowmem_page_readonly ( void vaddr)

Definition at line 156 of file mmu.c.

void make_lowmem_page_readwrite ( void vaddr)

Definition at line 172 of file mmu.c.

unsigned long 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 xen_set_domain_pte ( pte_t ptep,
pte_t  pteval,
unsigned  domid 
)

Definition at line 196 of file mmu.c.

Variable Documentation

unsigned long* machine_to_phys_mapping

Definition at line 92 of file enlighten.c.

unsigned long machine_to_phys_nr

Definition at line 94 of file enlighten.c.