blob: a7e47cf7ec6cdc2eb709188d47829a415bbbffec [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jeremy Fitzhardinge3b827c12007-07-17 18:37:04 -07002#ifndef _XEN_MMU_H
3
4#include <linux/linkage.h>
5#include <asm/page.h>
6
Mark McLoughlinf6433702008-04-02 15:36:36 +01007enum pt_level {
8 PT_PGD,
Xiong Zhang907cd432017-03-17 21:55:14 +03009 PT_P4D,
Mark McLoughlinf6433702008-04-02 15:36:36 +010010 PT_PUD,
11 PT_PMD,
12 PT_PTE
13};
14
Jeremy Fitzhardingef87e4ca2007-07-17 18:37:06 -070015
Jeremy Fitzhardingee791ca02009-02-26 15:48:33 -080016bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
Jeremy Fitzhardingee791ca02009-02-26 15:48:33 -080017
Jeremy Fitzhardinge3b827c12007-07-17 18:37:04 -070018void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
19
Jeremy Fitzhardingee57778a2008-06-16 04:30:02 -070020pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
21void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
22 pte_t *ptep, pte_t pte);
23
Jeremy Fitzhardinge319f3ba2009-01-28 14:35:01 -080024unsigned long xen_read_cr2_direct(void);
25
Thomas Gleixner030cb6c2009-08-20 14:30:02 +020026extern void xen_init_mmu_ops(void);
Stefano Stabellini59151002010-06-17 14:22:52 +010027extern void xen_hvm_init_mmu_ops(void);
Jeremy Fitzhardinge3b827c12007-07-17 18:37:04 -070028#endif /* _XEN_MMU_H */