PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 0ms

/arch/x86/xen/mmu.h

https://bitbucket.org/thekraven/iscream_thunderc-2.6.35
C++ Header | 63 lines | 46 code | 17 blank | 0 comment | 1 complexity | f01f3fb8564443e4f0c28319c253ed6b MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1#ifndef _XEN_MMU_H
 2
 3#include <linux/linkage.h>
 4#include <asm/page.h>
 5
 6enum pt_level {
 7	PT_PGD,
 8	PT_PUD,
 9	PT_PMD,
10	PT_PTE
11};
12
13
14bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
15bool install_p2mtop_page(unsigned long pfn, unsigned long *p);
16
17void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
18
19
20void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next);
21void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);
22void xen_exit_mmap(struct mm_struct *mm);
23
24pteval_t xen_pte_val(pte_t);
25pmdval_t xen_pmd_val(pmd_t);
26pgdval_t xen_pgd_val(pgd_t);
27
28pte_t xen_make_pte(pteval_t);
29pmd_t xen_make_pmd(pmdval_t);
30pgd_t xen_make_pgd(pgdval_t);
31
32void xen_set_pte(pte_t *ptep, pte_t pteval);
33void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
34		    pte_t *ptep, pte_t pteval);
35
36#ifdef CONFIG_X86_PAE
37void xen_set_pte_atomic(pte_t *ptep, pte_t pte);
38void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
39void xen_pmd_clear(pmd_t *pmdp);
40#endif	/* CONFIG_X86_PAE */
41
42void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval);
43void xen_set_pud(pud_t *ptr, pud_t val);
44void xen_set_pmd_hyper(pmd_t *pmdp, pmd_t pmdval);
45void xen_set_pud_hyper(pud_t *ptr, pud_t val);
46
47#if PAGETABLE_LEVELS == 4
48pudval_t xen_pud_val(pud_t pud);
49pud_t xen_make_pud(pudval_t pudval);
50void xen_set_pgd(pgd_t *pgdp, pgd_t pgd);
51void xen_set_pgd_hyper(pgd_t *pgdp, pgd_t pgd);
52#endif
53
54pgd_t *xen_get_user_pgd(pgd_t *pgd);
55
56pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
57void  xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
58				  pte_t *ptep, pte_t pte);
59
60unsigned long xen_read_cr2_direct(void);
61
62extern void xen_init_mmu_ops(void);
63#endif	/* _XEN_MMU_H */