Go to the documentation of this file. 1 #ifndef _ASM_X86_XEN_PAGE_H
2 #define _ASM_X86_XEN_PAGE_H
4 #include <linux/kernel.h>
5 #include <linux/types.h>
10 #include <asm/uaccess.h>
12 #include <asm/pgtable.h>
28 #define XMADDR(x) ((xmaddr_t) { .maddr = (x) })
29 #define XPADDR(x) ((xpaddr_t) { .paddr = (x) })
32 #define INVALID_P2M_ENTRY (~0UL)
33 #define FOREIGN_FRAME_BIT (1UL<<(BITS_PER_LONG-1))
34 #define IDENTITY_FRAME_BIT (1UL<<(BITS_PER_LONG-2))
35 #define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT)
36 #define IDENTITY_FRAME(m) ((m) | IDENTITY_FRAME_BIT)
39 #define MAX_DOMAIN_PAGES \
40 ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE))
59 static inline unsigned long pfn_to_mfn(
unsigned long pfn)
82 static inline unsigned long mfn_to_pfn(
unsigned long mfn)
159 static inline unsigned long mfn_to_local_pfn(
unsigned long mfn)
168 #define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v))))
169 #define virt_to_pfn(v) (PFN_DOWN(__pa(v)))
170 #define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v)))
171 #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
183 massage_pgprot(pgprot);
195 return (
pte_t) { .pte = x };
198 #define pmd_val_ma(v) ((v).pmd)
199 #ifdef __PAGETABLE_PUD_FOLDED
200 #define pud_val_ma(v) ((v).pgd.pgd)
202 #define pud_val_ma(v) ((v).pud)
204 #define __pmd_ma(x) ((pmd_t) { (x) } )
206 #define pgd_val_ma(x) ((x).pgd)