Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Jeremy Fitzhardinge | 3b827c1 | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 2 | #ifndef _XEN_MMU_H |
| 3 | |
| 4 | #include <linux/linkage.h> |
| 5 | #include <asm/page.h> |
| 6 | |
Mark McLoughlin | f643370 | 2008-04-02 15:36:36 +0100 | [diff] [blame] | 7 | enum pt_level { |
| 8 | PT_PGD, |
Xiong Zhang | 907cd43 | 2017-03-17 21:55:14 +0300 | [diff] [blame] | 9 | PT_P4D, |
Mark McLoughlin | f643370 | 2008-04-02 15:36:36 +0100 | [diff] [blame] | 10 | PT_PUD, |
| 11 | PT_PMD, |
| 12 | PT_PTE |
| 13 | }; |
| 14 | |
Jeremy Fitzhardinge | f87e4ca | 2007-07-17 18:37:06 -0700 | [diff] [blame] | 15 | |
Jeremy Fitzhardinge | e791ca0 | 2009-02-26 15:48:33 -0800 | [diff] [blame] | 16 | bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn); |
Jeremy Fitzhardinge | e791ca0 | 2009-02-26 15:48:33 -0800 | [diff] [blame] | 17 | |
Jeremy Fitzhardinge | 3b827c1 | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 18 | void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); |
| 19 | |
Jeremy Fitzhardinge | e57778a | 2008-06-16 04:30:02 -0700 | [diff] [blame] | 20 | pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep); |
| 21 | void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, |
| 22 | pte_t *ptep, pte_t pte); |
| 23 | |
Jeremy Fitzhardinge | 319f3ba | 2009-01-28 14:35:01 -0800 | [diff] [blame] | 24 | unsigned long xen_read_cr2_direct(void); |
| 25 | |
Thomas Gleixner | 030cb6c | 2009-08-20 14:30:02 +0200 | [diff] [blame] | 26 | extern void xen_init_mmu_ops(void); |
Stefano Stabellini | 5915100 | 2010-06-17 14:22:52 +0100 | [diff] [blame] | 27 | extern void xen_hvm_init_mmu_ops(void); |
Jeremy Fitzhardinge | 3b827c1 | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 28 | #endif /* _XEN_MMU_H */ |