Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
page_tables.c File Reference
#include <linux/mm.h>
#include <linux/gfp.h>
#include <linux/types.h>
#include <linux/spinlock.h>
#include <linux/random.h>
#include <linux/percpu.h>
#include <asm/tlbflush.h>
#include <asm/uaccess.h>
#include "lg.h"

Go to the source code of this file.

Macros

#define SWITCHER_PGD_INDEX   (PTRS_PER_PGD - 1)
 
#define RESERVE_MEM   4U
 
#define CHECK_GPGD_MASK   _PAGE_TABLE
 
#define switcher_pte_page(cpu)   per_cpu(switcher_pte_pages, cpu)
 

Functions

bool demand_page (struct lg_cpu *cpu, unsigned long vaddr, int errcode)
 
void pin_page (struct lg_cpu *cpu, unsigned long vaddr)
 
void guest_pagetable_flush_user (struct lg_cpu *cpu)
 
unsigned long guest_pa (struct lg_cpu *cpu, unsigned long vaddr)
 
void guest_pagetable_clear_all (struct lg_cpu *cpu)
 
void guest_new_pagetable (struct lg_cpu *cpu, unsigned long pgtable)
 
void guest_set_pte (struct lg_cpu *cpu, unsigned long gpgdir, unsigned long vaddr, pte_t gpte)
 
void guest_set_pgd (struct lguest *lg, unsigned long gpgdir, u32 idx)
 
int init_guest_pagetable (struct lguest *lg)
 
void page_table_guest_data_init (struct lg_cpu *cpu)
 
void free_guest_pagetable (struct lguest *lg)
 
void map_switcher_in_guest (struct lg_cpu *cpu, struct lguest_pages *pages)
 
__init int init_pagetables (struct page **switcher_page, unsigned int pages)
 
void free_pagetables (void)
 

Macro Definition Documentation

#define CHECK_GPGD_MASK   _PAGE_TABLE

Definition at line 70 of file page_tables.c.

#define RESERVE_MEM   4U

Definition at line 69 of file page_tables.c.

#define SWITCHER_PGD_INDEX   (PTRS_PER_PGD - 1)

Definition at line 58 of file page_tables.c.

#define switcher_pte_page (   cpu)    per_cpu(switcher_pte_pages, cpu)

Definition at line 79 of file page_tables.c.

Function Documentation

bool demand_page ( struct lg_cpu cpu,
unsigned long  vaddr,
int  errcode 
)

Definition at line 312 of file page_tables.c.

void free_guest_pagetable ( struct lguest lg)

Definition at line 1009 of file page_tables.c.

void free_pagetables ( void  )

Definition at line 1149 of file page_tables.c.

void guest_new_pagetable ( struct lg_cpu cpu,
unsigned long  pgtable 
)

Definition at line 785 of file page_tables.c.

unsigned long guest_pa ( struct lg_cpu cpu,
unsigned long  vaddr 
)

Definition at line 623 of file page_tables.c.

void guest_pagetable_clear_all ( struct lg_cpu cpu)

Definition at line 771 of file page_tables.c.

void guest_pagetable_flush_user ( struct lg_cpu cpu)

Definition at line 615 of file page_tables.c.

void guest_set_pgd ( struct lguest lg,
unsigned long  gpgdir,
u32  idx 
)

Definition at line 932 of file page_tables.c.

void guest_set_pte ( struct lg_cpu cpu,
unsigned long  gpgdir,
unsigned long  vaddr,
pte_t  gpte 
)

Definition at line 897 of file page_tables.c.

int init_guest_pagetable ( struct lguest lg)

Definition at line 962 of file page_tables.c.

__init int init_pagetables ( struct page **  switcher_page,
unsigned int  pages 
)

Definition at line 1132 of file page_tables.c.

void map_switcher_in_guest ( struct lg_cpu cpu,
struct lguest_pages pages 
)

Definition at line 1028 of file page_tables.c.

void page_table_guest_data_init ( struct lg_cpu cpu)

Definition at line 978 of file page_tables.c.

void pin_page ( struct lg_cpu cpu,
unsigned long  vaddr 
)

Definition at line 527 of file page_tables.c.